From a422ff628186335576e3e6d2cf400fa615a663f7 Mon Sep 17 00:00:00 2001 From: "7u83@mail.ru" <7u83@mail.ru@noemail.net> Date: Mon, 29 Feb 2016 06:52:52 +0000 Subject: [PATCH] Mods... FossilOrigin-Name: b6754678ab0cc13238110aa51cfba59b694c6966a84b8134930b6c9cbc419c24 --- src/capwap/Makefile | 1 - src/mod/capwap/capwap_actions_ac.c | 14 ++++++++++- src/mod/cisco/Makefile | 2 ++ src/mod/cisco/cisco_actions_ac.c | 37 +++++++++++++++++++----------- src/mod/cisco/mod_cisco.h | 3 --- 5 files changed, 39 insertions(+), 18 deletions(-) diff --git a/src/capwap/Makefile b/src/capwap/Makefile index 5752bd76..bca4235d 100644 --- a/src/capwap/Makefile +++ b/src/capwap/Makefile @@ -146,7 +146,6 @@ CAPWAPOBJS= \ cw_out_ac_descriptor.o \ cw_out_wtp_descriptor.o \ cw_out_cisco_ac_descriptor.o \ - cw_out_cisco_ap_timesync.o \ cw_in_cisco_image_identifier.o\ cw_out_radio_operational_state.o\ cw_in_ac_descriptor.o\ diff --git a/src/mod/capwap/capwap_actions_ac.c b/src/mod/capwap/capwap_actions_ac.c index dacd29b2..92b607aa 100644 --- a/src/mod/capwap/capwap_actions_ac.c +++ b/src/mod/capwap/capwap_actions_ac.c @@ -142,7 +142,7 @@ static cw_action_out_t actions_out[]={ } , - /* Discovery Response Elem AC_NAME */ + /* Discovery Response Elem AC Name */ { .msg_id = CW_MSG_DISCOVERY_RESPONSE, .elem_id = CW_ELEM_AC_NAME, @@ -153,6 +153,18 @@ static cw_action_out_t actions_out[]={ } , + /* List of CAPWAP Control IPv4 and IPv6 addresses */ + { + .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .item_id = CW_ITEM_CAPWAP_CONTROL_IP_ADDRESS_LIST, + .out = cw_out_capwap_control_ip_addr_list, + .get = cw_out_get_outgoing, + .mand = 1 + } + , + + + {0,0} }; diff --git a/src/mod/cisco/Makefile b/src/mod/cisco/Makefile index 8aae4ea1..b32199d4 100644 --- a/src/mod/cisco/Makefile +++ b/src/mod/cisco/Makefile @@ -2,7 +2,9 @@ OBJS=\ mod_cisco_ac.o \ cisco_actions_ac.o \ + cisco_out_ap_timesync.o \ cisco_in_wtp_descriptor.o + NAME=libcisco.a diff --git a/src/mod/cisco/cisco_actions_ac.c b/src/mod/cisco/cisco_actions_ac.c index 757a3652..d9061582 100644 --- a/src/mod/cisco/cisco_actions_ac.c +++ b/src/mod/cisco/cisco_actions_ac.c @@ -26,6 +26,7 @@ #include "capwap/capwap_cisco.h" #include "mod_cisco.h" +#include "cisco.h" static cw_action_in_t actions_in[] = { @@ -64,13 +65,33 @@ static cw_action_in_t actions_in[] = { } , - - /* End of list */ {0, 0} }; +static cw_action_out_t actions_out[]={ + + /* Message Discovery Response */ + + /* Discovery Response AC Descriptor */ + { + .msg_id = CW_MSG_DISCOVERY_RESPONSE, + .item_id = CW_ITEM_AC_TIMESTAMP, + .vendor_id = CW_VENDOR_ID_CISCO, + .elem_id = CW_CISCO_AP_TIMESYNC, + .out = cisco_out_ap_timesync, + .mand = 1 + } + + , + + {0,0} + +}; + + + #include "capwap/item.h" static struct cw_itemdef _capwap_itemdefs[] = { @@ -89,20 +110,10 @@ static struct cw_itemdef _capwap_itemdefs[] = { int cisco_register_actions_ac(struct cw_actiondef *def) { - /* - def->in = cw_actionlist_in_create(); - def->out = cw_actionlist_out_create(); - def->strmsg = cw_strheap_create(); - def->strelem = cw_strheap_create(); - def->wbids = intavltree_create(); - def->items = cw_itemdefheap_create(); - def->radioitems = cw_itemdefheap_create(); -*/ - int rc; rc = cw_actionlist_in_register_actions(def->in, actions_in); -// rc += cw_actionlist_out_register_actions(def->out, capwap_actions_ac_out); + rc += cw_actionlist_out_register_actions(def->out, actions_out); rc += cw_strheap_register_strings(def->strmsg, capwap_strings_msg); rc += cw_strheap_register_strings(def->strelem, capwap_strings_elem); diff --git a/src/mod/cisco/mod_cisco.h b/src/mod/cisco/mod_cisco.h index 9a2900ca..2377815f 100644 --- a/src/mod/cisco/mod_cisco.h +++ b/src/mod/cisco/mod_cisco.h @@ -3,8 +3,5 @@ struct mod_ac * mod_cisco_ac(); -extern int cisco_in_wtp_descriptor(struct conn *conn, struct cw_action_in *a, uint8_t * data, - int len, struct sockaddr *from); - #endif