diff --git a/src/capwap/Makefile b/src/capwap/Makefile index a3bcc74a..73c171c0 100644 --- a/src/capwap/Makefile +++ b/src/capwap/Makefile @@ -311,6 +311,7 @@ CWACTION=action.o \ cw_out_wtp_board_data.o \ cw_out_image_data.o \ cipwap_actions_ac.o \ + cipwap_actions_wtp.o \ cipwap_strings_elem.o \ capwap_strings_result.o\ cw_put_msg.o \ diff --git a/src/capwap/capwap_actions_wtp.c b/src/capwap/capwap_actions_wtp.c index fd7f57a2..487f86ce 100644 --- a/src/capwap/capwap_actions_wtp.c +++ b/src/capwap/capwap_actions_wtp.c @@ -197,6 +197,16 @@ cw_action_out_t capwap_actions_wtp_out[] = { + /* ------------------------------------------------------------------------------- + * Configuration Status Request OUT + */ + {CW_MSG_CONFIGURATION_STATUS_REQUEST, CW_ITEM_NONE} + , + + + + + {0, 0} }; diff --git a/src/capwap/cipwap.h b/src/capwap/cipwap.h index 1309eabc..a7ae5fc1 100644 --- a/src/capwap/cipwap.h +++ b/src/capwap/cipwap.h @@ -2,7 +2,12 @@ #ifndef __CIPWAP_H #define __CIPWAP_H +#include "strheap.h" +#include "action.h" + extern struct cw_str cipwap_strings_elem[]; +extern int cw_register_actions_cipwap_wtp(struct cw_actiondef *def); + #endif diff --git a/src/capwap/cipwap_actions_ac.c b/src/capwap/cipwap_actions_ac.c index eda02332..b1c3a6d4 100644 --- a/src/capwap/cipwap_actions_ac.c +++ b/src/capwap/cipwap_actions_ac.c @@ -126,7 +126,7 @@ cw_action_out_t cipwap_actions_ac_out[] = { , /* Cisco AP Timesync - Important to get the WTP a DTLS - connection stablished*/ + connection established*/ {CW_MSG_DISCOVERY_RESPONSE, CW_ITEM_AC_TIMESTAMP, CW_VENDOR_ID_CISCO, CW_CISCO_AP_TIMESYNC, NULL,cw_out_cisco_ap_timesync, 0} , diff --git a/src/capwap/cw_out_generic.c b/src/capwap/cw_out_generic.c index 5fc10f45..3355ccd1 100644 --- a/src/capwap/cw_out_generic.c +++ b/src/capwap/cw_out_generic.c @@ -62,7 +62,7 @@ int cw_out_generic(struct conn *conn, struct cw_action_out *a, uint8_t * dst) // ); } else{ - cw_dbg(DBG_ELEM,"No output for element %d -(%s) in %s. Item %d not found.", + cw_dbg(DBG_WARN,"No output for element %d -(%s) in %s. Item %d not found.", a->elem_id, cw_strelemp(conn->actions, a->elem_id) , cw_strmsg(a->msg_id),a->item_id); diff --git a/src/capwap/dbg.c b/src/capwap/dbg.c index 2704acc2..7cbf133f 100644 --- a/src/capwap/dbg.c +++ b/src/capwap/dbg.c @@ -50,6 +50,8 @@ uint32_t cw_dbg_opt_level = 0; #define DBG_CLR_YELLO "\x1b[33m" #define DBG_CLR_YELLO_I "\x1b[3;33m" +#define DBG_CLR_CYAN "\x1b[36m" + static struct cw_str color_on[] = { { DBG_PKT_IN, DBG_CLR_YELLO }, @@ -67,6 +69,7 @@ static struct cw_str color_on[] = { { DBG_RFC, "\x1b[31m" }, { DBG_X, "\x1b[31m" }, + { DBG_WARN, DBG_CLR_CYAN }, { CW_STR_STOP, "" } }; static struct cw_str color_ontext[] = { @@ -95,7 +98,9 @@ static struct cw_str prefix[] = { { DBG_RFC, " RFC Violation -" }, { DBG_SUBELEM," Sub-Element - "}, { DBG_DTLS, " DTLS - "}, + { DBG_WARN, " Warning - "}, { DBG_X, "XXXXX - "}, + { CW_STR_STOP, "" } }; diff --git a/src/capwap/dbg_strings.c b/src/capwap/dbg_strings.c index cabae3dd..bc9d7051 100644 --- a/src/capwap/dbg_strings.c +++ b/src/capwap/dbg_strings.c @@ -39,6 +39,7 @@ struct cw_str cw_dbg_strings[] = { { DBG_ELEM_ERR, "elem_err" }, { DBG_DTLS, "dtls" }, { DBG_DTLS_BIO, "dtls_bio" }, + { DBG_WARN, "warn" }, { DBG_X,"dbgx" }, { CW_STR_STOP, NULL } diff --git a/src/capwap/send.c b/src/capwap/send.c index 896b7e1b..69dc576c 100644 --- a/src/capwap/send.c +++ b/src/capwap/send.c @@ -106,7 +106,7 @@ int cw_send_request(struct conn *conn,int msg_id) } if ( rc <0 && errno != EAGAIN) { - cw_log(LOG_ERR,"Error reading from %s:%s",sock_addr2str(&conn->addr),strerror(errno)); + cw_log(LOG_ERR,"Can't read from %s: %s",sock_addr2str(&conn->addr),strerror(errno)); } if ( rc <0 && errno == EAGAIN) { errno=ETIMEDOUT; diff --git a/src/wtp/cfg.json b/src/wtp/cfg.json index bb84c98b..2e68e2f5 100644 --- a/src/wtp/cfg.json +++ b/src/wtp/cfg.json @@ -16,7 +16,7 @@ "wtp_board_data" : { "vendor_id": 4232704, - "model_no": "Tobias Herre", + "model_no": "Moodle", "serial_no": "2045", }, diff --git a/src/wtp/configure.c b/src/wtp/configure.c index ee586343..015dbe0a 100644 --- a/src/wtp/configure.c +++ b/src/wtp/configure.c @@ -8,6 +8,10 @@ int configure() { struct conn * conn = get_conn(); + cw_send_request(conn,CW_MSG_CONFIGURATION_STATUS_REQUEST); + + + /* struct wtpinfo * wtpinfo = get_wtpinfo(); struct radioinfo *rip = &(wtpinfo->radioinfo[0]); diff --git a/src/wtp/wtp_main.c b/src/wtp/wtp_main.c index 543b7b82..a926dbf4 100644 --- a/src/wtp/wtp_main.c +++ b/src/wtp/wtp_main.c @@ -4,6 +4,7 @@ #include #include "capwap/capwap.h" +#include "capwap/cipwap.h" #include "capwap/capwap_items.h" #include "capwap/conn.h" #include "capwap/log.h" @@ -63,7 +64,7 @@ int main() struct conn *conn = the_conn; - cw_register_actions_capwap_wtp(&capwap_actions); + cw_register_actions_cipwap_wtp(&capwap_actions); ////cw_register_actions_capwap_80211_wtp(&capwap_actions); conn->actions = &capwap_actions; @@ -109,6 +110,7 @@ int main() the_conn->strict_capwap=0; discovery(); join(); + configure(); //image_update();