uc-sdk
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
inet.h File Reference
#include "lwip/opt.h"
#include "lwip/pbuf.h"
#include "lwip/ip_addr.h"

Go to the source code of this file.

Functions

u16_t inet_chksum (void *data, u16_t len)
 
u16_t inet_chksum_pbuf (struct pbuf *p)
 
u16_t inet_chksum_pseudo (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, u8_t proto, u32_t proto_len)
 
u32_t inet_addr (const char *cp)
 
s8_t inet_aton (const char *cp, struct in_addr *addr)
 
u16_t htons (u16_t n)
 
u16_t ntohs (u16_t n)
 
u32_t htonl (u32_t n)
 
u32_t ntohl (u32_t n)
 

Function Documentation

u32_t htonl ( u32_t  n)
u16_t htons ( u16_t  n)
u32_t inet_addr ( const char *  cp)
s8_t inet_aton ( const char *  cp,
struct in_addr addr 
)
u16_t inet_chksum ( void *  data,
u16_t  len 
)

Definition at line 396 of file inet_chksum.c.

u16_t inet_chksum_pbuf ( struct pbuf p)

Calculate a checksum over a chain of pbufs (without pseudo-header, much like inet_chksum only pbufs are used).

Parameters
ppbuf chain over that the checksum should be calculated
Returns
checksum (as u16_t) to be saved directly in the protocol header

Definition at line 409 of file inet_chksum.c.

u16_t inet_chksum_pseudo ( struct pbuf p,
struct ip_addr src,
struct ip_addr dest,
u8_t  proto,
u32_t  proto_len 
)

Definition at line 80 of file inet6.c.

u32_t ntohl ( u32_t  n)
u16_t ntohs ( u16_t  n)