diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-08-01 04:28:20 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-08-01 04:28:20 +0000 |
commit | b2f932c1dbb6180a3b4a86c7510ef4beff814bb0 (patch) | |
tree | 4b9c007a4f6bbfa27c0c7f9cad2a1e7800c30863 /packet-tr.c | |
parent | c31abd81fa1fa78b0ac19d0b1de3d492a016768c (diff) |
Changed the display filter scanner from GLIB's GScanner to lex. The code
as it standed depends on your lex being flex, but that only matters if you're
a developer. The distribution will include the dfilter-scanner.c file, so
that if the user doesn't modify dfilter-scanner.l, he won't need flex to
re-create the *.c file.
The new lex scanner gives me better syntax checking for ether addresses. I
thought I could get by using GScanner, but it simply wasn't powerful enough.
All operands have English-like abbreviations and C-like syntax:
and, && ; or, || ; eq, == ; ne, != ; , etc.
I removed the ETHER_VENDOR type in favor of letting the user use the [x:y]
notation: ether.src[0:3] == 0:6:29 instead of ether.srcvendor == 00:06:29
I implemented the IPXNET field type; it had been there before, but was
not implemented. I chose to make it use integer values rather than byte
ranges, since an IPX Network is 4 bytes. So a display filter looks like this:
ipx.srcnet == 0xc0a82c00
rather than this:
ipx.srcnet == c0:a8:2c:00
I can supposrt the byte-range type IPXNET in the future, very trivially.
I still have more work to do on the parser though. It needs to check ranges
when extracting byte ranges ([x:y]) from packets. And I need to get rid
of those reduce/reduce errors from yacc!
svn path=/trunk/; revision=414
Diffstat (limited to 'packet-tr.c')
-rw-r--r-- | packet-tr.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/packet-tr.c b/packet-tr.c index 28051d30a1..147eab795b 100644 --- a/packet-tr.c +++ b/packet-tr.c @@ -2,7 +2,7 @@ * Routines for Token-Ring packet disassembly * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-tr.c,v 1.17 1999/07/29 05:47:06 gram Exp $ + * $Id: packet-tr.c,v 1.18 1999/08/01 04:28:09 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -40,8 +40,6 @@ static int proto_tr = -1; static int hf_tr_dst = -1; static int hf_tr_src = -1; -static int hf_tr_dst_vendor = -1; -static int hf_tr_src_vendor = -1; static int hf_tr_sr = -1; static int hf_tr_ac = -1; static int hf_tr_priority = -1; @@ -348,14 +346,11 @@ dissect_tr(const u_char *pd, frame_data *fd, proto_tree *tree) { decode_enumerated_bitfield(trn_fc, 0x0f, 8, pcf_vals, "%s")); proto_tree_add_item(tr_tree, hf_tr_dst, 2, 6, trn_dhost); - proto_tree_add_item_hidden(tr_tree, hf_tr_dst_vendor, 2, 3, trn_dhost); proto_tree_add_item(tr_tree, hf_tr_src, 8, 6, trn_shost); - proto_tree_add_item_hidden(tr_tree, hf_tr_src_vendor, 8, 3, trn_shost); proto_tree_add_item_hidden(tr_tree, hf_tr_sr, 8, 1, source_routed); /* non-source-routed version of src addr */ proto_tree_add_item_hidden(tr_tree, hf_tr_src, 8, 6, trn_shost_nonsr); - proto_tree_add_item_hidden(tr_tree, hf_tr_src_vendor, 8, 3, trn_shost_nonsr); if (source_routed) { /* RCF Byte 1 */ @@ -470,12 +465,6 @@ proto_register_tr(void) { &hf_tr_src, { "Source", "tr.src", FT_ETHER, NULL }}, - { &hf_tr_dst_vendor, - { "Destination Hardware Vendor", "tr.dst_vendor", FT_ETHER_VENDOR, NULL }}, - - { &hf_tr_src_vendor, - { "Source Hardware Vendor", "tr.src_vendor", FT_ETHER_VENDOR, NULL }}, - { &hf_tr_sr, { "Source Routed", "tr.sr", FT_BOOLEAN, NULL }}, |