-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
18515: libschc: initial import as package r=miri64 a=miri64 Co-authored-by: Martine Lenders <m.lenders@fu-berlin.de>
- Loading branch information
Showing
16 changed files
with
2,357 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
# Copyright (c) 2022 Freie Universität Berlin | ||
# | ||
# 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. | ||
# | ||
menuconfig KCONFIG_USEPKG_LIBSCHC | ||
bool "Configure libSCHC" | ||
depends on USEPKG_LIBSCHC | ||
help | ||
Configure libSCHC package via Kconfig. | ||
|
||
if KCONFIG_USEPKG_LIBSCHC | ||
|
||
config LIBSCHC_STATIC_MEMBUF_LEN | ||
int "Static memory allocation buffer length" | ||
default 1024 | ||
help | ||
Length of the static memory buffer for fragment data allocation in reassembly buffer in | ||
bytes. | ||
|
||
config LIBSCHC_MBUF_POOL_SIZE | ||
int "Maximum number of mbuf pool entries" | ||
default 64 | ||
help | ||
Maximum number of entries in the mbuf used for fragment reassembly. | ||
|
||
config LIBSCHC_MAX_RX_CONNS | ||
int "Maximum number of incoming connections" | ||
default 1 | ||
|
||
config LIBSCHC_MAX_MTU_LEN | ||
int "Maximum transfer unit of the underlying technology" | ||
default 242 | ||
|
||
config LIBSCHC_DEBUG | ||
bool "Enable debug output" | ||
|
||
endif # KCONFIG_USEPKG_LIBSCHC |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
PKG_NAME=libschc | ||
PKG_URL=https://github.com/imec-idlab/libschc | ||
PKG_VERSION=303e9f15bf69da5a68cda76796c76de353f44a88 | ||
PKG_LICENSE=GPL-v3.0 | ||
|
||
include $(RIOTBASE)/pkg/pkg.mk | ||
|
||
all: | ||
+$(QQ)"$(MAKE)" -C $(PKG_SOURCE_DIR) -f $(RIOTBASE)/Makefile.base |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
ifneq (,$(filter libschc_%,$(USEMODULE))) | ||
USEPKG += libschc | ||
endif | ||
|
||
ifneq (,$(filter libschc,$(USEPKG))) | ||
USEMODULE += libschc_udpv6 | ||
endif | ||
|
||
FEATURES_BLACKLIST += arch_8bit arch_16bit arch_esp8266 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
CFLAGS += -Wno-enum-conversion | ||
CFLAGS += -Wno-old-style-definition | ||
CFLAGS += -Wno-sign-compare | ||
CFLAGS += -Wno-strict-prototypes | ||
CFLAGS += -Wno-unused-parameter | ||
CFLAGS += -Wno-unused-variable | ||
|
||
INCLUDES += -I$(RIOTBASE)/pkg/libschc/include | ||
INCLUDES += -I$(PKGDIRBASE)/libschc | ||
|
||
PSEUDOMODULES += libschc_coap | ||
PSEUDOMODULES += libschc_udpv6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
/** | ||
* @defgroup pkg_libschc libSCHC | ||
* @ingroup pkg | ||
* @brief Provides support for Static Context Header Compression and Fragmentation (SCHC) | ||
* @see https://github.com/imec-idlab/libschc | ||
* @see [RFC 8724](https://datatracker.ietf.org/doc/html/rfc8724) | ||
* @experimental | ||
* | ||
* libSCHC is a C implementation of Static Context Header Compression and | ||
Fragmentation | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Copyright (C) 2022 Freie Universität Berlin | ||
* | ||
* 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. | ||
*/ | ||
|
||
/** | ||
* @defgroup pkg_libschc_config libSCHC compile-time configuration | ||
* @ingroup pkg_libschc | ||
* @ingroup config | ||
* @brief Compile-time configuration for libSCHC | ||
* @{ | ||
* | ||
* @file | ||
* @brief RIOT-side compile-time configuration for libSCHC | ||
* | ||
* @author Martine S. Lenders <m.lenders@fu-berlin.de> | ||
*/ | ||
#ifndef LIBSCHC_CONFIG_H | ||
#define LIBSCHC_CONFIG_H | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Static memory buffer length | ||
* | ||
* Length of the static memory buffer for fragmentation in bytes. | ||
*/ | ||
#ifndef CONFIG_LIBSCHC_STATIC_MEMBUF_LEN | ||
#define CONFIG_LIBSCHC_STATIC_MEMBUF_LEN 1024 | ||
#endif | ||
|
||
/** | ||
* @brief Maximum number of mbuf pool entries | ||
* | ||
* Maximum number of entries in the mbuf used for fragment reassembly. | ||
*/ | ||
#ifndef CONFIG_LIBSCHC_MBUF_POOL_SIZE | ||
#define CONFIG_LIBSCHC_MBUF_POOL_SIZE 64 | ||
#endif | ||
|
||
/** | ||
* @brief Maximum number of incoming connections | ||
*/ | ||
#ifndef CONFIG_LIBSCHC_MAX_RX_CONNS | ||
#define CONFIG_LIBSCHC_MAX_RX_CONNS 1 | ||
#endif | ||
|
||
/** | ||
* @brief Maximum transfer unit of the underlying technology | ||
*/ | ||
#ifndef CONFIG_LIBSCHC_MAX_MTU_LEN | ||
#define CONFIG_LIBSCHC_MAX_MTU_LEN 242 | ||
#endif | ||
|
||
/** | ||
* @brief Enable debug output | ||
*/ | ||
#ifndef CONFIG_LIBSCHC_DEBUG | ||
#define CONFIG_LIBSCHC_DEBUG | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* LIBSCHC_CONFIG_H */ | ||
/** @} */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/* | ||
* Copyright (C) 2018 imec IDLab | ||
* Copyright (C) 2022 Freie Universität Berlin | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
/** | ||
* @internal | ||
* @author boortmans <bart.moons@gmail.com> | ||
* @author Martine S. Lenders <m.lenders@fu-berlin.de> | ||
*/ | ||
#ifndef RULES_RULE_CONFIG_H | ||
#define RULES_RULE_CONFIG_H | ||
|
||
#include "rules.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* RULES_RULE_CONFIG_H */ |
Oops, something went wrong.