From 9d36c05398612d4bb3cf2600bb8eda8866fec457 Mon Sep 17 00:00:00 2001 From: Martine Lenders Date: Fri, 6 Feb 2015 17:06:05 +0100 Subject: [PATCH] nettype: intial import --- sys/include/net/ng_nettype.h | 74 ++++++++++++++++++++++++++++++++++++ 1 file changed, 74 insertions(+) create mode 100644 sys/include/net/ng_nettype.h diff --git a/sys/include/net/ng_nettype.h b/sys/include/net/ng_nettype.h new file mode 100644 index 000000000000..8c33ed298027 --- /dev/null +++ b/sys/include/net/ng_nettype.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2015 Martine Lenders + * + * This file is subject to the terms and conditions of the GNU Lesser + * General Public License v2.1. See the file LICENSE in the top level + * directory for more details. + */ + +/** + * @ingroup net + * @{ + * + * @file + * @brief Protocol type definitions + * + * @author Martine Lenders + */ +#ifndef NG_NETTYPE_H_ +#define NG_NETTYPE_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Definition of protocol types in the network stack. + * + * @note Expand at will. + */ +typedef enum { + NG_NETTYPE_UNDEF = 0, /**< Protocol is undefined */ + +#ifdef MODULE_NG_SIXLOWPAN + NG_NETTYPE_SIXLOWPAN, /**< Protocol is 6LoWPAN */ +#endif + + /** + * @{ + * @name Network layer + */ +#ifdef MODULE_NG_IPV6 + NG_NETTYPE_IPV6, /**< Protocol is IPv6 */ +#endif +#ifdef MODULE_NG_ICMPV6 + NG_NETTYPE_ICMPV6, /**< Protocol is ICMPv6 */ +#endif + /** + * @} + */ + + /** + * @{ + * @name Transport layer + * + */ +#ifdef MODULE_NG_TCP + NG_NETTYPE_TCP, /**< Protocol is TCP */ +#endif +#ifdef MODULE_NG_UDP + NG_NETTYPE_UDP, /**< Protocol is UDP */ +#endif + /** + * @} + */ + + NG_NETTYPE_NUMOF, /**< maximum number of available protocols */ +} ng_nettype_t; + +#ifdef __cplusplus +} +#endif + +#endif /* NG_NETTYPE_H_ */ +/** @} */