From 1ca5632a3fdc256036df1b2f02ea078ab6b307af Mon Sep 17 00:00:00 2001 From: Ethan Cotterell Date: Thu, 29 Apr 2021 15:50:41 +0100 Subject: [PATCH] include: Expose LwIP's RAW protocol This commit optionalizes LwIP's "RAW" protocol, making it available to use within Unikraft when enabled. Signed-off-by: Ethan Cotterell Signed-off-by: Alexander Jung Reviewed-by: Simon Kuenzer Approved-by: Simon Kuenzer GitHub-Closes: #2 --- Config.uk | 7 +++++++ include/lwipopts.h | 9 +++++++++ 2 files changed, 16 insertions(+) diff --git a/Config.uk b/Config.uk index 21b529a..fd346c1 100644 --- a/Config.uk +++ b/Config.uk @@ -214,6 +214,13 @@ config LWIP_UDP bool "UDP support" default y +config LWIP_RAW + bool "RAW support" + default n + help + Enable the RAW address family (AF_RAW). This option allows an + application to be able to hook into the IP layer itself. + menuconfig LWIP_TCP bool "TCP support" default y diff --git a/include/lwipopts.h b/include/lwipopts.h index bedd17c..608d6a7 100644 --- a/include/lwipopts.h +++ b/include/lwipopts.h @@ -131,6 +131,15 @@ void sys_free(void *ptr); #define IP_REASS_MAX_PBUFS CONFIG_LWIP_IP_REASS_MAX_PBUFS #endif +/** + * RAW support + */ +#if CONFIG_LWIP_RAW +#define LWIP_RAW 1 +#else +#define LWIP_RAW 0 +#endif + /** * UDP options */ -- 2.39.5