New "in"-actions.

FossilOrigin-Name: cf257c7998b4441a837dfee193480d75eb3e88cbf31ce02a7492afdd1d5a6ccc
This commit is contained in:
7u83@mail.ru 2015-03-31 10:46:58 +00:00
parent 4e8c530188
commit 91265641ed
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,38 @@
#include "capwap.h"
/**
* @file
* @brief Implementation of Vendor Specific Payload
*/
/**
* Default handler for Vendor Specific Payload message elements.
*/
int cw_in_vendor_specific_payload(struct conn *conn,struct cw_action * a,uint8_t *data,int len)
{
cw_action_t as,*af;
as = *a;
as.vendor_id = cw_get_dword(data);
as.elem_id = cw_get_word(data+4);
printf("Vendor Specific: %d, %d\n",as.vendor_id,as.elem_id);
af = cw_actionlist_get(conn->msgtr,&as);
if (!af) {
printf("Msg unknown\n");
return 0;
}
printf("Found\n");
if (af->start) {
af->start(conn,af,data+6,len-6);
}
return 1;
}

View File

@ -0,0 +1,14 @@
int cw_in_wtp_name(struct conn *conn,struct cw_action * a,uint8_t *data,int len)
{
int i;
for (i=0; i<len; i++) {
printf("%c",data[i]);
}
printf("\n");
}