aboutsummaryrefslogtreecommitdiffstats
path: root/packet-q931.c
AgeCommit message (Collapse)AuthorFilesLines
2000-05-31Add routines for adding items to a protocol tree that take arguments ofGuy Harris1-6/+6
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
2000-05-29Add "tvb_reported_length()" to get the "reported length" of a tvbuffGuy Harris1-303/+313
(i.e., the amount of data that was in the packet, even if not all of it was captured), for use when dissecting packets containing data that fills the packet (we want the dissector to try to dissect all of it; if it runs past the end of the captured data, we want it to throw an exception so that we'll put a "Short Frame" note in the protocol tree). This means we always want a tvbuff to have a real reported length value, so we make it an unsigned integer, and don't bother checking it for -1, as it should never be -1. If the reported length passed in to "tvb_set_subset()" is -1, set the reported length to the reported length of the tvbuff of which the new tvbuff will be a subset minus the offset in that tvbuff of the subset, so that "-1" means "what's left of the packet after we chop off the header". This is necessary in order to ensure that all tvbuffs have a real reported length value. Have "dissect_packet()" set the reported length of the top-level tvbuff to the reported length of the frame, so that we start out with a tvbuff with a real reported length value. Have "tvb_offset_exists()" return FALSE if the offset is past the end of the tvbuff. If the offset passed to it is postitive, have "compute_offset_length()" check for that it's not more than one byte past the end of the tvbuff - if it's just past the end, we don't want the check to fail, as we don't want attempts to create a subset tvbuff containing zero bytes to fail; that would be done if a captured packet was all header and no payload, and we'd want the dissector of the payload, not the dissector of the header, to throw an exception, as the problem isn't with the protocol for the header, it's with the protocol for the payload. Convert the ATM dissector, the SSCOP dissector, the Q.2931 dissector, and the Q.931 dissector to use tvbuffs. Make the LAPD dissector set up a tvbuff for the Q.931 dissector (it's not converted yet). svn path=/trunk/; revision=2023
2000-05-11Add tvbuff class.Gilbert Ramirez1-132/+132
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
2000-01-13Add the NLPID value for PPP.Guy Harris1-8/+3
In Q.931 and Q.2931, the TR 9577 values are NLPIDs, so use "nlpid_vals" to dissect them, and values from "nlpid.h" to refer to them. svn path=/trunk/; revision=1461
1999-12-14Patches from Bert Driehuis to:Guy Harris1-3/+3
1) fix the check for the IE identifier to check all bits, including the topmost bit; 2) print all fields in the Date IE as 2 digits. svn path=/trunk/; revision=1335
1999-11-25Minor bug fix.Guy Harris1-2/+2
svn path=/trunk/; revision=1109
1999-11-25Small bug fix.Guy Harris1-1/+3
svn path=/trunk/; revision=1105
1999-11-25Fixes to Q.931 dissector, and additions from a recent copy of Q.931.Guy Harris1-63/+174
Export some functions from the Q.931 dissector, so the Q.2931 dissector can use them. Add a pile of information element dissection to the Q.2931 dissector. svn path=/trunk/; revision=1104
1999-11-19There are no protocols under Q.931, so mark everything up to the end ofGuy Harris1-2/+3
the frame as being Q.931 stuff. svn path=/trunk/; revision=1067
1999-11-19Fix a typo.Guy Harris1-3/+3
svn path=/trunk/; revision=1066
1999-11-16Replace the ETT_ "enum" members, declared in "packet.h", withGuy Harris1-8/+16
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
1999-11-13Dissect a whole pile of Q.931 information elements.Guy Harris1-137/+1850
svn path=/trunk/; revision=1023
1999-11-13A few cause codes more (cue Ennio Morricone).Guy Harris1-2/+6
svn path=/trunk/; revision=1021
1999-11-13Add initial support for decoding information elements.Guy Harris1-1/+355
svn path=/trunk/; revision=1020
1999-11-11Support all lengths of call reference value (1 to 15 octets).Guy Harris1-27/+10
svn path=/trunk/; revision=1009
1999-11-11Add #defines for bits in the LAPD address field and for the LAPD SAPIGuy Harris1-0/+207
values. Dissect the LAPD payload, if present. Add the beginnings of a Q.931 dissector. svn path=/trunk/; revision=1007