aboutsummaryrefslogtreecommitdiffstats
path: root/packet-x25.c
AgeCommit message (Collapse)AuthorFilesLines
2003-10-07Put the "X.264 protocol identifier" and "X.264 sharing strategy" fieldsoabad1-3/+3
in the "User data" subtree. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@8642 f5534014-38df-0310-8fa8-9805f1628bb7
2003-04-20Add a pointer to an hf_ value for a "reassembled_in" field (which can beguy1-1/+2
null) to the "fragment_items" structure, and don't pass that value into "process_reassembled_data()", just have it use the value in the "fragment_items" structure passed to it. Make "process_reassembled_data()" capable of handling reassembly done by "fragment_add_seq_check()", and use it in the ATP and 802.11 dissectors; give them "reassembled_in" fields. Make "process_reassembled_data()" handle only the case of a completed reassembly (fd_head != NULL) so that we can use it in those dissectors without gunking the code up too much. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7513 f5534014-38df-0310-8fa8-9805f1628bb7
2003-03-05Distinguish between the two directions of X.25 traffic when doingguy1-8/+48
reassembly - don't reassemble packets from different directions into a single packet. We don't need to check whether we have enough data for reassembly - "fragment_add_seq_next()" does that for us. If we're doing reassembly, show the user data of packets with the M bit set as "User data". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7281 f5534014-38df-0310-8fa8-9805f1628bb7
2003-03-05When reassembling, test the correct M bit based on whether it's mod-8 orguy1-32/+47
mod-128. Don't reassemble if we don't have all the payload (e.g., if we have a short frame). Clean up indentation. Remove the "_x25" at the end of the preference for reassembling X.25 packets - it already has "x25." at the beginning. Add a bunch of #defines for various bits to be tested, and use them. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7279 f5534014-38df-0310-8fa8-9805f1628bb7
2003-03-04From Laurent Meyer: reassemble fragmented X.25 packets, and fix up aguy1-5/+104
test. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7276 f5534014-38df-0310-8fa8-9805f1628bb7
2003-03-01X.29 call user data in CALL REQUEST packets starts with an SPI and 3guy1-1/+10
bytes of other information, currently not used; that data is not to be dissected as X.29 packet data. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7241 f5534014-38df-0310-8fa8-9805f1628bb7
2003-03-01If *all* you have in the user data portion of a Call Request packet isguy1-12/+22
an NLPID, don't dissect the user data as a packet for that protocol. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7234 f5534014-38df-0310-8fa8-9805f1628bb7
2003-02-28From Laurent Meyer: let the user data in CALL REQUEST and CALL CONFIRMguy1-17/+27
PDUs be dissected by the appropriate dissector for the connection. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7216 f5534014-38df-0310-8fa8-9805f1628bb7
2003-02-16According to ITU/X.25 (refer to table G.2), only the bits 1 to 6deniel1-3/+3
represent the number of semi-octets in the calling/called address extension facility. So bits 7 and 8 shall be masked. This fix avoids an incorrect detection of malformed packets. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7157 f5534014-38df-0310-8fa8-9805f1628bb7
2003-01-31Get rid of BASE_BIN - it's just the same as BASE_DEC, but people seemedguy1-2/+2
to be using it for stuff that should be hex, and for stuff that should be Boolean. Use BASE_DEC if it should be decimal, BASE_HEX if it should be hex, and make it Boolean if it should be Boolean. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@7053 f5534014-38df-0310-8fa8-9805f1628bb7
2003-01-11Only do stuff to circuits on the first pass.guy1-13/+20
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6914 f5534014-38df-0310-8fa8-9805f1628bb7
2003-01-08Display the packet type as a bitfield for Data, RR, RNR, and REJguy1-24/+46
packets. Fix some displays of the packet type to include the "Packet Type:" tag. Display the M bit with an indication of what it means. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6877 f5534014-38df-0310-8fa8-9805f1628bb7
2003-01-06Show the M bit regardless of whether it's set or not.guy1-11/+9
Show sequence numbers in decimal, not hex. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6862 f5534014-38df-0310-8fa8-9805f1628bb7
2003-01-06Add an X.29 dissector.guy1-32/+51
The Q bit in X.25 doesn't mean "this is QLLC traffic", it's just a "this packet is special" indication. Have the X.25 dissector pass as the "private_data" pointer a pointer to a gboolean indicating whether the Q bit was set or not. Replace the "decode non-Q-bit traffic as SNA" option with a "decode traffic as QLLC/SNA if we didn't see the Call Request packet and thus don't know what it is" option, which hands traffic to the QLLC dissector for that traffic. Have the QLLC dissector hand traffic to the SNA dissector if the Q bit isn't set. Arrange that we determine whether the Q bit is set regardless of whether we're building the protocol tree or not. If we don't just dissect traffic as QLLC/SNA if we didn't see the Call Request packet, check not only for 0x45 (as an indication that it's probably IP), check also for NLPID_ISO8473_CLNP and treat that as an indication that it's probably OSI CLNP. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6854 f5534014-38df-0310-8fa8-9805f1628bb7
2002-11-08Allow more than one circuit with the same circuit ID; a circuit has aguy1-225/+47
starting and ending frame number, and circuits with the same circuit ID are sorted by the starting frame number (the last circuit can have 0 as the ending frame number, meaning "unknown"), and, when looking up a circuit, we take a frame number as an argument and return the circuit that includes that frame. Add a new circuit ID type for X.25 virtual circuits, and use the circuit mechanism to keep track of the dissector for an X.25 virtual circuit rather than having a private mechanism. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6580 f5534014-38df-0310-8fa8-9805f1628bb7
2002-09-01Update my email.oabad1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6166 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-28Removed trailing whitespaces from .h and .c files using thejmayer1-6/+6
winapi_cleanup tool written by Patrik Stridvall for the wine project. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6117 f5534014-38df-0310-8fa8-9805f1628bb7
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hjmayer1-5/+1
equivalents for the toplevel directory. The removal of winsock2.h will hopefully not cause any problems under MSVC++, as those files using struct timeval still include wtap.h, which still includes winsock2.h. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5932 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-09Process address lengths according to the X.25 spec.guy1-38/+118
Put in a comment noting that the address data should, if the A bit is set, be processed according to the spec. Label addresses for registration requests and confirmations appropriately. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5429 f5534014-38df-0310-8fa8-9805f1628bb7
2002-05-09From Martin Thomas: handle address lengths based on TOA bit in X.25.guy1-1/+8
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5423 f5534014-38df-0310-8fa8-9805f1628bb7
2002-04-09Move the definition of the FROM_DCE bit in the "flags" field of aguy1-34/+133
"struct x25_phdr" to "wiretap/wtap.h". Have two X.25 dissectors, one of which assumes that there's a "struct x25_phdr" pseudo-header and one of which doesn't; the former uses the information in that pseudo-header to determine whether the packet is DTE->DCE or DCE->DTE, and the latter assumes it has no clue whether the packet is DTE->DCE or DCE->TDE. Use the former one in the LAPB dissector, and the latter one in the XOT dissector and in the LLC dissector table. In the X.25-over-TCP dissector, handle multiple X.25 packets per TCP segment, and handle X.25 packets split across TCP segments. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@5134 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-24Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inguy1-7/+6
arguments to "proto_tree_add_text()", and to "proto_tree_add_XXX()" calls that add FT_NONE or FT_PROTO items to the protocol tree, with -1. Replace some calls to "tvb_length()" or "tvb_length_remaining()" with calls to "tvb_reported_length()" and "tvb_reported_length_remaining()", as those give the actual length of the data in the packet, not just the data that happened to be captured. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4605 f5534014-38df-0310-8fa8-9805f1628bb7
2002-01-21Include files from the "epan" directory and subdirectories thereof withguy1-2/+2
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4586 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"guy1-57/+57
structure to the "packet_info" structure; only stuff that's permanently stored with each frame should be in the "frame_data" structure, and the "column_info" structure is not guaranteed to hold the column values for that frame at all times - it was only in the "frame_data" structure so that it could be passed to dissectors, and, as all dissectors are now passed a pointer to a "packet_info" structure, it could just as well be put in the "packet_info" structure. That saves memory, by shrinking the "frame_data" structure (there's one of those per frame), and also lets us clean up the code a bit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4370 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-08Attach a descriptive name field type and base to dissector tables; thatguy1-2/+3
specifies how the selector values used as keys in those tables are to be displayed, and the title to use when displaying the table. Use that information in the code to display the initial and current entries of various dissector tables. Have the dissector for BACnet APDUs register itself by name, and have the BACnet NPDU dissector call it iff the BAC_CONTROL_NET bit isn't set, rather than doing it with a dissector table. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4358 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-05Add a heuristic dissector for protocols running atop X.25.guy1-19/+31
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4336 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-03Add a routine tro look for a given port in a given dissector table and,guy1-63/+41
if found, return the dissector handle for that port. Use that routine in the X.25 dissector; revert to attaching a dissector handle to an X.25 virtual circuit. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4310 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"guy1-2/+5
take a dissector handle as an argument, rather than a pointer to a dissector function and a protocol ID. Associate dissector handles with dissector table entries. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4308 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-02Add a new header file for X.264 transport protocol IDs.guy1-11/+17
Handle ISO 8602 as a protocol ID on top of X.25. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4302 f5534014-38df-0310-8fa8-9805f1628bb7
2001-12-02An NLPID of 1 means T.70 when used as an X.263/ISO 9577 initial protocolguy1-124/+273
identifier, but means X.29 when used as an X.263/ISO 9577 secondary protocol identifier. Add support for the IPv6 NLPID, and Ethernet type, in more places. Fix up the handling of the user data of a CALL REQUEST packet to more correctly distinguish between user data containing an NLPID and user data containing an X.264/ISO 11570 UN TPDU. If it's an NLPID, use "nlpid_vals" to show its value. Put that user data in a subtree. Create a new "x.25.spi" dissector table, for protocols running atop X.25, rather than having a built-in switch statement, so that other protocols can register themselves by NLPID. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4300 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-25Switched from calling dissect_data to using call_dissectorhagbard1-2/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4263 f5534014-38df-0310-8fa8-9805f1628bb7
2001-11-15Add support for SNA-over-X.25. Add QLLC dissector. I still need togram1-30/+68
work on dissecting the Information frame of QLLC packets. Thanks to mario.ferreira@hsbc.com.br for lots of information on SNA over X.25. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@4207 f5534014-38df-0310-8fa8-9805f1628bb7
2001-07-18- get_x25_pkt_len() :oabad1-1/+6
In "call accept" packets, the address block is not mandatory. Check the packet length before trying to read the addresses. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3739 f5534014-38df-0310-8fa8-9805f1628bb7
2001-07-16Fix a typo.guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3733 f5534014-38df-0310-8fa8-9805f1628bb7
2001-07-14Dissect more diagnostic codes.oabad1-13/+94
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3719 f5534014-38df-0310-8fa8-9805f1628bb7
2001-07-05fixed some warning: comparison between signed and unsignedoabad1-4/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3657 f5534014-38df-0310-8fa8-9805f1628bb7
2001-06-18From Joerg Mayer: explicitly fill in all members of aguy1-14/+14
"header_field_info" structure, including the ones that are later set by the routines to register fields. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3561 f5534014-38df-0310-8fa8-9805f1628bb7
2001-04-07Mention RFC 1356 in the comment about handling NLPIDs other than theguy1-3/+6
0xCC one for IP. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3268 f5534014-38df-0310-8fa8-9805f1628bb7
2001-03-30NLPID's of 0x08 and 0x09 should be labeled as Q.933 and LMI,guy1-4/+1
respectively, not Q.931 and Q.2931, in Frame Relay. When dissecting Q.933-style multiprotocol encapsulated Frame Relay frames, use the "osinl" dissector table to check for OSI network layer protocols, include the NLPID in the tvbuff you hand to "dissector_try_port()" with that dissector table, and put the NLPID into the protocol tree as an invisible item - the NLPID is considered part of the PDU for those protocols, so you have to include it in the tvbuff, and the dissector will put it into the protocol tree. Also, make sure the top-level entry for the Frame Relay protocol includes all the bytes preceding the payload, and none of the payload bytes. Export a routine to do Q.933-style dissection, and have the WCP dissector call it, rather than duplicating that code in the WCP dissector. Don't register OSI network layer protocols with the "fr.ietf" dissector table; it's now sufficient to register them with the "osinl" dissector table, as the Frame Relay dissector now checks that. Get rid of unnecessary checks for protocols being enabled (if the dissector is always called through handles or dissector tables, the common code for handles and dissector tables will do the checks for you). Get rid of some unnecessary #includes. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3211 f5534014-38df-0310-8fa8-9805f1628bb7
2001-02-12If you register more than one field with the same name, the dfilter codeguy1-163/+93
can now handle that; this allows us to register both the modulo-8 and the modulo-128 versions of various X.25 bitfields with "x.25.XXX" names, which lets us get rid of the "ex.25" protocol stuff completely and use "x.25" for both modulo-8 and modulo-128 X.25. Do so. (Also, fix up some cases where we appeared to be using the modulo-8 fields when dissecting modulo-128 X.25.) This, in turn, allows us to register the X.25 dissector, as there's now only one protocol with which it's associated, and make it static and have it called only through a handle, and to, when registering it with the "llc.dsap" dissector table, associate it with "proto_x25". That, in turn, allows us to get rid of the "CHECK_DISPLAY_AS_DATA()" calls, and the code to set "pinfo->current_proto", in the X.25 dissector. The code for the display filter expression dialog would, if there are two fields with the same name registered under a protocol, list both of them; have it list only one of them - the fields should have the same type, the same radix, and the same value_string/true_false_string table if any (if they don't, they're really not the same field...). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@3023 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",guy1-2/+9
"{old_}heur_dissector_add()", "{old_}conv_dissector_add()", and "register_dissector()", so that an entry in those tables has associated with it the protocol index of the protocol the dissector handles (or -1, if there is no protocol index for it). This is for future use in a number of places. (Arguably, "proto_register_protocol()" should take a dissector pointer as an argument, but 1) it'd have to handle both regular and heuristic dissectors; 2) making it take either a "dissector_t" or a union of that and a "heur_dissector_t" introduces some painful header-file interdependencies so I'm punting on that for now. As with other Ethereal internal APIs, these APIs are subject to change in the future, at least until Ethereal 1.0 comes out....) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2849 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-05X.25-over-LLC support, from Paul Ionescu.guy1-2/+5
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2829 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03- replace x25 with x.25 in all protocol fieldsoabad1-24/+56
- displays the GFI (the a/q/d bits and modulo are displayed in a subtree of the GFI) - correctly dissect the first bit of the GFI : Address bit in call set-up and clearing packets, Qualifier bit in data packets. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2820 f5534014-38df-0310-8fa8-9805f1628bb7
2001-01-03Have "proto_register_protocol()" build a list of data structures forguy1-3/+4
protocols, in addition to adding structures to the list of filterable fields. Give it an extra argument that specifies a "short name" for the protocol, for use in such places as pinfo->current_proto; the dialog box for constructing filters; the preferences tab for the protocol; and so on (although we're not yet using it in all those places). Make the preference name that appears in the preferences file and the command line for the DIAMETER protocol "diameter", not "Diameter"; the convention is that the name in question be all-lower-case. Make some routines and variables that aren't exported static. Update a comment in the ICP dissector to make it clear that the dissector won't see fragments other than the first fragment of a fragmented datagram. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2810 f5534014-38df-0310-8fa8-9805f1628bb7
2000-12-29Modify X.25 dissector to accept a search string of x.25 and ex.25, not x25 ↵sharpe1-3/+3
and ex25. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2797 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-27The length of FT_BOOLEAN bitfields must be specified in bits, not bytes.oabad1-7/+7
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2702 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-19For each column, have both a buffer into which strings for that columnguy1-6/+6
can be put, and a pointer to the string for the column, which might or might not point to that buffer. Add a routine "col_set_str()", which sets the string for the column to the string passed to it as an argument; it should only be handed a static string (a string constant would be ideal). It doesn't do any copying, so it's faster than "col_add_str()". Make the routines that append to columns check whether the pointer to the string for the column points to the buffer for the column and, if not, copy the string for the column to the buffer for the column so that you can append to it (so you can use "col_set_str()" and then use "col_append_str()" or "col_append_fstr()"). Convert a bunch of "col_add_str()" calls that take a string constant as an argument to "col_set_str()" calls. Convert some "col_add_fstr()" calls that take a string constant as the only argument - i.e., the format string doesn't have any "%" slots into which to put strings for subsequent arguments to "col_set_str()" calls (those calls are just like "col_add_str()" calls). Replace an END_OF_FRAME reference in a tvbuffified dissector with a "tvb_length(tvb)" call. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2670 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-19Register the OSI transport dissector by name, and make it static.guy1-11/+23
"packet-clnp.h" no longer exports anything, so remove it. Have the X.25 dissector call subdissectors through dissector handles (now that all the dissectors it uses are registered by name). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2668 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-18Tvbuffify the IP, ICMP, TCP, UDP, OSI CLNP, OSI COTP, OSI CLTP, and OSIguy1-17/+14
ESIS dissectors. Register the IP dissector and have dissectors that call it directly (rather than through a port table) call it through a handle. Add a routine "tvb_set_reported_length()" which a dissector can use if it was handed a tvbuff that contains more data than is actually in its part of the packet - for example, handing a padded Ethernet frame to IP; the routine sets the reported length of the tvbuff (and also adjusts the actual length, as appropriate). Then use it in IP. Given that, "ethertype()" can determine how much of the Ethernet frame was actually part of an IP datagram (and can do the same for other protocols under Ethernet that use "tvb_set_reported_length()"; have it return the actual length, and have "dissect_eth()" and "dissect_vlan()" use that to mark trailer data in Ethernet II frames as well as in 802.3 frames. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2658 f5534014-38df-0310-8fa8-9805f1628bb7
2000-11-16Tvbuffify the STP dissector, have it register itself and have the LLCguy1-2/+2
dissector call it through a handle, and make it static. Give "dissect_data()" an "offset" argument, so dissectors can use it to dissect part of the packet without having to cook up a new tvbuff. Go back to using "dissect_data()" to dissect the data in an IPP request. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2651 f5534014-38df-0310-8fa8-9805f1628bb7