Cisco detection...

FossilOrigin-Name: 85b9dc7b18bb8eabd6a16215a31f8314e6d904a32ac569d2e4396c2590f663e4
This commit is contained in:
7u83@mail.ru
2016-02-27 09:47:37 +00:00
parent 0ba2c2cc39
commit bbe8b6a424
13 changed files with 65 additions and 212 deletions

View File

@ -63,6 +63,8 @@ UTILOBJS= \
intavltree.o \
cw_util.o \
send.o \
cw_read_wtp_descriptor_7.o \
cw_read_wtp_descriptor_versions.o
MAVLOBJS= \
mavl_del.o \

View File

@ -257,7 +257,7 @@ CW_MSG_MAXMSG = 26
#define CW_ELEM_AC_IPV6_LIST 3
#define CW_ELEM_AC_NAME 4
#define CW_ELEM_AC_NAME_WITH_PRIORITY 5
#define CW_ELEM_AC_NAME_WITH_INDEX CW_ELEM_AC_NAME_WITH_PRIORITY /* Draft 7 naming */
#define CW_ELEM_AC_NAME_WITH_INDEX CW_ELEM_AC_NAME_WITH_PRIORITY /* Draft 7 naming */
#define CW_ELEM_AC_TIMESTAMP 6
#define CW_ELEM_ADD_MAC_ACL_ENTRY 7
#define CW_ELEM_ADD_STATION 8

View File

@ -175,7 +175,7 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
int i;
for (i = 0; mods[i]; i++) {
if (mods[i]->detect) {
if (mods[i]->detect(conn, rawmsg, len, from)) {
if (mods[i]->detect(conn, rawmsg, len, elems_len, from)) {
cw_dbg(DBG_INFO,
"Using mod '%s' to handle connection from %s",
mods[i]->name,

View File

@ -173,7 +173,7 @@ static int process_elements(struct conn *conn, uint8_t * rawmsg, int len,
int i;
for (i=0; mods[i]; i++){
if (mods[i]->detect){
if (mods[i]->detect(conn,rawmsg,len,from)){
if (mods[i]->detect(conn,rawmsg,len,elems_len,from)){
cw_dbg(DBG_INFO,"Using mod '%s' to handle connection from %s",mods[i]->name,sock_addr2str(from));
break;
}

View File

@ -20,7 +20,7 @@ struct mod_ac
This function ifter receiving and disassembling a complete
CAPWAP message. Either on Discovery Request or Join Request
**/
int (*detect)(struct conn *conn,const uint8_t *rawmsg, int rawlen,struct sockaddr *from);
int (*detect)(struct conn *conn,const uint8_t *rawmsg, int rawlen,int elems_len, struct sockaddr *from);
/** used for private data */
void *data;