moved unsied files, compiles w/o waringins with clang

FossilOrigin-Name: 1189a474bfcc28195d888d7967ccfc50c812f194e1ee19e99d3cb244d666a19a
This commit is contained in:
7u83@mail.ru
2018-03-25 08:07:39 +00:00
parent c1f1d91b28
commit 847781bf7c
70 changed files with 130 additions and 492 deletions

View File

@ -1,64 +0,0 @@
#ifndef __CONN_LINK_H
#define __CONN_LINK_H
#include <semaphore.h>
#include <sys/types.h>
#include <sys/socket.h>
#include "fragman.h"
struct netconn;
struct netconn{
int sock;
struct sockaddr_storage addr;
/** The framgent manager used on this connection */
frag_t *fragman;
/** Current Fragment ID */
int fragid;
int (*recv_packet) (struct netconn *, uint8_t *, int);
int (*recv_packet_peek) (struct netconn *, uint8_t *, int);
int (*send_packet) (struct netconn *, const uint8_t *, int);
int (*readfrom) (struct netconn *, uint8_t *, int, struct sockaddr_storage *);
int (*read) (struct netconn *, uint8_t *, int);
int (*write) (struct netconn *, const uint8_t *, int);
/* optional packet queue */
uint8_t **q;
int qsize;
int qrpos;
int qwpos;
sem_t q_sem;
uint8_t *cur_packet;
int cur_packet_len;
int cur_packet_pos;
int (*process_packet)(struct netconn *nc, uint8_t * packet, int len,struct sockaddr *from);
int (*process_message)(struct netconn *nc, uint8_t * rawmsg, int rawlen,
struct sockaddr *from);
void * data;
};
extern struct netconn * netconn_create(int sock, struct sockaddr * addr, int qsize);
extern void netconn_destroy(struct netconn *nc);
extern void netconn_q_add_packet(struct netconn * nc,uint8_t *packet,int len);
extern int netconn_process_packet(struct netconn *nc, uint8_t * packet, int len,
struct sockaddr *from);
extern int netconn_read_messages(struct netconn *nc);
extern int netconn_send_capwap_msg(struct netconn * nc, uint8_t *rawmsg, int msglen);
#endif