|
DTS Application Library
0.2.3
Application library containing referenced objects and interfaces to common libraries
|
Helper functions for various calculations. More...
Modules | |
| IPv4 functions | |
| Helper functions for various calculations. | |
| IPv6 functions | |
| Helper functions for various calculations. | |
Files | |
| file | iputil.c |
| IPv4 And IPv6 Utiliies. | |
Enumerations | |
| enum | ipversion { IP_PROTO_V4 = 4, IP_PROTO_V6 = 6 } |
| IP Protocol numbers. More... | |
Functions | |
| int | packetchecksum (uint8_t *pkt) |
| Generic IPv4 and IPv6 Checksum. More... | |
| int | inet_lookup (int family, const char *host, void *addr, socklen_t len) |
| Perform DNS lookup on a host/ip retun the IP address. More... | |
Helper functions for various calculations.
| enum ipversion |
IP Protocol numbers.
| Enumerator | |
|---|---|
| IP_PROTO_V4 | |
| IP_PROTO_V6 | |
Definition at line 77 of file iputil.c.
| int inet_lookup | ( | int | family, |
| const char * | host, | ||
| void * | addr, | ||
| socklen_t | len | ||
| ) |
Perform DNS lookup on a host/ip retun the IP address.
| family | Protocol family either PF_INET or PF_INET6. |
| host | Hostname or IP address to lookup. |
| addr | A structure in_addr or in6_addr the result is returned in. |
| len | Length of the structure to place the result. |
Definition at line 523 of file iputil.c.
Referenced by mcast_socket().
| int packetchecksum | ( | uint8_t * | pkt | ) |
Generic IPv4 and IPv6 Checksum.
| pkt | Packet buffer to check. |
Definition at line 208 of file iputil.c.
References IP_PROTO_V4, IP_PROTO_V6, and packetchecksumv4().