2014-07-11 22:12:11 +02:00
|
|
|
#ifndef __WTPMAN_H
|
|
|
|
#define __WTPMAN_H
|
|
|
|
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#include <semaphore.h>
|
|
|
|
#include <pthread.h>
|
|
|
|
|
2016-03-03 20:46:20 +01:00
|
|
|
#include "cw/capwap.h"
|
|
|
|
#include "cw/fragman.h"
|
2016-03-27 04:43:48 +02:00
|
|
|
#include "cw/timer.h"
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
#define WTPMAN_QSIZE 1024
|
|
|
|
|
|
|
|
struct wtpman{
|
|
|
|
pthread_t thread;
|
|
|
|
|
|
|
|
struct conn * conn;
|
|
|
|
|
|
|
|
|
|
|
|
/* wtp data */
|
|
|
|
uint8_t * wtp_name;
|
|
|
|
uint8_t * wtp_location;
|
|
|
|
uint8_t * session_id;
|
|
|
|
uint8_t wtp_mactype;
|
|
|
|
|
|
|
|
int socklistindex;
|
2016-03-27 04:43:48 +02:00
|
|
|
int connected;
|
|
|
|
|
2018-04-02 01:39:08 +02:00
|
|
|
int dtlsmode;
|
2016-03-27 04:43:48 +02:00
|
|
|
|
|
|
|
cw_timer_t echointerval_timer;
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2014-07-19 12:16:40 +02:00
|
|
|
|
2014-07-11 22:12:11 +02:00
|
|
|
};
|
|
|
|
|
2018-03-20 18:47:06 +01:00
|
|
|
/*
|
2014-07-11 22:12:11 +02:00
|
|
|
struct wtp{
|
|
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
//extern void wtpman_run(void *arg);
|
2018-03-20 18:47:06 +01:00
|
|
|
*/
|
|
|
|
|
2018-04-01 18:32:13 +02:00
|
|
|
struct wtpman * wtpman_create();
|
2014-07-11 22:12:11 +02:00
|
|
|
|
2018-04-02 21:00:37 +02:00
|
|
|
struct wtpman * wtpman_create(int socklistindex,struct sockaddr * srcaddr, int dtlsmode);
|
2014-07-11 22:12:11 +02:00
|
|
|
|
|
|
|
extern void wtpman_addpacket(struct wtpman * wtpman,uint8_t *packet,int len);
|
|
|
|
extern void wtpman_destroy(struct wtpman * wtpman);
|
|
|
|
extern void wtpman_start(struct wtpman * wtpman,int dtlsmode);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|