net_isq()

Functions

void net_isq (void)
 The main polling function for processing sockets, must be periodically called in the main application. More...
 

Detailed Description

This is the "working horse" of the TCP/IP stack. net_isq() must be called regularly to handle background activities: listen for incoming connections, transfer queued data, resolve host names, provide ARP resolution, retransmit data, etc. For example, if you want to send a packet to a host called www.mydomain.com and the IP address is unknown, the net_isq() will start a DNS request and tries to resolve the name.

net_isq() can be called in your main program loop, from a periodic timer interrupt, or as a periodic task in a RTOS environment.

In pseudo code the net_isq() performs the following functions:

function net_isq()
{
if ( net_isq() is already running ) return;
if ( Hardware Interrupt is active ) return;
if ( not configured for interrupts ) check_hardware_event();
if ( DHCP request pending ) send_DHCP_request();
if ( ICMP pending ) check_ICMP_event();
check all received data for call-back events and call user call-back
check all pending transmit packets and try to retransmit
if ( ARP pending ) check_ARP_event();
if ( DNS required ) resolve name();
if ( DHCP response ) receive_DHCP();
handle all timers;
}

Function Documentation

void net_isq ( void  )