aboutsummaryrefslogtreecommitdiffstats
path: root/packet-http.c
AgeCommit message (Collapse)AuthorFilesLines
2000-09-30Don't put any "\r" and/or "\n" at the end of an HTTP request or replyguy1-3/+4
into the "Info" column. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2468 f5534014-38df-0310-8fa8-9805f1628bb7
2000-09-11Move format_text(), get_token_len(), and fine_line_end(), into strutil.cgram1-1/+2
This keeps tvbuff.c generic; it doesn't have to pull in packet.h and all of it's included files. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2409 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-13Add the "Edit:Protocols..." feature which currently only implementsdeniel1-1/+3
the following: It is now possible to enable/disable a particular protocol decoding (i.e. the protocol dissector is void or not). When a protocol is disabled, it is displayed as Data and of course, all linked sub-protocols are disabled as well. Disabling a protocol could be interesting: - in case of buggy dissectors - in case of wrong heuristics - for performance reasons - to decode the data as another protocol (TODO) Currently (if I am not wrong), all dissectors but NFS can be disabled (and dissectors that do not register protocols :-) I do not like the way the RPC sub-dissectors are disabled (in the sub-dissectors) since this could be done in the RPC dissector itself, knowing the sub-protocol hfinfo entry (this is why, I've not modified the NFS one yet). Two functions are added in proto.c : gboolean proto_is_protocol_enabled(int n); void proto_set_decoding(int n, gboolean enabled); and two MACROs which can be used in dissectors: OLD_CHECK_DISPLAY_AS_DATA(index, pd, offset, fd, tree) CHECK_DISPLAY_AS_DATA(index, tvb, pinfo, tree) See also the XXX in proto_dlg.c and proto.c around the new functions. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2267 f5534014-38df-0310-8fa8-9805f1628bb7
2000-08-07Allow either old-style (pre-tvbuff) or new-style (tvbuffified)guy1-6/+6
dissectors to be registered as dissectors for particular ports, registered as heuristic dissectors, and registered as dissectors for conversations, and have routines to be used both by old-style and new-style dissectors to call registered dissectors. Have the code that calls those dissectors translate the arguments as necessary. (For conversation dissectors, replace "find_conversation_dissector()", which just returns a pointer to the dissector, with "old_try_conversation_dissector()" and "try_conversation_dissector()", which actually call the dissector, so that there's a single place at which we can do that translation. Also make "dissector_lookup()" static and, instead of calling it and, if it returns a non-null pointer, calling that dissector, just use "old_dissector_try_port()" or "dissector_try_port()", for the same reason.) This allows some dissectors that took old-style arguments and immediately translated them to new-style arguments to just take new-style arguments; make them do so. It also allows some new-style dissectors not to have to translate arguments before calling routines to look up and call dissectors; make them not do so. Get rid of checks for too-short frames in new-style dissectors - the tvbuff code does those checks for you. Give the routines to register old-style dissectors, and to call dissectors from old-style dissectors, names beginning with "old_", with the routines for new-style dissectors not having the "old_". Update the dissectors that use those routines appropriately. Rename "dissect_data()" to "old_dissect_data()", and "dissect_data_tvb()" to "dissect_data()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2218 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-31Add routines for adding items to a protocol tree that take arguments ofguy1-4/+4
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2031 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-11Add tvbuff class.gram1-5/+5
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1939 f5534014-38df-0310-8fa8-9805f1628bb7
2000-04-08Move calls to "dissector_add()" out of the register routines for TCP andguy1-1/+15
UDP and into the handoff registration routines for the protocols in question. Make the dissectors for those protocols static if they're not called outside the dissector's source file. Get rid of header files if all they did was declare dissectors that are now static; remove declarations of now-static dissectors from header files that do more than just declare the dissector. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1823 f5534014-38df-0310-8fa8-9805f1628bb7
2000-02-23"http_tree" doesn't need to be static; make it local toguy1-27/+29
"dissect_http()". git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1666 f5534014-38df-0310-8fa8-9805f1628bb7
2000-02-23Fix HTTP request & response.deniel1-18/+39
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1665 f5534014-38df-0310-8fa8-9805f1628bb7
2000-02-15Create a header file for every packet-*.c file. Prune the packet.h file.gram1-1/+2
This change allows you to add a new packet-*.c file and not cause a recompilation of everything that #include's packet.h Add the plugin_api.[ch] files ot the plugins/Makefile.am packaging list. Add #define YY_NO_UNPUT 1 to the lex source so that the yyunput symbol is not defined, squelching a compiler complaint when compiling the generated C file. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1637 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-22Fix files that had Gilbert's old e-mail address or that didn't have myguy1-2/+2
forwarding e-mail address. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1522 f5534014-38df-0310-8fa8-9805f1628bb7
1999-12-06Patch from Jerry Talkington to:guy1-3/+16
treat CONNECT as an HTTP request; add DELETE and OPTIONS as request names. Make the order of names in the AUTHORS file match that of the man page and the About box. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1231 f5534014-38df-0310-8fa8-9805f1628bb7
1999-11-16Replace the ETT_ "enum" members, declared in "packet.h", withguy1-2/+8
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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1043 f5534014-38df-0310-8fa8-9805f1628bb7
1999-10-16Add display filters.deniel1-11/+30
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@864 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-17Add a "BYTES_ARE_IN_FRAME()" macro, to test whether there are aguy1-4/+9
specified number of bytes of captured data in the frame at the specified offset, and a "IS_DATA_IN_FRAME()" macro, to test whether there are any bytes of captured data in the frame at the specified offset, and convert some bounds checks to use them. Add a dissector for the Internet Printing Protocol. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@685 f5534014-38df-0310-8fa8-9805f1628bb7
1999-09-12Use "dissect_data()" to put in the raw HTTP data, rather than doing itguy1-5/+3
ourselves; that means we don't have to duplicate the stuff "dissect_data()" does (including saying "1 byte" rather than "1 bytes" - "dissect_data()" does that, but we weren't doing that), and also means that when you print a packet, the data gets dumped. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@670 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-30Fix a typo in "Hypertext".guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@404 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-29Made the protocol (but not the fields) use the new proto_tree routine,gram1-3/+16
allowing users to filter on the existence of these protocols. I also added packet-clip.c to the Nmake makefile. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@402 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-13Added support for compiling on win32 with Visual C and 'nmake'. It compiles,gram1-1/+3
but does not link. Perhaps someone who understands the MS tools can help out. I made it link a few months ago, but with different version of glib/gtk+. I can't remember how I made it link. Most of the compatibility issues were resolved with adding #ifdef HAVE_UNISTD_H the the source code. Please be sure to add this to all future code. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@359 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-07Created a new protocol tree implementation and a new display filtergram1-6/+5
mechanism that is built into ethereal. Wiretap is now used to read all file formats. Libpcap is used only for capturing. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@342 f5534014-38df-0310-8fa8-9805f1628bb7
1999-03-30Changes to the routines to help decode text-oriented protocols (FTP,guy1-6/+6
SMTP, POP, HTTP, etc.) for the benefit of Richard Sharpe's FTP and POP dissectors. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@233 f5534014-38df-0310-8fa8-9805f1628bb7
1999-03-23Removed all references to gtk objects from packet*.[ch] files. They nowgram1-19/+12
reference the protocol tree with struct proto_tree and struct proto_item objects. That way, the packet decoding source code file can be used with non-gtk packet decoders, like a curses-based ethereal, e.g. I also re-arranged some of the information in packet.h to more appropriate places (like other packet-*.[ch] files). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@223 f5534014-38df-0310-8fa8-9805f1628bb7
1999-02-12Add a first cut at HTTP decoding.guy1-0/+215
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@187 f5534014-38df-0310-8fa8-9805f1628bb7