aboutsummaryrefslogtreecommitdiff
path: root/pcap-linux.c
diff options
context:
space:
mode:
authorguy <guy>2001-01-14 04:34:51 +0000
committerguy <guy>2001-01-14 04:34:51 +0000
commit2b3dac284e25434f15da7f9d7f1d66cbecb1df88 (patch)
treea5871ab1ea5f31b532e7eb4b63fbfa93a6996b22 /pcap-linux.c
parent90018ebb80717f22a3e652003a6d92055001b586 (diff)
Support checking for protocols specified by an LLC SAP on FDDI, Token
Ring, and RFC 1483-style ATM, as well as on Ethernet. Support checking for LLC SAP protocols other than OSI protocols on Ethernet - for now, we check only the DSAP on those, rather than checking both the DSAP and SSAP as we do for OSI, as I think, in some cases, the SSAP isn't the same as the DSAP. When generating protocol type checks on link-layer types with no type field, where packets are always IP (SLIP, BSD/OS SLIP, raw IP), generate a "test" that always succeeds if the protocol being checked for is IP or IPv6 and a "test" that always fails otherwise. (We originally did "gen_true()" if the protocol is IP, and bogusly generated code to check the field at an offset of -1 otherwise; a subsequent change caused us always to do "gen_true()", but that doesn't properly handle attempts to check for other protocols - those attempts should generate code that always fails, meaning that if you try to look for ARP packets in such a capture the BPF compiler will return "expression rejects all packets" as an error - and still generated extra code not all of which was removed by the optimizer. The current code generates no *more* BPF code.) Add "stp", which checks for the LLC SAP for the Spanning Tree Protocol.
Diffstat (limited to 'pcap-linux.c')
0 files changed, 0 insertions, 0 deletions