![]()  | 
  
    EVE 1.0
    
   | 
 
 
 | 
Files | |
| file | uip_arch.h | 
Functions | |
| void | uip_add32 (uint8_t *op32, uint16_t op16) | 
| uint16_t | uip_chksum (uint16_t *buf, uint16_t len) | 
| uint16_t | uip_ipchksum (void) | 
| uint16_t | uip_tcpchksum (void) | 
Variables | |
| uint8_t | uip_acc32 [4] | 
The functions in the architecture specific module implement the IP check sum and 32-bit additions.
The IP checksum calculation is the most computationally expensive operation in the TCP/IP stack and it therefore pays off to implement this in efficient assembler. The purpose of the uip-arch module is to let the checksum functions to be implemented in architecture specific assembler.
| void uip_add32 | ( | uint8_t * | op32, | 
| uint16_t | op16 | ||
| ) | 
Carry out a 32-bit addition.
Because not all architectures for which uIP is intended has native 32-bit arithmetic, uIP uses an external C function for doing the required 32-bit additions in the TCP protocol processing. This function should add the two arguments and place the result in the global variable uip_acc32.
| op32 | A pointer to a 4-byte array representing a 32-bit integer in network byte order (big endian). | 
| op16 | A 16-bit integer in host byte order. | 
Definition at line 266 of file uip.c.
References data, and uip_acc32.
Referenced by uip_listen(), and uip_process().
| uint16_t uip_chksum | ( | uint16_t * | buf, | 
| uint16_t | len | ||
| ) | 
Calculate the Internet checksum over a buffer.
The Internet checksum is the one's complement of the one's complement sum of all 16-bit words in the buffer.
See RFC1071.
| buf | A pointer to the buffer over which the checksum is to be computed. | 
| len | The length of the buffer over which the checksum is to be computed. | 
Calculate the Internet checksum over a buffer.
The Internet checksum is the one's complement of the one's complement sum of all 16-bit words in the buffer.
See RFC1071.
| buf | A pointer to the buffer over which the checksum is to be computed. | 
| len | The length of the buffer over which the checksum is to be computed. | 
Definition at line 328 of file uip.c.
References uip_htons().
Referenced by uip_fw_init(), and uip_process().
| uint16_t uip_ipchksum | ( | void | ) | 
Calculate the IP header checksum of the packet header in uip_buf.
The IP header checksum is the Internet checksum of the 20 bytes of the IP header.
Definition at line 335 of file uip.c.
References uip_htons(), uip_icmp6chksum(), and UIP_LLH_LEN.
Referenced by uip_fw_init(), uip_listen(), and uip_process().
| uint16_t uip_tcpchksum | ( | void | ) | 
Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
The TCP checksum is the Internet checksum of data contents of the TCP segment, and a pseudo-header as defined in RFC793.
Calculate the TCP checksum of the packet in uip_buf and uip_appdata.
The TCP checksum is the Internet checksum of data contents of the TCP segment, and a pseudo-header as defined in RFC793.
Definition at line 381 of file uip.c.
References uip_udpchksum().
Referenced by uip_process().
| uint8_t uip_acc32[4] | 
4-byte array used for the 32-bit sequence number calculations.
Definition at line 206 of file uip.c.
Referenced by uip_add32(), uip_listen(), and uip_process().