2013-05-01 14:52:55 +02:00
|
|
|
#ifndef __WTP_DFA_HEADER__
|
|
|
|
#define __WTP_DFA_HEADER__
|
|
|
|
|
|
|
|
#include "capwap_network.h"
|
|
|
|
#include "capwap_protocol.h"
|
|
|
|
#include "capwap_element.h"
|
|
|
|
|
2013-05-27 21:33:23 +02:00
|
|
|
/* */ /* TODO da rifare */
|
2013-05-01 14:52:55 +02:00
|
|
|
struct wtp_discovery_response {
|
2013-05-27 21:33:23 +02:00
|
|
|
struct capwap_array* controlipv4;
|
|
|
|
struct capwap_array* controlipv6;
|
2013-05-01 14:52:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
void wtp_free_discovery_response_array(void);
|
|
|
|
|
|
|
|
/* */
|
|
|
|
int wtp_bio_send(struct capwap_dtls* dtls, char* buffer, int length, void* param);
|
|
|
|
|
|
|
|
/* */
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_teardown_connection(void);
|
2013-05-01 14:52:55 +02:00
|
|
|
|
|
|
|
/* */
|
2013-06-05 19:39:03 +02:00
|
|
|
void wtp_free_packet_rxmng(int isctrlmsg);
|
2013-05-01 14:52:55 +02:00
|
|
|
void wtp_free_reference_last_request(void);
|
|
|
|
void wtp_free_reference_last_response(void);
|
|
|
|
|
|
|
|
/* State machine */
|
2013-05-27 21:33:23 +02:00
|
|
|
int wtp_dfa_running(void);
|
2013-05-01 14:52:55 +02:00
|
|
|
void wtp_dfa_change_state(int state);
|
|
|
|
|
2013-11-07 22:06:29 +01:00
|
|
|
/* */
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_start_dtlssetup(void);
|
|
|
|
void wtp_start_datachannel(void);
|
2013-05-01 14:52:55 +02:00
|
|
|
|
2013-11-07 22:06:29 +01:00
|
|
|
/* */
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_send_join(void);
|
|
|
|
void wtp_send_configure(void);
|
|
|
|
void wtp_send_datacheck(void);
|
2013-05-01 14:52:55 +02:00
|
|
|
|
2013-11-07 22:06:29 +01:00
|
|
|
/* */
|
2014-03-02 19:31:27 +01:00
|
|
|
void wtp_dfa_retransmition_timeout(struct capwap_timeout* timeout, unsigned long index, void* context, void* param);
|
|
|
|
|
|
|
|
/* */
|
|
|
|
void wtp_dfa_state_idle(void);
|
|
|
|
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_dfa_state_discovery(struct capwap_parsed_packet* packet);
|
2014-03-02 19:31:27 +01:00
|
|
|
void wtp_dfa_state_discovery_timeout(struct capwap_timeout* timeout, unsigned long index, void* context, void* param);
|
|
|
|
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_dfa_state_dtlsteardown(struct capwap_parsed_packet* packet);
|
2014-03-02 19:31:27 +01:00
|
|
|
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_dfa_state_sulking(struct capwap_parsed_packet* packet);
|
2014-03-02 19:31:27 +01:00
|
|
|
void wtp_dfa_state_sulking_timeout(struct capwap_timeout* timeout, unsigned long index, void* context, void* param);
|
|
|
|
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_dfa_state_join(struct capwap_parsed_packet* packet);
|
2014-03-02 19:31:27 +01:00
|
|
|
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_dfa_state_configure(struct capwap_parsed_packet* packet);
|
2014-03-02 19:31:27 +01:00
|
|
|
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_dfa_state_datacheck(struct capwap_parsed_packet* packet);
|
2014-03-02 19:31:27 +01:00
|
|
|
|
2014-02-19 19:16:33 +01:00
|
|
|
void wtp_dfa_state_run(struct capwap_parsed_packet* packet);
|
2014-03-02 19:31:27 +01:00
|
|
|
void wtp_dfa_state_run_echo_timeout(struct capwap_timeout* timeout, unsigned long index, void* context, void* param);
|
|
|
|
void wtp_dfa_state_run_keepalive_timeout(struct capwap_timeout* timeout, unsigned long index, void* context, void* param);
|
|
|
|
void wtp_dfa_state_run_keepalivedead_timeout(struct capwap_timeout* timeout, unsigned long index, void* context, void* param);
|
|
|
|
|
|
|
|
void wtp_dfa_state_reset(void);
|
2013-05-01 14:52:55 +02:00
|
|
|
|
2014-02-16 15:28:27 +01:00
|
|
|
/* */
|
2014-04-21 23:16:56 +02:00
|
|
|
void wtp_ieee80211_packet(uint8_t radioid, const struct ieee80211_header* header, int length);
|
2014-04-14 22:33:12 +02:00
|
|
|
void wtp_send_data_packet(uint8_t radioid, uint8_t wlanid, const uint8_t* data, int length, int leavenativeframe);
|
2014-02-16 15:28:27 +01:00
|
|
|
|
2013-05-01 14:52:55 +02:00
|
|
|
#endif /* __WTP_DFA_HEADER__ */
|