diff options
Diffstat (limited to 'ctrl/libhicnctrl/includes')
-rw-r--r-- | ctrl/libhicnctrl/includes/hicn/ctrl/api.h | 4 | ||||
-rw-r--r-- | ctrl/libhicnctrl/includes/hicn/ctrl/commands.h | 13 | ||||
-rw-r--r-- | ctrl/libhicnctrl/includes/hicn/ctrl/face.h | 1 |
3 files changed, 17 insertions, 1 deletions
diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h index d6bb282cb..c9c2f0da8 100644 --- a/ctrl/libhicnctrl/includes/hicn/ctrl/api.h +++ b/ctrl/libhicnctrl/includes/hicn/ctrl/api.h @@ -498,6 +498,7 @@ typedef struct { u16 remote_port; /* .rw */ hc_connection_state_t admin_state; /* .rw */ #ifdef WITH_POLICY + uint32_t priority; /* .rw */ policy_tags_t tags; /* .rw */ #endif /* WITH_POLICY */ hc_connection_state_t state; /* .r. */ @@ -523,8 +524,9 @@ int hc_connection_validate(const hc_connection_t * connection); int hc_connection_cmp(const hc_connection_t * c1, const hc_connection_t * c2); int hc_connection_parse(void * in, hc_connection_t * connection); -#ifdef WITH_POLICY int hc_connection_set_admin_state(hc_sock_t * s, const char * conn_id_or_name, face_state_t state); +#ifdef WITH_POLICY +int hc_connection_set_priority(hc_sock_t * s, const char * conn_id_or_name, uint32_t priority); #endif /* WITH_POLICY */ #define foreach_connection(VAR, data) foreach_type(hc_connection_t, VAR, data) diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/commands.h b/ctrl/libhicnctrl/includes/hicn/ctrl/commands.h index a5bc15e8a..520559ccf 100644 --- a/ctrl/libhicnctrl/includes/hicn/ctrl/commands.h +++ b/ctrl/libhicnctrl/includes/hicn/ctrl/commands.h @@ -75,6 +75,7 @@ typedef enum { LIST_POLICIES, REMOVE_POLICY, UPDATE_CONNECTION, + CONNECTION_SET_PRIORITY, #endif /* WITH_POLICY */ LAST_COMMAND_VALUE } command_id; @@ -138,6 +139,7 @@ typedef struct { uint8_t connectionType; uint8_t admin_state; #ifdef WITH_POLICY + uint32_t priority; policy_tags_t tags; #endif /* WITH_POLICY */ } add_connection_command; @@ -166,6 +168,9 @@ typedef struct { uint32_t connid; uint8_t state; uint8_t admin_state; +#ifdef WITH_POLICY + uint32_t priority; +#endif /* WITH_POLICY */ char interfaceName[SYMBOLIC_NAME_LEN]; char connectionName[SYMBOLIC_NAME_LEN]; } list_connections_command; @@ -335,9 +340,15 @@ typedef struct { typedef struct { char symbolicOrConnid[SYMBOLIC_NAME_LEN]; uint8_t admin_state; + uint32_t priority; policy_tags_t tags; } update_connection_command; +typedef struct { + char symbolicOrConnid[SYMBOLIC_NAME_LEN]; + uint32_t priority; +} connection_set_priority_command; + #endif /* WITH_POLICY */ //===== size of commands ====== @@ -394,6 +405,8 @@ static inline int payloadLengthDaemon(command_id id) { return sizeof(remove_policy_command); case UPDATE_CONNECTION: return sizeof(update_connection_command); + case CONNECTION_SET_PRIORITY: + return sizeof(connection_set_priority_command); #endif /* WITH_POLICY */ case LAST_COMMAND_VALUE: return 0; diff --git a/ctrl/libhicnctrl/includes/hicn/ctrl/face.h b/ctrl/libhicnctrl/includes/hicn/ctrl/face.h index 5c1fecd55..f0a8045de 100644 --- a/ctrl/libhicnctrl/includes/hicn/ctrl/face.h +++ b/ctrl/libhicnctrl/includes/hicn/ctrl/face.h @@ -153,6 +153,7 @@ typedef struct { face_state_t admin_state; face_state_t state; #ifdef WITH_POLICY + uint32_t priority; policy_tags_t tags; /**< \see policy_tag_t */ #endif /* WITH_POLICY */ |