summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-eth-llc
diff options
context:
space:
mode:
authorSander Vrijders <sander.vrijders@ugent.be>2017-03-21 16:21:49 +0100
committerSander Vrijders <sander.vrijders@ugent.be>2017-03-21 16:21:49 +0100
commitfef50c3db0e02f0052f1759d508045c44fc4146e (patch)
treefc73859827a5dfebf5022fad37e826d98ba4046f /src/ipcpd/shim-eth-llc
parent4b257b249ea91d1ee7e2341c563bac561911e8a6 (diff)
parentd4e80d41197b75d2c351659c7e8d4546270e677d (diff)
downloadouroboros-fef50c3db0e02f0052f1759d508045c44fc4146e.tar.gz
ouroboros-fef50c3db0e02f0052f1759d508045c44fc4146e.zip
Merge branch 'be' of bitbucket.org:ouroboros-rina/ouroboros into be
Diffstat (limited to 'src/ipcpd/shim-eth-llc')
-rw-r--r--src/ipcpd/shim-eth-llc/CMakeLists.txt14
-rw-r--r--src/ipcpd/shim-eth-llc/main.c18
-rw-r--r--src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto9
3 files changed, 16 insertions, 25 deletions
diff --git a/src/ipcpd/shim-eth-llc/CMakeLists.txt b/src/ipcpd/shim-eth-llc/CMakeLists.txt
index bd9add74..bd3049a2 100644
--- a/src/ipcpd/shim-eth-llc/CMakeLists.txt
+++ b/src/ipcpd/shim-eth-llc/CMakeLists.txt
@@ -15,21 +15,21 @@ include_directories(${CMAKE_BINARY_DIR}/include)
protobuf_generate_c(SHIM_ETH_LLC_PROTO_SRCS SHIM_ETH_LLC_PROTO_HDRS
shim_eth_llc_messages.proto)
-SET(IPCP_SHIM_ETH_LLC_TARGET ipcpd-shim-eth-llc
+set(IPCP_SHIM_ETH_LLC_TARGET ipcpd-shim-eth-llc
CACHE STRING "IPCP_SHIM_ETH_LLC_TARGET")
set(SHIM_ETH_LLC_SOURCES
# Add source files here
${CMAKE_CURRENT_SOURCE_DIR}/main.c)
-add_executable (ipcpd-shim-eth-llc ${SHIM_ETH_LLC_SOURCES} ${IPCP_SOURCES}
- ${SHIM_ETH_LLC_PROTO_SRCS})
-target_link_libraries (ipcpd-shim-eth-llc LINK_PUBLIC ouroboros
- ${PROTOBUF_C_LIBRARY})
+add_executable(ipcpd-shim-eth-llc ${SHIM_ETH_LLC_SOURCES} ${IPCP_SOURCES}
+ ${SHIM_ETH_LLC_PROTO_SRCS})
+target_link_libraries(ipcpd-shim-eth-llc LINK_PUBLIC ouroboros
+ ${PROTOBUF_C_LIBRARY})
-include(MacroAddCompileFlags)
+include(AddCompileFlags)
if (CMAKE_BUILD_TYPE MATCHES Debug)
- MACRO_ADD_COMPILE_FLAGS(ipcpd-shim-eth-llc -DCONFIG_OUROBOROS_DEBUG)
+ add_compile_flags(ipcpd-shim-eth-llc -DCONFIG_OUROBOROS_DEBUG)
endif (CMAKE_BUILD_TYPE MATCHES Debug)
install(TARGETS ipcpd-shim-eth-llc RUNTIME DESTINATION sbin)
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c
index cd913de4..8015d64a 100644
--- a/src/ipcpd/shim-eth-llc/main.c
+++ b/src/ipcpd/shim-eth-llc/main.c
@@ -3,7 +3,8 @@
*
* Shim IPC process over Ethernet with LLC
*
- * Sander Vrijders <sander.vrijders@intec.ugent.be>
+ * Dimitri Staessens <dimitri.staessens@ugent.be>
+ * Sander Vrijders <sander.vrijders@ugent.be>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
@@ -334,7 +335,6 @@ static int eth_llc_ipcp_send_mgmt_frame(shim_eth_llc_msg_t * msg,
static int eth_llc_ipcp_sap_alloc(uint8_t * dst_addr,
uint8_t ssap,
char * dst_name,
- char * src_ae_name,
qoscube_t cube)
{
shim_eth_llc_msg_t msg = SHIM_ETH_LLC_MSG__INIT;
@@ -343,7 +343,6 @@ static int eth_llc_ipcp_sap_alloc(uint8_t * dst_addr,
msg.has_ssap = true;
msg.ssap = ssap;
msg.dst_name = dst_name;
- msg.src_ae_name = src_ae_name;
msg.has_qoscube = true;
msg.qoscube = cube;
@@ -371,7 +370,6 @@ static int eth_llc_ipcp_sap_alloc_resp(uint8_t * dst_addr,
static int eth_llc_ipcp_sap_req(uint8_t r_sap,
uint8_t * r_addr,
char * dst_name,
- char * src_ae_name,
qoscube_t cube)
{
int fd;
@@ -380,7 +378,7 @@ static int eth_llc_ipcp_sap_req(uint8_t r_sap,
pthread_rwlock_wrlock(&eth_llc_data.flows_lock);
/* reply to IRM */
- fd = ipcp_flow_req_arr(getpid(), dst_name, src_ae_name, cube);
+ fd = ipcp_flow_req_arr(getpid(), dst_name, cube);
if (fd < 0) {
pthread_rwlock_unlock(&eth_llc_data.flows_lock);
pthread_rwlock_unlock(&ipcpi.state_lock);
@@ -491,7 +489,6 @@ static int eth_llc_ipcp_mgmt_frame(uint8_t * buf,
eth_llc_ipcp_sap_req(msg->ssap,
r_addr,
msg->dst_name,
- msg->src_ae_name,
msg->qoscube);
}
break;
@@ -989,7 +986,6 @@ static int eth_llc_ipcp_name_query(char * name)
static int eth_llc_ipcp_flow_alloc(int fd,
char * dst_name,
- char * src_ae_name,
qoscube_t cube)
{
uint8_t ssap = 0;
@@ -998,7 +994,7 @@ static int eth_llc_ipcp_flow_alloc(int fd,
log_dbg("Allocating flow to %s.", dst_name);
- if (dst_name == NULL || src_ae_name == NULL)
+ if (dst_name == NULL)
return -1;
if (cube != QOS_CUBE_BE && cube != QOS_CUBE_FRC) {
@@ -1038,11 +1034,7 @@ static int eth_llc_ipcp_flow_alloc(int fd,
memcpy(r_addr, &addr, MAC_SIZE);
- if (eth_llc_ipcp_sap_alloc(r_addr,
- ssap,
- dst_name,
- src_ae_name,
- cube) < 0) {
+ if (eth_llc_ipcp_sap_alloc(r_addr, ssap, dst_name, cube) < 0) {
pthread_rwlock_rdlock(&ipcpi.state_lock);
pthread_rwlock_wrlock(&eth_llc_data.flows_lock);
bmp_release(eth_llc_data.saps, eth_llc_data.fd_to_ef[fd].sap);
diff --git a/src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto b/src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto
index cedb0fd4..2d66428c 100644
--- a/src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto
+++ b/src/ipcpd/shim-eth-llc/shim_eth_llc_messages.proto
@@ -32,9 +32,8 @@ enum shim_eth_llc_msg_code {
message shim_eth_llc_msg {
required shim_eth_llc_msg_code code = 1;
optional string dst_name = 2;
- optional string src_ae_name = 3;
- optional uint32 ssap = 4;
- optional uint32 dsap = 5;
- optional uint32 qoscube = 6;
- optional sint32 response = 7;
+ optional uint32 ssap = 3;
+ optional uint32 dsap = 4;
+ optional uint32 qoscube = 5;
+ optional sint32 response = 6;
};