mirror of
https://github.com/oliverschmidt/contiki.git
synced 2025-01-05 09:29:39 +00:00
Added a macro for checking if an address is link local.
This commit is contained in:
parent
d1c4b4968c
commit
75dd41601b
@ -47,7 +47,7 @@
|
|||||||
*
|
*
|
||||||
* This file is part of the uIP TCP/IP stack.
|
* This file is part of the uIP TCP/IP stack.
|
||||||
*
|
*
|
||||||
* $Id: uip.h,v 1.28 2010/03/16 15:35:03 joxe Exp $
|
* $Id: uip.h,v 1.29 2010/04/06 16:47:18 nvt-se Exp $
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1970,6 +1970,14 @@ CCIF extern uip_lladdr_t uip_lladdr;
|
|||||||
(((a)->u8[14]) == 0) && \
|
(((a)->u8[14]) == 0) && \
|
||||||
(((a)->u8[15]) == 0x02))
|
(((a)->u8[15]) == 0x02))
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \brief Checks whether the address a is link local.
|
||||||
|
* a is of type uip_ipaddr_t
|
||||||
|
*/
|
||||||
|
#define uip_is_addr_linklocal(a) \
|
||||||
|
((a)->u8[0] == 0xfe && \
|
||||||
|
(a)->u8[1] == 0x80)
|
||||||
|
|
||||||
/** \brief set IP address a to unspecified */
|
/** \brief set IP address a to unspecified */
|
||||||
#define uip_create_unspecified(a) uip_ip6addr(a, 0, 0, 0, 0, 0, 0, 0, 0)
|
#define uip_create_unspecified(a) uip_ip6addr(a, 0, 0, 0, 0, 0, 0, 0, 0)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user