aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ppp.c
AgeCommit message (Collapse)AuthorFilesLines
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-135/+135
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-18From ENDOH Akira:Gerald Combs1-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
2002-08-04From Hidetaka Ogawa: fix PPP FCS computation to include address andGuy Harris1-5/+5
control field if present. Add Sergei Shokhor to the contributor list in the Ethereal man page. svn path=/trunk/; revision=5949
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-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
2002-05-22Fix a typo.Guy Harris1-2/+2
svn path=/trunk/; revision=5521
2002-05-20Don't include the FCS in the tvbuff handed to "dissect_ppp_common()", soGuy Harris1-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
2002-04-24From Joerg Mayer: get rid of extra arguments to capture routines.Guy Harris1-3/+3
svn path=/trunk/; revision=5233
2002-04-14From Joerg Mayer:Guy Harris1-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
2002-04-01Get rid of ett_ values for options with no subtrees.Guy Harris1-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
2002-03-31Mark unused variables with _U_ if they can't be eliminated.Guy Harris1-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
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-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
2002-01-20Allow a length of -1 to be specified when adding FT_NONE and FT_PROTOCOLGuy Harris1-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
2002-01-11Support for BSD Compress, MVRCA, and Deflate compression options inGuy Harris1-6/+104
CCP, from Motonori Shindo. svn path=/trunk/; revision=4530
2002-01-03PPP multiplexing support, from Jayaram V.R.Guy Harris1-1/+243
svn path=/trunk/; revision=4469
2001-12-20Make the address and control fields in the PPP/HDLC header, and theGuy Harris1-52/+61
protocol field in the PPP header, filterable fields. Show the FCS value with a leading "0x". svn path=/trunk/; revision=4430
2001-12-19Van Jacobson decompression support for PPP, from Irfan Khan.Guy Harris1-3/+9
svn path=/trunk/; revision=4427
2001-12-10Move the pointer to the "column_info" structure in the "frame_data"Guy Harris1-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
2001-12-08Attach a descriptive name field type and base to dissector tables; thatGuy Harris1-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
2001-12-08BACP and BAP support in PPP dissector, from Motonori Shindo.Guy Harris1-5/+561
svn path=/trunk/; revision=4356
2001-12-03Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris1-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
2001-11-25Moved from using dissect_data to using call_dissector()Ed Warnicke1-2/+4
svn path=/trunk/; revision=4264
2001-11-21Get rid of some unused variables.Guy Harris1-3/+1
svn path=/trunk/; revision=4241
2001-11-20Make the capture routines take an additional argument giving the amountGuy Harris1-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
2001-11-04CBCP support in PPP, from Motonori Shindo.Guy Harris1-1/+154
svn path=/trunk/; revision=4153
2001-10-30Small fix to previous patch, from Motonori Shindo.Guy Harris1-5/+5
svn path=/trunk/; revision=4106
2001-10-29PPP CCP support, from Motonori Shindo.Guy Harris1-2/+300
svn path=/trunk/; revision=4096
2001-09-30Committing Montonori Shindo's patched to ppp for chap support.Richard Sharpe1-1/+150
svn path=/trunk/; revision=3979
2001-08-05Patch from Motonori Shindo to add support for decoding additional data,Guy Harris1-3/+55
for CHAP, in LCP Authentication Protocol option. Fix a typo. svn path=/trunk/; revision=3827
2001-08-05Patch from Motonori Shindo, addingGuy Harris1-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
2001-06-18From Joerg Mayer: explicitly fill in all members of aGuy Harris1-4/+4
"header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
2001-06-16Set the Protocol column in dissectors for PPP-specific subprotocols.Guy Harris1-1/+9
svn path=/trunk/; revision=3556
2001-06-15PAP support, from Laurent Rabret.Guy Harris1-6/+151
svn path=/trunk/; revision=3555
2001-06-15Explain why we have to be ready to handle Ethernet frames withGuy Harris1-1/+23
protocol type values that are PPP protocol types. svn path=/trunk/; revision=3554
2001-06-14LCP-over Ethernet and IPCP-over-Ethernet support, from Laurent Rabret.Guy Harris1-1/+3
svn path=/trunk/; revision=3547
2001-04-23Get rid of some unnecessary includes.Guy Harris1-3/+2
Fix up Gerald's e-mail address. svn path=/trunk/; revision=3371
2001-04-16Assorted ISIS enhancements from Hannes Gredler.Guy Harris1-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
2001-03-31In various Frame Relay and PPP routines that set the length of theGuy Harris1-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
2001-03-30Call the capture routine for PPP-in-HDLC-like-framing (RFC 1662) theGuy Harris1-2/+2
"ppp_hdlc" capture routine. svn path=/trunk/; revision=3209
2001-03-30Call the dissector for PPP-in-HDLC-like-framing (RFC 1662) theGuy Harris1-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
2001-03-29Have "dissect_ppp_stuff()" set the Protocol column for unknownGuy Harris1-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
2001-03-22Move appletalk- and sna-related address routines out of the dissectorsGilbert Ramirez1-2/+2
and into epan. svn path=/trunk/; revision=3160
2001-03-15Add a new Wiretap encapsulation type for Cisco HDLC. Map the NetBSDGuy Harris1-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
2001-01-21Start removing "{OLD_}CHECK_DISPLAY_AS_DATA()" calls, and code to setGuy Harris1-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
2001-01-14Add the PPP types for the DEC LANBridge100 Spanning Tree protocol andGuy Harris1-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
2001-01-13Make GRE use a dissector table for its protocol types, and registerGuy Harris1-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
2001-01-10Make the stuff to handle SNAP frames (OUI, PID, payload) a routine ofGuy Harris1-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
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris1-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
2001-01-03Add a new "prefs_register_protocol()" routine, which is likeGuy Harris1-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
2001-01-03Have "proto_register_protocol()" build a list of data structures forGuy Harris1-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
2000-12-14PPP patches from Burke Lau to:Guy Harris1-1/+224
add FCS checking; support Cisco HDLC format in the PPP dissector; handle MPLS-over-PPP. svn path=/trunk/; revision=2754