aboutsummaryrefslogtreecommitdiffstats
path: root/packet-wsp.c
Commit message (Collapse)AuthorAgeFilesLines
* From Dermot Bradley:Guy Harris2002-02-221-8/+710
| | | | | | | | | | | | support for Openwave-specific WSP headers; support for Openwave-specific field names; support for additional content types from Openwave; support for additional language values. svn path=/trunk/; revision=4775
* Use -1 rather than "tvb_length_remaining(tvb, offset)" in some items forGuy Harris2002-02-011-5/+5
| | | | | | | the remaining data in a packet (and rather than "tvb_reported_length()", which is wrong as it doesn't take the starting offset into account). svn path=/trunk/; revision=4661
* Replace a bunch of "tvb_length()" and "tvb_length_remaining()" calls inGuy Harris2002-01-241-3/+3
| | | | | | | | | | | | 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. svn path=/trunk/; revision=4605
* Include files from the "epan" directory and subdirectories thereof withGuy Harris2002-01-211-4/+4
| | | | | | | | | | | | | "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
* Move the pointer to the "column_info" structure in the "frame_data"Guy Harris2001-12-101-16/+15
| | | | | | | | | | | | | | | 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
* From Tom Uijldert: WSP/MMSE changes to handle multipart-content:Guy Harris2001-12-071-62/+226
| | | | | | | | | | | | | | packet-wsp.[ch]: - Proper parameter-dissection - Now handles multipart content - Exports content-type & multipart-dissection - Attach a sub-dissector based on content-type packet-mmse.c: - Dissecting message-content added - Registers with WSP based on content-type. svn path=/trunk/; revision=4353
* Make "dissector_add()", "dissector_delete()", and "dissector_change()"Guy Harris2001-12-031-3/+3
| | | | | | | | 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
* As you set a conversation dissector by supplying a dissector handleGuy Harris2001-12-031-6/+9
| | | | | | | | | | | rather than a function pointer, "dissect_wtp_fromudp()" no longer needs to be global; make it static, register it by name, and have the WSP dissector get the handle by calling "find_dissector()" rather than by constructing its own handle for it. Fix up some attributions. svn path=/trunk/; revision=4306
* Change "conversation_set_dissector()" to take a dissector handle, ratherGuy Harris2001-11-271-9/+20
| | | | | | | | | | | | | | | | | | | | | than a pointer to a dissector function, as an argument. This means that the conversation dissector is called through "call_dissector()", so the dissector itself doesn't have to worry about checking whether the protocol is enabled or setting "pinfo->current_proto", so get rid of the code that does that in conversation dissectors. Also, make the conversation dissectors static. Get rid of some direct calls to dissectors; replace them with calls through handles, and, again, get rid of code to check whether a protocol is enabled and set "pinfo->current_proto" where that code isn't needed. Make those dissectors static if they aren't already static. Add a routine "create_dissector_handle()" to create a dissector handle without registering it by name, if the dissector isn't used outside the module in which it's defined. svn path=/trunk/; revision=4281
* Get rid of some unused variables.Guy Harris2001-11-211-2/+1
| | | | svn path=/trunk/; revision=4240
* Handle the 1.3 and 1.4 Content-Type values in WSP, from Tom Uijldert.Guy Harris2001-10-261-1/+12
| | | | svn path=/trunk/; revision=4089
* From Georg von Zezschwitz: fix an uninitialized variable, dissect theGuy Harris2001-10-221-4/+7
| | | | | | | S-max-age value in Cache-Control headers, and handle the 1.1, 1.3, and 1.4 encoding of Cache-Control headers. svn path=/trunk/; revision=4058
* From Georg von Zezschwitz:Guy Harris2001-10-181-48/+29
| | | | | | | Fix a bug with WSP Connect requests with headers > 256 bytes Implement attributes of WSP Suspend/Resume svn path=/trunk/; revision=4037
* Fix to show FN_PROFILE_WARNING14, rather than FN_PROFILE_WARNING, asGuy Harris2001-10-071-2/+2
| | | | | | "Profile-Warning (encoding 1.4)". svn path=/trunk/; revision=4005
* From Georg von Zezschwitz:Guy Harris2001-10-071-34/+41
| | | | | | | | | | | - A bug related to "WSP header pages" is fixed, that resulted into "malformed WSP frame" alerts - "Concatenated PDUs" (Multiple PDUs within one UDP packet) are now supported (used e.g. by Nokia 8310) - The URL of WSP GET/POST requests is display in the info column, same like HTTP GET requests svn path=/trunk/; revision=4004
* Push-traffic dissecting for WSP/WTLS, from Tom Uijldert.Guy Harris2001-09-281-6/+191
| | | | svn path=/trunk/; revision=3968
* MMSE support, from Tom Uijldert.Guy Harris2001-09-251-12/+23
| | | | svn path=/trunk/; revision=3954
* If "snprintf()" can't print all the data because there's not enoughGuy Harris2001-09-251-44/+117
| | | | | | | | | | | | | | | | | | | | | | | room, it might return -1 in some versions of glibc; check for that, and quit if that happens. It might also return the number of characters that would've been printed had there been enough room; this means that a loop that does n += snprintf (buf + n, BUF_LENGTH - n, ...); may end up making "n" bigger than BUF_LENGTH, and "snprintf()" might not sanely handle being passed a negative length, so if "n" isn't less than the total length of the string buffer, don't add stuff to it. The "capabilitiesStart" variable in "add_capabilities()" in the WSP dissector is an offset into the PDU data; there's no guarantee that said offet is < 256, and, even if there were, there's no point in making it an 8-bit variable. Add some additional buffer overflow checks to the WSP dissector. svn path=/trunk/; revision=3953
* Make the resolution for time values be nanoseconds rather thanGuy Harris2001-09-141-7/+7
| | | | | | | | microseconds. Fix some "signed vs. unsigned" comparison warnings. svn path=/trunk/; revision=3934
* Use "tvb_reported_length_remaining()" to check whether there's data leftGuy Harris2001-09-031-2/+2
| | | | | | | in the packet; this eliminates a signed vs. unsigned comparison warning in GCC. svn path=/trunk/; revision=3903
* Instead of having a single datum attached to a conversation, have a listGuy Harris2001-09-031-5/+3
| | | | | | | | | | | of protocol-id-plus-datum pairs, so that multiple protocols can attach information to the same conversation. Dissectors that attach information to a conversation should not assume that if they find a conversation it has one of its data attached to it; the conversation might've been created by another dissector. svn path=/trunk/; revision=3901
* Update from Alexandre P. Ferreira to correctly decode Extended MethodsGuy Harris2001-07-301-15/+29
| | | | | | capabilities in CONNECT replies. svn path=/trunk/; revision=3800
* Use "tvb_strsize()" rather than "tvb_strnlen()" to get the sizeGuy Harris2001-07-301-89/+22
| | | | | | | | | (including the terminating null byte) of a null-terminated string; it includes the terminating null in the count, and throws an exception if the string goes past the end of the tvbuff, so we don't have to do either of those ourselves. svn path=/trunk/; revision=3797
* Fix a comment.Guy Harris2001-07-201-2/+2
| | | | svn path=/trunk/; revision=3751
* Don't base the WSP dissector's idea of whether it's running inGuy Harris2001-07-201-11/+24
| | | | | | | | | connectionless or connection-oriented mode on the server port; that won't work with redirects. Instead, base it on the protocol atop which WSP is running - atop UDP, or directly atop WTLS, it's connectionless; atop WTP, it's connection-oriented. svn path=/trunk/; revision=3750
* If the HeadersLen field of a Post or Reply PDU is 0, don't try toGuy Harris2001-07-201-13/+25
| | | | | | | | | dissect the ContentType or Headers fields, as they're not there. If there's no header data left over after the ContentType field, don't try to dissect the Headers field. svn path=/trunk/; revision=3749
* Assume that Bearer-indication values are bearer types.Guy Harris2001-07-201-3/+4
| | | | svn path=/trunk/; revision=3748
* Add bearer type names.Guy Harris2001-07-201-24/+180
| | | | | | | | | Base the interpretation of the address in a Redirect PDU on the bearer type, not the length of the address. Add support for IPv6 addresses. svn path=/trunk/; revision=3747
* Clean up a lot of stuff, and implement a bunch of missing stuff; a bunchGuy Harris2001-07-201-753/+1993
| | | | | | | | of things showed up when dissecting one capture file once the WSP dissector started creating conversations for redirections, and packets started being dissected as WSP. svn path=/trunk/; revision=3746
* Dissect WSP redirects, and set up a conversation and conversationGuy Harris2001-07-201-150/+390
| | | | | | dissector so that the redirected traffic is dissected as WAP traffic. svn path=/trunk/; revision=3743
* Don't base the protocol column setting in the WSP and WTP dissectors onGuy Harris2001-07-031-18/+28
| | | | | | | | | | | | | | | | | | | | the port - instead, base it on whether the dissector was called directly from UDP or called from another WAP dissector. That way, if you explicitly say "decode this as WTP" because there was a redirection (or if, in the future, the WSP dissector handles redirections for you, although that won't handle the case of a capture where the redirection wasn't captured), the column doesn't say "UDP", it says the right thing. Don't register the WTLS dissector by name - nobody calls it through a handle. Register the WTP dissector by name, as the WTLS dissector tries to get a handle for it - although it doesn't actually call it, or the WSP dissector, through a handle. svn path=/trunk/; revision=3647
* Many corrections and updates for connection-oriented WSP, from AlexandreGuy Harris2001-06-181-21/+371
| | | | | | P. Ferreira. svn path=/trunk/; revision=3571
* From Joerg Mayer: explicitly fill in all members of aGuy Harris2001-06-181-43/+43
| | | | | | | "header_field_info" structure, including the ones that are later set by the routines to register fields. svn path=/trunk/; revision=3561
* Get rid of END_OF_FRAME references in tvbuffified dissectors.Guy Harris2001-04-231-5/+5
| | | | svn path=/trunk/; revision=3364
* Updates from Alexandre P. Ferreira.Guy Harris2001-02-191-33/+54
| | | | svn path=/trunk/; revision=3048
* Updates from Neil Hunter.Guy Harris2001-02-131-2193/+706
| | | | svn path=/trunk/; revision=3026
* Updates from Alexandre P. Ferreira.Guy Harris2001-02-101-66/+132
| | | | svn path=/trunk/; revision=3012
* Updates from Alexandre P. Ferreira.Guy Harris2001-02-011-46/+383
| | | | svn path=/trunk/; revision=2966
* WTLS support and WSP fixes, from Alexandre P. Ferreira.Guy Harris2001-01-301-45/+1451
| | | | svn path=/trunk/; revision=2960
* Fix up the indentation, to make it correct, and to keep the code fromGuy Harris2001-01-281-134/+130
| | | | | | running quite as far to the right. svn path=/trunk/; revision=2945
* Make a bunch of routines not used outside of "packet-wsp.c" static.Guy Harris2001-01-281-20/+20
| | | | svn path=/trunk/; revision=2944
* Remove more "CHECK_DISPLAY_AS_DATA()" calls and "pinfo->current_proto ="Guy Harris2001-01-221-10/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. Don't use col_add_fstr(..., "%s", string); Use col_add_str(..., string); as it does the same thing, but doesn't drag all the heavy *printf machinery in. Fix the DDTP dissector to set the Info column regardless of whether we're building a protocol tree or not, and to set it to "Encrypted payload" if the payload is encrypted. Also fix a typo in a field name. Register the FTP data dissector as being associated with the FTP data protocol, not the FTP protocol (the removed "CHECK_DISPLAY_AS_DATA()" call checked "proto_ftp_data", and the removed "pinfo->current_proto =" line set it to "FTP-DATA", so it should be associated with "proto_ftp_data"). Make the H1 dissector check whether the frame has at least 2 bytes in it before checking the first two bytes; heuristic dissectors must not throw exceptions until they've accepted the packet as one of theirs. Use "tvb_format_text()" rather than "tvb_get_ptr()" and "format_text()" in some dissectors where the result of "tvb_get_ptr()" is used only in the "format_text()" call. In the Quake dissector, don't check whether there are at least 4 bytes in the packet - if we return, the packet won't be dissected at all (it's not as if some other dissector will get to handle it), and, if we don't return, we'll throw an exception if there aren't at least 4 bytes in the packet, so the packet will be marked as short or malformed, as appropriate. In the RIPng dissector, associate the table of strings for the command field with the command field, so that the dissector doesn't have to format the string for the protocol tree entry itself, and so that the filter construction dialog box can let you select "Request" or "Response" from a list rather than requiring you to know the values for "Request" and "Response". Make "dissect_rpc()" static, as it's called only through a heuristic dissector list. Use "col_set_str()" to set the COL_PROTOCOL column for RPC protocols; the string used is from a table provided by the dissector, and is a string constant. Don't format the Info column for WSP into a buffer and then format that buffer into the column with "%s" - "col_add_fstr()" can do the formatting for you, without having to allocate your own buffer (or run through the *printf machinery twice). Don't fetch fields from the WTP packet until you're ready to use them, so that you don't throw an exception before you even set the Protocol column or clear the Info column. Use "pinfo->destport", not "pi.destport", in the Zebra dissector when checking whether the packet is a request or reply, and do the check by comparing with "pinfo->match_port" rather than TCP_PORT_ZEBRA (so that if the dissector is ever registered on another port, it still correctly determines whether the packet is a request or reply - the Network Monitor HTTP dissector has port 80 wired into its brain, which is a bit irritating if you're trying to get it to dissect HTTP proxy traffic on port 3128 or proxy administration UI traffic on port 3132). svn path=/trunk/; revision=2931
* Fix another "match_strval()" call.Guy Harris2001-01-161-164/+171
| | | | | | | | | | Remove one level of indentation from a "switch()" statement, so as not to oblige those of who use 80-column windows for editing (and will continue to do, arguments against it nonwithstanding; I *like* being able to have lots of windows open and visible) to have to play too many games in order to be able to work on this code. svn path=/trunk/; revision=2907
* The PDU type of a WSP packet is presumably not signed, so assign it to aGuy Harris2001-01-161-3/+3
| | | | | | | | | | | "guint8", not a "char". Do not use "match_strval()" unless you're prepared to check whether it returns NULL and do something appropriate if it does so; instead, use "val_to_str()", and let *it* worry about the value passed to it not having a corresponding string. svn path=/trunk/; revision=2906
* Add an additional "protocol index" argument to "{old_}dissector_add()",Guy Harris2001-01-091-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | "{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
* Ensure that all value_string arrays end in {0, NULL}. Dissectors got awayGilbert Ramirez2001-01-031-1/+9
| | | | | | | | | | | | | | with not terminating their arrays because they knew the limits of the value used to look up strings in the value_string array, but the dfilter_expr_dlg does not know these limits and must rely on the terminating {0, NULL} record. Also, in SNA fixed a bug in which a field should have been defined as FT_UINT8 but was defined as FT_BOOLEAN. In WTP, fixed a value string which had duplicate keys. svn path=/trunk/; revision=2817
* Register the WSP dissector, make it static, and have the WTP dissectorGuy Harris2001-01-031-2/+4
| | | | | | call it through a handle. svn path=/trunk/; revision=2815
* Have "proto_register_protocol()" build a list of data structures forGuy Harris2001-01-031-1/+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
* Some tvbuffified dissectors weren't setting "pinfo->current_proto", soGuy Harris2000-12-021-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