summaryrefslogtreecommitdiffstats
path: root/contrib/ipfilter/iplang
diff options
context:
space:
mode:
authorguido <guido@FreeBSD.org>1999-11-08 20:51:23 +0000
committerguido <guido@FreeBSD.org>1999-11-08 20:51:23 +0000
commit0539756f3d2277bd1ecc19afb014c074426e2f35 (patch)
treedbbb879c93cb0348e4c4fd6a3ef24f80198ce5a1 /contrib/ipfilter/iplang
parent9529c38ad8859b9f325867d97f266101f2c4dca3 (diff)
downloadFreeBSD-src-0539756f3d2277bd1ecc19afb014c074426e2f35.zip
FreeBSD-src-0539756f3d2277bd1ecc19afb014c074426e2f35.tar.gz
Import of ipfilter 3.3.3 in anticipation of its revival.
More to come in the next days.
Diffstat (limited to 'contrib/ipfilter/iplang')
-rw-r--r--contrib/ipfilter/iplang/iplang.h5
-rw-r--r--contrib/ipfilter/iplang/iplang_l.l8
-rw-r--r--contrib/ipfilter/iplang/iplang_y.y21
3 files changed, 27 insertions, 7 deletions
diff --git a/contrib/ipfilter/iplang/iplang.h b/contrib/ipfilter/iplang/iplang.h
index a7a13f9..d8986c8 100644
--- a/contrib/ipfilter/iplang/iplang.h
+++ b/contrib/ipfilter/iplang/iplang.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 1997 by Darren Reed.
+ * Copyright (C) 1997-1998 by Darren Reed.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and due credit is given
@@ -49,3 +49,6 @@ typedef struct aniphdr {
#define ah_tcp ah_un.ahu_tcp
#define ah_udp ah_un.ahu_udp
#define ah_icmp ah_un.ahu_icmp
+
+extern int get_arpipv4 __P((char *, char *));
+
diff --git a/contrib/ipfilter/iplang/iplang_l.l b/contrib/ipfilter/iplang/iplang_l.l
index 89b7732..36a4ec8 100644
--- a/contrib/ipfilter/iplang/iplang_l.l
+++ b/contrib/ipfilter/iplang/iplang_l.l
@@ -1,12 +1,12 @@
%{
/*
- * Copyright (C) 1997 by Darren Reed.
+ * Copyright (C) 1997-1998 by Darren Reed.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and due credit is given
* to the original author and the contributors.
*
- * $Id: iplang_l.l,v 2.0.2.15.2.5 1997/12/28 01:32:13 darrenr Exp $
+ * $Id: iplang_l.l,v 2.1 1999/08/04 17:30:53 darrenr Exp $
*/
#include <stdio.h>
#include <string.h>
@@ -310,7 +310,9 @@ int nstate, fornext;
void swallow()
{
- int c = input();
+ int c;
+
+ c = input();
if (c == '#') {
while ((c != '\n') && (c != EOF))
diff --git a/contrib/ipfilter/iplang/iplang_y.y b/contrib/ipfilter/iplang/iplang_y.y
index e01bb37..6dacd99 100644
--- a/contrib/ipfilter/iplang/iplang_y.y
+++ b/contrib/ipfilter/iplang/iplang_y.y
@@ -1,14 +1,14 @@
%{
/*
- * Copyright (C) 1997 by Darren Reed.
+ * Copyright (C) 1997-1998 by Darren Reed.
*
* Redistribution and use in source and binary forms are permitted
* provided that this notice is preserved and due credit is given
* to the original author and the contributors.
*
- * $Id: iplang_y.y,v 2.0.2.18.2.7 1998/05/23 14:29:53 darrenr Exp $
+ * $Id: iplang_y.y,v 2.1 1999/08/04 17:30:53 darrenr Exp $
*/
-
+
#include <stdio.h>
#include <string.h>
#include <fcntl.h>
@@ -1431,6 +1431,21 @@ char **arg;
}
+int arp_getipv4(ip, addr)
+char *ip;
+char *addr;
+{
+ arp_t *a;
+
+ for (a = arplist; a; a = a->arp_next)
+ if (!bcmp(ip, (char *)&a->arp_addr, 4)) {
+ bcopy((char *)&a->arp_eaddr, addr, 6);
+ return 0;
+ }
+ return -1;
+}
+
+
void reset_send()
{
sending.snd_if = iflist;
OpenPOWER on IntegriCloud