zephyr/net/ip/contiki/contiki-conf.h

157 lines
4.2 KiB
C

/* contiki-conf.h - These settings override the default configuration */
#include <stdint.h>
#include <sys_clock.h>
#ifndef __CONTIKI_CONF_H__
#define __CONTIKI_CONF_H__
#define PACK_ALIAS_STRUCT __attribute__((__packed__,__may_alias__))
#define CCIF
#define CLIF
typedef uint32_t clock_time_t;
typedef unsigned int uip_stats_t;
#define CLOCK_CONF_SECOND sys_clock_ticks_per_sec
/* It is either IPv6 or IPv4 but not both at the same time. */
#ifdef CONFIG_NETWORKING_WITH_IPV6
#define NETSTACK_CONF_WITH_IPV6 1
#elif CONFIG_NETWORKING_WITH_IPV4
#define NETSTACK_CONF_WITH_IPV6 0
#else
#error "Either IPv6 or IPv4 needs to be supported."
#endif
/* The actual MTU size is defined in uipopt.h */
#define UIP_CONF_BUFFER_SIZE UIP_LINK_MTU
/* No TCP yet */
#define UIP_CONF_TCP 0
/* We do not want to be a router */
#define UIP_CONF_ROUTER 0
/* No Rime */
#define NETSTACK_CONF_WITH_RIME 0
/* How many IPv6 addresses will be allocated for the user (default is 2).
* Increased this setting so that user can specify multicast addresses.
*/
#define UIP_CONF_DS6_ADDR_NBU 4
/* The queuebuf count defines how many fragments we are able to
* receive. Value 13 means that we can receive full IPv6 data
* (1280 bytes), we need also some extra buffers for temp use.
*/
#define QUEUEBUF_CONF_NUM (13 + 5)
#ifdef SICSLOWPAN_CONF_ENABLE
/* Min and Max compressible UDP ports */
#define SICSLOWPAN_UDP_PORT_MIN 0xF0B0
#define SICSLOWPAN_UDP_PORT_MAX 0xF0BF /* F0B0 + 15 */
#define NETSTACK_CONF_COMPRESS sicslowpan_compression
#define NETSTACK_CONF_FRAGMENT sicslowpan_fragmentation
#else
#define NETSTACK_CONF_COMPRESS null_compression
#define NETSTACK_CONF_FRAGMENT null_fragmentation
#endif /* SICSLOWPAN_CONF_ENABLE */
#ifdef CONFIG_NETWORKING_WITH_15_4
#ifdef CONFIG_NETWORKING_WITH_15_4_PAN_ID
#define IEEE802154_CONF_PANID CONFIG_NETWORKING_WITH_15_4_PAN_ID
#endif /* CONFIG_NETWORKING_WITH_15_4_PAN_ID */
#define NETSTACK_CONF_FRAMER framer_802154
#ifdef CONFIG_NETWORKING_WITH_6LOWPAN
#define NETSTACK_CONF_RDC sicslowmac_driver
#endif /* CONFIG_NETWORKING_WITH_6LOWPAN */
#define NETSTACK_CONF_MAC csma_driver
#define LINKADDR_CONF_SIZE 8
#define UIP_CONF_LL_802154 1
#define SICSLOWPAN_CONF_MAX_ADDR_CONTEXTS 1
#ifdef CONFIG_6LOWPAN_COMPRESSION_IPHC
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_IPHC
#else /* 6lowpan compression method */
#define SICSLOWPAN_CONF_COMPRESSION SICSLOWPAN_COMPRESSION_IPV6
#endif
//#define FRAMER_802154_HANDLER handler_802154_frame_received
//#define HANDLER_802154_CONF_STATS 1
#else
#define NETSTACK_CONF_FRAMER framer_nullmac
#define NETSTACK_CONF_RDC nullrdc_driver
#define NETSTACK_CONF_MAC nullmac_driver
#define LINKADDR_CONF_SIZE 6
#endif /* CONFIG_NETWORKING_WITH_15_4 */
#define NETSTACK_CONF_LLSEC nullsec_driver
#ifdef CONFIG_NETWORKING_WITH_RPL
#define UIP_MCAST6_CONF_ENGINE UIP_MCAST6_ENGINE_SMRF
#define UIP_CONF_IPV6_MULTICAST 1
#ifdef CONFIG_RPL_WITH_MRHOF
#define RPL_CONF_OF rpl_mrhof
#else
#define RPL_CONF_OF rpl_of0
#endif /* CONFIG_RPL_WITH_MRHOF */
#ifdef CONFIG_RPL_PROBING
#define RPL_CONF_WITH_PROBING 1
#else
#define RPL_CONF_WITH_PROBING 0
#endif /* CONFIG_RPL_PROBING */
#ifdef CONFIG_RPL_STATS
#define RPL_CONF_STATS 1
#else
#define RPL_CONF_STATS 0
#endif /* CONFIG_RPL_STATS */
#else /* CONFIG_NETWORKING_WITH_RPL */
#define RPL_CONF_STATS 0
#endif
#if defined(CONFIG_NETWORKING_STATISTICS) && defined(CONFIG_L2_BUFFERS)
#define NET_MAC_CONF_STATS 1
#else
#define NET_MAC_CONF_STATS 0
#endif
#ifdef CONFIG_NETWORKING_IPV6_NO_ND
/* Disabling ND will simplify the IPv6 address assignment.
* This should only be done in testing phase.
*/
#define UIP_CONF_ND6_SEND_NA 0
#else
#define UIP_CONF_ND6_SEND_NA 1
#endif
#ifndef NETSTACK_CONF_RADIO
/* #error "No radio configured, cannot continue!" */
#endif
#ifdef CONFIG_ER_COAP
#ifndef REST
#define REST REGISTERED_ENGINE_ERBIUM
#endif
#endif
#ifdef CONFIG_ER_COAP_WITH_DTLS
#define ER_COAP_WITH_DTLS 1
#else
#define ER_COAP_WITH_DTLS 0
#endif
#ifdef CONFIG_ER_COAP_CLIENT
#define COAP_OBSERVE_CLIENT 1
#else
#undef COAP_OBSERVE_CLIENT
#endif
#ifdef CONFIG_NETWORKING_STATISTICS
#define UIP_CONF_STATISTICS 1
#endif
#ifdef CONFIG_ETHERNET
#define UIP_CONF_LLH_LEN 14
#endif
#endif /* __CONTIKI_CONF_H__ */