NetBurner 3.5.0
PDF Version
 
Initialization - System Initialization Functions

Functions

void init ()
 System initialization. Normally called at the beginning of all applications.
 
void StartHttp (uint16_t port=80)
 Start the HTTP web server.
 
void StartHttps (uint16_t ssl_port=443, uint16_t http_port=80)
 Start the HTTPS secure web server.
 
bool WaitForActiveNetwork (uint32_t ticks_to_wait=120 *TICKS_PER_SECOND, int interface=-1)
 Wait for an active network connection on at least one interface.
 
void EnableSystemDiagnostics ()
 Turn on the diagnostic reports from the config page.
 
void EnableSecureConfigServer (bool bSec_Only)
 Enable the minimal http config server to operate over TLS.
 

Detailed Description

#include< init.h >

Function Documentation

◆ EnableSecureConfigServer()

void EnableSecureConfigServer ( bool bSec_Only)

#include <init.h>

Enable the minimal http config server to operate over TLS.

Due to the nature of the server operating on a non-standard HTTP port, a client (such as a webbrowser) cannot infer whether to utilize TLS unless explicitly told to do so. Therefore, the secure configuration server has two modes it can operate in: a less secure, more compliant manner that allows both plaintext and TLS secured transactions and a HSTS (Http Strict Transport Security) mode that will only respond to plaintext requests with a redirect indicating the TLS requirement.

Parameters
bSec_OnlyWhether the SecureConfigServer should disallow non-secure requests

◆ EnableSystemDiagnostics()

void EnableSystemDiagnostics ( )

#include <init.h>

Turn on the diagnostic reports from the config page.

This should be used under development. It production it has no performance impact, but could leak possibly sensitive information.

◆ init()

void init ( )

#include <init.h>

System initialization. Normally called at the beginning of all applications.

Initialize the system including the following:

  • Enable interrupt driven stdio
  • Read the configuration record and set parameters accordingly. If the configuration speficies DHCP, start the DHCP Client. All interfaces will be checked.
  • Initialize the network stack
  • Start the configuration server for both web and serial
  • Assign the UserMain() task priority to MAIN_PRIO
  • Enable the Task Monitor diagnostic tool
  • Initialize the GDB stub if in debug mode

◆ StartHttp()

void StartHttp ( uint16_t port = 80)

#include <init.h>

Start the HTTP web server.

If no parameters are specified it will listen on port 80, and enable the configuration mirror feature so an application can create its own custom configuration web page.

Parameters
portListen port, defaults to port 80
See also
StartHttps(), StopHttp()

◆ StartHttps()

void StartHttps ( uint16_t ssl_port = 443,
uint16_t http_port = 80 )

#include <init.h>

Start the HTTPS secure web server.

If no parameters are specified the web server will listen on ports 443 and 80, and enable the configuration mirror feature so an application can create its own custom configuration web page. If no user key is installed the default system key will be used.

Parameters
ssl_portSecure listen port, defaults to port 443
http_portNon-secure listen port, defaults to port 80
See also
StartHttp(), StopHttp()

◆ WaitForActiveNetwork()

bool WaitForActiveNetwork ( uint32_t ticks_to_wait = 120 *TICKS_PER_SECOND,
int interface = -1 )

#include <init.h>

Wait for an active network connection on at least one interface.

If DHCP is enabled it will wait for a lease. If static IP parameters are configured it will wait for link.

Parameters
ticks_to_waitNumber of system time ticks to wait. Default is 120 seconds.
interfaceInterface number to check. Default is -1, which checks all interfaces.