![]() |
nRF5 SDK
v16.0.0
|
| Choose documentation: | nRF5 SDK | S112 SoftDevice API | S113 SoftDevice API | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S312 SoftDevice API | S332 SoftDevice API | S340 SoftDevice API |
Common IoT definitions that are needed by IoT modules. More...
Modules | |
| ICMPv6 message types. | |
Data Structures | |
| struct | eui64_t |
| union | ipv6_addr_t |
| struct | ipv6_header_t |
| struct | udp6_header_t |
| struct | icmp6_header_t |
Macros | |
| #define | HTONS(val) ((uint16_t)((((val) & 0xff00) >> 8) | ((((val) & 0x00ff) << 8)))) |
| Host to network byte-orders on half word. | |
| #define | HTONL(val) |
| Host to network byte-orders on full word. More... | |
| #define | NTOHS(val) HTONS(val) |
| Network to host byte-orders on half word. | |
| #define | NTOHL(val) HTONL(val) |
| Network to host byte-orders on full word. | |
| #define | EUI_64_ADDR_SIZE 8 |
| #define | IPV6_ADDR_SIZE 16 |
| #define | IPV6_CONTEXT_IDENTIFIER_NONE 0xFF |
| #define | IPV6_IID_FLIP_VALUE 0x00 |
| #define | IPV6_LL_ADDR_SIZE 6 |
| #define | IPV6_IP_HEADER_SIZE 40 |
| #define | ICMP6_HEADER_SIZE 8 |
| #define | UDP_HEADER_SIZE 8 |
| #define | COAP_HEADER_SIZE 4 |
| #define | IPV6_DEFAULT_VER_TC 0x60 |
| #define | IPV6_DEFAULT_TC_FL 0x00 |
| #define | IPV6_DEFAULT_FL 0x00 |
| #define | IPV6_NEXT_HEADER_TCP 6 |
| #define | IPV6_NEXT_HEADER_UDP 17 |
| #define | IPV6_NEXT_HEADER_ICMP6 58 |
| #define | IPV6_NEXT_HEADER_RESERVED 255 |
| #define | IPV6_ADDRESS_INITIALIZE(ADDR) memset((ADDR)->u8, 0, IPV6_ADDR_SIZE) |
| Initializes IPv6 address. | |
| #define | IPV6_ADDRESS_PREFIX_CMP(prefix, prefix2, length) |
| Checks if prefixes match. Length in bits. More... | |
| #define | IPV6_ADDRESS_PREFIX_SET(pfx_to, pfx_from, length) |
| Sets address prefix. Length in bits. More... | |
| #define | IPV6_EUI64_CREATE_FROM_EUI48(eui64, eui48, addr_type) |
| Creates EUI-64 address from EUI-48. More... | |
| #define | IPV6_CREATE_LINK_LOCAL_FROM_EUI64(addr, eui64) |
| Creates link-local address from EUI-64. More... | |
| #define | IPV6_ADDRESS_IS_LINK_LOCAL(addr) ((addr)->u16[0] == HTONS(0xfe80)) |
| Checks if address is a link-local address. | |
| #define | IPV6_ADDRESS_IS_MULTICAST(addr) ((addr)->u8[0] == 0xff) |
| Checks if address is a multicast address. | |
| #define | IPV6_ADDRESS_IS_ALL_NODE(addr) |
| Checks if address is a multicast all-node address. More... | |
| #define | IPV6_ADDRESS_IS_ALL_ROUTER(addr) |
| Checks if address is a multicast all-router address. More... | |
| #define | IPV6_ADDRESS_IS_MLDV2_MCAST(addr) |
| Checks if address is a multicast MLDv2 address. More... | |
| #define | IPV6_ADDRESS_IS_MULTICAST_SOLICITED_NODE(addr) |
| Checks if address is a multicast all-node address. More... | |
| #define | IPV6_ADDRESS_IS_UNSPECIFIED(addr) |
| Checks if address is an unspecified address. More... | |
| #define | IPV6_ADDRESS_CMP(addr1, addr2) memcmp((addr1)->u8, (addr2)->u8, IPV6_ADDR_SIZE) |
| Compares two IPv6 addresses. | |
| #define | IPV6_ADDRESS_SWAP(addr1, addr2) |
| Swaps two IPv6 addresses. More... | |
| #define | IPV6_ADDRESS_LOG(addr) |
| Prints an IPV6 address. More... | |
| #define | IPV6_ADDR_ANY &ipv6_addr_any |
| #define | EUI64_LOCAL_IID &eui64_local_iid |
Enumerations | |
| enum | ipv6_addr_state_t { IPV6_ADDR_STATE_UNUSED = 0, IPV6_ADDR_STATE_TENTATIVE, IPV6_ADDR_STATE_PREFERRED, IPV6_ADDR_STATE_DEPRECATED } |
| IPv6 address states. More... | |
Variables | |
| ipv6_addr_t | ipv6_addr_any |
| eui64_t | eui64_local_iid |
Common IoT definitions that are needed by IoT modules.
This module abstracts common data structures and constants related to IoT. These definitions can be used by all the IoT modules.
| #define COAP_HEADER_SIZE 4 |
CoAP header size.
| #define EUI64_LOCAL_IID &eui64_local_iid |
EUI-64 IID of the device.
| #define EUI_64_ADDR_SIZE 8 |
Size of EUI-64.
| #define HTONL | ( | val | ) |
Host to network byte-orders on full word.
| #define ICMP6_HEADER_SIZE 8 |
ICMP header size.
| #define IPV6_ADDR_ANY &ipv6_addr_any |
IPV6 address represents any address.
| #define IPV6_ADDR_SIZE 16 |
Size of IPv6 128-bit address.
| #define IPV6_ADDRESS_IS_ALL_NODE | ( | addr | ) |
| #define IPV6_ADDRESS_IS_ALL_ROUTER | ( | addr | ) |
| #define IPV6_ADDRESS_IS_MLDV2_MCAST | ( | addr | ) |
| #define IPV6_ADDRESS_IS_MULTICAST_SOLICITED_NODE | ( | addr | ) |
| #define IPV6_ADDRESS_IS_UNSPECIFIED | ( | addr | ) |
Checks if address is an unspecified address.
| #define IPV6_ADDRESS_LOG | ( | addr | ) |
Prints an IPV6 address.
EUI 64 data type.
| #define IPV6_ADDRESS_PREFIX_CMP | ( | prefix, | |
| prefix2, | |||
| length | |||
| ) |
Checks if prefixes match. Length in bits.
| #define IPV6_ADDRESS_PREFIX_SET | ( | pfx_to, | |
| pfx_from, | |||
| length | |||
| ) |
Sets address prefix. Length in bits.
| #define IPV6_ADDRESS_SWAP | ( | addr1, | |
| addr2 | |||
| ) |
Swaps two IPv6 addresses.
| #define IPV6_CONTEXT_IDENTIFIER_NONE 0xFF |
No context identifier in use.
| #define IPV6_CREATE_LINK_LOCAL_FROM_EUI64 | ( | addr, | |
| eui64 | |||
| ) |
Creates link-local address from EUI-64.
| #define IPV6_DEFAULT_FL 0x00 |
Default value of the flow label's two last bytes in IPv6 header.
| #define IPV6_DEFAULT_TC_FL 0x00 |
Default value of traffic class and flow label fields in IPv6 header.
| #define IPV6_DEFAULT_VER_TC 0x60 |
Default value of version and traffic class fields in IPv6 header.
| #define IPV6_EUI64_CREATE_FROM_EUI48 | ( | eui64, | |
| eui48, | |||
| addr_type | |||
| ) |
Creates EUI-64 address from EUI-48.
| #define IPV6_IID_FLIP_VALUE 0x00 |
RFC 7668 specifies that no bit is flipped when IID is generated from a Bluetooth Device Address.
| #define IPV6_IP_HEADER_SIZE 40 |
IPv6 header size.
| #define IPV6_LL_ADDR_SIZE 6 |
The link-layer address size used in Neighbor Discovery messages.
| #define IPV6_NEXT_HEADER_ICMP6 58 |
ICMPv6: protocol number.
| #define IPV6_NEXT_HEADER_RESERVED 255 |
Reserved value.
| #define IPV6_NEXT_HEADER_TCP 6 |
TCP: protocol number.
| #define IPV6_NEXT_HEADER_UDP 17 |
UDP: protocol number.
| #define UDP_HEADER_SIZE 8 |
UDP header size.
| enum ipv6_addr_state_t |
| eui64_t eui64_local_iid |
External variable assumed to be implemented in the application with desired EUI-64 to be used as the IID for SLAAC.