Deleted Added
full compact
filter.c (31962) filter.c (32663)
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.20 1997/12/13 02:37:22 brian Exp $
20 * $Id: filter.c,v 1.21 1997/12/24 09:28:57 brian Exp $
21 *
22 * TODO: Shoud send ICMP error message when we discard packets.
23 */
24
25#include <sys/param.h>
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>
29#include <netdb.h>
30
31#include <stdio.h>
32#include <stdlib.h>
33#include <strings.h>
34

--- 229 unchanged lines hidden (view full) ---

264 LogPrintf(LogWARN, "ParseUdpOrTcp: estab is expected: %s\n", *argv);
265 return (0);
266 }
267 if (argc > 0)
268 LogPrintf(LogWARN, "ParseUdpOrTcp: bad src/dst port syntax: %s\n", *argv);
269 return (0);
270}
271
26#include <netinet/in.h>
27#include <arpa/inet.h>
28#include <netdb.h>
29
30#include <stdio.h>
31#include <stdlib.h>
32#include <strings.h>
33

--- 229 unchanged lines hidden (view full) ---

263 LogPrintf(LogWARN, "ParseUdpOrTcp: estab is expected: %s\n", *argv);
264 return (0);
265 }
266 if (argc > 0)
267 LogPrintf(LogWARN, "ParseUdpOrTcp: bad src/dst port syntax: %s\n", *argv);
268 return (0);
269}
270
272const char *opname[] = {"none", "eq", "gt", NULL, "lt"};
271static const char *opname[] = {"none", "eq", "gt", NULL, "lt"};
273
274static int
275Parse(int argc, char const *const *argv, struct filterent * ofp)
276{
277 int action, proto;
278 int val;
279 char *wp;
280 struct filterent *fp = &filterdata;

--- 220 unchanged lines hidden ---
272
273static int
274Parse(int argc, char const *const *argv, struct filterent * ofp)
275{
276 int action, proto;
277 int val;
278 char *wp;
279 struct filterent *fp = &filterdata;

--- 220 unchanged lines hidden ---