aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ppp.c
Commit message (Collapse)AuthorAgeFilesLines
* From ENDOH Akira:Gerald Combs2002-08-181-4/+172
| | | | | | | | | - displaying PPP datalink layer protocol names based on iana database: http://www.iana.org/assignments/ppp-numbers - dissecting MPLSCP and CDPCP - dissecting CDP over PPP svn path=/trunk/; revision=6011
* From Hidetaka Ogawa: fix PPP FCS computation to include address andGuy Harris2002-08-041-5/+5
| | | | | | | | control field if present. Add Sergei Shokhor to the contributor list in the Ethereal man page. svn path=/trunk/; revision=5949
* Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer2002-08-021-6/+2
| | | | | | | | 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. svn path=/trunk/; revision=5932
* Fix a typo.Guy Harris2002-05-221-2/+2
| | | | svn path=/trunk/; revision=5521
* Don't include the FCS in the tvbuff handed to "dissect_ppp_common()", soGuy Harris2002-05-201-43/+139
| | | | | | | | | | | | | | | | | that it's not included in the tvbuff handed to subdissectors. Use that tvbuff to compute the FCS. Properly handle the FCS in frames that don't include all the captured data. In VJ-compressed packets, put the VJ compression information into the protocol tree, and set the Protocol and Info columns, and don't worry about the CRC - as per the above, it's no longer in the tvbuff (and never *was* in the tvbuff in some cases). Also, clean up some other stuff in the VJ dissector. svn path=/trunk/; revision=5510
* From Joerg Mayer: get rid of extra arguments to capture routines.Guy Harris2002-04-241-3/+3
| | | | svn path=/trunk/; revision=5233
* From Joerg Mayer:Guy Harris2002-04-141-5/+6
| | | | | | | | | | | | Declares some variables static. Creates a new include file packet-rsvp.h, and make use of it (change some extern decls to #inlcude). Move the file packet-pgm.h into packet-pgm.c as it is not used by anything outside packet-pgm.c. svn path=/trunk/; revision=5162
* Get rid of ett_ values for options with no subtrees.Guy Harris2002-04-011-89/+144
| | | | | | | | | | | | | | Show the names of the control characters being mapped by the async control character map option. Use "proto_item_add_subtree()" to establish a subtree, so that the ett_ value gets associated with it. (Unfortunately, "proto_item" and "proto_tree" are typedefs for the same type, so checks for use of one when you should be using the other aren't done at compile time.) Get rid of some extra blanks before colons. svn path=/trunk/; revision=5067
* Mark unused variables with _U_ if they can't be eliminated.Guy Harris2002-03-311-49/+53
| | | | | | | | | | Use the "optp" argument in more option dissectors, and set the name of the option in the table entries for those options - and for one option where that name *was* being used. Get rid of unused variables. svn path=/trunk/; revision=5061
* Include files from the "epan" directory and subdirectories thereof withGuy Harris2002-01-211-3/+3
| | | | | | | | | | | | | "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/"). svn path=/trunk/; revision=4586
* Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOLGuy Harris2002-01-201-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | items to the protocol tree; it's interpreted as "the rest of the data in the tvbuff". This can be used if 1) the item covers the entire packet or the remaining payload in the packet or 2) the item's length won't be known until it's dissected, and will be then set with "proto_item_set_len()" - if an exception is thrown in the dissection, it means the item ran *past* the end of the tvbuff, so saying it runs to the end of the tvbuff is reasonable. Convert a number of "proto_tree_add_XXX()" calls using "tvb_length_remaining()", values derived from the result of "tvb_length()", or 0 (in the case of items whose length is unknown) to use -1 instead (using 0 means that if an exception is thrown, selecting the item highlights nothing; using -1 means it highlights all the data for that item that's available). In some places where "tvb_length()" or "tvb_length_remaining()" was used to determine how large a packet is, use "tvb_reported_length()" or "tvb_reported_length_remaining()", instead - the first two calls indicate how much captured data was in the packet, the latter two calls indicate how large the packet actually was (and the fact that using the latter could cause BoundsError exceptions to be thrown is a feature - if such an exception is thrown, the frame really *was* short, and it should be tagged as such). Replace some "proto_tree_add_XXX()" calls with equivalent "proto_tree_add_item()" calls. Fix some indentation. svn path=/trunk/; revision=4578
* Support for BSD Compress, MVRCA, and Deflate compression options inGuy Harris2002-01-111-6/+104
| | | | | | CCP, from Motonori Shindo. svn path=/trunk/; revision=4530
* PPP multiplexing support, from Jayaram V.R.Guy Harris2002-01-031-1/+243
| | | | svn path=/trunk/; revision=4469
* Make the address and control fields in the PPP/HDLC header, and theGuy Harris2001-12-201-52/+61
| | | | | | | | protocol field in the PPP header, filterable fields. Show the FCS value with a leading "0x". svn path=/trunk/; revision=4430
* Van Jacobson decompression support for PPP, from Irfan Khan.Guy Harris2001-12-191-3/+9
| | | | svn path=/trunk/; revision=4427
* Move the pointer to the "column_info" structure in the "frame_data"Guy Harris2001-12-101-89/+89
| | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=4370
* Attach a descriptive name field type and base to dissector tables; thatGuy Harris2001-12-081-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. svn path=/trunk/; revision=4358
* BACP and BAP support in PPP dissector, from Motonori Shindo.Guy Harris2001-12-081-5/+561
| | | | svn path=/trunk/; revision=4356
* Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris2001-12-031-20/+49
| | | | | | | | 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. svn path=/trunk/; revision=4308
* Moved from using dissect_data to using call_dissector()Ed Warnicke2001-11-251-2/+4
| | | | svn path=/trunk/; revision=4264
* Get rid of some unused variables.Guy Harris2001-11-211-3/+1
| | | | svn path=/trunk/; revision=4241
* Make the capture routines take an additional argument giving the amountGuy Harris2001-11-201-6/+14
| | | | | | | | | | | of packet data captured. Make the "BYTES_ARE_IN_FRAME()" macro take a "captured length of the packet" argument. Add some length checks to capture routines. svn path=/trunk/; revision=4235
* CBCP support in PPP, from Motonori Shindo.Guy Harris2001-11-041-1/+154
| | | | svn path=/trunk/; revision=4153
* Small fix to previous patch, from Motonori Shindo.Guy Harris2001-10-301-5/+5
| | | | svn path=/trunk/; revision=4106
* PPP CCP support, from Motonori Shindo.Guy Harris2001-10-291-2/+300
| | | | svn path=/trunk/; revision=4096
* Committing Montonori Shindo's patched to ppp for chap support.Richard Sharpe2001-09-301-1/+150
| | | | svn path=/trunk/; revision=3979
* Patch from Motonori Shindo to add support for decoding additional data,Guy Harris2001-08-051-3/+55
| | | | | | | | for CHAP, in LCP Authentication Protocol option. Fix a typo. svn path=/trunk/; revision=3827
* Patch from Motonori Shindo, addingGuy Harris2001-08-051-1/+5
| | | | | | | | | | 1) Shiva PAP (SPAP) and Extensible Authentication Protocol (EAP) 2) CBCP negotiation in LCP Callback Operation Field to the PPP dissector. svn path=/trunk/; revision=3826
* From Joerg Mayer: explicitly fill in all members of aGuy Harris2001-06-181-4/+4
| | | | | | | "header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
* Set the Protocol column in dissectors for PPP-specific subprotocols.Guy Harris2001-06-161-1/+9
| | | | svn path=/trunk/; revision=3556
* PAP support, from Laurent Rabret.Guy Harris2001-06-151-6/+151
| | | | svn path=/trunk/; revision=3555
* Explain why we have to be ready to handle Ethernet frames withGuy Harris2001-06-151-1/+23
| | | | | | protocol type values that are PPP protocol types. svn path=/trunk/; revision=3554
* LCP-over Ethernet and IPCP-over-Ethernet support, from Laurent Rabret.Guy Harris2001-06-141-1/+3
| | | | svn path=/trunk/; revision=3547
* Get rid of some unnecessary includes.Guy Harris2001-04-231-3/+2
| | | | | | Fix up Gerald's e-mail address. svn path=/trunk/; revision=3371
* Assorted ISIS enhancements from Hannes Gredler.Guy Harris2001-04-161-1/+3
| | | | | | | When dissecting the ISIS NLPID CLV, use the "nlpid_vals" array to convert NLPID values to protocol names. svn path=/trunk/; revision=3308
* In various Frame Relay and PPP routines that set the length of theGuy Harris2001-03-311-3/+4
| | | | | | | | | | top-level protocol tree items, use "offset" to set the length, rather than fetching the length of the item - "offset" is the offset from the beginning of the Frame Relay or PPP header just past the last field processed in that header, so it indicates how much of the header we've processed. svn path=/trunk/; revision=3215
* Call the capture routine for PPP-in-HDLC-like-framing (RFC 1662) theGuy Harris2001-03-301-2/+2
| | | | | | "ppp_hdlc" capture routine. svn path=/trunk/; revision=3209
* Call the dissector for PPP-in-HDLC-like-framing (RFC 1662) theGuy Harris2001-03-301-26/+19
| | | | | | | | | | | | | | | | | | | "ppp_hdlc" dissector, and call the dissector for "raw" PPP (just RFC 1661, no HDLC encapsulation) the "ppp" dissector. Have the common routine used by both those dissectors take the offset in the tvbuff of the PPP protocol field as an argument, rather than assuming that the protocol field begins at the beginning of the tvbuff, so we don't have to construct a new tvbuff in the PPP-in-HDLC-like-framing dissector. Use the PPP dissector, not the PPP-in-HDLC-like-framing dissector, for PPP over Frame Relay - there's no HDLC header in PPP over Frame Relay, at least according to http://www.cisco.com/univercd/cc/td/doc/product/software/ios120/120newft/120t/120t1/pppframe.htm svn path=/trunk/; revision=3208
* Have "dissect_ppp_stuff()" set the Protocol column for unknownGuy Harris2001-03-291-53/+57
| | | | | | | | | | | | | | | | | protocols; this obviates the need for "dissect_ppp()" to look at the protocol field at all. Have "dissect_ppp_stuff()" add the length of the protocol field to the length of the top-level protocol tree item, as only it knows how long the field is. Have "dissect_mp()" call "dissect_ppp_payload()", rather than duplicating what "dissect_ppp_payload()" does itself. Don't fetch the address and control fields in "dissect_ppp()" until you're ready to put them into the protocol tree. svn path=/trunk/; revision=3207
* Move appletalk- and sna-related address routines out of the dissectorsGilbert Ramirez2001-03-221-2/+2
| | | | | | and into epan. svn path=/trunk/; revision=3160
* Add a new Wiretap encapsulation type for Cisco HDLC. Map the NetBSDGuy Harris2001-03-151-15/+22
| | | | | | | | | | | | | | | | | | | | | | | DLT_HDLC to it. Make a separate dissector for Cisco HDLC, and add a dissector for Cisco SLARP. Have the PPP dissector call the Cisco HDLC dissector if the address field is the Cisco HDLC unicast or multicast address. Use the Cisco HDLC dissector for the Cisco HDLC Wiretap encapsulation type. Add a new dissector table "chdlctype", for Cisco HDLC packet types (they're *almost* the same as Ethernet types, but 0x8035 is SLARP, not Reverse ARP, and 0x2000 is the Cisco Discovery protocol, for example), replacing "fr.chdlc". Have a "chdlctype()" routine, similar to "ethertype()", used both by the Cisco HDLC and Frame Relay dissectors. Have a "chdlc_vals[]" "value_string" table for Cisco HDLC types and protocol names. Split the packet type field in the Frame Relay dissector into separate SNAP and Cisco HDLC fields, and give them the Ethernet type and Cisco HDLC type "value_string" tables, respectively. svn path=/trunk/; revision=3133
* Start removing "{OLD_}CHECK_DISPLAY_AS_DATA()" calls, and code to setGuy Harris2001-01-211-119/+150
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | "pinfo->current_proto"; dissectors called only through dissector tables and handles don't need to do either of those, as the dissector table and handle code will do it for them. (Dissectors called directly, or dissectors that can be attached to conversations, still have to do it themselves.) Register the PPP Multilink Protocol, PPP Link Control Protocol, and PPP IP Control Protocol as official protocols, and register them in PPP's dissector table rather than having PPP handle them specially; change "dissect_cp()" to take a protocol ID, get the protocol short name information from it, and use the protocol ID for the top-level protocol tree item. Set the Protocol column in the PPP Multilink Protocol dissector, and set the Info column before extracting anything from the frame, so that if an exception is thrown, the Info and Protocol columns will reflect that the packet is supposed to be a PPP Multilink Protocol frame. Make the "First fragment" and "Last fragment" flags in the PPP Multilink Protocol header boolean bitfields, and let "proto_tree_add_boolean()" do all the heavy lifting when displaying them, rather than doing it by hand. Don't extract the sequence number in the PPP Multilink Protocol until you're ready to put it into the tree, just in case the captured packet includes the flags but not the sequence number. Clean up the code to check the FCS of PPP frames - extract it with "tvb_get_letohs()" or "tvb_get_letohl()", don't extract it byte-by-byte and then put it together yourself. svn path=/trunk/; revision=2926
* Add the PPP types for the DEC LANBridge100 Spanning Tree protocol andGuy Harris2001-01-141-4/+6
| | | | | | | | | | | for "Bridging PDU"s (which I'm assuming are 802.1d Spanning Tree BPDUs), and have the STP and LANBridge100 STP dissectors register them with the "ppp.protocol" dissector table. Fix the value for the PPP type for MPLS Multicast (it's 0x0283, not 0x0281). svn path=/trunk/; revision=2896
* Make GRE use a dissector table for its protocol types, and registerGuy Harris2001-01-131-1/+2
| | | | | | | | | | | dissectors for protcools that can be encapsulated inside GRE in that table. Fix a bug in the handling of WCCPv2 IP encapsulation (it was constructing the next tvbuff before, rather than after, advancing the offset past the redirection header). svn path=/trunk/; revision=2893
* Make the stuff to handle SNAP frames (OUI, PID, payload) a routine ofGuy Harris2001-01-101-7/+10
| | | | | | | | | | | | | | its own; it's used not only by LLC, but by Frame Relay with RFC 2427 and ATM with RFC 2684. Support for RFC 2427-encapsulation Frame Relay packets, from Paul Ionescu. Get rid of the CISCO_IP PPP protocol type - Cisco HDLC uses, in most cases, Ethernet packet types, so use ETHERTYPE_IP instead (they're both 0x0800). svn path=/trunk/; revision=2854
* Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris2001-01-091-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | "{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....) svn path=/trunk/; revision=2849
* Add a new "prefs_register_protocol()" routine, which is likeGuy Harris2001-01-031-2/+2
| | | | | | | | | | | | "prefs_register_module()" except that it takes a protocol index as returned by "proto_register_protocol()" as its first argument, rather than taking two character strings as arguments as its first two arguments, and uses the protocol's abbreviation as the name to use for preferences in the preferences file and the "-o" flag and uses the protocol's short name as the name to use in the tabs in the "Edit->Preferences" window. svn path=/trunk/; revision=2812
* Have "proto_register_protocol()" build a list of data structures forGuy Harris2001-01-031-17/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. svn path=/trunk/; revision=2810
* PPP patches from Burke Lau to:Guy Harris2000-12-141-1/+224
| | | | | | | | | | add FCS checking; support Cisco HDLC format in the PPP dissector; handle MPLS-over-PPP. svn path=/trunk/; revision=2754
* Add a "col_clear()" routine, to clear a column; it appears (and itGuy Harris2000-12-041-30/+46
| | | | | | | | | | | | | | | | | | | | | | doesn't just seem to be a profiling artifact) that, at least on FreeBSD 3.4, it's significantly more efficient to clear out a column by stuffing a '\0' into the first byte of the column data than to do so by copying a null string (I guess when copying one byte, the fixed overhead of the procedure call and of "strcpy()" is significant). Have the TCP dissector set the Protocol column, and clear the Info column, before doing anything that might cause an exception to be thrown, so that if we *do* get an exception thrown, the frame at least shows up as TCP. Instead of, in the TCP dissector, constructing a string and then stuffing it into the Info column, just append to the Info column, which avoids one string copy. Pass a "frame_data" pointer to dissectors for TCP and IP (and PPP) options, so they can use it to append to the Info column. svn path=/trunk/; revision=2744