aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/includes/hicn/ctrl
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2023-01-24 01:46:29 +0100
committerJordan Augé <jordan.auge+fdio@cisco.com>2023-02-08 17:11:36 +0100
commit49776ceac54eecadabca6c0e2fdc0b9ee2e8e663 (patch)
treec357522d75a35142fca8b153984c776333d179f2 /ctrl/libhicnctrl/includes/hicn/ctrl
parent8a7e75e84a31180d51b9970d526709ec4dca2030 (diff)
feat: libhicnctrl: new API to allow sending MAP-Me command on specific face
Change-Id: Iac39a1d145a5c1b4f19e1fa35d713ca720393760 Ticket: HICN-832 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com>
Diffstat (limited to 'ctrl/libhicnctrl/includes/hicn/ctrl')
-rw-r--r--ctrl/libhicnctrl/includes/hicn/ctrl/api.h4
-rw-r--r--ctrl/libhicnctrl/includes/hicn/ctrl/hicn-light.h24
-rw-r--r--ctrl/libhicnctrl/includes/hicn/ctrl/objects/mapme.h7
3 files changed, 22 insertions, 13 deletions
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
index ad3f8fcc3..87f0e955d 100644
--- a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
+++ b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 Cisco and/or its affiliates.
+ * Copyright (c) 2021-2023 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -303,7 +303,7 @@ int hc_mapme_set(hc_sock_t *s, hc_mapme_t *mapme);
int hc_mapme_set_discovery(hc_sock_t *s, hc_mapme_t *mapme);
int hc_mapme_set_timescale(hc_sock_t *s, hc_mapme_t *mapme);
int hc_mapme_set_retx(hc_sock_t *s, hc_mapme_t *mapme);
-int hc_mapme_send_update(hc_sock_t *s, hc_mapme_t *mapme);
+int hc_mapme_create(hc_sock_t *s, hc_mapme_t *mapme);
int hc_policy_create(hc_sock_t *s, hc_policy_t *policy);
int hc_policy_delete(hc_sock_t *s, hc_policy_t *policy);
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/hicn-light.h b/ctrl/libhicnctrl/includes/hicn/ctrl/hicn-light.h
index 426b82fa9..3e3e98c35 100644
--- a/ctrl/libhicnctrl/includes/hicn/ctrl/hicn-light.h
+++ b/ctrl/libhicnctrl/includes/hicn/ctrl/hicn-light.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Cisco and/or its affiliates.
+ * Copyright (c) 2021-2023 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -14,14 +14,14 @@
*/
/*
- * @file commands.h
- * @brief All hicn-light commands: 14 in total.
+ * @file hicn-light.h
+ * @brief hicn-light specifics.
*
* Header and payload in binary format.
*/
-#ifndef HICN_CTRL_HICNLIGHTNG_H
-#define HICN_CTRL_HICNLIGHTNG_H
+#ifndef HICN_CTRL_HICNLIGHT_H
+#define HICN_CTRL_HICNLIGHT_H
#ifndef _WIN32
#include <netinet/in.h>
@@ -84,7 +84,7 @@ typedef enum {
_(mapme_set_discovery, MAPME_SET_DISCOVERY) \
_(mapme_set_timescale, MAPME_SET_TIMESCALE) \
_(mapme_set_retx, MAPME_SET_RETX) \
- _(mapme_send_update, MAPME_SEND_UPDATE) \
+ _(mapme_add, MAPME_ADD) \
_(policy_add, POLICY_ADD) \
_(policy_remove, POLICY_REMOVE) \
_(policy_list, POLICY_LIST) \
@@ -302,8 +302,16 @@ typedef cmd_mapme_timing_t cmd_mapme_set_timescale_t;
typedef cmd_mapme_timing_t cmd_mapme_set_retx_t;
typedef struct {
+ hicn_ip_address_t address;
+ uint32_t face_id;
+ uint8_t family;
+ uint8_t len;
+} cmd_mapme_add_t;
+
+/* dummy */
+typedef struct {
void *_;
-} cmd_mapme_send_update_t;
+} cmd_mapme_list_item_t;
/* Policy */
@@ -538,4 +546,4 @@ ssize_t hc_light_command_serialize(hc_action_t action,
int hc_sock_initialize_module(hc_sock_t *s);
-#endif /* HICN_CTRL_HICNLIGHTNG_H */
+#endif /* HICN_CTRL_HICNLIGHT_H */
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/objects/mapme.h b/ctrl/libhicnctrl/includes/hicn/ctrl/objects/mapme.h
index 37623ebfe..3eda1bfaa 100644
--- a/ctrl/libhicnctrl/includes/hicn/ctrl/objects/mapme.h
+++ b/ctrl/libhicnctrl/includes/hicn/ctrl/objects/mapme.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021-2022 Cisco and/or its affiliates.
+ * Copyright (c) 2021-2023 Cisco and/or its affiliates.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
@@ -51,8 +51,9 @@ typedef struct {
uint32_t timescale; // Milliseconds
hicn_ip_address_t address;
- int family;
- u8 len;
+ uint8_t family;
+ uint8_t len;
+ uint32_t face_id;
} hc_mapme_t;
#endif /* HICNCTRL_OBJECTS_MAPME_H */