From 2936dd5e4232f7d7d9c720d89bb4a696abcd1830 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sat, 10 Mar 2018 10:09:08 +0100 Subject: ipcpd: Add IPCP over DIX Ethernet This adds an IPC Process that uses DIX Ethernet with an Ethertype that is configurable at bootstrap. This allows parallel DIX layers over the same Ethernet network with different Ethertypes (and one LLC layer). It allows jumbo frames in the future, and should avoid the problems we have with some routers not handling LLC traffic very well. The destination endpoint ID is sent as a 16 bit integer, so the maximum payload is 1498 bytes in standard Ethernet, and 8998 bytes when Jumbo frames are used. The implementation is very similar to the Ethernet LLC IPCP, so it is implemented using preprocessor macros in the single source instead of duplicating code. Signed-off-by: Dimitri Staessens Signed-off-by: Sander Vrijders --- src/lib/ipcp_config.proto | 6 ++++-- src/lib/irm.c | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'src/lib') diff --git a/src/lib/ipcp_config.proto b/src/lib/ipcp_config.proto index 3e656d42..44391f36 100644 --- a/src/lib/ipcp_config.proto +++ b/src/lib/ipcp_config.proto @@ -40,8 +40,10 @@ message ipcp_config_msg { // Config for UDP optional uint32 ip_addr = 9; optional uint32 dns_addr = 10; - // Config for the Ethernet LLC - optional string if_name = 11; + // Config for the Ethernet + optional string dev = 11; + // Config for DIX Ethernet + optional uint32 ethertype = 12; } enum enroll_code { diff --git a/src/lib/irm.c b/src/lib/irm.c index 66b5c849..c12ab893 100644 --- a/src/lib/irm.c +++ b/src/lib/irm.c @@ -139,7 +139,12 @@ int irm_bootstrap_ipcp(pid_t pid, case IPCP_RAPTOR: break; case IPCP_ETH_LLC: - config.if_name = conf->if_name; + config.dev = conf->dev; + break; + case IPCP_ETH_DIX: + config.dev = conf->dev; + config.has_ethertype = true; + config.ethertype = conf->ethertype; break; default: return -EIPCPTYPE; -- cgit v1.2.3