|
u16_t | uip_chksum (u16_t *buf, u32_t len) |
|
u16_t | uip_ipchksum (void *dataptr, u16_t len) |
|
u16_t | uip_ipchksum_pbuf (struct uip_pbuf *p) |
|
u16_t | uip_chksum_pseudo (struct uip_pbuf *p, struct uip_ip_addr *src, struct uip_ip_addr *dst, u8_t proto, u16_t proto_len) |
|
void | tcpip_tmr_needed () |
|
static __inline__ void | uip_memcpy (void *dest, const void *src, s32_t len) |
|
static __inline__ void | uip_memset (void *dest, s32_t c, s32_t len) |
|
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.
◆ ERROR
#define ERROR |
( |
|
fmt, |
|
|
|
... |
|
) |
| |
◆ le64toh
◆ LOG
◆ MEM_ALIGN [1/2]
◆ MEM_ALIGN [2/2]
◆ MEM_ALIGN_SIZE [1/2]
◆ MEM_ALIGN_SIZE [2/2]
◆ MEM_ALIGNMENT [1/2]
◆ MEM_ALIGNMENT [2/2]
◆ MEMCPY
◆ MEMSET
◆ PACK_STRUCT_BEGIN
#define PACK_STRUCT_BEGIN |
◆ PACK_STRUCT_END
◆ PACK_STRUCT_FIELD
#define PACK_STRUCT_FIELD |
( |
|
x | ) |
x |
◆ PACK_STRUCT_STRUCT
◆ tcp_tmr_needed
◆ UIP_MEMCPY
◆ UIP_MEMSET
◆ UIP_MIN
#define UIP_MIN |
( |
|
x, |
|
|
|
y |
|
) |
| (x)<(y)?(x):(y) |
◆ tcpip_tmr_needed()
void tcpip_tmr_needed |
( |
| ) |
|
◆ uip_chksum()
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.
- Note
- This function is not called in the current version of uIP, but future versions might make use of it.
- Parameters
-
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. |
- Returns
- The Internet checksum of the buffer.
◆ uip_chksum_pseudo()
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.
- Note
- The uip_appdata pointer that points to the packet data may point anywhere in memory, so it is not possible to simply calculate the Internet checksum of the contents of the uip_buf buffer.
- Returns
- The TCP checksum of the TCP segment in uip_buf and pointed to by uip_appdata.
◆ uip_ipchksum()
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.
- Returns
- The IP header checksum of the IP header in the uip_buf buffer.
◆ uip_ipchksum_pbuf()
◆ uip_memcpy()
◆ uip_memset()