aboutsummaryrefslogtreecommitdiffstats
path: root/packet-ftp.c
AgeCommit message (Collapse)AuthorFilesLines
2000-05-31Add routines for adding items to a protocol tree that take arguments ofguy1-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. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@2031 f5534014-38df-0310-8fa8-9805f1628bb7
2000-05-11Add tvbuff class.gram1-11/+11
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-15Changes from Richard Sharpe to improve the display of FTP data.guy1-3/+4
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1858 f5534014-38df-0310-8fa8-9805f1628bb7
2000-04-08Move calls to "dissector_add()" out of the register routines for TCP andguy1-3/+14
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-03-12Break proto_tree_add_item_format() into multiple functions:gram1-5/+5
proto_tree_add_protocol_format() proto_tree_add_uint_format() proto_tree_add_ipxnet_format() proto_tree_add_ipv4_format() proto_tree_add_ipv6_format() proto_tree_add_bytes_format() proto_tree_add_string_format() proto_tree_add_ether_format() proto_tree_add_time_format() proto_tree_add_double_format() proto_tree_add_boolean_format() If using GCC 2.x, we can check the print-format against the variable args passed in. Regardless of compiler, we can now check at run-time that the field type passed into the function corresponds to what that function expects (FT_UINT, FT_BOOLEAN, etc.) Note that proto_tree_add_protocol_format() does not require a value field, since the value of a protocol is always NULL. It's more intuitive w/o the vestigial argument. Fixed a proto_tree_add_item_format-related bug in packet-isis-hello.c Fixed a variable usage bug in packet-v120.c. (ett_* was used instead of hf_*) Checked in Guy's fix for the function declearation for proto_tree_add_text() and proto_tree_add_notext(). git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1713 f5534014-38df-0310-8fa8-9805f1628bb7
2000-01-07Fix Gerald's e-mail address.guy1-2/+2
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@1437 f5534014-38df-0310-8fa8-9805f1628bb7
1999-11-16Replace the ETT_ "enum" members, declared in "packet.h", withguy1-3/+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-12New proto_tree header_field_info stuff. Header_field_infos now containgram1-7/+18
the base for numbers to be displayed in, bitmasks for bitfields, and blurbs (which are one or two sentences describing the field). proto_tree_add*() routines now automatically handle bitfields. You tell it which header field you are adding, and just pass it the value of the entire field, and the proto_tree routines will do the masking and shifting for you. This means that bitfields are more naturally filtered via dfilter now. Added Phil Techau's support for signed integers in dfilters/proto_tree. Added the beginning of the SNA dissector. It's not complete, but I'm committing it now because it has example after example of how to use bitfields with the new header_field_info struct and proto_tree routines. It was the impetus to change how header_field_info works. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@815 f5534014-38df-0310-8fa8-9805f1628bb7
1999-10-09- correct bound checkings in string parsingdeniel1-15/+49
- add display filters git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@792 f5534014-38df-0310-8fa8-9805f1628bb7
1999-08-24Removed unnecessary #include "etypes.h" lines.gram1-2/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@565 f5534014-38df-0310-8fa8-9805f1628bb7
1999-08-18Declare the "packet_info" structure "pi" in "packet.h", rather than in aguy1-5/+4
bunch of source files. Replace the "payload" field of a "packet_info" structure with "len" and "captured_len" fields, which contain the total packet length and total captured packet length (including all headers) at the current protocol layer (i.e., if a given layer has a length field, and that length field says its shorter than the length we got from the capture, reduce the "pi.len" and "pi.captured_len" values appropriately). Those fields can be used in the future if we add checks to make sure a field we're extracting from a packet doesn't go past the end of the packet, or past the captured part of the packet. Get rid of the additional payload argument to some dissection functions; use "pi.captured_len - offset" instead. Have the END_OF_FRAME macro use "pi.captured_len" rather than "fd->cap_len", so that "dissect the rest of the frame" becomes "dissect the rest of the packet", and doesn't dissect end-of-frame padding such as padding added to make an Ethernet frame 60 or more octets long. (We might want to rename it END_OF_PACKET; if we ever want to label the end-of-frame padding for the benefit of people curious what that extra gunk is, we could have a separate END_OF_FRAME macro that uses "fd->cap_len".) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@506 f5534014-38df-0310-8fa8-9805f1628bb7
1999-07-29Made the protocol (but not the fields) use the new proto_tree routine,gram1-7/+14
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-07Created a new protocol tree implementation and a new display filtergram1-9/+8
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-05-13Removing some includes of tftp.h from places it should not besharpe1-2/+1
in. Would like to remove it from packet-tftp.c as well to remove our dependence on that file as well. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@285 f5534014-38df-0310-8fa8-9805f1628bb7
1999-04-05Add an RCS ID.guy1-1/+1
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@240 f5534014-38df-0310-8fa8-9805f1628bb7
1999-04-05FTP, POP, and Telnet support from Richard Sharpe.guy1-0/+144
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@237 f5534014-38df-0310-8fa8-9805f1628bb7