Microchip® Advanced Software Framework

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Architecture specific uIP functions

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.

Files

file  uip_arch.h
 Declarations of architecture specific functions.
 

Functions

void uip_add32 (uint8_t *op32, uint16_t op16)
 Carry out a 32-bit addition. More...
 

Variables

uint8_t uip_acc32 [4]
 4-byte array used for the 32-bit sequence number calculations. More...
 

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.

Note
The 32-bit integer pointed to by the op32 parameter and the result in the uip_acc32 variable are in network byte order (big endian).
Parameters
op32A pointer to a 4-byte array representing a 32-bit integer in network byte order (big endian).
op16A 16-bit integer in host byte order.

Referenced by uip_process(), and uip_split_output().

uint8_t uip_acc32[4]

4-byte array used for the 32-bit sequence number calculations.

Referenced by uip_split_output().