2015-04-07 07:46:55 +02:00
|
|
|
|
|
|
|
#include "action.h"
|
2015-04-11 19:00:51 +02:00
|
|
|
#include "dbg.h"
|
2015-04-19 23:27:44 +02:00
|
|
|
#include "mbag.h"
|
2015-04-07 07:46:55 +02:00
|
|
|
#include "capwap.h"
|
2015-04-12 23:28:55 +02:00
|
|
|
#include "capwap_cisco.h"
|
2015-04-07 07:46:55 +02:00
|
|
|
|
|
|
|
|
2015-04-12 23:28:55 +02:00
|
|
|
int cw_in_cisco_image_identifier(struct conn *conn,struct cw_action_in * a,uint8_t *data,int len,struct sockaddr *from)
|
2015-04-07 07:46:55 +02:00
|
|
|
{
|
|
|
|
|
|
|
|
if (len<a->min_len) {
|
|
|
|
cw_dbg(DBG_ELEM_ERR,"Message element too short, %d < %d", len,a->min_len);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t vendor_id = cw_get_dword(data);
|
|
|
|
int dstart;
|
|
|
|
|
|
|
|
switch (vendor_id) {
|
|
|
|
case CW_VENDOR_ID_ZYXEL:
|
|
|
|
case CW_VENDOR_ID_CISCO:
|
|
|
|
case CW_VENDOR_ID_FSF:
|
|
|
|
case 0:
|
|
|
|
dstart=4;
|
|
|
|
len-=4;
|
2015-04-12 10:19:02 +02:00
|
|
|
break;
|
2015-04-07 07:46:55 +02:00
|
|
|
default:
|
|
|
|
vendor_id=CW_VENDOR_ID_CISCO;
|
|
|
|
dstart=0;
|
|
|
|
}
|
|
|
|
|
2015-04-19 23:27:44 +02:00
|
|
|
// mbag_set(conn->remote,a->item_id,a->itemtype,data+dstart,len);
|
|
|
|
mbag_set_vendorstr(conn->incomming,a->item_id,vendor_id,data+dstart,len);
|
2015-04-07 07:46:55 +02:00
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|