diff options
| author | kleink <kleink@NetBSD.org> | 2001-01-19 09:02:40 +0000 |
|---|---|---|
| committer | kleink <kleink@NetBSD.org> | 2001-01-19 09:02:40 +0000 |
| commit | 4b543c30e797aec442a85547dba9995a496b541a (patch) | |
| tree | 6eb20ecfb8d2f88ee30e1b077cacc3daec58a602 /lib/libpcap/gencode.c | |
| parent | 4c96c6b51fd12ce9e45f92cc2cf2c2fe84a5bd45 (diff) | |
Add VRRP support.
Diffstat (limited to 'lib/libpcap/gencode.c')
| -rw-r--r-- | lib/libpcap/gencode.c | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/lib/libpcap/gencode.c b/lib/libpcap/gencode.c index 2f2fdb1ea75..53f21b0ebe8 100644 --- a/lib/libpcap/gencode.c +++ b/lib/libpcap/gencode.c @@ -1,4 +1,4 @@ -/* $NetBSD: gencode.c,v 1.26 2001/01/06 02:11:18 christos Exp $ */ +/* $NetBSD: gencode.c,v 1.27 2001/01/19 09:02:40 kleink Exp $ */ /* * Copyright (c) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997 @@ -26,7 +26,7 @@ static const char rcsid[] = "@(#) Header: gencode.c,v 1.93 97/06/12 14:22:47 leres Exp (LBL)"; #else -__RCSID("$NetBSD: gencode.c,v 1.26 2001/01/06 02:11:18 christos Exp $"); +__RCSID("$NetBSD: gencode.c,v 1.27 2001/01/19 09:02:40 kleink Exp $"); #endif #endif @@ -1133,6 +1133,9 @@ gen_host(addr, mask, proto, dir) case Q_PIM: bpf_error("'pim' modifier applied to host"); + case Q_VRRP: + bpf_error("'vrrp' modifier applied to host"); + case Q_ATALK: bpf_error("ATALK host filtering not implemented"); @@ -1211,6 +1214,9 @@ gen_host6(addr, mask, proto, dir) case Q_PIM: bpf_error("'pim' modifier applied to host"); + case Q_VRRP: + bpf_error("'vrrp' modifier applied to host"); + case Q_ATALK: bpf_error("ATALK host filtering not implemented"); @@ -1345,6 +1351,14 @@ gen_proto_abbrev(proto) #endif break; +#ifndef IPPROTO_VRRP +#define IPPROTO_VRRP 112 +#endif + + case Q_VRRP: + b1 = gen_proto(IPPROTO_VRRP, Q_IP, Q_DEFAULT); + break; + case Q_IP: b1 = gen_linktype(ETHERTYPE_IP); break; @@ -2027,6 +2041,10 @@ gen_proto(v, proto, dir) bpf_error("'pim proto' is bogus"); /* NOTREACHED */ + case Q_VRRP: + bpf_error("'vrrp proto' is bogus"); + /* NOTREACHED */ + #ifdef INET6 case Q_IPV6: b0 = gen_linktype(ETHERTYPE_IPV6); @@ -2571,6 +2589,7 @@ gen_load(proto, index, size) case Q_IGMP: case Q_IGRP: case Q_PIM: + case Q_VRRP: s = new_stmt(BPF_LDX|BPF_MSH|BPF_B); s->s.k = off_nl; sappend(s, xfer_to_a(index)); |
