summaryrefslogtreecommitdiff
path: root/src/tools/irm/irm_ipcp_list.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/irm/irm_ipcp_list.c')
-rw-r--r--src/tools/irm/irm_ipcp_list.c53
1 files changed, 29 insertions, 24 deletions
diff --git a/src/tools/irm/irm_ipcp_list.c b/src/tools/irm/irm_ipcp_list.c
index 3b8612ed..a211a02b 100644
--- a/src/tools/irm/irm_ipcp_list.c
+++ b/src/tools/irm/irm_ipcp_list.c
@@ -1,10 +1,10 @@
/*
- * Ouroboros - Copyright (C) 2016 - 2020
+ * Ouroboros - Copyright (C) 2016 - 2026
*
* List IPC Processes
*
- * Dimitri Staessens <dimitri.staessens@ugent.be>
- * Sander Vrijders <sander.vrijders@ugent.be>
+ * Dimitri Staessens <dimitri@ouroboros.rocks>
+ * Sander Vrijders <sander@ouroboros.rocks>
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -46,12 +46,13 @@
#include <stdlib.h>
#include <string.h>
-#define UNICAST "unicast"
-#define UDP "udp"
-#define ETH_LLC "eth-llc"
-#define ETH_DIX "eth-dix"
-#define LOCAL "local"
-#define RAPTOR "raptor"
+#define UNICAST "unicast"
+#define BROADCAST "broadcast"
+#define UDP4 "udp4"
+#define UDP6 "udp6"
+#define ETH_LLC "eth-llc"
+#define ETH_DIX "eth-dix"
+#define LOCAL "local"
static void usage(void)
{
@@ -60,7 +61,7 @@ static void usage(void)
" [layer <layer_name>]\n\n"
" [type [TYPE]]\n\n"
"where TYPE = {" UNICAST " " LOCAL " "
- UDP " " ETH_LLC " " ETH_DIX " " RAPTOR "}\n");
+ UDP4 " " UDP6 " " ETH_LLC " " ETH_DIX "}\n");
}
static char * str_type(enum ipcp_type type)
@@ -68,14 +69,16 @@ static char * str_type(enum ipcp_type type)
switch(type) {
case IPCP_UNICAST:
return UNICAST;
+ case IPCP_BROADCAST:
+ return BROADCAST;
case IPCP_ETH_LLC:
return ETH_LLC;
case IPCP_ETH_DIX:
return ETH_DIX;
- case IPCP_UDP:
- return UDP;
- case IPCP_RAPTOR:
- return RAPTOR;
+ case IPCP_UDP4:
+ return UDP4;
+ case IPCP_UDP6:
+ return UDP6;
case IPCP_LOCAL:
return LOCAL;
default:
@@ -86,12 +89,12 @@ static char * str_type(enum ipcp_type type)
int do_list_ipcp(int argc,
char ** argv)
{
- char * ipcp_type = NULL;
- char * ipcp_name = NULL;
- enum ipcp_type type = -1;
- struct ipcp_info * ipcps;
- ssize_t len;
- ssize_t i;
+ char * ipcp_type = NULL;
+ char * ipcp_name = NULL;
+ enum ipcp_type type = -1;
+ struct ipcp_list_info * ipcps;
+ ssize_t len;
+ ssize_t i;
while (argc > 0) {
if (matches(*argv, "type") == 0) {
@@ -111,16 +114,18 @@ int do_list_ipcp(int argc,
if (ipcp_type != NULL) {
if (strcmp(ipcp_type, UNICAST) == 0)
type = IPCP_UNICAST;
- else if (strcmp(ipcp_type, UDP) == 0)
- type = IPCP_UDP;
+ else if (strcmp(ipcp_type, BROADCAST) == 0)
+ type = IPCP_BROADCAST;
+ else if (strcmp(ipcp_type, UDP4) == 0)
+ type = IPCP_UDP4;
+ else if (strcmp(ipcp_type, UDP6) == 0)
+ type = IPCP_UDP6;
else if (strcmp(ipcp_type, LOCAL) == 0)
type = IPCP_LOCAL;
else if (strcmp(ipcp_type, ETH_LLC) == 0)
type = IPCP_ETH_LLC;
else if (strcmp(ipcp_type, ETH_DIX) == 0)
type = IPCP_ETH_DIX;
- else if (strcmp(ipcp_type, RAPTOR) == 0)
- type = IPCP_RAPTOR;
else {
usage();
return -1;