aboutsummaryrefslogtreecommitdiffstats
path: root/packet-x25.c
Commit message (Collapse)AuthorAgeFilesLines
* Add routines for adding items to a protocol tree that take arguments ofGuy Harris2000-05-311-44/+44
| | | | | | | | | | | | | | | | | a particular type, rather than taking a varargs list, along the lines of the "proto_tree_add_XXX_format()" routines. Replace most calls to "proto_tree_add_item()" and "proto_tree_add_item_hidden()" with calls to those routines. Rename "proto_tree_add_item()" and "proto_tree_add_item_hidden()" to "proto_tree_add_item_old()" and "proto_tree_add_item_hidden_old()", and add new "proto_tree_add_item()" and "proto_tree_add_item_hidden()" routines that don't take the item to be added as an argument - instead, they fetch the argument from the packet whose tvbuff was handed to them, from the offset handed to them. svn path=/trunk/; revision=2031
* 1 - Use "tvb_reported_length()" in the X.25 dissector.Olivier Abad2000-05-291-28/+28
| | | | | | | 2 - Consistantly display LCN in decimal (they used to be displayed in decimal in the packet list, and in hexadecimal in the tree view). svn path=/trunk/; revision=2026
* Changed my mail address to oabad@cybercable.fr (dhis.net is tooOlivier Abad2000-05-281-2/+2
| | | | | | unreliable). svn path=/trunk/; revision=2019
* Properly register hf_x25_dbit and hf_ex25_dbit.Gilbert Ramirez2000-05-281-3/+3
| | | | svn path=/trunk/; revision=2018
* Convert X.25 dissector to use tvbuffs.Olivier Abad2000-05-251-544/+582
| | | | svn path=/trunk/; revision=2007
* Add wtap-int.h. Move definitions relevant to the internal workins of wiretapGilbert Ramirez2000-05-191-2/+2
| | | | | | | | | to that file, leave public definitions in wtap.h. Rename "union pseudo_header" to "union wtap_pseudo_header". Make the wtap_pseudo_header pointer available in packet_info struct. svn path=/trunk/; revision=1989
* Remove the "union pseudo_header" from the "frame_data" structure;Guy Harris2000-05-181-25/+21
| | | | | | | | | | | | | | | | | | | | there's no need to keep it around in memory - when the frame data is read in when handing a frame, read in the information, if any, necessary to reconstruct the frame header, and reconstruct it. This saves some memory. This requires that the seek-and-read function be implemented inside Wiretap, and that the Wiretap handle remain open even after we've finished reading the file sequentially. This also points out that we can't really do X.25-over-Ethernet correctly, as we don't know where the direction (DTE->DCE or DCE->DTE) flag is stored; it's not clear how the Ethernet type 0x0805 for X.25 Layer 3 is supposed to be handled in any case. We eliminate X.25-over-Ethernet support (until we find out what we're supposed to do). svn path=/trunk/; revision=1975
* Add tvbuff class.Gilbert Ramirez2000-05-111-153/+153
| | | | | | | | | | | | | | | Add exceptions routines. Convert proto_tree_add_*() routines to require tvbuff_t* argument. Convert all dissectors to pass NULL argument ("NullTVB" macro == NULL) as the tvbuff_t* argument to proto_tree_add_*() routines. dissect_packet() creates a tvbuff_t, wraps the next dissect call in a TRY block, will print "Short Frame" on the proto_tree if a BoundsError exception is caught. The FDDI dissector is converted to use tvbuff's. svn path=/trunk/; revision=1939
* Ralf Schneider's changes to enhance to OSI CLNP, CLTP, and ISIS supportGuy Harris2000-04-151-1/+2
| | | | | | and to add OSI ESIS support. svn path=/trunk/; revision=1865
* Change the sub-dissector handoff registration routines so that theGilbert Ramirez2000-04-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sub-dissector table is not stored in the header_field_info struct, but in a separate namespace. Dissector tables are now registered by name and not by field ID. For example: udp_dissector_table = register_dissector_table("udp.port"); Because of this different namespace, dissector tables can have names that are not field names. This is useful for ethertype, since multiple fields are "ethertypes". packet-ethertype.c replaces ethertype.c (the name was changed so that it would be named in the same fashion as all the filenames passed to make-reg-dotc) Although it registers no protocol or field, it registers one dissector table: ethertype_dissector_table = register_dissector_table("ethertype"); All protocols that can be called because of an ethertype field now register that fact with dissector_add() calls. In this way, one dissector_table services all ethertype fields (hf_eth_type, hf_llc_type, hf_null_etype, hf_vlan_etype) Furthermore, the code allows for names of protocols to exist in the etype_vals, yet a dissector for that protocol doesn't exist. The name of the dissector is printed in COL_INFO. You're welcome, Richard. :-) svn path=/trunk/; revision=1848
* Break proto_tree_add_item_format() into multiple functions:Gilbert Ramirez2000-03-121-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | proto_tree_add_protocol_format() proto_tree_add_uint_format() proto_tree_add_ipxnet_format() proto_tree_add_ipv4_format() proto_tree_add_ipv6_format() proto_tree_add_bytes_format() proto_tree_add_string_format() proto_tree_add_ether_format() proto_tree_add_time_format() proto_tree_add_double_format() proto_tree_add_boolean_format() If using GCC 2.x, we can check the print-format against the variable args passed in. Regardless of compiler, we can now check at run-time that the field type passed into the function corresponds to what that function expects (FT_UINT, FT_BOOLEAN, etc.) Note that proto_tree_add_protocol_format() does not require a value field, since the value of a protocol is always NULL. It's more intuitive w/o the vestigial argument. Fixed a proto_tree_add_item_format-related bug in packet-isis-hello.c Fixed a variable usage bug in packet-v120.c. (ett_* was used instead of hf_*) Checked in Guy's fix for the function declearation for proto_tree_add_text() and proto_tree_add_notext(). svn path=/trunk/; revision=1713
* Make "reinit_x25_hashtable()" static (it's not explicitly called fromGuy Harris2000-02-221-3/+3
| | | | | | | | | | | outside "packet-x25.c", it's only registered as a protocol init routine), and explicitly declare it as taking no arguments (GCC doesn't complain about passing a pointer to a routine with an unspecified argument list to "register_init_routine()", which expects a pointer to a routine with no arguments, but Microsoft Visual C{++} 6.0 does complain about it). svn path=/trunk/; revision=1664
* Used register_init_routine() to register "reinit_x25_hashtable()" as aOlivier Abad2000-02-191-1/+2
| | | | | | | routine to be called every time a new capture file is opened instead of calling it in read_cap_file() and do_capture(). svn path=/trunk/; revision=1651
* Renamed init_dissect_x25() to reinit_x25_hashtable() and actually used it !Olivier Abad2000-02-181-2/+2
| | | | | | | | | | | | This function is used to re-initialize the hash table used by the X.25 dissector to record the upper layer protocol used by each VC. The hash table should be re-initialized each time we read / start a new capture. I moved the definition of the function from packet.h to packet-x25.h, and added calls to reinit_x25_hashtable() in read_cap_file (file.c) and do_capture (capture.c). svn path=/trunk/; revision=1644
* Create a header file for every packet-*.c file. Prune the packet.h file.Gilbert Ramirez2000-02-151-1/+3
| | | | | | | | | | | | | This change allows you to add a new packet-*.c file and not cause a recompilation of everything that #include's packet.h Add the plugin_api.[ch] files ot the plugins/Makefile.am packaging list. Add #define YY_NO_UNPUT 1 to the lex source so that the yyunput symbol is not defined, squelching a compiler complaint when compiling the generated C file. svn path=/trunk/; revision=1637
* Dissect the user data of an incoming CALL REQUEST/INCOMING CALL packetGuy Harris2000-01-301-23/+94
| | | | | | as per X.224 and X.264. svn path=/trunk/; revision=1584
* The user data in an X.25 call request packet is - at least for IP and,Guy Harris2000-01-291-2/+6
| | | | | | | | | | | if I correctly read the Windows NT DDK documentation on WAN drivers, for PPP as well - an ISO NLPID, so use the "nlpid.h" values where they exist. Currently doesn't treat NLPID_PPP as PPP, but if we get a PPP-over-X.25 capture, we may find that it should do so. svn path=/trunk/; revision=1577
* Fix a bunch of dissectors to use "pi.captured_len" rather thanGuy Harris2000-01-241-37/+37
| | | | | | | | | | "fd->cap_len" for the frame length - or to use macros such as "BYTES_ARE_IN_FRAME()", "IS_DATA_IN_FRAME()", and "END_OF_FRAME", which use "pi.captured_len" - so that they correctly handle frames where the actual data length of the packet is less than the size of the raw frame, e.g. with encapsulations such as ISL. svn path=/trunk/; revision=1531
* Finished improving display of facilities :Olivier Abad1999-12-121-136/+378
| | | | | | | | | | | - use a subtree for each facility - decode the DTE address when appropriate Address decoding in call setup and clearing packets : - the A bit is the first bit of the general format identifier - correct use of this A bit (toa parameter) in x25_ntoa svn path=/trunk/; revision=1300
* Use decode_numeric_bitfield for address length in call packetsOlivier Abad1999-12-101-7/+5
| | | | svn path=/trunk/; revision=1277
* Class A facilities decoding :Olivier Abad1999-12-091-51/+117
| | | | | | | - correct a problem with throughput class calculation - improved the display using decode_xxx_bitfield() svn path=/trunk/; revision=1269
* Put X.25 Facilities in call packets in a subtreeOlivier Abad1999-12-091-60/+74
| | | | | | Decode a new facility (0xD2 : Priority) svn path=/trunk/; revision=1260
* Change Olivier's e-mail address.Gilbert Ramirez1999-11-291-2/+2
| | | | svn path=/trunk/; revision=1158
* Replace the ETT_ "enum" members, declared in "packet.h", withGuy Harris1999-11-161-20/+26
| | | | | | | | | | | | | | | | | dynamically-assigned "ett_" integer values, assigned by "proto_register_subtree_array()"; this: obviates the need to update "packet.h" whenever you add a new subtree type - you only have to add a call to "proto_register_subtree_array()" to a "register" routine and an array of pointers to "ett_", if they're not already there, and add a pointer to the new "ett_" variable to the array, if they are there; would allow run-time-loaded dissectors to allocate subtree types when they're loaded. svn path=/trunk/; revision=1043
* Olivier Abad's patches to add:Guy Harris1999-10-181-119/+234
| | | | | | | | | | | | more display filters for X.25; no LCN in X.25 RESTART / DIAGNOSTIC / REGISTRATION packets; support for nettl file format (nettl is a trace tool for HP-UX). For now, it only supports traces for X.25 interfaces (tested with HP-UX 10.20). svn path=/trunk/; revision=879
* New proto_tree header_field_info stuff. Header_field_infos now containGilbert Ramirez1999-10-121-3/+6
| | | | | | | | | | | | | | | | | | | | | 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
* Patch from Olivier Abad:Guy Harris1999-09-121-87/+126
| | | | | | | | | | | | | | | | | | packet-lapb.c : check the validity of the first byte in the frame. packet-x25.c : - in get_x25_pkt_len() : check that we are not reading after the end of the captured data - in dissect_x25() : various checks to avoid reading after the end of the captured data - in dissect_x25() : use offset (and not 2) as the length of the underlying protocol header. Olivier svn path=/trunk/; revision=669
* Add support for reading Full Frontal ATM from an ATM Sniffer captureGuy Harris1999-08-201-21/+21
| | | | | | | | | | | | file, instead of throwing out all but LANE or RFC 1483 data frames and pretending that the former are just Ethernet or Token-Ring frames. Add some level of decoding for ATM LANE, but not all of it; the rest, including decoding non-LANE frames, is left as an exercise for somebody who has captures they want to decode, an interest in decoding them, ATM expertise, and time.... svn path=/trunk/; revision=523
* Put in an RCS ID.Guy Harris1999-08-051-0/+2
| | | | svn path=/trunk/; revision=442
* "packet-udp.c" and "packet-x25.c" both have global variables namedGuy Harris1999-08-051-1/+1
| | | | | | | "hash_table", but each of them is used only in the file in question; make them static, so that they don't collide. svn path=/trunk/; revision=440
* Patch from Olivier Abad to implement modulo 128 X.25 decoding, and toGuy Harris1999-08-041-113/+535
| | | | | | improve X.25 decoding in other ways as well. svn path=/trunk/; revision=435
* Olivier Abad's patch to add dissectors for LAP-B and X.25, and wiretapGuy Harris1999-08-021-0/+995
support for RADCOM Ltd.'s WAN/LAN analyzers (see http://www.radcom-inc.com/ ). Note: a Make "S" a mnemonic for "Summary" in the "Tools" menu. Move the routine, used for the "Tools/Summary" display, that turns a wiretap file type into a descriptive string for it into the wiretap library itself, expand on some of its descriptions, and add an entry for files from a RADCOM analyzer. Have "Tools/Summary" display the snapshot length for the capture. svn path=/trunk/; revision=417