aboutsummaryrefslogtreecommitdiffstats
path: root/ctrl/libhicnctrl/src/objects
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/objects
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/objects')
-rw-r--r--ctrl/libhicnctrl/src/objects/connection.c5
-rw-r--r--ctrl/libhicnctrl/src/objects/connection.h1
2 files changed, 5 insertions, 1 deletions
diff --git a/ctrl/libhicnctrl/src/objects/connection.c b/ctrl/libhicnctrl/src/objects/connection.c
index 14e763396..019e5dc22 100644
--- a/ctrl/libhicnctrl/src/objects/connection.c
+++ b/ctrl/libhicnctrl/src/objects/connection.c
@@ -191,6 +191,10 @@ int _hc_connection_cmp(const hc_object_t *object1, const hc_object_t *object2) {
return hc_connection_cmp(&object1->connection, &object2->connection);
}
+int hc_connection_has_valid_id(const hc_connection_t *connection) {
+ return connection->id != INVALID_FACE_ID;
+}
+
/* CONNECTION SNPRINTF */
/* /!\ Please update constants in header file upon changes */
@@ -273,7 +277,6 @@ int hc_connection_set_priority(hc_sock_t *s, const char *conn_id_or_name,
}
int hc_connection_set_tags(hc_sock_t *s, const char *conn_id_or_name,
-
policy_tags_t tags) {
hc_object_t object;
memset(&object, 0, sizeof(hc_object_t));
diff --git a/ctrl/libhicnctrl/src/objects/connection.h b/ctrl/libhicnctrl/src/objects/connection.h
index 4a4c78f09..1e9bf0376 100644
--- a/ctrl/libhicnctrl/src/objects/connection.h
+++ b/ctrl/libhicnctrl/src/objects/connection.h
@@ -25,6 +25,7 @@
bool hc_connection_is_local(const hc_connection_t *connection);
bool hc_connection_has_local(const hc_connection_t *connection);
+bool hc_connection_has_valid_id(const hc_connection_t *connection);
DECLARE_OBJECT_OPS_H(OBJECT_TYPE_CONNECTION, connection);