aboutsummaryrefslogtreecommitdiffstats
path: root/hicn-light/src/hicn/core/connection.h
diff options
context:
space:
mode:
authorJordan Augé <jordan.auge+fdio@cisco.com>2019-07-26 23:20:30 +0200
committerMauro Sardara <msardara@cisco.com>2019-07-29 17:13:35 +0200
commit0a1c6b5565e20167d1f1f33a5a8b597f420b18b0 (patch)
tree98c5da8f231fbd3dc2ce6502040e29c8333d9ffc /hicn-light/src/hicn/core/connection.h
parent05ca0aa8f612ee48fb66d4dbebe596b7f1e03181 (diff)
[HICN-252] Add per-application policy framework to hicn-light forwarder
Change-Id: I0531cd7a7de179581295ae34766c81cd9cf3e172 Signed-off-by: Jordan Augé <jordan.auge+fdio@cisco.com> Signed-off-by: Mauro Sardara <msardara@cisco.com> Co-authored-by: Mauro Sardara <msardara@cisco.com>
Diffstat (limited to 'hicn-light/src/hicn/core/connection.h')
-rw-r--r--hicn-light/src/hicn/core/connection.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/hicn-light/src/hicn/core/connection.h b/hicn-light/src/hicn/core/connection.h
index df1c780a1..c007a1a26 100644
--- a/hicn-light/src/hicn/core/connection.h
+++ b/hicn-light/src/hicn/core/connection.h
@@ -29,6 +29,21 @@
#include <hicn/io/ioOperations.h>
#include <hicn/utils/address.h>
+#ifdef WITH_MAPME
+typedef enum {
+ CONNECTION_EVENT_CREATE,
+ CONNECTION_EVENT_DELETE,
+ CONNECTION_EVENT_UPDATE,
+ CONNECTION_EVENT_SET_UP,
+ CONNECTION_EVENT_SET_DOWN,
+} connection_event_t;
+
+#endif /* WITH_MAPME */
+
+#ifdef WITH_POLICY
+#include <hicn/utils/policy.h>
+#endif /* WITH_POLICY */
+
// packet types for probing
#define PACKET_TYPE_PROBE_REQUEST 5
#define PACKET_TYPE_PROBE_REPLY 6
@@ -168,4 +183,13 @@ connection_state_t connection_GetAdminState(const Connection *conn);
void connection_SetAdminState(Connection *conn, connection_state_t admin_state);
+#ifdef WITH_POLICY
+void connection_AddTag(Connection *conn, policy_tag_t tag);
+void connection_RemoveTag(Connection *conn, policy_tag_t tag);
+policy_tags_t connection_GetTags(const Connection *conn);
+void connection_SetTags(Connection *conn, policy_tags_t tags);
+void connection_ClearTags(Connection *conn);
+int connection_HasTag(const Connection *conn, policy_tag_t tag);
+#endif /* WITH_POLICY */
+
#endif // connection_h