Defines | |
| #define | uip_ipaddr(addr, addr0, addr1, addr2, addr3) |
| Construct an IP address from four bytes. | |
| #define | uip_ipaddr_copy(dest, src) |
| Copy an IP address to another IP address. | |
| #define | uip_ipaddr_cmp(addr1, addr2) |
| Compare two IP addresses. | |
| #define | uip_ipaddr_maskcmp(addr1, addr2, mask) |
| Compare two IP addresses with netmasks. | |
| #define | uip_ipaddr_mask(dest, src, mask) |
| Mask out the network part of an IP address. | |
| #define | uip_ipaddr1(addr) |
| Pick the first octet of an IP address. | |
| #define | uip_ipaddr2(addr) |
| Pick the second octet of an IP address. | |
| #define | uip_ipaddr3(addr) |
| Pick the third octet of an IP address. | |
| #define | uip_ipaddr4(addr) |
| Pick the fourth octet of an IP address. | |
| #define | HTONS(n) |
| Convert 16-bit quantity from host byte order to network byte order. | |
Functions | |
| u16_t | htons (u16_t val) |
| Convert 16-bit quantity from host byte order to network byte order. | |
| unsigned char | uiplib_ipaddrconv (char *addrstr, unsigned char *addr) |
| Convert a textual representation of an IP address to a numerical representation. | |
|
|
Convert 16-bit quantity from host byte order to network byte order. This macro is primarily used for converting constants from host byte order to network byte order. For converting variables to network byte order, use the htons() function instead.
|
|
|
Construct an IP address from four bytes. This function constructs an IP address of the type that uIP handles internally from four bytes. The function is handy for specifying IP addresses to use with e.g. the uip_connect() function. Example:
|
|
|
Pick the first octet of an IP address. Picks out the first octet of an IP address. Example: In the example above, the variable "octet" will contain the value 1. |
|
|
Pick the second octet of an IP address. Picks out the second octet of an IP address. Example: In the example above, the variable "octet" will contain the value 2. |
|
|
Pick the third octet of an IP address. Picks out the third octet of an IP address. Example: In the example above, the variable "octet" will contain the value 3. |
|
|
Pick the fourth octet of an IP address. Picks out the fourth octet of an IP address. Example: In the example above, the variable "octet" will contain the value 4. |
|
|
Compare two IP addresses. Compares two IP addresses. Example:
|
|
|
Copy an IP address to another IP address. Copies an IP address from one place to another. Example:
|
|
|
Mask out the network part of an IP address. Masks out the network part of an IP address, given the address and the netmask. Example:
In the example above, the variable "ipaddr2" will contain the IP address 192.168.1.0.
|
|
|
Compare two IP addresses with netmasks. Compares two IP addresses with netmasks. The masks are used to mask out the bits that are to be compared. Example:
|
|
|
Convert 16-bit quantity from host byte order to network byte order. This function is primarily used for converting variables from host byte order to network byte order. For converting constants to network byte order, use the HTONS() macro instead. |
|
||||||||||||
|
Convert a textual representation of an IP address to a numerical representation. This function takes a textual representation of an IP address in the form a.b.c.d and converts it into a 4-byte array that can be used by other uIP functions.
|
1.3.6