1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-17 17:12:43 +01:00

defined some values

This commit is contained in:
Stephan Zeisberg 2010-10-17 16:03:48 +02:00
parent 864f02ec4d
commit 4a7948e53b

View File

@ -1,7 +1,12 @@
/* 6LoWPAN IP header file */ /* 6LoWPAN IP header file */
#ifndef SIXLOWIP_H
#define SIXLOWIP_H
#include <stdint.h> #include <stdint.h>
#define MSBA2_SENSOR_NODE 1
/* set maximum transmission unit */ /* set maximum transmission unit */
#ifdef MSBA2_SENSOR_NODE #ifdef MSBA2_SENSOR_NODE
#define MTU 0x3A #define MTU 0x3A
@ -23,14 +28,19 @@
#define LL_HEADER_LENGTH 0x0 #define LL_HEADER_LENGTH 0x0
#endif #endif
#define SIXLOWPAN_IPV6_LL_ADDR_LEN 8
/* size of global buffer */
#define BUFFER_SIZE (LL_HEADER_LENGTH + MTU) #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_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*/ /* global buffer*/
uint8_t[BUFFER_SIZE] buffer;
uint8_t buffer[BUFFER_SIZE];
/* ipv6 extension header length */ /* ipv6 extension header length */
@ -56,3 +66,11 @@ struct ipv6_hdr{
ipv6_addr srcaddr; ipv6_addr srcaddr;
ipv6_addr destaddr; 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