filter.c (31070) | filter.c (31141) |
---|---|
1/* 2 * PPP Filter command Interface 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * | 1/* 2 * PPP Filter command Interface 3 * 4 * Written by Toshiharu OHNO (tony-o@iij.ad.jp) 5 * 6 * Copyright (C) 1993, Internet Initiative Japan, Inc. All rights reserverd. 7 * 8 * Redistribution and use in source and binary forms are permitted 9 * provided that the above copyright notice and this paragraph are 10 * duplicated in all such forms and that any documentation, 11 * advertising materials, and other materials related to such 12 * distribution and use acknowledge that the software was developed 13 * by the Internet Initiative Japan. The name of the 14 * IIJ may not be used to endorse or promote products derived 15 * from this software without specific prior written permission. 16 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 17 * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 18 * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 19 * |
20 * $Id: filter.c,v 1.16 1997/10/26 01:02:34 brian Exp $ | 20 * $Id: filter.c,v 1.17 1997/11/09 14:18:38 brian Exp $ |
21 * 22 * TODO: Shoud send ICMP error message when we discard packets. 23 */ 24 25#include <sys/param.h> 26#include <sys/socket.h> 27#include <netinet/in.h> 28#include <arpa/inet.h> --- 400 unchanged lines hidden (view full) --- 429{ 430 int n; 431 432 if (!VarTerm) 433 return; 434 435 for (n = 0; n < MAXFILTERS; n++, fp++) { 436 if (fp->action != A_NONE) { | 21 * 22 * TODO: Shoud send ICMP error message when we discard packets. 23 */ 24 25#include <sys/param.h> 26#include <sys/socket.h> 27#include <netinet/in.h> 28#include <arpa/inet.h> --- 400 unchanged lines hidden (view full) --- 429{ 430 int n; 431 432 if (!VarTerm) 433 return; 434 435 for (n = 0; n < MAXFILTERS; n++, fp++) { 436 if (fp->action != A_NONE) { |
437 fprintf(VarTerm, "%2d %s", n, actname[fp->action]); | 437 fprintf(VarTerm, "%2d %s", n, actname[fp->action & (A_PERMIT|A_DENY)]); 438 if (fp->action & A_UHOST) 439 fprintf(VarTerm, "host "); 440 else if (fp->action & A_UPORT) 441 fprintf(VarTerm, "port "); 442 else 443 fprintf(VarTerm, " "); |
438 fprintf(VarTerm, "%s/%d ", inet_ntoa(fp->saddr), fp->swidth); 439 fprintf(VarTerm, "%s/%d ", inet_ntoa(fp->daddr), fp->dwidth); 440 if (fp->proto) { 441 fprintf(VarTerm, "%s", protoname[fp->proto]); 442 443 if (fp->opt.srcop) 444 fprintf(VarTerm, " src %s %d", opname[fp->opt.srcop], 445 fp->opt.srcport); --- 39 unchanged lines hidden --- | 444 fprintf(VarTerm, "%s/%d ", inet_ntoa(fp->saddr), fp->swidth); 445 fprintf(VarTerm, "%s/%d ", inet_ntoa(fp->daddr), fp->dwidth); 446 if (fp->proto) { 447 fprintf(VarTerm, "%s", protoname[fp->proto]); 448 449 if (fp->opt.srcop) 450 fprintf(VarTerm, " src %s %d", opname[fp->opt.srcop], 451 fp->opt.srcport); --- 39 unchanged lines hidden --- |