aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ldp.c
AgeCommit message (Collapse)AuthorFilesLines
2001-01-25Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="Guy Harris1-6/+3
statements. Move the setting of the Protocol column in various dissectors before anything is fetched from the packet, and also clear the Info column at that point in those and some other dissectors, so that if an exception is thrown, the columns don't reflect the previous protocol. "Tvbuffify" the Mobile IP dissector (it took old-style arguments, and then converted them into tvbuff arguments, so there wasn't much to do, other than to fix references to "fd" to refer to "pinfo->fd"). In the SCTP dissector, refer to the port type and source and destination ports through "pinfo" rather than through the global "pi", as it's a tvbuffified dissector. In the SMTP and Time Protocol dissectors, use "pinfo->match_port" rather than "TCP_PORT_SMTP" when checking whether the packet is a request or reply, just in case somebody makes a non-standard port be dissected as SMTP or Time. (Also, remove a bogus comment from the Time dissector; it was probably cut-and-pasted from the TFTP dissector.) svn path=/trunk/; revision=2938
2001-01-09Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris1-3/+3
"{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-8/+8
"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-2/+2
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-04Fix egregious error with AF_ types. I relied on a Linux header file ratherRichard Sharpe1-7/+22
than checking RFC1700. svn path=/trunk/; revision=2745
2000-12-04Don't loop infinitely if we see a Host Address or unknown ForwardingGuy Harris1-1/+16
Equivalence Class. Set "pinfo->current_proto", so that if we run past the end of the data the problem is noted as being with LDP. svn path=/trunk/; revision=2743
2000-12-03Stealing time again to compulsively code this beast.Richard Sharpe1-2/+107
Still more TLVs to code ... svn path=/trunk/; revision=2734
2000-12-02Dissect Common Hello Params TLV ...Richard Sharpe1-10/+82
Still more work to do though ... svn path=/trunk/; revision=2733
2000-12-02Some tvbuffified dissectors weren't setting "pinfo->current_proto", soGuy Harris1-1/+3
that if they threw an exception, the wrong protocol would be blamed. Add the missing assignments. Clean up the extraction of the null-encapsulation header. svn path=/trunk/; revision=2730
2000-12-01Fix one small type WRT Forwarding Equivalence Classes and handle theRichard Sharpe1-1/+1
illegal padding by trying to skip it. svn path=/trunk/; revision=2727
2000-12-01A much more complete LDP dissector.Richard Sharpe1-31/+220
Still more work to do though, as I want to dissect the various message types correctly, and to dissect TLVs much more as well. The dissector currently handles multiple messages in a PDU, as the trace file I have has some of those. I think that the equipment that generated the LDP trace I have has a bug. It seems to think that TLVs must be alligned on 4-byte boundaries, while the spec (draft) says that there are no alignment requirements :-) Don't know what generated the trace :-) svn path=/trunk/; revision=2726
2000-11-30Step-wise improvement on this thing ... next to dissect each message typeRichard Sharpe1-53/+105
more fully. Apparently, LDP allows multiple messages per PDU. Has anyone seen such an implementation? svn path=/trunk/; revision=2724
2000-11-30More work in progress on the Label Distribution Protocol dissector ...Richard Sharpe1-12/+150
Bit more work to do, and a list of TLV values, and I am away :-) svn path=/trunk/; revision=2720
2000-11-29Initial coding of the dissector for the Label Distribution Protocol.Richard Sharpe1-0/+252
It registers the same dissector for the LDP port for both TCP and UDP. Still a lot of work to do, but we can see the header now. svn path=/trunk/; revision=2714