Network Component
Version 6.6
MDK-Professional Middleware for IP Networking
|
Core system functions not to be called by user. More...
Structures | |
struct | ARP_CFG |
ARP Configuration info. More... | |
struct | ARP_INFO |
ARP Cache Entry info. More... | |
struct | BSD_INFO |
BSD Socket info. More... | |
struct | BSD_CFG |
BSD Socket Configuration info. More... | |
struct | DHCP_CFG |
DHCP Client Configuration info. More... | |
struct | DNS_CACHE |
DNS Cache Entry info. More... | |
struct | DNS_CFG |
DNS Client Configuration info. More... | |
struct | FTP_CFG |
FTP Server Configuration info. More... | |
struct | FTP_INFO |
FTP Session info. More... | |
struct | FTPC_CFG |
FTP Client Configuration info. More... | |
struct | IGMP_INFO |
IGMP Group info. More... | |
struct | IGMP_CFG |
IGMP Configuration info. More... | |
struct | HTTP_CFG |
HTTP Server Configuration info. More... | |
struct | HTTP_INFO |
HTTP Session info. More... | |
struct | HTTP_ERROR |
HTTP Error page info. More... | |
struct | LOCALM |
Local Machine info. More... | |
struct | NET_FRAME |
System frame buffer structure. More... | |
struct | PPP_CFG |
PPP Interface Configuration info. More... | |
struct | TCP_CFG |
TCP Socket Configuration info. More... | |
struct | TCP_INFO |
TCP Socket info. More... | |
struct | TFTP_CFG |
TFTP Server Configuration info. More... | |
struct | TFTP_INFO |
TFTP Server Session info. More... | |
struct | TFTPC_CFG |
TFTP Client Configuration info. More... | |
struct | TNET_INFO |
Telnet Session info. More... | |
struct | SNMP_CFG |
SNMP Agent Configuration info. More... | |
struct | SNTP_CFG |
SNTP Client Configuration info. More... | |
struct | TNET_CFG |
Telnet Server Configuration info. More... | |
struct | UDP_CFG |
UDP Socket Configuration info. More... | |
struct | UDP_INFO |
UDP Socket info. More... | |
struct | SYS_CFG |
SYS Configuration info. More... | |
struct | DRIVER_MODEM |
Access structure of the Modem Driver. More... | |
Enumerations | |
enum | MODEM_STATUS { MODEM_OK = 0, MODEM_ERROR = 1 } |
enum | MODEM_EVENT { MODEM_EVENT_OK, MODEM_EVENT_TIMEOUT, MODEM_EVENT_ERROR } |
enum | ERROR_CODE { ERR_MEM_ALLOC, ERR_MEM_FREE, ERR_MEM_CORRUPT, ERR_MEM_LOCK, ERR_UDP_ALLOC, ERR_TCP_ALLOC, ERR_TCP_STATE } |
System Error codes. More... | |
Functions | |
MODEM_STATUS | Modem_Initialize (Modem_Request_t cb_request, const char *init_string) |
Initialize Modem Device. | |
MODEM_STATUS | Modem_Uninitialize (void) |
De-initialize Modem Device. | |
MODEM_STATUS | Modem_Listen (void) |
Start Modem Device listening mode. | |
MODEM_STATUS | Modem_Dial (const char *dial_num) |
Start dialing target number. | |
MODEM_STATUS | Modem_Hangup (void) |
Hangup the line. | |
bool | Modem_IsOnline (void) |
Check if modem is online. | |
MODEM_STATUS | Modem_Notify (MODEM_EVENT event) |
Notify the Modem Driver of completion event. | |
void | Modem_Request (const char *command, const char *response, uint32_t timeout, uint32_t retries) |
Request Callback function for the driver. | |
void | net_sys_error (ERROR_CODE error) |
Network system error handler. | |
void | net_sys_init (void) |
Initialize Network Component, resources and interfaces. | |
void | net_sys_run (void) |
Run Network Component main function. | |
NET_FRAME * | mem_alloc (uint32_t byte_size) |
Allocate memory for the network frame. | |
void | mem_free (NET_FRAME *mem_ptr) |
Release allocated memory. | |
void | eth_init_link (void) |
Initialize Ethernet interface. | |
void | eth_run_link (void) |
Run ethernet interface main function. | |
bool | eth_send_frame (NET_FRAME *frame) |
Construct ethernet header for the frame and send it. | |
bool | eth_chk_addr (NET_FRAME *frame) |
Check if ethernet destination MAC address is local MAC address. | |
void | arp_notify (void) |
Send a notification of local IP address change (gratuitous ARP). | |
void | igmp_host_init (void) |
Initialize IGMP group management. | |
void | igmp_host_run (void) |
Run IGMP group management main function. | |
void | igmp_process (NET_FRAME *frame) |
Process IGMP group management frame. | |
void | nbns_client_init (void) |
Initialize NBNS client. | |
void | dhcp_client_init (void) |
Initialize DHCP client. | |
void | dhcp_client_run (void) |
Run DHCP client main function. | |
void | ppp_init_link (void) |
Initialize PPP interface. | |
void | ppp_run_link (void) |
Run PPP interface main function. | |
bool | ppp_send_frame (NET_FRAME *frame, uint16_t prot) |
Construct PPP header for the frame and send it. | |
void | pap_init (void) |
Initialize PAP authentication. | |
void | pap_process (NET_FRAME *frame) |
Process PAP authentication frame. | |
void | pap_run (void) |
Run PAP authentication main function. | |
void | chap_init (void) |
Initialize CHAP authentication. | |
void | chap_run (void) |
Run CHAP authentication main function. | |
void | chap_process (NET_FRAME *frame) |
Process CHAP authentication frame. | |
void | slip_init_link (void) |
Initialize SLIP interface. | |
void | slip_run_link (void) |
Run SLIP interface main function. | |
bool | slip_send_frame (NET_FRAME *frame) |
Send a SLIP frame. | |
void | ip_localhost_init (void) |
Initialize IP localhost. | |
void | ip_localhost_run (void) |
Run IP localhost main function. | |
void | icmp_service_init (void) |
Initialize ICMP service. | |
void | icmp_service_run (void) |
Run ICMP service main function. | |
void | udp_socket_init (void) |
Initialize UDP sockets. | |
void | udp_process (NET_FRAME *frame) |
Process UDP frame. | |
void | tcp_socket_init (void) |
Initialize TCP sockets. | |
void | tcp_socket_poll (void) |
Run TCP socket main function. | |
void | tcp_process (NET_FRAME *frame) |
Process TCP frame. | |
void | dns_client_init (void) |
Initialize DNS client. | |
void | dns_client_run (void) |
Run DNS client main function. | |
void | bsd_socket_init (void) |
Initialize BSD sockets. | |
void | bsd_socket_poll (void) |
Run BSD socket main function. | |
void | bsd_lock (void) |
Lock BSD socket functions (acquire mutex). | |
void | bsd_unlock (void) |
Unlock BSD socket functions (release mutex). | |
void | bsd_host_init (void) |
Initialize BSD host resolver. | |
void | ftp_server_init (void) |
Initialize FTP server. | |
void | ftp_server_run (void) |
Run FTP server main function. | |
void | ftp_client_init (void) |
Initialize FTP client. | |
void | ftp_client_run (void) |
Run FTP client main function. | |
void | tftp_server_init (void) |
Initialize TFTP server. | |
void | tftp_server_run (void) |
Run TFTP server main function. | |
void | tftp_client_init (void) |
Initialize TFTP client. | |
void | tftp_client_run (void) |
Run TFTP client main function. | |
void | smtp_client_init (void) |
Initialize SMTP client. | |
void | smtp_client_run (void) |
Run SMTP client main function. | |
void | snmp_agent_init (void) |
Initialize SNMP agent. | |
void | snmp_agent_run (void) |
Run SNMP agent main function. | |
void | telnet_server_init (void) |
Initialize Telnet server. | |
void | telnet_server_run (void) |
Run Telnet server main function. | |
void | http_server_init (void) |
Initialize HTTP server. | |
void | http_server_run (void) |
Run HTTP server main function. | |
Core system functions not to be called by user.
The following functions are for internal use only. They should not be called from within an user application. They are part of the Network Component library and are defined in rl_net_lib.h.
struct ARP_CFG |
ARP Configuration info.
Data Fields | ||
---|---|---|
uint8_t | MaxRetry | Number of Retries to resolve MAC address. |
bool | Notify | Notify on IP address changes. |
uint8_t | Resend | Resend Timeout in seconds. |
ARP_INFO * | Table | Cache Table array. |
uint8_t | TabSize | Cache Table size. |
uint8_t | TimeOut | Table Entry expiration time in seconds. |
struct ARP_INFO |
struct BSD_INFO |
BSD Socket info.
struct BSD_CFG |
BSD Socket Configuration info.
Data Fields | ||
---|---|---|
uint8_t | NumSocks | Number of BSD Sockets. |
uint16_t | RcvTout | Blocking recv timeout in ticks. |
BSD_INFO * | Scb | Socket Control Block array. |
struct DHCP_CFG |
struct DNS_CACHE |
struct DNS_CFG |
DNS Client Configuration info.
Data Fields | ||
---|---|---|
DNS_CACHE * | Table | Cache Table array. |
uint8_t | TabSize | Cache Table size. |
struct FTP_CFG |
FTP Server Configuration info.
Data Fields | ||
---|---|---|
uint8_t | EnAuth | Enable User Authentication. |
uint16_t | IdleTout | Idle Connection timeout in ticks. |
const char * | Msg | Server Welcome message. |
uint8_t | MsgLen | Length of welcome message. |
uint8_t | NumSess | Max. Number of Active Sessions. |
char * | Passw | Authentication Password. |
uint16_t | PortNum | Listening Port number. |
FTP_INFO * | Scb | Session Control Block array. |
const char * | User | Authentication User Name. |
struct FTP_INFO |
FTP Session info.
struct FTPC_CFG |
struct IGMP_INFO |
struct IGMP_CFG |
IGMP Configuration info.
Data Fields | ||
---|---|---|
IGMP_INFO * | Table | Group Table array. |
uint16_t | TabSize | Group Table size. |
struct HTTP_CFG |
HTTP Server Configuration info.
Data Fields | ||
---|---|---|
uint8_t | EnAuth | Enable User Authentication. |
uint8_t | NumSess | Max. Number of Active Sessions. |
char * | Passw | Authentication Password. |
uint16_t | PortNum | Listening Port number. |
const char * | Realm | Authentication Realm. |
HTTP_INFO * | Scb | Session Control Block array. |
const char * | SrvId | Server-Id http header. |
const char * | User | Authentication User name. |
struct HTTP_INFO |
HTTP Session info.
struct HTTP_ERROR |
struct LOCALM |
struct NET_FRAME |
struct PPP_CFG |
PPP Interface Configuration info.
Data Fields | ||
---|---|---|
uint32_t | ACCmap | Async Control Character map. |
COM_DEV | Dev | Serial Device Configuration. |
uint16_t | EchoTout | LCP Echo Timeout in seconds. |
uint8_t | EnAuth | Enabled Authentication protocols. |
uint8_t | MaxRetry | Number of Retries. |
uint16_t | RetryTout | Retry Timeout in ticks. |
uint16_t | SerTout | Serial Frame Receive Timeout. |
struct TCP_CFG |
TCP Socket Configuration info.
Data Fields | ||
---|---|---|
uint8_t | ConRetry | Number of Retries to Connect. |
uint16_t | DefTout | Default Connect Timeout in seconds. |
uint16_t | InitRetryTout | Initial Retransmit timeout in ticks. |
uint8_t | MaxRetry | Number of Retries. |
uint16_t | MaxSegSize | Maximum Segment Size value. |
uint8_t | NumSocks | Number of TCP Sockets. |
uint16_t | RecWinSize | Receiving Window Size in bytes. |
uint16_t | RetryTout | Retry Timeout in ticks. |
TCP_INFO * | Scb | Socket Control Block array. |
uint16_t | SynRetryTout | SYN Retry Timeout in ticks. |
uint16_t | T2MSLTout | Maximum Segment Life Time. |
struct TCP_INFO |
TCP Socket info.
Data Fields | ||
---|---|---|
uint8_t | AckTimer | Receive Delay-ack timer. |
uint16_t | AliveTimer | Keep Alive timer. |
net_tcp_cb_t | cb_func | Application Event-CallBack function. |
uint16_t | CWnd | Congestion Window. |
uint8_t | DupAcks | Number of duplicate acks (fast recovery) |
uint8_t | Flags | State machine flags. |
uint8_t | Id | Socket identification number. |
uint16_t | LocPort | Local TCP port. |
uint16_t | MaxSegSize | Transmit Max. Segment Size. |
uint32_t | RecNext | Next Receive Sequence Number. |
uint16_t | RecWin | Current Receive Window. |
uint8_t | RemAddr | Remote IPv4 address. |
uint16_t | RemPort | Remote TCP port. |
uint8_t | Retries | Number of retries left before aborting. |
uint16_t | RetryTimer | Retransmission timer. |
int16_t | RttSa | Scaled Average for RTT estimator. |
int16_t | RttSv | Scaled deViation for RTT estimator. |
uint32_t | SendChk | Check Sequence Number for dupacks. |
uint32_t | SendNext | Next Send Sequence Number. |
uint32_t | SendUna | Send Sequence Number unacknowledged. |
uint16_t | SendWin | Current Send Window. |
uint32_t | SendWl1 | Sequence Number of last Window update. |
uint32_t | SendWl2 | Acknowledge Number of last Window update. |
uint16_t | SsThresh | Slow Start Treshold. |
tcpState | State | Socket entry current state. |
uint8_t | Tos | Type of service allocated. |
uint16_t | Tout | Socket idle timeout (in seconds) |
uint8_t | Type | Socket type. |
NET_FRAME * | unack_list | Unacked queue list. |
struct TFTP_CFG |
TFTP Server Configuration info.
Data Fields | ||
---|---|---|
uint8_t | DefTout | Inactive Session Timeout in seconds. |
bool | EnFwall | Enable Firewall Support. |
uint8_t | MaxRetry | Number of Retries. |
uint8_t | NumSess | Max. Number of Active Sessions. |
uint16_t | PortNum | Listening Port number. |
TFTP_INFO * | Scb | Session Control Block array. |
struct TFTP_INFO |
TFTP Server Session info.
struct TFTPC_CFG |
struct TNET_INFO |
Telnet Session info.
struct SNMP_CFG |
struct SNTP_CFG |
struct TNET_CFG |
Telnet Server Configuration info.
Data Fields | ||
---|---|---|
uint8_t | EnAuth | Enable User Authentication. |
uint16_t | IdleTout | Idle Connection timeout in ticks. |
uint8_t | NoEcho | Disable Server Echo mode. |
uint8_t | NumSess | Max. Number of Active Sessions. |
char * | Passw | Authentication Password. |
uint16_t | PortNum | Listening Port number. |
TNET_INFO * | Scb | Session Control Block array. |
const char * | User | Authentication User Name. |
struct UDP_CFG |
UDP Socket Configuration info.
Data Fields | ||
---|---|---|
uint8_t | NumSocks | Number of UDP Sockets. |
UDP_INFO * | Scb | Socket Control Block array. |
struct UDP_INFO |
UDP Socket info.
Data Fields | ||
---|---|---|
net_udp_cb_t | cb_func | Application event CallBack function. |
uint8_t | Flags | State machine flags. |
uint16_t | LocPort | Local port of socket. |
uint8_t | McastTtl | MultiCast Time To Live. |
uint8_t | Opt | Socket options. |
uint8_t | State | Socket entry current state. |
uint8_t | Tos | Type of Service allocated. |
struct SYS_CFG |
SYS Configuration info.
struct DRIVER_MODEM |
Access structure of the Modem Driver.
Data Fields | |
MODEM_STATUS(* | Initialize )(Modem_Request_t cb_request, const char *init_string) |
Pointer to Modem_Initialize : Initialize Modem Device. | |
MODEM_STATUS(* | Uninitialize )(void) |
Pointer to Modem_Uninitialize : De-initialize Modem Device. | |
MODEM_STATUS(* | Listen )(void) |
Pointer to Modem_Listen : Start Modem Device listening mode. | |
MODEM_STATUS(* | Dial )(const char *dial_num) |
Pointer to Modem_Dial : Start dialing target number. | |
MODEM_STATUS(* | Hangup )(void) |
Pointer to Modem_Hangup : Hangup the line. | |
bool(* | IsOnline )(void) |
Pointer to Modem_IsOnline : Check if modem is online. | |
void(* | Notify )(MODEM_EVENT event) |
Pointer to Modem_Notify : Notify the driver of completion event. | |
MODEM_STATUS(* Dial)(const char *dial_num) |
Pointer to Modem_Dial : Start dialing target number.
MODEM_STATUS(* Hangup)(void) |
Pointer to Modem_Hangup : Hangup the line.
MODEM_STATUS(* Initialize)(Modem_Request_t cb_request, const char *init_string) |
Pointer to Modem_Initialize : Initialize Modem Device.
bool(* IsOnline)(void) |
Pointer to Modem_IsOnline : Check if modem is online.
MODEM_STATUS(* Listen)(void) |
Pointer to Modem_Listen : Start Modem Device listening mode.
void(* Notify)(MODEM_EVENT event) |
Pointer to Modem_Notify : Notify the driver of completion event.
MODEM_STATUS(* Uninitialize)(void) |
Pointer to Modem_Uninitialize : De-initialize Modem Device.
enum ERROR_CODE |
System Error codes.
/ System Error codes /**
enum MODEM_EVENT |
enum MODEM_STATUS |
void arp_notify | ( | void | ) |
Send a notification of local IP address change (gratuitous ARP).
void bsd_host_init | ( | void | ) |
Initialize BSD host resolver.
void bsd_lock | ( | void | ) |
Lock BSD socket functions (acquire mutex).
void bsd_socket_init | ( | void | ) |
Initialize BSD sockets.
void bsd_socket_poll | ( | void | ) |
Run BSD socket main function.
void bsd_unlock | ( | void | ) |
Unlock BSD socket functions (release mutex).
void chap_init | ( | void | ) |
Initialize CHAP authentication.
void chap_process | ( | NET_FRAME * | frame | ) |
Process CHAP authentication frame.
[in] | frame | received CHAP authentication frame. |
void chap_run | ( | void | ) |
Run CHAP authentication main function.
void dhcp_client_init | ( | void | ) |
Initialize DHCP client.
void dhcp_client_run | ( | void | ) |
Run DHCP client main function.
void dns_client_init | ( | void | ) |
Initialize DNS client.
void dns_client_run | ( | void | ) |
Run DNS client main function.
bool eth_chk_addr | ( | NET_FRAME * | frame | ) |
Check if ethernet destination MAC address is local MAC address.
[in] | frame | received frame to be checked. |
void eth_init_link | ( | void | ) |
Initialize Ethernet interface.
void eth_run_link | ( | void | ) |
Run ethernet interface main function.
bool eth_send_frame | ( | NET_FRAME * | frame | ) |
Construct ethernet header for the frame and send it.
[in] | frame | frame to be sent. |
void ftp_client_init | ( | void | ) |
Initialize FTP client.
void ftp_client_run | ( | void | ) |
Run FTP client main function.
void ftp_server_init | ( | void | ) |
Initialize FTP server.
void ftp_server_run | ( | void | ) |
Run FTP server main function.
void http_server_init | ( | void | ) |
Initialize HTTP server.
void http_server_run | ( | void | ) |
Run HTTP server main function.
void icmp_service_init | ( | void | ) |
Initialize ICMP service.
void icmp_service_run | ( | void | ) |
Run ICMP service main function.
void igmp_host_init | ( | void | ) |
Initialize IGMP group management.
void igmp_host_run | ( | void | ) |
Run IGMP group management main function.
void igmp_process | ( | NET_FRAME * | frame | ) |
Process IGMP group management frame.
[in] | frame | received IGMP group management frame. |
void ip_localhost_init | ( | void | ) |
Initialize IP localhost.
void ip_localhost_run | ( | void | ) |
Run IP localhost main function.
NET_FRAME * mem_alloc | ( | uint32_t | byte_size | ) |
Allocate memory for the network frame.
[in] | byte_size | buffer size in bytes. |
Referenced by http_server_ftime().
void mem_free | ( | NET_FRAME * | mem_ptr | ) |
Release allocated memory.
[in] | mem_ptr | pointer to the allocated memory. |
Referenced by http_server_ftime().
MODEM_STATUS Modem_Dial | ( | const char * | dial_num | ) |
Start dialing target number.
[in] | dial_num | Target number, a null-terminated string |
MODEM_STATUS Modem_Hangup | ( | void | ) |
Hangup the line.
MODEM_STATUS Modem_Initialize | ( | Modem_Request_t | cb_request, |
const char * | init_string | ||
) |
Initialize Modem Device.
[in] | cb_request | Pointer to Modem_Request |
[in] | init_string | Pointer to modem initialization string |
bool Modem_IsOnline | ( | void | ) |
Check if modem is online.
MODEM_STATUS Modem_Listen | ( | void | ) |
Start Modem Device listening mode.
void Modem_Notify | ( | MODEM_EVENT | event | ) |
Notify the Modem Driver of completion event.
[in] | event | notification event MODEM_EVENT |
void Modem_Request | ( | const char * | command, |
const char * | response, | ||
uint32_t | timeout, | ||
uint32_t | retries | ||
) |
Request Callback function for the driver.
[in] | command | Command to send to modem |
[in] | response | Expected response from modem |
[in] | timeout | Response timeout in milliseconds |
[in] | retries | Number of retries |
MODEM_STATUS Modem_Uninitialize | ( | void | ) |
De-initialize Modem Device.
void nbns_client_init | ( | void | ) |
Initialize NBNS client.
void net_sys_error | ( | ERROR_CODE | error | ) |
Network system error handler.
Signal Network Component error.
void net_sys_init | ( | void | ) |
Initialize Network Component, resources and interfaces.
void net_sys_run | ( | void | ) |
Run Network Component main function.
void pap_init | ( | void | ) |
Initialize PAP authentication.
void pap_process | ( | NET_FRAME * | frame | ) |
Process PAP authentication frame.
[in] | frame | received PAP authentication frame. |
void pap_run | ( | void | ) |
Run PAP authentication main function.
void ppp_init_link | ( | void | ) |
Initialize PPP interface.
void ppp_run_link | ( | void | ) |
Run PPP interface main function.
bool ppp_send_frame | ( | NET_FRAME * | frame, |
uint16_t | prot | ||
) |
Construct PPP header for the frame and send it.
[in] | frame | frame to be sent. |
[in] | prot | PPP protocol type of the frame. |
void slip_init_link | ( | void | ) |
Initialize SLIP interface.
void slip_run_link | ( | void | ) |
Run SLIP interface main function.
bool slip_send_frame | ( | NET_FRAME * | frame | ) |
Send a SLIP frame.
[in] | frame | frame to be sent. |
void smtp_client_init | ( | void | ) |
Initialize SMTP client.
void smtp_client_run | ( | void | ) |
Run SMTP client main function.
void snmp_agent_init | ( | void | ) |
Initialize SNMP agent.
void snmp_agent_run | ( | void | ) |
Run SNMP agent main function.
void tcp_process | ( | NET_FRAME * | frame | ) |
Process TCP frame.
[in] | frame | received TCP frame. |
void tcp_socket_init | ( | void | ) |
Initialize TCP sockets.
void tcp_socket_poll | ( | void | ) |
Run TCP socket main function.
void telnet_server_init | ( | void | ) |
Initialize Telnet server.
void telnet_server_run | ( | void | ) |
Run Telnet server main function.
void tftp_client_init | ( | void | ) |
Initialize TFTP client.
void tftp_client_run | ( | void | ) |
Run TFTP client main function.
void tftp_server_init | ( | void | ) |
Initialize TFTP server.
void tftp_server_run | ( | void | ) |
Run TFTP server main function.
void udp_process | ( | NET_FRAME * | frame | ) |
Process UDP frame.
[in] | frame | received UDP frame. |
void udp_socket_init | ( | void | ) |
Initialize UDP sockets.