From: guy Date: Fri, 28 Mar 2003 08:09:48 +0000 (+0000) Subject: Add support for "link broadcast" and "link multicast" for RFC 2625 X-Git-Tag: libpcap-0.8-bp~57 X-Git-Url: https://git.tcpdump.org/libpcap/commitdiff_plain/4175af1a53e3027d3d38c6eb916c5f02d18c27a2?hp=ef67e8fa3f5938ee6db69cd3b6e30d0c706b9f82 Add support for "link broadcast" and "link multicast" for RFC 2625 IP-over-FC. Clean up some error messages. --- diff --git a/gencode.c b/gencode.c index 1c2ab100..5e1aeedf 100644 --- a/gencode.c +++ b/gencode.c @@ -21,7 +21,7 @@ */ #ifndef lint static const char rcsid[] = - "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.189 2003-03-11 06:23:52 guy Exp $ (LBL)"; + "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.190 2003-03-28 08:09:48 guy Exp $ (LBL)"; #endif #ifdef HAVE_CONFIG_H @@ -4667,6 +4667,8 @@ gen_broadcast(proto) return gen_thostop(ebroadcast, Q_DST); if (linktype == DLT_IEEE802_11) return gen_wlanhostop(ebroadcast, Q_DST); + if (linktype == DLT_IP_OVER_FC) + return gen_ipfchostop(ebroadcast, Q_DST); if (linktype == DLT_SUNATM && is_lane) { /* * Check that the packet doesn't begin with an @@ -4696,7 +4698,7 @@ gen_broadcast(proto) gen_and(b0, b2); return b2; } - bpf_error("only ether/ip broadcast filters supported"); + bpf_error("only link-layer/IP broadcast filters supported"); } /* @@ -4874,6 +4876,11 @@ gen_multicast(proto) return b0; } + if (linktype == DLT_IP_OVER_FC) { + b0 = gen_mac_multicast(2); + return b0; + } + if (linktype == DLT_SUNATM && is_lane) { /* * Check that the packet doesn't begin with an @@ -4907,7 +4914,7 @@ gen_multicast(proto) return b1; #endif /* INET6 */ } - bpf_error("only IP multicast filters supported on ethernet/FDDI"); + bpf_error("link-layer multicast filters supported only on ethernet/FDDI/token ring/ARCNET/802.11/ATM LANE/Fibre Channel"); } /*