Not all of these functions must be invoked all the time in the main loop. Certain functions are only invoked when it is needed (IP, UDP and TCP processing for example). Check their individual documentation for detailed instructions on how to use them.
Defines | |
#define | NETWORK_CHECK_IF_RECEIVED() NE2000ReceiveFrame() |
Use this macro to check if there is recieved data in Ethernet controller. | |
#define | NETWORK_RECEIVE_END() NE2000DumpRxFrame() |
Dump received packet in the Ethernet controller. | |
Functions | |
void | arp_manage (void) |
Manage ARP cache periodically. | |
void | NE2000CheckOverFlow (void) |
Check if receive-buffer overflow occured. | |
INT16 | process_icmp_in (struct ip_frame *frame, UINT16 len) |
Process recieved ICMP datagram. | |
INT16 | process_ip_in (struct ethernet_frame *) |
Process received IP frame. | |
void | tcp_poll (void) |
Poll TCP sockets periodically. | |
INT16 | process_tcp_in (struct ip_frame *, UINT16) |
Check and process the received TCP frame. | |
INT16 | process_udp_in (struct ip_frame *, UINT16) |
Process received UDP frame. |
|
Invoke this macro periodically (see main_demo.c for example) to check if there is new data in the Ethernet controller. If there is new data in the Ethernet controller, this macro (function that it points to that is) will return a value of TRUE and fill in the appropriate values in the received_frame variable. Otherwise it returns FALSE.
|
|
Invoke this macro when the received Ethernet packet is not needed any more and can be discarded.
|
|
Definition at line 785 of file arp.c. References ARP_FIXED_IP, ARP_FREE, ARP_PENDING, ARP_REFRESHING, ARP_RESEND, ARP_RESOLVED, arp_send_req(), ARP_TEMP_IP, ARP_TIMEOUT, arp_timer, check_timer(), init_timer(), arp_entry::pradr, arp_entry::retries, arp_entry::state, TIMERTIC, arp_entry::ttl, and arp_entry::type. |
|
Invoke this function periodically to ensure proper operation under heavy load.
Definition at line 393 of file ethernet.c. References BOUNDARY, CR, CURR, inNE2000(), ISR, NE2000CurrPktPtr, NE2000NextPktPtr, outNE2000(), RBCR0, and TCR. |
|
This function simply checks correctnes of received ICMP message and send ICMP replies when requested.
Definition at line 97 of file icmp.c. References ip_frame::buf_index, ip_frame::dip, ip_checksum(), ip_checksum_buf(), IP_ICMP, NETWORK_RECEIVE_INITIALIZE, NETWORK_TX_BUFFER_SIZE, process_ip_out(), ip_frame::protocol, RECEIVE_NETWORK_B, RECEIVE_NETWORK_BUF, ip_frame::sip, and TXBUF. |
|
Definition at line 115 of file ip.c. References arp_add(), ARP_TEMP_IP, ethernet_frame::buf_index, ip_frame::buf_index, ip_frame::checksum, ethernet_frame::destination, ip_frame::dip, ip_frame::frags, ethernet_frame::frame_size, ip_frame::id, ip_check_cs(), IP_ICMP, NETWORK_RECEIVE_INITIALIZE, ip_frame::opt, PHY_ADR_LEN, ethernet_frame::protocol, ip_frame::protocol, PROTOCOL_IP, RECEIVE_NETWORK_B, ip_frame::sip, ethernet_frame::source, ip_frame::tlen, ip_frame::tos, TRUE, ip_frame::ttl, and ip_frame::vihl. |
|
|
|
Definition at line 550 of file udp.c. References ip_frame::buf_index, udp_frame::buf_index, udp_frame::checksum, ip_frame::dip, udp_frame::dport, ip_checksum(), IP_UDP, ucb::locport, NETWORK_RECEIVE_INITIALIZE, ucb::opts, ip_frame::protocol, RECEIVE_NETWORK_B, ip_frame::sip, udp_frame::sport, ucb::state, udp_frame::tlen, UDP_EVENT_DATA, UDP_HLEN, UDP_OPT_CHECK_CS, and UDP_STATE_OPENED. |