More WTP work...
FossilOrigin-Name: afda76caa13c6b6daf59e1482844be8c1a0b6aa26760175f105c1b1aecbbb448
This commit is contained in:
parent
5a80bdecea
commit
5a71654ebd
@ -311,6 +311,7 @@ CWACTION=action.o \
|
|||||||
cw_out_wtp_board_data.o \
|
cw_out_wtp_board_data.o \
|
||||||
cw_out_image_data.o \
|
cw_out_image_data.o \
|
||||||
cipwap_actions_ac.o \
|
cipwap_actions_ac.o \
|
||||||
|
cipwap_actions_wtp.o \
|
||||||
cipwap_strings_elem.o \
|
cipwap_strings_elem.o \
|
||||||
capwap_strings_result.o\
|
capwap_strings_result.o\
|
||||||
cw_put_msg.o \
|
cw_put_msg.o \
|
||||||
|
@ -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}
|
{0, 0}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -2,7 +2,12 @@
|
|||||||
#ifndef __CIPWAP_H
|
#ifndef __CIPWAP_H
|
||||||
#define __CIPWAP_H
|
#define __CIPWAP_H
|
||||||
|
|
||||||
|
#include "strheap.h"
|
||||||
|
#include "action.h"
|
||||||
|
|
||||||
extern struct cw_str cipwap_strings_elem[];
|
extern struct cw_str cipwap_strings_elem[];
|
||||||
|
extern int cw_register_actions_cipwap_wtp(struct cw_actiondef *def);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -126,7 +126,7 @@ cw_action_out_t cipwap_actions_ac_out[] = {
|
|||||||
,
|
,
|
||||||
|
|
||||||
/* Cisco AP Timesync - Important to get the WTP a DTLS
|
/* 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_MSG_DISCOVERY_RESPONSE, CW_ITEM_AC_TIMESTAMP, CW_VENDOR_ID_CISCO,
|
||||||
CW_CISCO_AP_TIMESYNC, NULL,cw_out_cisco_ap_timesync, 0}
|
CW_CISCO_AP_TIMESYNC, NULL,cw_out_cisco_ap_timesync, 0}
|
||||||
,
|
,
|
||||||
|
@ -62,7 +62,7 @@ int cw_out_generic(struct conn *conn, struct cw_action_out *a, uint8_t * dst) //
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
else{
|
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)
|
a->elem_id, cw_strelemp(conn->actions, a->elem_id)
|
||||||
, cw_strmsg(a->msg_id),a->item_id);
|
, cw_strmsg(a->msg_id),a->item_id);
|
||||||
|
|
||||||
|
@ -50,6 +50,8 @@ uint32_t cw_dbg_opt_level = 0;
|
|||||||
#define DBG_CLR_YELLO "\x1b[33m"
|
#define DBG_CLR_YELLO "\x1b[33m"
|
||||||
#define DBG_CLR_YELLO_I "\x1b[3;33m"
|
#define DBG_CLR_YELLO_I "\x1b[3;33m"
|
||||||
|
|
||||||
|
#define DBG_CLR_CYAN "\x1b[36m"
|
||||||
|
|
||||||
|
|
||||||
static struct cw_str color_on[] = {
|
static struct cw_str color_on[] = {
|
||||||
{ DBG_PKT_IN, DBG_CLR_YELLO },
|
{ DBG_PKT_IN, DBG_CLR_YELLO },
|
||||||
@ -67,6 +69,7 @@ static struct cw_str color_on[] = {
|
|||||||
|
|
||||||
{ DBG_RFC, "\x1b[31m" },
|
{ DBG_RFC, "\x1b[31m" },
|
||||||
{ DBG_X, "\x1b[31m" },
|
{ DBG_X, "\x1b[31m" },
|
||||||
|
{ DBG_WARN, DBG_CLR_CYAN },
|
||||||
{ CW_STR_STOP, "" }
|
{ CW_STR_STOP, "" }
|
||||||
};
|
};
|
||||||
static struct cw_str color_ontext[] = {
|
static struct cw_str color_ontext[] = {
|
||||||
@ -95,7 +98,9 @@ static struct cw_str prefix[] = {
|
|||||||
{ DBG_RFC, " RFC Violation -" },
|
{ DBG_RFC, " RFC Violation -" },
|
||||||
{ DBG_SUBELEM," Sub-Element - "},
|
{ DBG_SUBELEM," Sub-Element - "},
|
||||||
{ DBG_DTLS, " DTLS - "},
|
{ DBG_DTLS, " DTLS - "},
|
||||||
|
{ DBG_WARN, " Warning - "},
|
||||||
{ DBG_X, "XXXXX - "},
|
{ DBG_X, "XXXXX - "},
|
||||||
|
|
||||||
{ CW_STR_STOP, "" }
|
{ CW_STR_STOP, "" }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -39,6 +39,7 @@ struct cw_str cw_dbg_strings[] = {
|
|||||||
{ DBG_ELEM_ERR, "elem_err" },
|
{ DBG_ELEM_ERR, "elem_err" },
|
||||||
{ DBG_DTLS, "dtls" },
|
{ DBG_DTLS, "dtls" },
|
||||||
{ DBG_DTLS_BIO, "dtls_bio" },
|
{ DBG_DTLS_BIO, "dtls_bio" },
|
||||||
|
{ DBG_WARN, "warn" },
|
||||||
|
|
||||||
{ DBG_X,"dbgx" },
|
{ DBG_X,"dbgx" },
|
||||||
{ CW_STR_STOP, NULL }
|
{ CW_STR_STOP, NULL }
|
||||||
|
@ -106,7 +106,7 @@ int cw_send_request(struct conn *conn,int msg_id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( rc <0 && errno != EAGAIN) {
|
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) {
|
if ( rc <0 && errno == EAGAIN) {
|
||||||
errno=ETIMEDOUT;
|
errno=ETIMEDOUT;
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
"wtp_board_data" : {
|
"wtp_board_data" : {
|
||||||
"vendor_id": 4232704,
|
"vendor_id": 4232704,
|
||||||
"model_no": "Tobias Herre",
|
"model_no": "Moodle",
|
||||||
"serial_no": "2045",
|
"serial_no": "2045",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -8,6 +8,10 @@ int configure()
|
|||||||
{
|
{
|
||||||
|
|
||||||
struct conn * conn = get_conn();
|
struct conn * conn = get_conn();
|
||||||
|
cw_send_request(conn,CW_MSG_CONFIGURATION_STATUS_REQUEST);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* struct wtpinfo * wtpinfo = get_wtpinfo();
|
/* struct wtpinfo * wtpinfo = get_wtpinfo();
|
||||||
|
|
||||||
struct radioinfo *rip = &(wtpinfo->radioinfo[0]);
|
struct radioinfo *rip = &(wtpinfo->radioinfo[0]);
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#include "capwap/capwap.h"
|
#include "capwap/capwap.h"
|
||||||
|
#include "capwap/cipwap.h"
|
||||||
#include "capwap/capwap_items.h"
|
#include "capwap/capwap_items.h"
|
||||||
#include "capwap/conn.h"
|
#include "capwap/conn.h"
|
||||||
#include "capwap/log.h"
|
#include "capwap/log.h"
|
||||||
@ -63,7 +64,7 @@ int main()
|
|||||||
struct conn *conn = the_conn;
|
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);
|
////cw_register_actions_capwap_80211_wtp(&capwap_actions);
|
||||||
|
|
||||||
conn->actions = &capwap_actions;
|
conn->actions = &capwap_actions;
|
||||||
@ -109,6 +110,7 @@ int main()
|
|||||||
the_conn->strict_capwap=0;
|
the_conn->strict_capwap=0;
|
||||||
discovery();
|
discovery();
|
||||||
join();
|
join();
|
||||||
|
configure();
|
||||||
//image_update();
|
//image_update();
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user