mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
lowpan6_ble.c: fixed whitespace & indentation
This commit is contained in:
parent
10209ee788
commit
69eaafecca
@ -110,10 +110,13 @@ void ble_addr_to_eui64(uint8_t *dst, uint8_t *src, uint8_t public_addr)
|
||||
dst[3] = 0xFF;
|
||||
dst[4] = 0xFE;
|
||||
memcpy(&dst[5], &src[3], 3);
|
||||
#if LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS
|
||||
if(public_addr) dst[0] &= ~0x02;
|
||||
else dst[0] |= 0x02;
|
||||
#endif
|
||||
#if LWIP_RFC7668_LINUX_WORKAROUND_PUBLIC_ADDRESS
|
||||
if(public_addr) {
|
||||
dst[0] &= ~0x02;
|
||||
} else {
|
||||
dst[0] |= 0x02;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/** convert EUI64 address to Bluetooth MAC addr
|
||||
@ -140,7 +143,7 @@ void eui64_to_ble_addr(uint8_t *dst, uint8_t *src)
|
||||
static s8_t
|
||||
rfc7668_context_lookup(const ip6_addr_t *ip6addr)
|
||||
{
|
||||
#if LWIP_RFC7668_NUM_CONTEXTS > 0
|
||||
#if LWIP_RFC7668_NUM_CONTEXTS > 0
|
||||
s8_t i;
|
||||
/* iterate over all possible context addresses */
|
||||
for (i = 0; i < LWIP_RFC7668_NUM_CONTEXTS; i++) {
|
||||
@ -149,7 +152,7 @@ rfc7668_context_lookup(const ip6_addr_t *ip6addr)
|
||||
return i;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
/* no address found, return -1 */
|
||||
return -1;
|
||||
}
|
||||
@ -461,7 +464,7 @@ rfc7668_frag(struct netif *netif, struct pbuf *p, const ip6_addr_t * src, const
|
||||
err_t
|
||||
rfc7668_set_context(u8_t idx, const ip6_addr_t * context)
|
||||
{
|
||||
#if LWIP_RFC7668_NUM_CONTEXTS > 0
|
||||
#if LWIP_RFC7668_NUM_CONTEXTS > 0
|
||||
/* check if the ID is possible */
|
||||
if (idx >= LWIP_RFC7668_NUM_CONTEXTS) {
|
||||
return ERR_ARG;
|
||||
@ -469,9 +472,9 @@ rfc7668_set_context(u8_t idx, const ip6_addr_t * context)
|
||||
/* copy IPv6 address to context storage */
|
||||
ip6_addr_set(&rfc7668_context[idx], context);
|
||||
return ERR_OK;
|
||||
#else
|
||||
#else
|
||||
return ERR_VAL;
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
@ -528,7 +531,7 @@ rfc7668_decompress(struct pbuf * p, const ip6_addr_t * src, const ip6_addr_t * d
|
||||
ip6hdr = (struct ip6_hdr *)q->payload;
|
||||
|
||||
/* output the full compressed packet, if set in @see rfc7668_opt.h */
|
||||
#if LWIP_RFC7668_IP_COMPRESSED_DEBUG
|
||||
#if LWIP_RFC7668_IP_COMPRESSED_DEBUG
|
||||
LWIP_DEBUGF(LWIP_RFC7668_DEBUG|LWIP_RFC7668_IP_COMPRESSED_DEBUG,("IP6 payload(compressed): \n"));
|
||||
for(j = 0; j<p->len;j++)
|
||||
{
|
||||
@ -537,7 +540,7 @@ rfc7668_decompress(struct pbuf * p, const ip6_addr_t * src, const ip6_addr_t * d
|
||||
}
|
||||
LWIP_DEBUGF(LWIP_RFC7668_DEBUG|LWIP_RFC7668_IP_COMPRESSED_DEBUG,("\np->len: %d",p->len));
|
||||
printf("\np->len: %d\n",p->len);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* offset for inline IP headers (RFC 6282 ch3)*/
|
||||
lowpan6_offset = 2;
|
||||
|
Loading…
x
Reference in New Issue
Block a user