Initial commit
FossilOrigin-Name: c53d95729c009f8f80a7d63847cef7668ff73f8af0523ab65f7734696f85399c
This commit is contained in:
		
							
								
								
									
										62
									
								
								src/ac/wtpman.h
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								src/ac/wtpman.h
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,62 @@
 | 
			
		||||
#ifndef __WTPMAN_H
 | 
			
		||||
#define __WTPMAN_H
 | 
			
		||||
 | 
			
		||||
#include <sys/socket.h>
 | 
			
		||||
#include <semaphore.h>
 | 
			
		||||
#include <pthread.h>
 | 
			
		||||
 | 
			
		||||
#include "capwap.h"
 | 
			
		||||
#include "fragman.h"
 | 
			
		||||
 | 
			
		||||
#define WTPMAN_QSIZE 1024
 | 
			
		||||
 | 
			
		||||
struct wtpman{
 | 
			
		||||
//	struct sockaddr_storage addr;
 | 
			
		||||
//	int sock;
 | 
			
		||||
	pthread_t thread;
 | 
			
		||||
 | 
			
		||||
	/* packet queue */
 | 
			
		||||
/*	uint8_t * q[WTPMAN_QSIZE];
 | 
			
		||||
	int qrpos;
 | 
			
		||||
	int qwpos;
 | 
			
		||||
	sem_t q_sem;
 | 
			
		||||
*/
 | 
			
		||||
	struct conn * conn;
 | 
			
		||||
 | 
			
		||||
	/* fragment manager */
 | 
			
		||||
//	FRAGMAN * fragman;
 | 
			
		||||
 | 
			
		||||
	/* wtp data */
 | 
			
		||||
	uint8_t * wtp_name;
 | 
			
		||||
	uint8_t * wtp_location;
 | 
			
		||||
	uint8_t * session_id;
 | 
			
		||||
	uint8_t wtp_mactype;
 | 
			
		||||
 | 
			
		||||
	struct wtpinfo wtpinfo;
 | 
			
		||||
 | 
			
		||||
//	pthread_mutex_t add_packet_mutex;
 | 
			
		||||
 | 
			
		||||
	int socklistindex;
 | 
			
		||||
	int connected; 
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
struct wtp{
 | 
			
		||||
		
 | 
			
		||||
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//extern void wtpman_run(void *arg);
 | 
			
		||||
extern struct wtpman * wtpman_create();
 | 
			
		||||
 | 
			
		||||
extern struct wtpman * wtpman_create(int socklistindex,struct sockaddr * srcaddr);
 | 
			
		||||
 | 
			
		||||
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
 | 
			
		||||
		Reference in New Issue
	
	Block a user