*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.146 2001-01-15 00:03:40 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/gencode.c,v 1.147 2001-01-28 09:44:48 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
gen_and(b0, b1);
return b1;
+ case LLCSAP_NETBEUI:
+ /*
+ * NetBEUI always uses 802.2 encapsulation.
+ * XXX - should we check both the DSAP and the
+ * SSAP, like this, or should we check just the
+ * DSAP?
+ */
+ b0 = gen_cmp_gt(off_linktype, BPF_H, ETHERMTU);
+ gen_not(b0);
+ b1 = gen_cmp(off_linktype + 2, BPF_H, (bpf_int32)
+ ((LLCSAP_NETBEUI << 8) | LLCSAP_NETBEUI));
+ gen_and(b0, b1);
+ return b1;
+
case LLCSAP_IPX:
/*
* Check for;
return gen_cmp(off_linktype, BPF_H, (long)
((LLCSAP_ISONS << 8) | LLCSAP_ISONS));
+ case LLCSAP_NETBEUI:
+ return gen_cmp(off_linktype, BPF_H, (long)
+ ((LLCSAP_NETBEUI << 8) | LLCSAP_NETBEUI));
+
+ case LLCSAP_IPX:
+ /*
+ * XXX - are there ever SNAP frames for IPX on
+ * non-Ethernet 802.x networks?
+ */
+ return gen_cmp(off_linktype, BPF_B,
+ (bpf_int32)LLCSAP_IPX);
+
case ETHERTYPE_ATALK:
/*
* 802.2-encapsulated ETHERTYPE_ATALK packets are
gen_and(b0, b1);
return b1;
+ case LLCSAP_NETBEUI:
+ /*
+ * NetBEUI always uses 802.2 encapsulation.
+ * XXX - should we check both the DSAP and the
+ * LSAP, like this, or should we check just the
+ * DSAP?
+ */
+ b0 = gen_cmp(off_linktype, BPF_H, LINUX_SLL_P_802_2);
+ b1 = gen_cmp(off_linktype + 2, BPF_H, (bpf_int32)
+ ((LLCSAP_NETBEUI << 8) | LLCSAP_NETBEUI));
+ gen_and(b0, b1);
+ return b1;
+
case LLCSAP_IPX:
/*
* Ethernet_II frames, which are Ethernet
case Q_IPX:
bpf_error("IPX host filtering not implemented");
+ case Q_NETBEUI:
+ bpf_error("'netbeui' modifier applied to host");
+
default:
abort();
}
case Q_IPX:
bpf_error("IPX host filtering not implemented");
+ case Q_NETBEUI:
+ bpf_error("'netbeui' modifier applied to host");
+
default:
abort();
}
b1 = gen_linktype(LLCSAP_IPX);
break;
+ case Q_NETBEUI:
+ b1 = gen_linktype(LLCSAP_NETBEUI);
+ break;
+
default:
abort();
}
case Q_IPX:
bpf_error("'ipx proto' is bogus");
+ case Q_NETBEUI:
+ bpf_error("'netbeui proto' is bogus");
+
default:
abort();
/* NOTREACHED */
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.49 2001-01-14 07:57:48 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/gencode.h,v 1.50 2001-01-28 09:44:49 guy Exp $ (LBL)
*/
/* Address qualifiers. */
#define Q_IPX 27
+#define Q_NETBEUI 28
+
/* Directional qualifiers. */
#define Q_SRC 1
*/
#ifndef lint
static const char rcsid[] =
- "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.66 2001-01-14 07:57:48 guy Exp $ (LBL)";
+ "@(#) $Header: /tcpdump/master/libpcap/grammar.y,v 1.67 2001-01-28 09:44:50 guy Exp $ (LBL)";
#endif
#ifdef HAVE_CONFIG_H
%token ISO ESIS ISIS CLNP
%token STP
%token IPX
+%token NETBEUI
%type <s> ID
%type <e> EID
| CLNP { $$ = Q_CLNP; }
| STP { $$ = Q_STP; }
| IPX { $$ = Q_IPX; }
+ | NETBEUI { $$ = Q_NETBEUI; }
;
other: pqual TK_BROADCAST { $$ = gen_broadcast($1); }
| pqual TK_MULTICAST { $$ = gen_multicast($1); }
* WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * @(#) $Header: /tcpdump/master/libpcap/llc.h,v 1.1 2001-01-14 21:26:53 guy Exp $ (LBL)
+ * @(#) $Header: /tcpdump/master/libpcap/llc.h,v 1.2 2001-01-28 09:44:50 guy Exp $ (LBL)
*/
/*
#ifndef LLCSAP_SNAP
#define LLCSAP_SNAP 0xaa
#endif
-#ifndef LLCSAP_ISONS
-#define LLCSAP_ISONS 0xfe
-#endif
#ifndef LLCSAP_IPX
#define LLCSAP_IPX 0xe0
#endif
+#ifndef LLCSAP_NETBEUI
+#define LLCSAP_NETBEUI 0xf0
+#endif
+#ifndef LLCSAP_ISONS
+#define LLCSAP_ISONS 0xfe
+#endif