summaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/commands/command_face.c
diff options
context:
space:
mode:
authorMauro Sardara <msardara@cisco.com>2022-09-21 19:36:30 +0200
committerMauro Sardara <msardara@cisco.com>2022-09-22 10:33:43 +0000
commit356530fa42140a9f0ad43269125fd96ad1ced594 (patch)
tree111c2a2e0186e6c70742d6f12b4e29e9e6c8df0a /ctrl/libhicnctrl/src/commands/command_face.c
parent45da502db58f712b78e59c214f05c44aa01ea8d0 (diff)
feat(libhicnctrl): implement face delete command
Ticket: HICN-793 Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I87f2cd5a9e077ba81cc0d92fc2ec9fb5c9ec2ff0
Diffstat (limited to 'ctrl/libhicnctrl/src/commands/command_face.c')
-rw-r--r--ctrl/libhicnctrl/src/commands/command_face.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ctrl/libhicnctrl/src/commands/command_face.c b/ctrl/libhicnctrl/src/commands/command_face.c
index 68a6abefe..68a71f9ec 100644
--- a/ctrl/libhicnctrl/src/commands/command_face.c
+++ b/ctrl/libhicnctrl/src/commands/command_face.c
@@ -60,6 +60,7 @@
int on_face_create(hc_face_t* face) {
face->admin_state = FACE_STATE_UP;
+ face->id = INVALID_FACE_ID;
return 0;
}
@@ -110,3 +111,20 @@ static const command_parser_t command_face_list = {
.nparams = 0,
};
COMMAND_REGISTER(command_face_list);
+
+static const command_parser_t command_face_remove6 = {
+ .action = ACTION_DELETE,
+ .object_type = OBJECT_TYPE_FACE,
+ .nparams = 6,
+ .parameters = {type_tcp_udp, local_address, local_port, remote_address,
+ remote_port, interface},
+};
+COMMAND_REGISTER(command_face_remove6);
+
+static const command_parser_t command_face_remove1 = {
+ .action = ACTION_DELETE,
+ .object_type = OBJECT_TYPE_FACE,
+ .nparams = 1,
+ .parameters = {symbolic_or_id},
+};
+COMMAND_REGISTER(command_face_remove1); \ No newline at end of file