aboutsummaryrefslogtreecommitdiffstats
path: root/packet-fddi.c
AgeCommit message (Collapse)AuthorFilesLines
1999-10-12New proto_tree header_field_info stuff. Header_field_infos now containGilbert Ramirez1-4/+7
the base for numbers to be displayed in, bitmasks for bitfields, and blurbs (which are one or two sentences describing the field). proto_tree_add*() routines now automatically handle bitfields. You tell it which header field you are adding, and just pass it the value of the entire field, and the proto_tree routines will do the masking and shifting for you. This means that bitfields are more naturally filtered via dfilter now. Added Phil Techau's support for signed integers in dfilters/proto_tree. Added the beginning of the SNA dissector. It's not complete, but I'm committing it now because it has example after example of how to use bitfields with the new header_field_info struct and proto_tree routines. It was the impetus to change how header_field_info works. svn path=/trunk/; revision=815
1999-09-10Have "fddifc_to_str()" return "Unknown frame type" for a frame type itGuy Harris1-4/+3
doesn't know about, and eliminate the check in "dissect_fddi()" where we check if its return value was NULL and, if so, print "Unknown frame type". svn path=/trunk/; revision=644
1999-09-10Changed default return value of fddifc_to_str from NULL to "". The valueGilbert Ramirez1-2/+2
is passed to col_add_str, which is then passed to strncpy, which, at least in glibc 2.1, doesn't like NULL pointers passed to it in lieu of empty strings. svn path=/trunk/; revision=643
1999-08-24More completely decode the frame control field of an FDDI frame.Guy Harris1-6/+93
In the summary display for FDDI frames, make the protocol FDDI and the info field the description of the frame control field (which will be overridden by other protocols, if the frame is an async LLC frame). svn path=/trunk/; revision=558
1999-08-24Add a new Wiretap encapsulation type WTAP_ENCAP_FDDI_BITSWAPPED, meaningGuy Harris1-22/+10
"FDDI with the MAC addresses bit-swapped"; whether the MAC addresses are bit-swapped is a property of the machine on which the capture was taken, not of the machine on which the capture is being read - right now, none of the capture file formats we read indicate whether FDDI MAC addresses are bit-swapped, but this does let us treat non-"libpcap" captures as being bit-swapped or not bit-swapped independent of the machine on which they're being read (and of the machine on which they were captured, but I have the impression they're bit-swapped on most platforms), and allows us to, if, as, and when we implement packet capture in Wiretap, mark packets in a capture file written in Wiretap-native format based on the machine on which they are captured (assuming the rule "Ultrix, Alpha, and BSD/OS are the only platforms that don't bit-swap", or some other compile-time rule, gets the right answer, or that some platform has drivers that can tell us whether the addresses are bit-swapped). (NOTE: if, for any of the capture file formats used only on one platform, FDDI MAC addresses aren't bit-swapped, the code to read that capture file format should be fixed to flag them as not bit-swapped.) Use the encapsulation type to decide whether to bit-swap addresses in "dissect_fddi()". svn path=/trunk/; revision=557
1999-08-23Alwasy compile in swaptab[] so that we can swap addresses, even if weGilbert Ramirez1-3/+1
don't need to. svn path=/trunk/; revision=554
1999-08-01Changed the display filter scanner from GLIB's GScanner to lex. The codeGilbert Ramirez1-13/+1
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
1999-07-29Made the protocol (but not the fields) use the new proto_tree routine,Gilbert Ramirez1-7/+7
allowing users to filter on the existence of these protocols. I also added packet-clip.c to the Nmake makefile. svn path=/trunk/; revision=402
1999-07-15Modified the proto_register_field_array usage again. Thanks to Guy'sGilbert Ramirez1-9/+17
suggestion, this new method using a static array should use less memory and be faster. It also has a nice side-effect of making the source-code more readble, IMHO. Changed the print routines to look for protocol proto_data instead of looking at the text label as they did before, hoping that the data hex dump field item starts with "Data (". Added the -G keyword to ethereal to make it dump a glossary of display filter keywords to stdout and exit. This data is then formatted with the doc/dfilter2pod perl program to pod format, which is combined with doc/ethereal.pod.template to create doc/ethereal.pod, from which the ethereal manpage is created. This way we can keep the manpage up-to-date with a list of fields that can be filtered on. svn path=/trunk/; revision=364
1999-07-08Documented the proto_register_field_array() function, and convertedGilbert Ramirez1-39/+13
the registration functions in packet-fddi.c and packet-eth.c to this new registration method. svn path=/trunk/; revision=346
1999-07-07Created a new protocol tree implementation and a new display filterGilbert Ramirez1-14/+82
mechanism that is built into ethereal. Wiretap is now used to read all file formats. Libpcap is used only for capturing. svn path=/trunk/; revision=342
1999-03-23Removed all references to gtk objects from packet*.[ch] files. They nowGilbert Ramirez1-15/+11
reference the protocol tree with struct proto_tree and struct proto_item objects. That way, the packet decoding source code file can be used with non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged some of the information in packet.h to more appropriate places (like other packet-*.[ch] files). svn path=/trunk/; revision=223
1999-03-02Add the right byte count to fddi's initial add_item_to_tree so that the entireGilbert Ramirez1-3/+3
FDDI header is highlighted in the hex dump. svn path=/trunk/; revision=207
1999-02-09When doing a capture, decode enough of the incoming packets to correctlyGuy Harris1-2/+44
update the packet counts and percentages in the dialog box popped up during a capture, even for non-Ethernet captures. svn path=/trunk/; revision=184
1998-11-17* Added column formatting functionality.Gerald Combs1-6/+13
* Added check_col(), add_col_str() and add_col_fmt() to replace references to ft->win_info. * Added column prefs handling code. svn path=/trunk/; revision=97
1998-11-12We have to include <sys/types.h>, if we have it, to declare "u_char", asGuy Harris1-1/+5
we no longer include <pcap.h>. svn path=/trunk/; revision=84
1998-11-12A lengthy patch to add the wiretap library. Wiretap is not used by defaultGilbert Ramirez1-2/+1
because it is still in its infancy, but it can be compiled in optionally. The library exists in its own subdirectory ethereal/wiretap. This patch also edits all the packet-*.c files to remove the #include <pcap.h> line which is unnecessary in these files. In the ethereal code, file.c is the most heavily modified with #ifdef WITH_WIRETAP lines for the optional library. svn path=/trunk/; revision=82
1998-10-13On most systems, bit-swap the bytes of an FDDI MAC address. (List ofGuy Harris1-8/+67
systems on which you don't bit-swap them taken from "tcpdump"; the list may not be complete.) svn path=/trunk/; revision=48
1998-10-13Remove the length-on-wire and length-captured values from the FDDIGuy Harris1-4/+3
detail display; that's now in the "frame" detail display. svn path=/trunk/; revision=46
1998-10-13Fix to use #define values as subscripts of "win_info[]".Guy Harris1-5/+5
svn path=/trunk/; revision=43
1998-10-10* Fixes for bugs introduced in last night's commit.Gerald Combs1-8/+18
svn path=/trunk/; revision=37
1998-10-10* OSPF alignment fixes (Gerald)Gerald Combs1-0/+136
* FDDI support (Laurent, Guy) svn path=/trunk/; revision=36