Cisco WTP can addapt to AC's version

FossilOrigin-Name: 326b87b9c8a4afebe70ccd3d93383afdba08495a7ff9976129260c7ee7f49bdb
This commit is contained in:
7u83@mail.ru
2018-04-23 08:51:42 +00:00
parent d599887e45
commit 74c96ab343
7 changed files with 120 additions and 29 deletions

View File

@ -61,6 +61,9 @@ int cw_put_msg(struct conn *conn, uint8_t * rawout)
return CAPWAP_RESULT_MSG_UNRECOGNIZED;
}
if (msg->preprocess){
msg->preprocess(conn);
}
cw_dbg(DBG_MSG_ASSEMBLY,"*** Assenmbling message of type %d (%s) ***",
msg->type, msg->name);

View File

@ -280,6 +280,7 @@ int cw_msgset_add(struct cw_MsgSet *set,
msg->mand_keys=NULL;
msg->elements_list = mlist_create(cmp_elemdata,NULL,sizeof(struct cw_ElemData));
msg->postprocess=NULL;
msg->preprocess=NULL;
}
/* Overwrite the found message */
@ -289,6 +290,8 @@ int cw_msgset_add(struct cw_MsgSet *set,
msg->states = msgdef->states;
if (msgdef->postprocess != NULL)
msg->postprocess = msgdef->postprocess;
if (msgdef->preprocess != NULL)
msg->preprocess = msgdef->preprocess;
msg->receiver = msgdef->receiver;

View File

@ -70,6 +70,7 @@ struct cw_MsgDef{
struct cw_ElemDef * elements;
int (*preprocess)(struct conn * conn);
int (*postprocess)(struct conn * conn);
};
@ -83,6 +84,7 @@ struct cw_MsgData{
mlist_t elements_list;
mlist_t mand_keys; /**< Keys of mandatory elements */
int (*preprocess)(struct conn * conn);
int (*postprocess)(struct conn * conn);
};