Network Component  Version 6.7
MDK-Professional Middleware for IP Networking
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
rl_net_lib.h File Reference

Data Structures

struct  LOCALM
 Local Machine info. More...
 
struct  NET_FRAME
 System frame buffer structure. More...
 
struct  ARP_INFO
 ARP Cache Entry info. More...
 
struct  IGMP_INFO
 IGMP Group info. More...
 
struct  UDP_INFO
 UDP Socket info. More...
 
struct  TCP_INFO
 TCP Socket info. More...
 
struct  BSD_INFO
 BSD Socket info. More...
 
struct  DNS_CACHE
 DNS Cache Entry info. More...
 
struct  TFTP_INFO
 TFTP Server Session info. More...
 
struct  TNET_INFO
 Telnet Session info. More...
 
struct  FTP_INFO
 FTP Session info. More...
 
struct  HTTP_INFO
 HTTP Session info. More...
 
struct  HTTP_ERROR
 HTTP Error page info. More...
 
struct  SYS_CFG
 SYS Configuration info. More...
 
struct  ARP_CFG
 ARP Configuration info. More...
 
struct  IGMP_CFG
 IGMP Configuration info. More...
 
struct  DHCP_CFG
 DHCP Client Configuration info. More...
 
struct  ETH_CFG
 Ethernet Interface Configuration info. More...
 
struct  COM_DEV
 Serial Device Configuration info. More...
 
struct  PPP_CFG
 PPP Interface Configuration info. More...
 
struct  SLIP_CFG
 SLIP Interface Configuration info. More...
 
struct  UDP_CFG
 UDP Socket Configuration info. More...
 
struct  TCP_CFG
 TCP Socket Configuration info. More...
 
struct  BSD_CFG
 BSD Socket Configuration info. More...
 
struct  DNS_CFG
 DNS Client Configuration info. More...
 
struct  SNMP_CFG
 SNMP Agent Configuration info. More...
 
struct  SNTP_CFG
 SNTP Client Configuration info. More...
 
struct  TFTP_CFG
 TFTP Server Configuration info. More...
 
struct  TFTPC_CFG
 TFTP Client Configuration info. More...
 
struct  TNET_CFG
 Telnet Server Configuration info. More...
 
struct  FTP_CFG
 FTP Server Configuration info. More...
 
struct  FTPC_CFG
 FTP Client Configuration info. More...
 
struct  HTTP_CFG
 HTTP Server Configuration info. More...
 

Macros

#define NET_HEADER_LEN   4
 General definitions. More...
 
#define PHY_HEADER_LEN   14
 Physical/ethernet header length. More...
 
#define ETH_FRAME_MTU   1514
 Ethernet frame max. transfer unit. More...
 
#define NET_PASSWORD_SIZE   20
 Authentication password buffer size. More...
 
#define TNET_LBUFSZ   96
 Debug process definitions. More...
 
#define TNET_HISTSZ   128
 Command History buffer size in bytes. More...
 
#define TNET_FIFOSZ   128
 Input character Fifo buffer in bytes. More...
 

Enumerations

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

void net_sys_init (void)
 Initialize Network Component, resources and interfaces. More...
 
void net_sys_run (void)
 Run Network Component main function. More...
 
void net_sys_error (ERROR_CODE error)
 Signal Network Component error. More...
 
NET_FRAMEmem_alloc (uint32_t byte_size)
 Allocate memory for the network frame. More...
 
void mem_free (NET_FRAME *mem_ptr)
 Release allocated memory. More...
 
void eth_init_link (void)
 Initialize Ethernet interface. More...
 
void eth_run_link (void)
 Run ethernet interface main function. More...
 
bool eth_send_frame (NET_FRAME *frame)
 Construct ethernet header for the frame and send it. More...
 
bool eth_chk_addr (NET_FRAME *frame)
 Check if ethernet destination MAC address is local MAC address. More...
 
const uint8_t * eth_get_addr (const uint8_t *ip_addr)
 Get MAC address for the given IP address. More...
 
void arp_notify (void)
 Send a notification of local IP address change (gratuitous ARP). More...
 
void igmp_host_init (void)
 Initialize IGMP group management. More...
 
void igmp_host_run (void)
 Run IGMP group management main function. More...
 
void igmp_process (NET_FRAME *frame)
 Process IGMP group management frame. More...
 
bool igmp_is_member (const uint8_t *ipadr)
 Check if local host is a member of provided group. More...
 
void nbns_client_init (void)
 Initialize NBNS client. More...
 
void dhcp_client_init (void)
 Initialize DHCP client. More...
 
void dhcp_client_run (void)
 Run DHCP client main function. More...
 
void ppp_init_link (void)
 Initialize PPP interface. More...
 
void ppp_run_link (void)
 Run PPP interface main function. More...
 
bool ppp_send_frame (NET_FRAME *frame, uint16_t prot)
 Construct PPP header for the frame and send it. More...
 
void pap_init (void)
 Initialize PAP authentication. More...
 
void pap_run (void)
 Run PAP authentication main function. More...
 
void pap_process (NET_FRAME *frame)
 Process PAP authentication frame. More...
 
void chap_init (void)
 Initialize CHAP authentication. More...
 
void chap_run (void)
 Run CHAP authentication main function. More...
 
void chap_process (NET_FRAME *frame)
 Process CHAP authentication frame. More...
 
void slip_init_link (void)
 Initialize SLIP interface. More...
 
void slip_run_link (void)
 Run SLIP interface main function. More...
 
bool slip_send_frame (NET_FRAME *frame)
 Send a SLIP frame. More...
 
void ip_localhost_init (void)
 Initialize IP localhost. More...
 
void ip_localhost_run (void)
 Run IP localhost main function. More...
 
void icmp_service_init (void)
 Initialize ICMP service. More...
 
void icmp_service_run (void)
 Run ICMP service main function. More...
 
void udp_socket_init (void)
 Initialize UDP sockets. More...
 
void udp_process (NET_FRAME *frame)
 Process UDP frame. More...
 
void tcp_socket_init (void)
 Initialize TCP sockets. More...
 
void tcp_socket_poll (void)
 Run TCP socket main function. More...
 
void tcp_process (NET_FRAME *frame)
 Process TCP frame. More...
 
void dns_client_init (void)
 Initialize DNS client. More...
 
void dns_client_run (void)
 Run DNS client main function. More...
 
void bsd_socket_init (void)
 Initialize BSD sockets. More...
 
void bsd_socket_poll (void)
 Run BSD socket main function. More...
 
void bsd_lock (void)
 Lock BSD socket functions (acquire mutex). More...
 
void bsd_unlock (void)
 Unlock BSD socket functions (release mutex). More...
 
void bsd_host_init (void)
 Initialize BSD host resolver. More...
 
void ftp_server_init (void)
 Initialize FTP server. More...
 
void ftp_server_run (void)
 Run FTP server main function. More...
 
void ftp_client_init (void)
 Initialize FTP client. More...
 
void ftp_client_run (void)
 Run FTP client main function. More...
 
void tftp_server_init (void)
 Initialize TFTP server. More...
 
void tftp_server_run (void)
 Run TFTP server main function. More...
 
void tftp_client_init (void)
 Initialize TFTP client. More...
 
void tftp_client_run (void)
 Run TFTP client main function. More...
 
void smtp_client_init (void)
 Initialize SMTP client. More...
 
void smtp_client_run (void)
 Run SMTP client main function. More...
 
void snmp_agent_init (void)
 Initialize SNMP agent. More...
 
void snmp_agent_run (void)
 Run SNMP agent main function. More...
 
void sntp_client_init (void)
 Initialize SNTP client. More...
 
void sntp_client_run (void)
 Run SNTP client main function. More...
 
void telnet_server_init (void)
 Initialize Telnet server. More...
 
void telnet_server_run (void)
 Run Telnet server main function. More...
 
void http_server_init (void)
 Initialize HTTP server. More...
 
void http_server_run (void)
 Run HTTP server main function. More...
 
void net_debug_init (void)
 Initialize debug interface. More...
 
void dbg_info (int32_t proc, const char *fmt,...)
 Debug print information message. More...
 
void dbg_error (int32_t proc, const char *fmt,...)
 Debug print error message. More...
 
const char * dbg_proc (int32_t proc)
 Convert process id into a string. More...
 
const char * dbg_time (void)
 Get current network time for debug. More...
 

Data Structure Documentation

struct LOCALM

Local Machine info.

Data Fields
uint8_t DefGW[IP4_ADDR_LEN] Default GateWay.
uint8_t IpAddr[IP4_ADDR_LEN] Local IP Address.
uint8_t NetMask[IP4_ADDR_LEN] Net Mask.
uint8_t PriDNS[IP4_ADDR_LEN] Primary DNS Server.
uint8_t SecDNS[IP4_ADDR_LEN] Secondary DNS Server.
struct NET_FRAME

System frame buffer structure.

Data Fields
uint8_t data[1] Buffer data (protocol headers + data)
uint16_t index Buffer Position Index.
uint16_t length Total Length of data in frame.
struct ARP_INFO

ARP Cache Entry info.

Data Fields
uint8_t HwAdr[ETH_ADDR_LEN] Ethernet Hardware Address.
uint8_t IpAdr[IP4_ADDR_LEN] Ethernet IP Address.
uint8_t Retries Number of Retries left.
uint8_t State ARP Cache entry current state.
uint8_t Tout Cache Entry Timeout.
uint8_t Type Cache Entry type.
struct IGMP_INFO

IGMP Group info.

Data Fields
uint8_t Flags State machine flags.
uint8_t GrpIpAdr[IP4_ADDR_LEN] Group IP address.
uint8_t State Group membership current state.
uint8_t Tout Timeout Timer for sending reports.
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 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[IP4_ADDR_LEN] 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 BSD_INFO

BSD Socket info.

Data Fields
uint8_t AcceptSock Accept Socket list.
void * buf_list Rx Data buffer chain.
uint8_t Event Owner Wait-for Events.
uint8_t Flags Flags for Socket Option.
uint32_t LocIP Bind local IP address (net byte order)
uint16_t LocPort Bind local Port.
uint8_t ParentSock Parent (server) socket.
uint32_t RemIP Remote IP address (net byte order)
uint16_t RemPort Remote TCP/UDP Port.
uint8_t Socket Binded TCP/UDP Socket.
uint8_t State Socket entry current state.
void * Thread Socket Owner thread.
uint16_t Tout Receive timer value.
uint8_t Type Type of Socket (SOCK_DGRAM/SOCK_STREAM)
uint8_t xEvent Sender Wait-for Events.
void * xThread Socket Sender thread.
struct DNS_CACHE

DNS Cache Entry info.

Data Fields
uint32_t HostId Host Id (CRC32 value of host name)
uint8_t IpAdr[IP4_ADDR_LEN] Ethernet IP Address.
uint32_t Ttl Cache Entry Time To Live.
struct TFTP_INFO

TFTP Server Session info.

Data Fields
uint16_t BlockNr Block Number.
uint16_t BlockSz Transfer Block size.
uint8_t * Buf Transmit/Retransmit buffer.
uint16_t BufLen Length of retransmit buffer.
void * File File Handle pointer.
uint8_t Flags State machine Flags.
uint8_t RemAddr[IP4_ADDR_LEN] Remote IP address.
uint16_t RemPort Remote UDP port (TID)
uint8_t Retries Retry counter.
uint8_t Socket binded UDP Data Socket
uint8_t State Session entry current state.
uint8_t Timer Timeout Timer value.
struct TNET_INFO

Telnet Session info.

Data Fields
uint8_t BCnt Received Data byte count.
char Fifo[TNET_FIFOSZ] Fifo Buffer for received line/keycodes.
uint8_t Flags State machine Flags.
uint8_t hCurr History command current position.
char Hist[TNET_HISTSZ] Command History buffer.
uint8_t hNext History command next position.
char LBuf[TNET_LBUFSZ] Data Line Buffer.
uint8_t Ridx Fifo buffer Read index.
uint8_t Socket binded TCP Socket
uint8_t State Session current state.
uint32_t SVar Session private variable.
uint16_t Tout Timeout delay counter.
uint8_t UserId User Id (authentication enabled)
uint8_t Widx Fifo buffer Write index.
struct FTP_INFO

FTP Session info.

Data Fields
uint16_t DPort TCP Data port (Server or Client)
uint8_t DSocket TCP Data Socket.
void * File File Handle pointer.
uint16_t Flags State machine Flags.
char * Name Absolute File/Folder Path Name.
char * Path Current Working Directory.
uint8_t PathLen Size of the Path string.
uint8_t RemIpAdr[IP4_ADDR_LEN] Client IP address.
uint8_t Resp FTP Server Response Code.
uint8_t Socket binded TCP Control Socket
uint8_t State FTP Session current state.
uint8_t UserId User Id (authentication enabled)
struct HTTP_INFO

HTTP Session info.

Data Fields
uint16_t BCnt Number of bytes sent in last packet.
uint32_t CGIvar CGI session private variable.
uint32_t Count Total number of bytes sent.
uint16_t DelimSz Boundary delimiter size.
void * dFile Data File pointer.
uint32_t DLen Data length (number of bytes to send)
uint16_t Flags State machine Flags.
uint8_t FType File Type: html, jpeg, gif,...
char Lang[6] Selected Web Language: en-us, de, fr...
uint32_t LMDate Last Modified Date (UTC format)
char * pDelim Multipart Boundary delimiter value.
uint8_t PostSt POST method Processing Status.
char * Script Script Buffer pointer.
void * sFile Script Interpreter File pointer.
uint8_t Socket binded TCP Socket
uint8_t State HTTP Session current state.
uint8_t UserId User Id (authentication enabled)
struct HTTP_ERROR

HTTP Error page info.

Data Fields
const char * e401 401 Unauthorized
const char * e403 403 Forbidden
const char * e404 404 Not Found
const char * e501 501 Not Implemented
const char * footer Common page footer.
const char * header Common page header.
struct SYS_CFG

SYS Configuration info.

Data Fields
char * HostName Local Host Name.
uint32_t * MemPool Dynamic Memory Pool buffer.
uint32_t MemSize Memory Pool size in bytes.
uint8_t NetCfg Network Interface Configuration flags.
uint8_t T200ms Delay 200 ms in ticks.
uint8_t TickItv Tick Interval in ms.
uint8_t TickRate Tick Rate in ticks per second.
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 IGMP_CFG

IGMP Configuration info.

Data Fields
IGMP_INFO * Table Group Table array.
uint16_t TabSize Group Table size.
struct DHCP_CFG

DHCP Client Configuration info.

Data Fields
uint8_t Opt Extra DHCP option flags.
const char * Vcid Vendor Class Identifier.
struct ETH_CFG

Ethernet Interface Configuration info.

Data Fields
ARP_CFG ArpCfg ARP configuration.
DHCP_CFG DhcpCfg DHCP configuraton.
ARM_DRIVER_ETH_MAC * DrvMac Registered MAC driver.
ARM_DRIVER_ETH_PHY * DrvPhy Registered PHY driver.
IGMP_CFG IgmpCfg IGMP configuration.
uint8_t * MacAddr MAC address.
struct COM_DEV

Serial Device Configuration info.

Data Fields
DRIVER_MODEM * DrvModem Registered MODEM driver.
ARM_DRIVER_USART * DrvUsart Registered USART driver.
uint8_t FlowCtrl Flow control.
const char * InitString Modem initialization string.
uint32_t Speed Connection Speed.
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 SLIP_CFG

SLIP Interface Configuration info.

Data Fields
COM_DEV Dev Serial Device configuration.
uint16_t SerTout Serial Frame Receive Timeout.
struct UDP_CFG

UDP Socket Configuration info.

Data Fields
uint8_t NumSocks Number of UDP Sockets.
UDP_INFO * Scb Socket Control Block array.
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 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 DNS_CFG

DNS Client Configuration info.

Data Fields
DNS_CACHE * Table Cache Table array.
uint8_t TabSize Cache Table size.
struct SNMP_CFG

SNMP Agent Configuration info.

Data Fields
const char * Community Community Name.
uint16_t PortNum Listening Port number.
uint8_t TickItv Tick Interval in ticks.
uint8_t TrapIp[IP4_ADDR_LEN] Trap Server IP Address.
uint16_t TrapPort Trap Port number.
struct SNTP_CFG

SNTP Client Configuration info.

Data Fields
bool Bcast Broadcast client mode (for LAN only)
uint8_t SrvIp[IP4_ADDR_LEN] NTP/SNTP Server IP Address.
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 TFTPC_CFG

TFTP Client Configuration info.

Data Fields
uint16_t BlockSize Transfer Block size.
uint8_t MaxRetry Number of Retries.
uint16_t RetryTout Retry Timeout in ticks.
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 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 FTPC_CFG

FTP Client Configuration info.

Data Fields
uint8_t DefTout Default inactivity timeout.
bool PasvMode FTP Passive Mode used.
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.

Macro Definition Documentation

#define ETH_FRAME_MTU   1514

Ethernet frame max. transfer unit.

#define NET_HEADER_LEN   4

General definitions.

Network frame header length

#define NET_PASSWORD_SIZE   20

Authentication password buffer size.

#define PHY_HEADER_LEN   14

Physical/ethernet header length.

#define TNET_FIFOSZ   128

Input character Fifo buffer in bytes.

#define TNET_HISTSZ   128

Command History buffer size in bytes.

#define TNET_LBUFSZ   96

Debug process definitions.

Telnet definitions Command Line buffer size in bytes

Enumeration Type Documentation

enum ERROR_CODE

System Error codes.

Enumerator
ERR_MEM_ALLOC 

Alloc memory failed, out of memory.

ERR_MEM_FREE 

Free memory failed, memory slot invalid.

ERR_MEM_CORRUPT 

Memory corruption detected.

ERR_MEM_LOCK 

Locked memory function re-entered error.

ERR_UDP_ALLOC 

No free UDP sockets available.

ERR_TCP_ALLOC 

No free TCP sockets available.

ERR_TCP_STATE 

TCP socket in undefined state.

Function Documentation

void arp_notify ( void  )

Send a notification of local IP address change (gratuitous ARP).

Returns
None
void bsd_host_init ( void  )

Initialize BSD host resolver.

Returns
None
void bsd_lock ( void  )

Lock BSD socket functions (acquire mutex).

Returns
None
void bsd_socket_init ( void  )

Initialize BSD sockets.

Returns
None
void bsd_socket_poll ( void  )

Run BSD socket main function.

Returns
None
void bsd_unlock ( void  )

Unlock BSD socket functions (release mutex).

Returns
None
void chap_init ( void  )

Initialize CHAP authentication.

Returns
None
void chap_process ( NET_FRAME frame)

Process CHAP authentication frame.

Parameters
[in]framereceived CHAP authentication frame.
Returns
None
void chap_run ( void  )

Run CHAP authentication main function.

Returns
None
void dbg_error ( int32_t  proc,
const char *  fmt,
  ... 
)

Debug print error message.

Parameters
[in]procnetwork process id.
[in]fmtprintf format string.
Returns
None.
void dbg_info ( int32_t  proc,
const char *  fmt,
  ... 
)

Debug print information message.

Parameters
[in]procnetwork process id.
[in]fmtprintf format string.
Returns
None
const char* dbg_proc ( int32_t  proc)

Convert process id into a string.

Parameters
[in]procnetwork process id.
Returns
pointer to process id string.
const char* dbg_time ( void  )

Get current network time for debug.

Returns
pointer to current time string.
void dhcp_client_init ( void  )

Initialize DHCP client.

Returns
None
void dhcp_client_run ( void  )

Run DHCP client main function.

Returns
None
void dns_client_init ( void  )

Initialize DNS client.

Returns
None
void dns_client_run ( void  )

Run DNS client main function.

Returns
None
bool eth_chk_addr ( NET_FRAME frame)

Check if ethernet destination MAC address is local MAC address.

Parameters
[in]framereceived frame to be checked.
Returns
  • true = Destination MAC is local MAC address.
  • false = Destination MAC is not local.
const uint8_t* eth_get_addr ( const uint8_t *  ip_addr)

Get MAC address for the given IP address.

Parameters
[in]ip_addrIP address of a host.
Returns
Pointer to the MAC address in ARP cache.
void eth_init_link ( void  )

Initialize Ethernet interface.

Returns
None
void eth_run_link ( void  )

Run ethernet interface main function.

Returns
None
bool eth_send_frame ( NET_FRAME frame)

Construct ethernet header for the frame and send it.

Parameters
[in]frameframe to be sent.
Returns
  • true = Frame successfuly sent.
  • false = Failed to send a frame.
void ftp_client_init ( void  )

Initialize FTP client.

Returns
None
void ftp_client_run ( void  )

Run FTP client main function.

Returns
None
void ftp_server_init ( void  )

Initialize FTP server.

Returns
None
void ftp_server_run ( void  )

Run FTP server main function.

Returns
None
void http_server_init ( void  )

Initialize HTTP server.

Returns
None
void http_server_run ( void  )

Run HTTP server main function.

Returns
None
void icmp_service_init ( void  )

Initialize ICMP service.

Returns
None
void icmp_service_run ( void  )

Run ICMP service main function.

Returns
None
void igmp_host_init ( void  )

Initialize IGMP group management.

Returns
None
void igmp_host_run ( void  )

Run IGMP group management main function.

Returns
None
bool igmp_is_member ( const uint8_t *  ipadr)

Check if local host is a member of provided group.

Parameters
[in]ipadrmulticast IP address to be checked.
Returns
  • true = Local host is member of IGMP group ipadr.
  • false = Local host is not member.
void igmp_process ( NET_FRAME frame)

Process IGMP group management frame.

Parameters
[in]framereceived IGMP group management frame.
Returns
None
void ip_localhost_init ( void  )

Initialize IP localhost.

Returns
None
void ip_localhost_run ( void  )

Run IP localhost main function.

Returns
None
NET_FRAME* mem_alloc ( uint32_t  byte_size)

Allocate memory for the network frame.

Parameters
[in]byte_sizebuffer size in bytes.
Returns
Pointer to the allocated memory.

Referenced by http_server_ftime().

void mem_free ( NET_FRAME mem_ptr)

Release allocated memory.

Parameters
[in]mem_ptrpointer to the allocated memory.
Returns
None

Referenced by http_server_ftime().

void nbns_client_init ( void  )

Initialize NBNS client.

Returns
None
void net_debug_init ( void  )

Initialize debug interface.

Returns
None
void net_sys_init ( void  )

Initialize Network Component, resources and interfaces.

Returns
None
void net_sys_run ( void  )

Run Network Component main function.

Returns
None
void pap_init ( void  )

Initialize PAP authentication.

Returns
None
void pap_process ( NET_FRAME frame)

Process PAP authentication frame.

Parameters
[in]framereceived PAP authentication frame.
Returns
None
void pap_run ( void  )

Run PAP authentication main function.

Returns
None
void ppp_init_link ( void  )

Initialize PPP interface.

Returns
None
void ppp_run_link ( void  )

Run PPP interface main function.

Returns
None
bool ppp_send_frame ( NET_FRAME frame,
uint16_t  prot 
)

Construct PPP header for the frame and send it.

Parameters
[in]frameframe to be sent.
[in]protPPP protocol type of the frame.
Returns
  • true = Frame successfuly sent.
  • false = Failed to send a frame.
void slip_init_link ( void  )

Initialize SLIP interface.

Returns
None
void slip_run_link ( void  )

Run SLIP interface main function.

Returns
None
bool slip_send_frame ( NET_FRAME frame)

Send a SLIP frame.

Parameters
[in]frameframe to be sent.
Returns
  • true = Frame successfuly sent.
  • false = Failed to send a frame.
void smtp_client_init ( void  )

Initialize SMTP client.

Returns
None
void smtp_client_run ( void  )

Run SMTP client main function.

Returns
None
void snmp_agent_init ( void  )

Initialize SNMP agent.

Returns
None
void snmp_agent_run ( void  )

Run SNMP agent main function.

Returns
None
void sntp_client_init ( void  )

Initialize SNTP client.

Returns
None
void sntp_client_run ( void  )

Run SNTP client main function.

Returns
None
void tcp_process ( NET_FRAME frame)

Process TCP frame.

Parameters
[in]framereceived TCP frame.
Returns
None
void tcp_socket_init ( void  )

Initialize TCP sockets.

Returns
None
void tcp_socket_poll ( void  )

Run TCP socket main function.

Returns
None
void telnet_server_init ( void  )

Initialize Telnet server.

Returns
None
void telnet_server_run ( void  )

Run Telnet server main function.

Returns
None
void tftp_client_init ( void  )

Initialize TFTP client.

Returns
None
void tftp_client_run ( void  )

Run TFTP client main function.

Returns
None
void tftp_server_init ( void  )

Initialize TFTP server.

Returns
None
void tftp_server_run ( void  )

Run TFTP server main function.

Returns
None
void udp_process ( NET_FRAME frame)

Process UDP frame.

Parameters
[in]framereceived UDP frame.
Returns
None
void udp_socket_init ( void  )

Initialize UDP sockets.

Returns
None