UbixOS V2 2.0

Macros | Typedefs | Enumerations
ip_addr.h File Reference
`#include <net/opt.h>`
`#include <net/def.h>`
`#include <net/ip4_addr.h>`
`#include <net/ip6_addr.h>`
Include dependency graph for ip_addr.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Macros
#define | IP46_ADDR_ANY(type) (IP6_ADDR_ANY)
#define | ip_2_ip6(ipaddr) (ipaddr)
#define | IP_ADDR6(ipaddr, i0, i1, i2, i3) IP6_ADDR(ipaddr,i0,i1,i2,i3)
#define | IP_ADDR6_HOST(ipaddr, i0, i1, i2, i3) IP_ADDR6(ipaddr,PP_HTONL(i0),PP_HTONL(i1),PP_HTONL(i2),PP_HTONL(i3))
#define | ip_addr_cmp(addr1, addr2) ip6_addr_cmp(addr1, addr2)
#define | ip_addr_copy(dest, src) ip6_addr_copy(dest, src)
#define | ip_addr_copy_from_ip6(dest, src) ip6_addr_copy(dest, src)
#define | ip_addr_debug_print(debug, ipaddr) ip6_addr_debug_print(debug, ipaddr)
#define | ip_addr_debug_print_val(debug, ipaddr) ip6_addr_debug_print_val(debug, ipaddr)
#define | ip_addr_get_network(target, host, mask) ip6_addr_set_zero(target)
#define | ip_addr_isany(ipaddr) ip6_addr_isany(ipaddr)
#define | ip_addr_isany_val(ipaddr) ip6_addr_isany_val(ipaddr)
#define | ip_addr_isbroadcast(addr, netif) 0
#define | ip_addr_islinklocal(ipaddr) ip6_addr_islinklocal(ipaddr)
#define | ip_addr_isloopback(ipaddr) ip6_addr_isloopback(ipaddr)
#define | ip_addr_ismulticast(ipaddr) ip6_addr_ismulticast(ipaddr)
#define | ip_addr_netcmp(addr1, addr2, mask) 0
#define | IP_ADDR_PCB_VERSION_MATCH(addr, pcb) 1
#define | IP_ADDR_PCB_VERSION_MATCH_EXACT(pcb, ipaddr) 1
#define | ip_addr_set(dest, src) ip6_addr_set(dest, src)
#define | ip_addr_set_any(is_ipv6, ipaddr) ip6_addr_set_any(ipaddr)
#define | ip_addr_set_hton(dest, src) ip6_addr_set_hton(dest, src)
#define | ip_addr_set_ipaddr(dest, src) ip6_addr_set(dest, src)
#define | ip_addr_set_loopback(is_ipv6, ipaddr) ip6_addr_set_loopback(ipaddr)
#define | ip_addr_set_zero(ipaddr) ip6_addr_set_zero(ipaddr)
#define | ip_addr_set_zero_ip6(ipaddr) ip6_addr_set_zero(ipaddr)
#define | IP_ANY_TYPE IP_ADDR_ANY
#define | IP_GET_TYPE(ipaddr) IPADDR_TYPE_V6
#define | IP_IS_ANY_TYPE_VAL(ipaddr) 0
#define | IP_IS_V4(ipaddr) 0
#define | IP_IS_V4_VAL(ipaddr) 0
#define | IP_IS_V6(ipaddr) 1
#define | IP_IS_V6_VAL(ipaddr) 1
#define | IP_SET_TYPE(ipaddr, iptype)
#define | IP_SET_TYPE_VAL(ipaddr, iptype)
#define | IPADDR6_INIT(a, b, c, d) { { a, b, c, d } }
#define | IPADDR6_INIT_HOST(a, b, c, d) { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } }
#define | ipaddr_aton(cp, addr) ip6addr_aton(cp, addr)
#define | ipaddr_ntoa(ipaddr) ip6addr_ntoa(ipaddr)
#define | ipaddr_ntoa_r(ipaddr, buf, buflen) ip6addr_ntoa_r(ipaddr, buf, buflen)
#define | IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX

## Typedefs
typedef ip6_addr_t | ip_addr_t

## Enumerations
enum | lwip_ip_addr_type { IPADDR_TYPE_V4 = 0U, IPADDR_TYPE_V6 = 6U, IPADDR_TYPE_ANY = 46U }

## Detailed Description

IP address API (common IPv4 and IPv6)

Definition in file ip_addr.h.

## Macro Definition Documentation

## ◆ IP46_ADDR_ANY

#define IP46_ADDR_ANY | ( |  | type | ) | (IP6_ADDR_ANY)

Definition at line 331 of file ip_addr.h.

## ◆ ip_2_ip6

#define ip_2_ip6 | ( |  | ipaddr | ) | (ipaddr)

Definition at line 301 of file ip_addr.h.

## ◆ IP_ADDR6

#define IP_ADDR6 | ( |  | ipaddr,
|  |  | i0,
|  |  | i1,
|  |  | i2,
|  |  | i3
| ) |  | IP6_ADDR(ipaddr,i0,i1,i2,i3)

Definition at line 302 of file ip_addr.h.

## ◆ IP_ADDR6_HOST

#define IP_ADDR6_HOST | ( |  | ipaddr,
|  |  | i0,
|  |  | i1,
|  |  | i2,
|  |  | i3
| ) |  | IP_ADDR6(ipaddr,PP_HTONL(i0),PP_HTONL(i1),PP_HTONL(i2),PP_HTONL(i3))

Definition at line 303 of file ip_addr.h.

## ◆ ip_addr_cmp

#define ip_addr_cmp | ( |  | addr1,
|  |  | addr2
| ) |  | ip6_addr_cmp(addr1, addr2)

Definition at line 316 of file ip_addr.h.

## ◆ ip_addr_copy

#define ip_addr_copy | ( |  | dest,
|  |  | src
| ) |  | ip6_addr_copy(dest, src)

Definition at line 305 of file ip_addr.h.

## ◆ ip_addr_copy_from_ip6

#define ip_addr_copy_from_ip6 | ( |  | dest,
|  |  | src
| ) |  | ip6_addr_copy(dest, src)

Definition at line 306 of file ip_addr.h.

## ◆ ip_addr_debug_print

#define ip_addr_debug_print | ( |  | debug,
|  |  | ipaddr
| ) |  | ip6_addr_debug_print(debug, ipaddr)

Definition at line 323 of file ip_addr.h.

## ◆ ip_addr_debug_print_val

#define ip_addr_debug_print_val | ( |  | debug,
|  |  | ipaddr
| ) |  | ip6_addr_debug_print_val(debug, ipaddr)

Definition at line 324 of file ip_addr.h.

## ◆ ip_addr_get_network

#define ip_addr_get_network | ( |  | target,
|  |  | host,
|  |  | mask
| ) |  | ip6_addr_set_zero(target)

Definition at line 314 of file ip_addr.h.

## ◆ ip_addr_isany

#define ip_addr_isany | ( |  | ipaddr | ) | ip6_addr_isany(ipaddr)

Definition at line 317 of file ip_addr.h.

## ◆ ip_addr_isany_val

#define ip_addr_isany_val | ( |  | ipaddr | ) | ip6_addr_isany_val(ipaddr)

Definition at line 318 of file ip_addr.h.

## ◆ ip_addr_isbroadcast

#define ip_addr_isbroadcast | ( |  | addr,
|  |  | netif
| ) |  | 0

Definition at line 321 of file ip_addr.h.

## ◆ ip_addr_islinklocal

#define ip_addr_islinklocal | ( |  | ipaddr | ) | ip6_addr_islinklocal(ipaddr)

Definition at line 320 of file ip_addr.h.

## ◆ ip_addr_isloopback

#define ip_addr_isloopback | ( |  | ipaddr | ) | ip6_addr_isloopback(ipaddr)

Definition at line 319 of file ip_addr.h.

## ◆ ip_addr_ismulticast

#define ip_addr_ismulticast | ( |  | ipaddr | ) | ip6_addr_ismulticast(ipaddr)

Definition at line 322 of file ip_addr.h.

## ◆ ip_addr_netcmp

#define ip_addr_netcmp | ( |  | addr1,
|  |  | addr2,
|  |  | mask
| ) |  | 0

Definition at line 315 of file ip_addr.h.

## ◆ IP_ADDR_PCB_VERSION_MATCH

#define IP_ADDR_PCB_VERSION_MATCH | ( |  | addr,
|  |  | pcb
| ) |  | 1

Definition at line 239 of file ip_addr.h.

## ◆ IP_ADDR_PCB_VERSION_MATCH_EXACT

#define IP_ADDR_PCB_VERSION_MATCH_EXACT | ( |  | pcb,
|  |  | ipaddr
| ) |  | 1

Definition at line 240 of file ip_addr.h.

## ◆ ip_addr_set

#define ip_addr_set | ( |  | dest,
|  |  | src
| ) |  | ip6_addr_set(dest, src)

Definition at line 307 of file ip_addr.h.

## ◆ ip_addr_set_any

#define ip_addr_set_any | ( |  | is_ipv6,
|  |  | ipaddr
| ) |  | ip6_addr_set_any(ipaddr)

Definition at line 311 of file ip_addr.h.

## ◆ ip_addr_set_hton

#define ip_addr_set_hton | ( |  | dest,
|  |  | src
| ) |  | ip6_addr_set_hton(dest, src)

Definition at line 313 of file ip_addr.h.

## ◆ ip_addr_set_ipaddr

#define ip_addr_set_ipaddr | ( |  | dest,
|  |  | src
| ) |  | ip6_addr_set(dest, src)

Definition at line 308 of file ip_addr.h.

## ◆ ip_addr_set_loopback

#define ip_addr_set_loopback | ( |  | is_ipv6,
|  |  | ipaddr
| ) |  | ip6_addr_set_loopback(ipaddr)

Definition at line 312 of file ip_addr.h.

## ◆ ip_addr_set_zero

#define ip_addr_set_zero | ( |  | ipaddr | ) | ip6_addr_set_zero(ipaddr)

Definition at line 309 of file ip_addr.h.

## ◆ ip_addr_set_zero_ip6

#define ip_addr_set_zero_ip6 | ( |  | ipaddr | ) | ip6_addr_set_zero(ipaddr)

Definition at line 310 of file ip_addr.h.

## ◆ IP_ANY_TYPE

#define IP_ANY_TYPE IP_ADDR_ANY

Definition at line 400 of file ip_addr.h.

## ◆ IP_GET_TYPE

#define IP_GET_TYPE | ( |  | ipaddr | ) | IPADDR_TYPE_V6

Definition at line 300 of file ip_addr.h.

## ◆ IP_IS_ANY_TYPE_VAL

#define IP_IS_ANY_TYPE_VAL | ( |  | ipaddr | ) | 0

Definition at line 297 of file ip_addr.h.

## ◆ IP_IS_V4

#define IP_IS_V4 | ( |  | ipaddr | ) | 0

Definition at line 295 of file ip_addr.h.

## ◆ IP_IS_V4_VAL

#define IP_IS_V4_VAL | ( |  | ipaddr | ) | 0

Definition at line 293 of file ip_addr.h.

## ◆ IP_IS_V6

#define IP_IS_V6 | ( |  | ipaddr | ) | 1

Definition at line 296 of file ip_addr.h.

## ◆ IP_IS_V6_VAL

#define IP_IS_V6_VAL | ( |  | ipaddr | ) | 1

Definition at line 294 of file ip_addr.h.

## ◆ IP_SET_TYPE

#define IP_SET_TYPE | ( |  | ipaddr,
|  |  | iptype
| ) |  |

Definition at line 299 of file ip_addr.h.

## ◆ IP_SET_TYPE_VAL

#define IP_SET_TYPE_VAL | ( |  | ipaddr,
|  |  | iptype
| ) |  |

Definition at line 298 of file ip_addr.h.

## ◆ IPADDR6_INIT

#define IPADDR6_INIT | ( |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  | { { a, b, c, d } }

Definition at line 291 of file ip_addr.h.

## ◆ IPADDR6_INIT_HOST

#define IPADDR6_INIT_HOST | ( |  | a,
|  |  | b,
|  |  | c,
|  |  | d
| ) |  | { { PP_HTONL(a), PP_HTONL(b), PP_HTONL(c), PP_HTONL(d) } }

Definition at line 292 of file ip_addr.h.

## ◆ ipaddr_aton

#define ipaddr_aton | ( |  | cp,
|  |  | addr
| ) |  | ip6addr_aton(cp, addr)

Definition at line 327 of file ip_addr.h.

## ◆ ipaddr_ntoa

#define ipaddr_ntoa | ( |  | ipaddr | ) | ip6addr_ntoa(ipaddr)

Definition at line 325 of file ip_addr.h.

## ◆ ipaddr_ntoa_r

#define ipaddr_ntoa_r | ( |  | ipaddr,
|  |  | buf,
|  |  | buflen
| ) |  | ip6addr_ntoa_r(ipaddr, buf, buflen)

Definition at line 326 of file ip_addr.h.

## ◆ IPADDR_STRLEN_MAX

#define IPADDR_STRLEN_MAX IP6ADDR_STRLEN_MAX

Definition at line 329 of file ip_addr.h.

## Typedef Documentation

## ◆ ip_addr_t

typedef ip6_addr_t ip_addr_t

Definition at line 290 of file ip_addr.h.