#include <sync/equilibrium2.h>
#include <sync/equilibrium2_svc.h>
#include "equilibrium2-classify.h"
#include <jnx/ipc_types.h>
#include <jnx/junos_kcom_mpsdk_cfg.h>
#include <jnx/mpsdk.h>
#include <jnx/msp_objcache.h>
Go to the source code of this file.
Functions | |
static void | proc_svc_set_blob (void *blob, junos_kcom_gencfg_opcode_t op) |
static void | read_gencfg_blob (junos_kcom_gencfg_t *kcom_gencfg) |
sp_svc_set_t * | get_svc_set (uint16_t id, bool active) |
void | del_svc_set (sp_svc_set_t *ss) |
int | equilibrium2_classify_ctrl_hdlr (msvcs_control_context_t *ctx, msvcs_control_event_t ev) |
Definition in file equilibrium2-classify_ctrl.c.
void del_svc_set | ( | sp_svc_set_t * | ss | ) |
Delete a service-set by pointer.
[in] | ss | Pointer to the service-set |
Definition at line 245 of file equilibrium2-classify_ctrl.c.
References ctrl_ctx, and sp_svc_set_s::ss_policy.
Referenced by proc_svc_set_blob(), and session_close().
int equilibrium2_classify_ctrl_hdlr | ( | msvcs_control_context_t * | ctx, | |
msvcs_control_event_t | ev | |||
) |
Control event handler.
[in] | ctx | Pointer to control context. |
[in] | ev | Control event. |
Definition at line 265 of file equilibrium2-classify_ctrl.c.
References ctrl_ctx, read_gencfg_blob(), svc_set_head, and svc_set_lock.
Referenced by equilibrium2_classify_entry().
sp_svc_set_t* get_svc_set | ( | uint16_t | id, | |
bool | active | |||
) |
Get a service-set by service-set ID. There could be maximumly two service-sets with the same ID, one is to be deleted, another is active.
[in] | id | Service-set ID |
[in] | active | Active flag, 'true' is active, 'false' is inactive |
Definition at line 226 of file equilibrium2-classify_ctrl.c.
References sp_svc_set_s::ss_active, blob_svc_set_s::ss_id, sp_svc_set_s::ss_policy, and svc_set_head.
Referenced by first_pkt_proc(), proc_svc_set_blob(), and session_close().
static void proc_svc_set_blob | ( | void * | blob, | |
junos_kcom_gencfg_opcode_t | op | |||
) | [static] |
Process service-set blob.
[in] | blob | Pointer to the blob |
[in] | op | Operation to the blob |
Definition at line 39 of file equilibrium2-classify_ctrl.c.
References classify_pid, ctrl_ctx, del_svc_set(), EQ2_CLASSIFY_SVC_NAME, get_svc_set(), INSIST_ERR, blob_rule_s::rule_term, blob_rule_s::rule_term_count, blob_svc_set_s::ss_gen_num, blob_svc_set_s::ss_id, blob_svc_set_s::ss_name, blob_svc_set_s::ss_rule, blob_svc_set_s::ss_rule_count, blob_svc_set_s::ss_size, blob_svc_set_s::ss_svc_id, svc_set_head, svc_set_lock, and blob_term_s::term_match_port.
Referenced by read_gencfg_blob().
static void read_gencfg_blob | ( | junos_kcom_gencfg_t * | kcom_gencfg | ) | [static] |
Read gencfg configuration blob.
[in] | kcom_gencfg | Pointer to kcom gencfg message |
Definition at line 192 of file equilibrium2-classify_ctrl.c.
References CONFIG_BLOB_SVC_SET, config_blob_key_s::key_name, config_blob_key_s::key_tag, and proc_svc_set_blob().
Referenced by equilibrium2_classify_ctrl_hdlr().