# inet.h File Reference

`#include "net/arch.h"`
`#include "net/opt.h"`
`#include "net/pbuf.h"`
`#include "net/ipv4/ip_addr.h"`

Go to the source code of this file.

## Defines

#define | HTONS(n) (n)
#define | htons(n) HTONS(n)
#define | NTOHS HTONS
#define | ntohs htons
#define | HTONL(n) (n)
#define | htonl(n) HTONL(n)
#define | NTOHL HTONL
#define | ntohl htonl

## Functions

uInt16 | inet_chksum (void *dataptr, uInt16 len)
uInt16 | inet_chksum_pbuf (struct pbuf *p)
uInt16 | inet_chksum_pseudo (struct pbuf *p, struct ip_addr *src, struct ip_addr *dest, uInt8 proto, uInt16 proto_len)
uInt16 | htons (uInt16 n)
uInt32 | htonl (uInt32 n)

## Define Documentation

#define htonl | ( | n |  | ) | HTONL(n)

#define HTONL | ( | n |  | ) | (n)

#define htons | ( | n |  | ) | HTONS(n)

#define HTONS | ( | n |  | ) | (n)

#define ntohl htonl

#define NTOHL HTONL

#define ntohs htons

#define NTOHS HTONS

## Function Documentation

uInt32 htonl | ( | uInt32 | n | ) |

uInt16 htons | ( | uInt16 | n | ) |

uInt16 inet_chksum | ( | void * | dataptr,
|  | uInt16 | len
| ) |

uInt16 inet_chksum_pbuf | ( | struct pbuf * | p | ) |

uInt16 inet_chksum_pseudo | ( | struct pbuf * | p,
|  | struct ip_addr * | src,
|  | struct ip_addr * | dest,
|  | uInt8 | proto,
|  | uInt16 | proto_len
| ) |