diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-10-24 10:06:23 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2018-10-24 11:58:49 +0200 |
commit | da60c56365ac13a262ffa6adaba7540c4d914843 (patch) | |
tree | 8b2f3ccd5f90f217de53f6b7c905adc11e75a261 /src/tools/irm/irm_ipcp_create.c | |
parent | e161da9a580152e52a84c5ca31422355307bab42 (diff) | |
download | ouroboros-da60c56365ac13a262ffa6adaba7540c4d914843.tar.gz ouroboros-da60c56365ac13a262ffa6adaba7540c4d914843.zip |
ipcpd: Add broadcast IPCP
This adds a broadcast IPCP that allows us to easily create multicast
applications. The broadcast IPCP accepts flows for "<layer_name>.mc".
A tool, obc (Ouroboros broadcast), is added that sends and reads a
message to a broadcast layer.
Signed-off-by: Dimitri Staessens <dimitri.staessens@ugent.be>
Signed-off-by: Sander Vrijders <sander.vrijders@ugent.be>
Diffstat (limited to 'src/tools/irm/irm_ipcp_create.c')
-rw-r--r-- | src/tools/irm/irm_ipcp_create.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/tools/irm/irm_ipcp_create.c b/src/tools/irm/irm_ipcp_create.c index c8866962..5694eccf 100644 --- a/src/tools/irm/irm_ipcp_create.c +++ b/src/tools/irm/irm_ipcp_create.c @@ -44,19 +44,20 @@ #include "irm_ops.h" #include "irm_utils.h" -#define NORMAL "normal" -#define UDP "udp" -#define ETH_LLC "eth-llc" -#define ETH_DIX "eth-dix" -#define LOCAL "local" -#define RAPTOR "raptor" +#define NORMAL "normal" +#define BROADCAST "broadcast" +#define UDP "udp" +#define ETH_LLC "eth-llc" +#define ETH_DIX "eth-dix" +#define LOCAL "local" +#define RAPTOR "raptor" static void usage(void) { printf("Usage: irm ipcp create\n" " name <ipcp name>\n" " type [TYPE]\n\n" - "where TYPE = {" NORMAL " " LOCAL " " + "where TYPE = {" NORMAL " " BROADCAST " " LOCAL " " UDP " " ETH_LLC " " RAPTOR "}\n"); } @@ -90,6 +91,8 @@ int do_create_ipcp(int argc, if (strcmp(ipcp_type, NORMAL) == 0) type = IPCP_NORMAL; + else if (strcmp(ipcp_type, BROADCAST) == 0) + type = IPCP_BROADCAST; else if (strcmp(ipcp_type, UDP) == 0) type = IPCP_UDP; else if (strcmp(ipcp_type, LOCAL) == 0) |