Definition in file ip.c.
Go to the source code of this file.
Functions | |
INT16 | process_ip_in (struct ethernet_frame *frame) |
Process received IP frame. | |
INT16 | process_ip_out (UINT32 ipadr, UINT8 pcol, UINT8 tos, UINT8 ttl, UINT8 *dat, UINT16 len) |
Try to send out IP frame. | |
UINT32 | ip_construct_cs (struct ip_frame *frame) |
Construct checksum of the IP header. | |
UINT8 | ip_check_cs (struct ip_frame *frame) |
Check IP frame's checksum. | |
UINT16 | ip_checksum (UINT16 cs, UINT8 dat, UINT8 count) |
Used for constructuing IP checksum. | |
UINT32 | ip_checksum_buf (UINT16 cs, UINT8 *buf, UINT16 len) |
Used for constructuing IP checksum of a data buffer. | |
Variables | |
ip_frame | received_ip_packet |
Used for storing various information about the incoming IP packet. | |
ip_frame | send_ip_packet |
Used for storing various information about the outgoing IP packet. | |
UINT16 | ip_id |
|
Definition at line 115 of file ip.c. References arp_add(), ARP_TEMP_IP, ip_frame::buf_index, ethernet_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, ip_frame::protocol, ethernet_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 300 of file ip.c. References arp_find(), ARP_TEMP_IP, ip_frame::checksum, ip_frame::dip, ip_frame::frags, arp_entry::hwadr, ICMP_BUF, ip_frame::id, ip_construct_cs(), IP_ICMP, ip_id, IP_TCP, IP_UDP, MAXHWALEN, NETWORK_ADD_DATALINK, NETWORK_COMPLETE_SEND, NETWORK_SEND_INITIALIZE, ip_frame::protocol, PROTOCOL_IP, SEND_NETWORK_B, SEND_NETWORK_BUF, ip_frame::sip, TCP_BUF, ip_frame::tlen, ip_frame::tos, ip_frame::ttl, UDP_BUF, and ip_frame::vihl. Referenced by process_icmp_in(), process_tcp_out(), and udp_send(). |
|
Definition at line 417 of file ip.c. References ip_frame::dip, ip_frame::frags, ip_frame::id, ip_checksum(), ip_frame::opt, ip_frame::protocol, ip_frame::sip, ip_frame::tlen, ip_frame::tos, ip_frame::ttl, and ip_frame::vihl. Referenced by process_ip_out(). |
|
Definition at line 474 of file ip.c. References ip_frame::checksum, ip_frame::dip, ip_frame::frags, ip_frame::id, ip_checksum(), ip_frame::opt, ip_frame::protocol, ip_frame::sip, ip_frame::tlen, ip_frame::tos, ip_frame::ttl, and ip_frame::vihl. Referenced by process_ip_in(). |
|
Definition at line 539 of file ip.c. Referenced by ip_check_cs(), ip_checksum_buf(), ip_construct_cs(), process_icmp_in(), process_tcp_out(), process_udp_in(), tcp_check_cs(), and udp_send(). |
|
Definition at line 582 of file ip.c. References ip_checksum(). Referenced by process_icmp_in(), process_tcp_out(), tcp_check_cs(), and udp_send(). |
|
Various fields from the IP packet are stored in this structure. These values are later used from other upper layer protocols (ICMP, UDP, TCP and possibly others) to extract needed information about the received packet. See ip_frame definition for struct information. |
|
Various fields from the IP packet are stored in this structure. These values are filled based on the information supplied by the upper layer protocols (ICMP, UDP, TCP and possibly others) and used to form a correct IP packet (correct filed values, checksum,..). See ip_frame definition for struct information. |
|
ID field in the next IP packet that will be sent Definition at line 97 of file ip.c. Referenced by process_ip_out(). |