|
lwIP
2.1.1
Lightweight IP stack
|
Functions | |
| void | ble_addr_to_eui64 (uint8_t *dst, const uint8_t *src, int public_addr) |
| void | eui64_to_ble_addr (uint8_t *dst, const uint8_t *src) |
| err_t | rfc7668_set_context (u8_t idx, const ip6_addr_t *context) |
| err_t | rfc7668_output (struct netif *netif, struct pbuf *q, const ip6_addr_t *ip6addr) |
| err_t | rfc7668_input (struct pbuf *p, struct netif *netif) |
| err_t | rfc7668_if_init (struct netif *netif) |
This file implements a RFC7668 implementation for 6LoWPAN over Bluetooth Low Energy. The specification is very similar to 6LoWPAN, so most of the code is re-used. Compared to 6LoWPAN, much functionality is already implemented in lower BLE layers (fragmenting, session management,...).
Usage:
| void ble_addr_to_eui64 | ( | uint8_t * | dst, |
| const uint8_t * | src, | ||
| int | public_addr | ||
| ) |
convert BT address to EUI64 addr
This method converts a Bluetooth MAC address to an EUI64 address, which is used within IPv6 communication
| dst | IPv6 destination space |
| src | BLE MAC address source |
| public_addr | If the LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS option is set, bit 0x02 will be set if param=0 (no public addr); cleared otherwise |
| void eui64_to_ble_addr | ( | uint8_t * | dst, |
| const uint8_t * | src | ||
| ) |
convert EUI64 address to Bluetooth MAC addr
This method converts an EUI64 address to a Bluetooth MAC address,
| dst | BLE MAC address destination |
| src | IPv6 source |
Initialize the netif
No flags are used (broadcast not possible, not ethernet, ...) The shortname for this netif is "BT"
| netif | the network interface to be initialized as RFC7668 netif |
Process a received raw payload from an L2CAP channel
| p | the received packet, p->payload pointing to the IPv6 header (maybe compressed) |
| netif | the network interface on which the packet was received |
| 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
| netif | The lwIP network interface which the IP packet will be sent on. |
| q | The pbuf(s) containing the IP packet to be sent. |
| ip6addr | The IP address of the packet destination. |
| err_t rfc7668_set_context | ( | u8_t | idx, |
| const ip6_addr_t * | context | ||
| ) |
Set context id IPv6 address
Store one IPv6 address to a given context id.
| idx | Context id |
| context | IPv6 addr for this context |