Mistake on this page?
Report an issue in GitHub or email us
Macros
inet_chksum.h File Reference

IP checksum calculation functions. More...

#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"

Go to the source code of this file.

Macros

#define SWAP_BYTES_IN_WORD(w)   (((w) & 0xff) << 8) | (((w) & 0xff00) >> 8)
 Swap the bytes in an u16_t: much like lwip_htons() for little-endian. More...
 
#define FOLD_U32T(u)    ((u32_t)(((u) >> 16) + ((u) & 0x0000ffffUL)))
 Split an u32_t in two u16_ts and add them up. More...
 

Detailed Description

IP checksum calculation functions.

Definition in file inet_chksum.h.

Macro Definition Documentation

#define FOLD_U32T (   u)    ((u32_t)(((u) >> 16) + ((u) & 0x0000ffffUL)))

Split an u32_t in two u16_ts and add them up.

Definition at line 52 of file inet_chksum.h.

#define SWAP_BYTES_IN_WORD (   w)    (((w) & 0xff) << 8) | (((w) & 0xff00) >> 8)

Swap the bytes in an u16_t: much like lwip_htons() for little-endian.

Definition at line 47 of file inet_chksum.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.