ipft_td.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* $Id: ipft_td.c,v 1.11 2003/06/03 16:01:01 darrenr Exp $
*/
/*
tcpdump -n
00:05:47.816843 128.231.76.76.3291 > 224.2.252.231.36573: udp 36 (encap)
tcpdump -nq
00:33:48.410771 192.73.213.11.1463 > 224.2.248.153.59360: udp 31 (encap)
tcpdump -nqt
128.250.133.13.23 > 128.250.20.20.2419: tcp 27
tcpdump -nqtt
123456789.1234567 128.250.133.13.23 > 128.250.20.20.2419: tcp 27
tcpdump -nqte
8:0:20:f:65:f7 0:0:c:1:8a:c5 81: 128.250.133.13.23 > 128.250.20.20.2419: tcp 27
*/
#include "ipf.h"
#include "ipt.h"
#if !defined(lint)
#endif
static int tcpd_close __P((void));
static int tcpd_readip __P((char *, int, char **, int *));
static int count_dots __P((char *));
static int tfd = -1;
char *fname;
{
if (tfd != -1)
return tfd;
tfd = 0;
} else {
}
return tfd;
}
static int tcpd_close()
{
}
static int count_dots(str)
char *str;
{
int i = 0;
while (*str)
if (*str++ == '.')
i++;
return i;
}
{
struct protoent *p;
char lbuf[160], *s;
return 0;
*s = '\0';
"%31s %31s %31s: %31s > %31s: %255s",
if (n != 6)
return -1;
}
*s++ = '\0';
*--s = '.';
*s++ = '\0';
*--s = '.';
} else {
}
{
case IPPROTO_TCP :
case IPPROTO_UDP :
break;
#ifdef IGMP
case IPPROTO_IGMP :
break;
#endif
case IPPROTO_ICMP :
break;
default :
break;
}
return slen;
}