Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
6LowPAN over BLE output for IPv6 (RFC7668). More...
Go to the source code of this file.
Functions | |
| void | ble_addr_to_eui64 (uint8_t *dst, const uint8_t *src, int public_addr) |
| convert BT address to EUI64 addr | |
| void | eui64_to_ble_addr (uint8_t *dst, const uint8_t *src) |
| convert EUI64 address to Bluetooth MAC addr | |
| static err_t | rfc7668_set_addr (struct lowpan6_link_addr *addr, const u8_t *in_addr, size_t in_addr_len, int is_mac_48, int is_public_addr) |
| Set an address used for stateful compression. | |
| err_t | rfc7668_set_local_addr_eui64 (struct netif *netif, const u8_t *local_addr, size_t local_addr_len) |
| Set the local address used for stateful compression. | |
| err_t | rfc7668_set_local_addr_mac48 (struct netif *netif, const u8_t *local_addr, size_t local_addr_len, int is_public_addr) |
| Set the local address used for stateful compression. | |
| err_t | rfc7668_set_peer_addr_eui64 (struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len) |
| Set the peer address used for stateful compression. | |
| err_t | rfc7668_set_peer_addr_mac48 (struct netif *netif, const u8_t *peer_addr, size_t peer_addr_len, int is_public_addr) |
| Set the peer address used for stateful compression. | |
| static err_t | rfc7668_compress (struct netif *netif, struct pbuf *p) |
| Encapsulate IPv6 frames for BLE transmission. | |
| err_t | rfc7668_set_context (u8_t idx, const ip6_addr_t *context) |
| Set context id IPv6 address. | |
| err_t | rfc7668_output (struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) |
| Compress outgoing IPv6 packet and pass it on to netif->linkoutput. | |
| err_t | rfc7668_input (struct pbuf *p, struct netif *netif) |
| Process a received raw payload from an L2CAP channel. | |
| err_t | rfc7668_if_init (struct netif *netif) |
| Initialize the netif. | |
| err_t | tcpip_rfc7668_input (struct pbuf *p, struct netif *inp) |
| Pass a received packet to tcpip_thread for input processing. | |
Variables | |
| static ip6_addr_t | rfc7668_context [LWIP_6LOWPAN_NUM_CONTEXTS] |
| context memory, containing IPv6 addresses | |
Detailed Description
6LowPAN over BLE output for IPv6 (RFC7668).
Definition in file lwip_lowpan6_ble.c.
Function Documentation
Encapsulate IPv6 frames for BLE transmission.
This method implements the IPv6 header compression: *) According to RFC6282 *) See Figure 2, contains base format of bit positions *) Fragmentation not necessary (done at L2CAP layer of BLE)
- Note:
- Currently the pbuf allocation uses 256 bytes. If longer packets are used (possible due to MTU=1480Bytes), increase it here!
- Parameters:
-
p Pbuf struct, containing the payload data netif Output network interface. Should be of RFC7668 type
- Returns:
- Same as netif->output.
Definition at line 230 of file lwip_lowpan6_ble.c.
| static err_t rfc7668_set_addr | ( | struct lowpan6_link_addr * | addr, |
| const u8_t * | in_addr, | ||
| size_t | in_addr_len, | ||
| int | is_mac_48, | ||
| int | is_public_addr | ||
| ) | [static] |
Set an address used for stateful compression.
This expects an address of 6 or 8 bytes.
Definition at line 150 of file lwip_lowpan6_ble.c.
| err_t rfc7668_set_local_addr_eui64 | ( | struct netif * | netif, |
| const u8_t * | local_addr, | ||
| size_t | local_addr_len | ||
| ) |
Set the local address used for stateful compression.
This expects an address of 8 bytes.
Definition at line 176 of file lwip_lowpan6_ble.c.
| err_t rfc7668_set_local_addr_mac48 | ( | struct netif * | netif, |
| const u8_t * | local_addr, | ||
| size_t | local_addr_len, | ||
| int | is_public_addr | ||
| ) |
Set the local address used for stateful compression.
This expects an address of 6 bytes.
Definition at line 187 of file lwip_lowpan6_ble.c.
| err_t rfc7668_set_peer_addr_eui64 | ( | struct netif * | netif, |
| const u8_t * | peer_addr, | ||
| size_t | peer_addr_len | ||
| ) |
Set the peer address used for stateful compression.
This expects an address of 8 bytes.
Definition at line 198 of file lwip_lowpan6_ble.c.
| err_t rfc7668_set_peer_addr_mac48 | ( | struct netif * | netif, |
| const u8_t * | peer_addr, | ||
| size_t | peer_addr_len, | ||
| int | is_public_addr | ||
| ) |
Set the peer address used for stateful compression.
This expects an address of 6 bytes.
Definition at line 209 of file lwip_lowpan6_ble.c.
Pass a received packet to tcpip_thread for input processing.
- Parameters:
-
p the received packet, p->payload pointing to the IEEE 802.15.4 header. inp the network interface on which the packet was received
- Returns:
- see tcpip_inpkt, same return values
Definition at line 440 of file lwip_lowpan6_ble.c.
Variable Documentation
ip6_addr_t rfc7668_context[LWIP_6LOWPAN_NUM_CONTEXTS] [static] |
context memory, containing IPv6 addresses
Definition at line 87 of file lwip_lowpan6_ble.c.
Generated on Tue Jul 12 2022 13:55:14 by
1.7.2