diff options
author | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-08 11:14:43 +0100 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@intec.ugent.be> | 2017-01-09 11:23:48 +0100 |
commit | 0a071a42d4e80f54e92f34911cafda3d666d35d5 (patch) | |
tree | 456cb6250d0396705bef29b0d80c889bee205fe7 /src/ipcpd/shim-eth-llc/main.c | |
parent | e56d24010287127fc6b9c9da8d1f7cf160c50253 (diff) | |
download | ouroboros-0a071a42d4e80f54e92f34911cafda3d666d35d5.tar.gz ouroboros-0a071a42d4e80f54e92f34911cafda3d666d35d5.zip |
ipcpd: Let IPCPs bind a name
This allows IPCPs to bind a name, so that they can announce their name
to neighbors which can then allocate a flow to them. Registering of
the name happens by an administrator. It also moves the irmd_api to
common ground, since it is used by all IPCPs.
Diffstat (limited to 'src/ipcpd/shim-eth-llc/main.c')
-rw-r--r-- | src/ipcpd/shim-eth-llc/main.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/ipcpd/shim-eth-llc/main.c b/src/ipcpd/shim-eth-llc/main.c index 623f2071..da496b07 100644 --- a/src/ipcpd/shim-eth-llc/main.c +++ b/src/ipcpd/shim-eth-llc/main.c @@ -1,5 +1,5 @@ /* - * Ouroboros - Copyright (C) 2016 + * Ouroboros - Copyright (C) 2016 - 2017 * * Shim IPC process over Ethernet with LLC * @@ -77,9 +77,6 @@ typedef ShimEthLlcMsg shim_eth_llc_msg_t; #define EVENT_WAIT_TIMEOUT 100 /* us */ #define NAME_QUERY_TIMEOUT 100000000 /* ns */ -/* global for trapping signal */ -int irmd_api; - struct eth_llc_frame { uint8_t dst_hwaddr[MAC_SIZE]; uint8_t src_hwaddr[MAC_SIZE]; @@ -675,7 +672,7 @@ void ipcp_sig_handler(int sig, siginfo_t * info, void * c) case SIGINT: case SIGTERM: case SIGHUP: - if (info->si_pid == irmd_api) { + if (info->si_pid == ipcpi.irmd_api) { pthread_rwlock_wrlock(&ipcpi.state_lock); if (ipcp_get_state() == IPCP_INIT) @@ -1123,9 +1120,6 @@ int main(int argc, char * argv[]) exit(EXIT_FAILURE); } - /* store the process id of the irmd */ - irmd_api = atoi(argv[1]); - /* init sig_act */ memset(&sig_act, 0, sizeof(sig_act)); |