mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 04:32:46 +01:00
defined some values
This commit is contained in:
parent
864f02ec4d
commit
4a7948e53b
@ -1,7 +1,12 @@
|
||||
/* 6LoWPAN IP header file */
|
||||
|
||||
#ifndef SIXLOWIP_H
|
||||
#define SIXLOWIP_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#define MSBA2_SENSOR_NODE 1
|
||||
|
||||
/* set maximum transmission unit */
|
||||
#ifdef MSBA2_SENSOR_NODE
|
||||
#define MTU 0x3A
|
||||
@ -23,14 +28,19 @@
|
||||
#define LL_HEADER_LENGTH 0x0
|
||||
#endif
|
||||
|
||||
#define SIXLOWPAN_IPV6_LL_ADDR_LEN 8
|
||||
|
||||
/* size of global buffer */
|
||||
#define BUFFER_SIZE (LL_HEADER_LENGTH + MTU)
|
||||
|
||||
uint8_t ipv6_ext_hdr_len = 0;
|
||||
extern uint8_t ipv6_ext_hdr_len;
|
||||
|
||||
#define LLHDR_IPV6HDR_LENGTH (LL_HEADER_LENGTH + IPV6_HEADER_LENGTH + ipv6_ext_hdr_len)
|
||||
|
||||
#define LLHDR_ICMPV6HDR_LENGTH (LL_HEADER_LENGTH + IPV6_HEADER_LENGTH + ipv6_ext_hdr_len + ICMP_HEADER_LENGTH)
|
||||
#define IPV6HDR_ICMPV6HDR_LENGTH (IPV6_HEADER_LENGTH + ipv6_ext_hdr_len + ICMP_HEADER_LENGTH)
|
||||
/* global buffer*/
|
||||
uint8_t[BUFFER_SIZE] buffer;
|
||||
|
||||
uint8_t buffer[BUFFER_SIZE];
|
||||
|
||||
|
||||
/* ipv6 extension header length */
|
||||
@ -56,3 +66,11 @@ struct ipv6_hdr{
|
||||
ipv6_addr srcaddr;
|
||||
ipv6_addr destaddr;
|
||||
};
|
||||
|
||||
typedef struct link_layer_addr{
|
||||
uint8_t uint8[8];
|
||||
} link_layer_addr;
|
||||
|
||||
#define HTONS(a) (uint16_t)((((uint16_t) (a)) << 8) | (((uint16_t) (a)) >> 8))
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user