tcp_cont
} *tcp_cont[MAX_TCPCONT];
static int add_tcp_cont(struct tcp_cont *, char *, int);
static struct tcp_cont *find_tcp_cont(int);
struct tcp_cont *tce = NULL;
struct tcp_cont *tce = malloc(sizeof (*tce));
if (tcp_cont[current_tcp_cont]) {
free(tcp_cont[current_tcp_cont]->msg);
free(tcp_cont[current_tcp_cont]);
tcp_cont[current_tcp_cont++] = tce;
static int add_tcp_cont(struct tcp_cont *tce, char *msg, int fraglen) {
static struct tcp_cont *find_tcp_cont(int dst_port) {
if (tcp_cont[i] && tcp_cont[i]->dst_port == dst_port)
return (tcp_cont[i]);
if (tcp_cont[i] && tcp_cont[i]->dst_port == dst_port)
return (tcp_cont[i]);
if (tcp_cont[i] && tcp_cont[i]->dst_port == dst_port) {
free(tcp_cont[i]->msg);
free(tcp_cont[i]);
tcp_cont[i] = NULL;
if (tcp_cont[i] && tcp_cont[i]->dst_port == dst_port) {
free(tcp_cont[i]->msg);
free(tcp_cont[i]);
tcp_cont[i] = NULL;