diff --git a/src/capwap/cwmsg_addelem_radio_operational_state.c b/src/capwap/cwmsg_addelem_radio_operational_state.c new file mode 100644 index 00000000..76c16653 --- /dev/null +++ b/src/capwap/cwmsg_addelem_radio_operational_state.c @@ -0,0 +1,15 @@ + + +#include "capwap.h" +#include "cwmsg.h" +#include "radioinfo.h" + +void cwmsg_addelem_radio_operational_state(struct cwmsg * cwmsg, struct radioinfo * ri) +{ + uint8_t s[3]; + s[0]=ri->rid; + s[1]=ri->state; + s[2]=ri->cause; + + cwmsg_addelem(cwmsg,CWMSGELEM_RADIO_OPERATIONAL_STATE,s,3); +} diff --git a/src/capwap/cwsend_change_state_event_response.c b/src/capwap/cwsend_change_state_event_response.c new file mode 100644 index 00000000..435458be --- /dev/null +++ b/src/capwap/cwsend_change_state_event_response.c @@ -0,0 +1,19 @@ + +#include "cwmsg.h" +#include "capwap.h" +#include "cw_log.h" +#include "sock.h" + +void cwsend_change_state_event_response(struct conn * conn,int seqnum, struct radioinfo * radioinfo) +{ + cw_dbg(DBG_CW_MSG,"Sending change state response to %s, seq = %d",sock_addr2str(&conn->addr),seqnum); + + struct cwmsg * cwmsg = &conn->resp_msg; + cwmsg_init(cwmsg,conn->resp_buffer,CWMSG_CHANGE_STATE_EVENT_RESPONSE,seqnum,NULL); + + cwmsg_addelem_result_code(cwmsg,0); + cwmsg_addelem_radio_operational_state(cwmsg,radioinfo); + + conn_send_response(conn,cwmsg,seqnum); +} +