diff options
Diffstat (limited to 'contrib/ipfilter/iplang/iplang_y.y')
-rw-r--r-- | contrib/ipfilter/iplang/iplang_y.y | 21 |
1 files changed, 18 insertions, 3 deletions
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; |