/*
* Copyright (C) 1993-2001 by Darren Reed.
*
* See the IPFILTER.LICENCE file for details on licencing.
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include "ipf.h"
#include "ipt.h"
#if !defined(lint)
#endif
extern char *optarg;
int use_inet6 = 0;
int pfil_delayed_copy = 0;
#else
#endif
NULL };
int argc;
char *argv[];
{
struct ipread *r;
m = &mb;
dir = 0;
dump = 0;
hlen = 0;
loaded = 0;
r = &iptext;
ifname = "anon0";
initparse();
ifs = create_ifs();
#if defined(IPFILTER_DEFAULT_BLOCK)
#else
#endif
switch (c)
{
case '6' :
#ifdef USE_INET6
use_inet6 = 1;
#else
exit(1);
#endif
break;
case 'b' :
break;
case 'd' :
break;
case 'D' :
dump = 1;
break;
case 'F' :
r = &pcap;
r = ðerf;
r = &snoop;
r = &tcpd;
r = &iphex;
r = &iptext;
break;
case 'i' :
break;
case 'I' :
break;
case 'l' :
break;
case 'o' :
opts |= OPT_SAVEOUT;
break;
case 'r' :
optarg) == -1)
return -1;
loaded = 1;
break;
case 'R' :
opts |= OPT_NORESOLVE;
break;
case 'v' :
opts |= OPT_VERBOSE;
break;
case 'N' :
optarg) == -1)
return -1;
loaded = 1;
break;
case 'P' :
return -1;
loaded = 1;
break;
case 'T' :
break;
case 'x' :
break;
}
if (loaded == 0) {
exit(-1);
}
if (opts & OPT_SAVEOUT)
init_ifp();
if (datain)
else
if (fd < 0)
exit(-1);
exit(1);
}
if (!use_inet6) {
if (r->r_flags & R_DO_CKSUM)
}
#ifdef USE_INET6
else
#endif
/* ipfr_slowtimer(); */
m = &mb;
m->mb_len = i;
switch (i)
{
case -4 :
(void)printf("preauth");
break;
case -3 :
(void)printf("account");
break;
case -2 :
(void)printf("auth");
break;
case -1 :
(void)printf("block");
break;
case 0 :
(void)printf("pass");
break;
case 1 :
(void)printf("nomatch");
break;
case 3 :
(void)printf("block return-rst");
break;
case 4 :
(void)printf("block return-icmp");
break;
case 5 :
(void)printf("block return-icmp-as-dest");
break;
default :
(void)printf("recognised return %#x\n", i);
break;
}
if (!use_inet6) {
}
putchar(' ');
printf("--------------");
#else
# if TRU64 >= 1885
# else
# endif
#endif
putchar('\n');
dir = 0;
}
m = &mb;
}
(*r->r_close)();
}
if (dump == 1) {
}
return 0;
}
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
#else
void *data;
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
void *data;
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
void *data;
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
void *data;
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
void *data;
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
void *data;
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
void *data;
{
int i;
if (i != 0) {
errno = i;
return -1;
}
return 0;
}
#endif
char *addr;
long offset;
int size;
{
return 0;
}
char *buf;
long pos;
int n;
{
char *ptr;
;
return 0;
}
/*
* Display the built up NAT table rules and mapping entries.
*/
{
printf("\nList of active sessions:\n");
}
}
/*
* Display the built up state table rules and mapping entries.
*/
{
printf("List of active state sessions:\n");
ifs->ifs_fr_ticks);
}
{
int i;
printf("List of configured pools\n");
for (i = 0; i < IPL_LOGSIZE; i++)
printf("List of configured hash tables\n");
for (i = 0; i < IPL_LOGSIZE; i++)
}
{
int i;
printf("List of groups configured (set 0)\n");
for (i = 0; i < IPL_LOGSIZE; i++)
printf("Dev.%d. Group %s Ref %d Flags %#x\n",
#ifdef USE_QUAD_T
#else
#endif
}
}
printf("List of groups configured (set 1)\n");
for (i = 0; i < IPL_LOGSIZE; i++)
printf("Dev.%d. Group %s Ref %d Flags %#x\n",
#ifdef USE_QUAD_T
#else
#endif
}
}
}
char *filename;
{
int fd, i;
if (fd == -1) {
perror("drain_log:open");
return;
}
for (i = 0; i <= IPL_LOGMAX; i++)
while (1) {
/*
* If nothing was read then break out.
*/
break;
} else
break;
}
}
mb_t *m;
{
{
case IPPROTO_TCP :
break;
case IPPROTO_UDP :
break;
default :
break;
}
*csump = 0;
}
}
/*
* Allocate and keep pointer for get_ifs()
*/
{
return (ifs);
}
get_ifs()
{
return (gifs);
}