Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
6lowpan.h File Reference

Go to the source code of this file.

Macros

#define UIP_802154_SHORTADDR_LEN   2 /* compressed ipv6 address length */
 
#define UIP_IPH_LEN   40 /* ipv6 fixed header size */
 
#define UIP_PROTO_UDP   17 /* ipv6 next header value for UDP */
 
#define UIP_FRAGH_LEN   8 /* ipv6 fragment header size */
 
#define is_addr_mac_addr_based(a, m)
 
#define is_addr_unspecified(a)
 
#define ipaddr_prefixcmp(addr1, addr2, length)   (memcmp(addr1, addr2, length >> 3) == 0)
 
#define is_addr_link_local(a)   (((a)->s6_addr16[0]) == 0x80FE)
 
#define lowpan_is_iid_16_bit_compressable(a)
 
#define is_addr_mcast(a)   (((a)->s6_addr[0]) == 0xFF)
 
#define lowpan_is_mcast_addr_compressable(a)
 
#define lowpan_is_mcast_addr_compressable48(a)
 
#define lowpan_is_mcast_addr_compressable32(a)
 
#define lowpan_is_mcast_addr_compressable8(a)
 
#define lowpan_is_addr_broadcast(a)
 
#define LOWPAN_DISPATCH_IPV6   0x41 /* 01000001 = 65 */
 
#define LOWPAN_DISPATCH_HC1   0x42 /* 01000010 = 66 */
 
#define LOWPAN_DISPATCH_IPHC   0x60 /* 011xxxxx = ... */
 
#define LOWPAN_DISPATCH_FRAG1   0xc0 /* 11000xxx */
 
#define LOWPAN_DISPATCH_FRAGN   0xe0 /* 11100xxx */
 
#define LOWPAN_DISPATCH_MASK   0xf8 /* 11111000 */
 
#define LOWPAN_FRAG_TIMEOUT   (HZ * 60) /* time-out 60 sec */
 
#define LOWPAN_FRAG1_HEAD_SIZE   0x4
 
#define LOWPAN_FRAGN_HEAD_SIZE   0x5
 
#define LOWPAN_FRAG_SIZE   88
 
#define LOWPAN_IPHC_TF   0x18
 
#define LOWPAN_IPHC_FL_C   0x10
 
#define LOWPAN_IPHC_TC_C   0x08
 
#define LOWPAN_IPHC_NH_C   0x04
 
#define LOWPAN_IPHC_TTL_1   0x01
 
#define LOWPAN_IPHC_TTL_64   0x02
 
#define LOWPAN_IPHC_TTL_255   0x03
 
#define LOWPAN_IPHC_TTL_I   0x00
 
#define LOWPAN_IPHC_CID   0x80
 
#define LOWPAN_IPHC_SAC   0x40
 
#define LOWPAN_IPHC_SAM_00   0x00
 
#define LOWPAN_IPHC_SAM_01   0x10
 
#define LOWPAN_IPHC_SAM_10   0x20
 
#define LOWPAN_IPHC_SAM   0x30
 
#define LOWPAN_IPHC_SAM_BIT   4
 
#define LOWPAN_IPHC_M   0x08
 
#define LOWPAN_IPHC_DAC   0x04
 
#define LOWPAN_IPHC_DAM_00   0x00
 
#define LOWPAN_IPHC_DAM_01   0x01
 
#define LOWPAN_IPHC_DAM_10   0x02
 
#define LOWPAN_IPHC_DAM_11   0x03
 
#define LOWPAN_IPHC_DAM_BIT   0
 
#define LOWPAN_NHC_UDP_MASK   0xF8
 
#define LOWPAN_NHC_UDP_ID   0xF0
 
#define LOWPAN_NHC_UDP_CHECKSUMC   0x04
 
#define LOWPAN_NHC_UDP_CHECKSUMI   0x00
 
#define LOWPAN_NHC_UDP_4BIT_PORT   0xF0B0
 
#define LOWPAN_NHC_UDP_4BIT_MASK   0xFFF0
 
#define LOWPAN_NHC_UDP_8BIT_PORT   0xF000
 
#define LOWPAN_NHC_UDP_8BIT_MASK   0xFF00
 
#define LOWPAN_NHC_UDP_CS_P_00   0xF0 /* all inline */
 
#define LOWPAN_NHC_UDP_CS_P_01
 
#define LOWPAN_NHC_UDP_CS_P_10
 
#define LOWPAN_NHC_UDP_CS_P_11   0xF3 /* source & dest = 0xF0B + 4bit inline */
 

Macro Definition Documentation

#define ipaddr_prefixcmp (   addr1,
  addr2,
  length 
)    (memcmp(addr1, addr2, length >> 3) == 0)

Definition at line 83 of file 6lowpan.h.

#define is_addr_link_local (   a)    (((a)->s6_addr16[0]) == 0x80FE)

Definition at line 87 of file 6lowpan.h.

#define is_addr_mac_addr_based (   a,
  m 
)
Value:
((((a)->s6_addr[8]) == (((m)[0]) ^ 0x02)) && \
(((a)->s6_addr[9]) == (m)[1]) && \
(((a)->s6_addr[10]) == (m)[2]) && \
(((a)->s6_addr[11]) == (m)[3]) && \
(((a)->s6_addr[12]) == (m)[4]) && \
(((a)->s6_addr[13]) == (m)[5]) && \
(((a)->s6_addr[14]) == (m)[6]) && \
(((a)->s6_addr[15]) == (m)[7]))

Definition at line 65 of file 6lowpan.h.

#define is_addr_mcast (   a)    (((a)->s6_addr[0]) == 0xFF)

Definition at line 100 of file 6lowpan.h.

#define is_addr_unspecified (   a)
Value:
((((a)->s6_addr32[0]) == 0) && \
(((a)->s6_addr32[1]) == 0) && \
(((a)->s6_addr32[2]) == 0) && \
(((a)->s6_addr32[3]) == 0))

Definition at line 76 of file 6lowpan.h.

#define LOWPAN_DISPATCH_FRAG1   0xc0 /* 11000xxx */

Definition at line 156 of file 6lowpan.h.

#define LOWPAN_DISPATCH_FRAGN   0xe0 /* 11100xxx */

Definition at line 157 of file 6lowpan.h.

#define LOWPAN_DISPATCH_HC1   0x42 /* 01000010 = 66 */

Definition at line 154 of file 6lowpan.h.

#define LOWPAN_DISPATCH_IPHC   0x60 /* 011xxxxx = ... */

Definition at line 155 of file 6lowpan.h.

#define LOWPAN_DISPATCH_IPV6   0x41 /* 01000001 = 65 */

Definition at line 153 of file 6lowpan.h.

#define LOWPAN_DISPATCH_MASK   0xf8 /* 11111000 */

Definition at line 159 of file 6lowpan.h.

#define LOWPAN_FRAG1_HEAD_SIZE   0x4

Definition at line 163 of file 6lowpan.h.

#define LOWPAN_FRAG_SIZE   88

Definition at line 175 of file 6lowpan.h.

#define LOWPAN_FRAG_TIMEOUT   (HZ * 60) /* time-out 60 sec */

Definition at line 161 of file 6lowpan.h.

#define LOWPAN_FRAGN_HEAD_SIZE   0x5

Definition at line 164 of file 6lowpan.h.

#define LOWPAN_IPHC_CID   0x80

Definition at line 193 of file 6lowpan.h.

#define LOWPAN_IPHC_DAC   0x04

Definition at line 204 of file 6lowpan.h.

#define LOWPAN_IPHC_DAM_00   0x00

Definition at line 205 of file 6lowpan.h.

#define LOWPAN_IPHC_DAM_01   0x01

Definition at line 206 of file 6lowpan.h.

#define LOWPAN_IPHC_DAM_10   0x02

Definition at line 207 of file 6lowpan.h.

#define LOWPAN_IPHC_DAM_11   0x03

Definition at line 208 of file 6lowpan.h.

#define LOWPAN_IPHC_DAM_BIT   0

Definition at line 210 of file 6lowpan.h.

#define LOWPAN_IPHC_FL_C   0x10

Definition at line 183 of file 6lowpan.h.

#define LOWPAN_IPHC_M   0x08

Definition at line 203 of file 6lowpan.h.

#define LOWPAN_IPHC_NH_C   0x04

Definition at line 185 of file 6lowpan.h.

#define LOWPAN_IPHC_SAC   0x40

Definition at line 195 of file 6lowpan.h.

#define LOWPAN_IPHC_SAM   0x30

Definition at line 199 of file 6lowpan.h.

#define LOWPAN_IPHC_SAM_00   0x00

Definition at line 196 of file 6lowpan.h.

#define LOWPAN_IPHC_SAM_01   0x10

Definition at line 197 of file 6lowpan.h.

#define LOWPAN_IPHC_SAM_10   0x20

Definition at line 198 of file 6lowpan.h.

#define LOWPAN_IPHC_SAM_BIT   4

Definition at line 201 of file 6lowpan.h.

#define LOWPAN_IPHC_TC_C   0x08

Definition at line 184 of file 6lowpan.h.

#define LOWPAN_IPHC_TF   0x18

Definition at line 181 of file 6lowpan.h.

#define LOWPAN_IPHC_TTL_1   0x01

Definition at line 186 of file 6lowpan.h.

#define LOWPAN_IPHC_TTL_255   0x03

Definition at line 188 of file 6lowpan.h.

#define LOWPAN_IPHC_TTL_64   0x02

Definition at line 187 of file 6lowpan.h.

#define LOWPAN_IPHC_TTL_I   0x00

Definition at line 189 of file 6lowpan.h.

#define lowpan_is_addr_broadcast (   a)
Value:
((((a)[0]) == 0xFF) && \
(((a)[1]) == 0xFF) && \
(((a)[2]) == 0xFF) && \
(((a)[3]) == 0xFF) && \
(((a)[4]) == 0xFF) && \
(((a)[5]) == 0xFF) && \
(((a)[6]) == 0xFF) && \
(((a)[7]) == 0xFF))

Definition at line 143 of file 6lowpan.h.

#define lowpan_is_iid_16_bit_compressable (   a)
Value:
((((a)->s6_addr16[4]) == 0) && \
(((a)->s6_addr16[5]) == 0) && \
(((a)->s6_addr16[6]) == 0) && \
((((a)->s6_addr[14]) & 0x80) == 0))

Definition at line 93 of file 6lowpan.h.

#define lowpan_is_mcast_addr_compressable (   a)
Value:
((((a)->s6_addr16[1]) == 0) && \
(((a)->s6_addr16[2]) == 0) && \
(((a)->s6_addr16[3]) == 0) && \
(((a)->s6_addr16[4]) == 0) && \
(((a)->s6_addr16[5]) == 0) && \
(((a)->s6_addr16[6]) == 0) && \
(((a)->s6_addr[14]) == 0) && \
((((a)->s6_addr[15]) == 1) || (((a)->s6_addr[15]) == 2)))

Definition at line 105 of file 6lowpan.h.

#define lowpan_is_mcast_addr_compressable32 (   a)
Value:
((((a)->s6_addr16[1]) == 0) && \
(((a)->s6_addr16[2]) == 0) && \
(((a)->s6_addr16[3]) == 0) && \
(((a)->s6_addr16[4]) == 0) && \
(((a)->s6_addr16[5]) == 0) && \
(((a)->s6_addr[12]) == 0))

Definition at line 124 of file 6lowpan.h.

#define lowpan_is_mcast_addr_compressable48 (   a)
Value:
((((a)->s6_addr16[1]) == 0) && \
(((a)->s6_addr16[2]) == 0) && \
(((a)->s6_addr16[3]) == 0) && \
(((a)->s6_addr16[4]) == 0) && \
(((a)->s6_addr[10]) == 0))

Definition at line 116 of file 6lowpan.h.

#define lowpan_is_mcast_addr_compressable8 (   a)
Value:
((((a)->s6_addr[1]) == 2) && \
(((a)->s6_addr16[1]) == 0) && \
(((a)->s6_addr16[2]) == 0) && \
(((a)->s6_addr16[3]) == 0) && \
(((a)->s6_addr16[4]) == 0) && \
(((a)->s6_addr16[5]) == 0) && \
(((a)->s6_addr16[6]) == 0) && \
(((a)->s6_addr[14]) == 0))

Definition at line 133 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_4BIT_MASK   0xFFF0

Definition at line 220 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_4BIT_PORT   0xF0B0

Definition at line 219 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_8BIT_MASK   0xFF00

Definition at line 222 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_8BIT_PORT   0xF000

Definition at line 221 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_CHECKSUMC   0x04

Definition at line 216 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_CHECKSUMI   0x00

Definition at line 217 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_CS_P_00   0xF0 /* all inline */

Definition at line 225 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_CS_P_01
Value:
0xF1 /* source 16bit inline,
dest = 0xF0 + 8 bit inline */

Definition at line 226 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_CS_P_10
Value:
0xF2 /* source = 0xF0 + 8bit inline,
dest = 16 bit inline */

Definition at line 227 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_CS_P_11   0xF3 /* source & dest = 0xF0B + 4bit inline */

Definition at line 228 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_ID   0xF0

Definition at line 215 of file 6lowpan.h.

#define LOWPAN_NHC_UDP_MASK   0xF8

Definition at line 214 of file 6lowpan.h.

#define UIP_802154_SHORTADDR_LEN   2 /* compressed ipv6 address length */

Definition at line 56 of file 6lowpan.h.

#define UIP_FRAGH_LEN   8 /* ipv6 fragment header size */

Definition at line 59 of file 6lowpan.h.

#define UIP_IPH_LEN   40 /* ipv6 fixed header size */

Definition at line 57 of file 6lowpan.h.

#define UIP_PROTO_UDP   17 /* ipv6 next header value for UDP */

Definition at line 58 of file 6lowpan.h.