summaryrefslogtreecommitdiff
path: root/src/ipcpd
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-08-23 10:47:15 +0000
committerdimitri staessens <dimitri.staessens@ugent.be>2017-08-23 10:47:15 +0000
commit2ece569453f142708f79d344bb5ce1619b350fc1 (patch)
tree1f499c0d6c7b8aedaecb1f11296fc7e01d36dea4 /src/ipcpd
parent7fce287d421a90c67b62be6ee6210714b7427222 (diff)
parent3c1f1088bdfc369a91f3b52d5a69552acc5e268d (diff)
downloadouroboros-2ece569453f142708f79d344bb5ce1619b350fc1.tar.gz
ouroboros-2ece569453f142708f79d344bb5ce1619b350fc1.zip
Merged in sandervrijders/ouroboros/be-llc (pull request #565)
Be llc
Diffstat (limited to 'src/ipcpd')
-rw-r--r--src/ipcpd/shim-eth-llc/CMakeLists.txt5
-rw-r--r--src/ipcpd/shim-eth-llc/main.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ipcpd/shim-eth-llc/CMakeLists.txt b/src/ipcpd/shim-eth-llc/CMakeLists.txt
index 6474eb8d..e10a715f 100644
--- a/src/ipcpd/shim-eth-llc/CMakeLists.txt
+++ b/src/ipcpd/shim-eth-llc/CMakeLists.txt
@@ -25,6 +25,7 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
if (NOT DISABLE_RAW_SOCKETS)
message(STATUS "Raw socket support for shim-eth-llc enabled")
set(HAVE_RAW_SOCKETS TRUE PARENT_SCOPE)
+ set(HAVE_LLC TRUE)
else ()
message(STATUS "Raw socket support for shim-eth-llc disabled by user")
endif ()
@@ -45,6 +46,7 @@ if (NOT CMAKE_SYSTEM_NAME STREQUAL "Linux")
message(STATUS "Berkeley Packet Filter support "
"for shim-eth-llc enabled")
set(HAVE_BPF TRUE PARENT_SCOPE)
+ set(HAVE_LLC TRUE)
else ()
message(STATUS "Berkeley Packet Filter support "
"for shim-eth-llc disabled by user")
@@ -59,12 +61,13 @@ if (NETMAP_C_INCLUDE_DIR)
message(STATUS "Netmap support for shim-eth-llc enabled")
set(HAVE_NETMAP TRUE PARENT_SCOPE)
test_and_set_c_compiler_flag_global(-std=c99)
+ set(HAVE_LLC TRUE)
else ()
message(STATUS "Netmap support for shim-eth-llc disabled by user")
endif ()
endif ()
-if (HAVE_NETMAP OR HAVE_BPF OR HAVE_RAW_SOCKETS)
+if (HAVE_LLC)
message(STATUS "Supported raw Ethernet API found, building shim-eth-llc")
protobuf_generate_c(SHIM_ETH_LLC_PROTO_SRCS SHIM_ETH_LLC_PROTO_HDRS
shim_eth_llc_messages.proto)
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c
index 37df964b..bcf5abe2 100644
--- a/src/ipcpd/shim-eth-llc/main.c
+++ b/src/ipcpd/shim-eth-llc/main.c
@@ -20,8 +20,6 @@
* Foundation, Inc., http://www.fsf.org/about/contact/.
*/
-
-
#ifdef __APPLE__
#define _BSD_SOURCE
#define _DARWIN_C_SOURCE
@@ -89,6 +87,8 @@
#include <net/bpf.h>
#endif
+#define THIS_TYPE IPCP_SHIM_ETH_LLC
+
#define MGMT_SAP 0x01
#define MAC_SIZE 6
#define LLC_HEADER_SIZE 3