aboutsummaryrefslogtreecommitdiffstats
path: root/packet-afs.c
AgeCommit message (Collapse)AuthorFilesLines
2001-11-03Rename the "private" member of the "packet_info" structure toGuy Harris1-2/+2
"private_data", to keep C++ compilers from getting heartburn. svn path=/trunk/; revision=4130
2001-09-03Instead of having a single datum attached to a conversation, have a listGuy Harris1-2/+2
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
2001-08-04Replace the protocol-specific data in the "packet_info" structure with aGuy Harris1-64/+65
"void *" that a dissector can set to point to such a structure; that means that the stuff in the epan directory doesn't have to know anything about the protocol-specific private data one dissector passes to another, and that structure doesn't have to be changed if a dissector wants to pass some new type of data to another dissector. svn path=/trunk/; revision=3818
2001-06-18Various signed vs. unsigned fixes, from Joerg Mayer.Guy Harris1-2/+2
svn path=/trunk/; revision=3560
2001-05-27Call the AFS dissector through a handle.Guy Harris1-4/+5
Update Gerald's e-mail address. svn path=/trunk/; revision=3458
2001-05-27RX and AFS dissectors tvbuffified, and bugs fixed, by Ronnie Sahlberg.Guy Harris1-422/+207
svn path=/trunk/; revision=3454
2001-04-02simplistic check for encrypted dataNathan Neulinger1-45/+64
svn path=/trunk/; revision=3248
2001-03-26misc afs/rx updates - more dissection, etc.Nathan Neulinger1-16/+28
svn path=/trunk/; revision=3190
2001-03-23Misc ubik/afs updates to correct a SEGV and add some moreNathan Neulinger1-41/+68
dissection. Will be more coming, but wanted to commit these before I headed home. svn path=/trunk/; revision=3172
2001-01-03Have "proto_register_protocol()" build a list of data structures forGuy Harris1-2/+3
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-11-30Small code optimization to make it possible to compile on ReliantUNIX.Uwe Girlich1-59/+9
svn path=/trunk/; revision=2723
2000-11-19Fix buffer overruns:Gerald Combs1-4/+4
- packet-afs.c: dissect_acl() didn't restrict the size of a string read with sscanf(). An exploit has been released. - packet-nbns.c: When passed an illegal name, get_nbns_name() would overrun nbname with an error message. This isn't exploitable AFAIK, but it could result in a crash. - packet-ntp.c: dissect_ntp() wasn't checking the length of the reference clock's host name. This is most likely exploitable. This fix simply lops off the end of the host name if it's too long. We should probably add an ellipsis (...) as we have done in other places in the code. svn path=/trunk/; revision=2671
2000-11-19For each column, have both a buffer into which strings for that columnGuy Harris1-2/+2
can be put, and a pointer to the string for the column, which might or might not point to that buffer. Add a routine "col_set_str()", which sets the string for the column to the string passed to it as an argument; it should only be handed a static string (a string constant would be ideal). It doesn't do any copying, so it's faster than "col_add_str()". Make the routines that append to columns check whether the pointer to the string for the column points to the buffer for the column and, if not, copy the string for the column to the buffer for the column so that you can append to it (so you can use "col_set_str()" and then use "col_append_str()" or "col_append_fstr()"). Convert a bunch of "col_add_str()" calls that take a string constant as an argument to "col_set_str()" calls. Convert some "col_add_fstr()" calls that take a string constant as the only argument - i.e., the format string doesn't have any "%" slots into which to put strings for subsequent arguments to "col_set_str()" calls (those calls are just like "col_add_str()" calls). Replace an END_OF_FRAME reference in a tvbuffified dissector with a "tvb_length(tvb)" call. svn path=/trunk/; revision=2670
2000-11-03more decoding of afs bos trafficNathan Neulinger1-21/+214
svn path=/trunk/; revision=2556
2000-11-03finished up afs fs requests, more macros implementedNathan Neulinger1-15/+42
svn path=/trunk/; revision=2555
2000-11-03finished up structure for fs replies, though macros still need implementedNathan Neulinger1-4/+117
svn path=/trunk/; revision=2554
2000-11-03Split into a separate files. Started adding a bunch more decoding ofNathan Neulinger1-1360/+240
structures. Renamed decoding macros to get them more consistent and in line with AFS data types wherever possible. svn path=/trunk/; revision=2553
2000-11-02added backup,rmtsys,update opcodesNathan Neulinger1-9/+48
svn path=/trunk/; revision=2551
2000-11-02more cleanup of opcodesNathan Neulinger1-29/+34
svn path=/trunk/; revision=2550
2000-11-02added entry, fixed couple of typosNathan Neulinger1-2/+3
svn path=/trunk/; revision=2549
2000-10-23Make the routines used for the hash table static - they're not usedGuy Harris1-4/+4
outside "packet-afs.c". svn path=/trunk/; revision=2531
2000-10-21Support for conversations with "wildcard" destination addresses, fromGuy Harris1-3/+3
Jeff Foster. svn path=/trunk/; revision=2523
2000-08-13Add the "Edit:Protocols..." feature which currently only implementsLaurent Deniel1-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. svn path=/trunk/; revision=2267
2000-06-21Fix the display of volume names.Guy Harris1-7/+7
svn path=/trunk/; revision=2083
2000-05-31Add routines for adding items to a protocol tree that take arguments ofGuy Harris1-36/+35
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-11Add tvbuff class.Gilbert Ramirez1-40/+40
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-15Fix up a bunch of places where a pointer into the packet buffer was castGuy Harris1-8/+8
to a type requiring 2-byte or better alignment and was then dereferenced; doing that requires that the code generated by your compiler not trap if it makes an unaligned reference, and on most RISC processors the code generated by the compiler *will* trap on an unaligned reference by default. svn path=/trunk/; revision=1480
2000-01-07Fix Gerald's e-mail address.Guy Harris1-2/+2
svn path=/trunk/; revision=1437
1999-11-17Provide a general mechanism by which dissectors can register "init"Guy Harris1-2/+3
routines, which are called before a dissection pass is made over all the packets in a capture - the "init" routine would clear out any state information that needs to be initialized before such a dissection pass. Make the NCP, SMB, AFS, and ONC RPC dissectors register their "init" routines with that mechanism, have the code that reads in a capture file call the routine that calls all registered "init" routines rather than calling a wired-in set of "init" routines, and also have the code that runs a filtering or colorizing pass over all the packets call that routine, as a filtering or colorizing pass is a dissection pass. Have the ONC RPC "init" routine zero out the table of RPC calls, so that it completely erases any state from the previous dissection pass (so that, for example, if you run a filtering pass, it doesn't mark any non-duplicate packets as duplicates because it remembers them from the previous pass). svn path=/trunk/; revision=1050
1999-11-16Replace the ETT_ "enum" members, declared in "packet.h", withGuy Harris1-9/+25
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-10-28added additional error messagesNathan Neulinger1-6/+85
svn path=/trunk/; revision=944
1999-10-28Converted C++ style comments to C styleNathan Neulinger1-27/+25
svn path=/trunk/; revision=943
1999-10-24Export the data structure used to represent a conversation.Guy Harris1-5/+12
Replace "add_to_conversation()" with: "conversation_new()", which creates a new conversation, given source and destination addresses and ports, and returns a pointer to the structure for the conversation; "find_conversation()", which tries to find a conversation for given source and destination addresses and ports, and returns a pointer to the structure for the conversation if found, and a null pointer if not found. Add a private data pointer field to the conversation structure, and have "conversation_new()" take an argument that specifies what to set that pointer to; that lets clients of the conversation code hang arbitrary data off the conversation (e.g., a hash table of protocol requests and replies, in case the protocol is a request/reply protocol wherein the reply doesn't say what type of request it's a reply to, and you need that information to dissect the reply). svn path=/trunk/; revision=920
1999-10-22Generalize the "ip_src" and "ip_dst" members of the "packet_info"Guy Harris1-15/+23
structure to "dl_src"/"dl_dst", "net_src"/"net_dst", and "src"/"dst" addresses, where an address is an address type, an address length in bytes, and a pointer to that many bytes. "dl_{src,dst}" are the link-layer source/destination; "net_{src,dst}" are the network-layer source/destination; "{src,dst}" are the source/destination from the highest of those two layers that we have in the packet. Add a port type to "packet_info" as well, specifying whether it's a TCP or UDP port. Don't set the address and port columns in the dissector functions; just set the address and port members of the "packet_info" structure. Set the columns in "fill_in_columns()"; this means that if we're showing COL_{DEF,RES,UNRES}_SRC" or "COL_{DEF,RES,UNRES}_DST", we only generate the string from "src" or "dst", we don't generate a string for the link-layer address and then overwrite it with a string for the network-layer address (generating those strings costs CPU). Add support for "conversations", where a "conversation" is (at present) a source and destination address and a source and destination port. (In the future, we may support "conversations" above the transport layer, e.g. a TFTP conversation, where the first packet goes from the client to the TFTP server port, but the reply comes back from a different port, and all subsequent packets go between the client address/port and the server address/new port, or an NFS conversation, which might include lock manager, status monitor, and mount packets, as well as NFS packets.) Currently, all we support is a call that takes the source and destination address/port pairs, looks them up in a hash table, and: if nothing is found, creates a new entry in the hash table, and assigns it a unique 32-bit conversation ID, and returns that conversation ID; if an entry is found, returns its conversation ID. Use that in the SMB and AFS code to keep track of individual SMB or AFS conversations. We need to match up requests and replies, as, for certain replies, the operation code for the request to which it's a reply doesn't show up in the reply - you have to find the request with a matching transaction ID. Transaction IDs are per-conversation, so the hash table for requests should include a conversation ID and transaction ID as the key. This allows SMB and AFS decoders to handle IPv4 or IPv6 addresses transparently (and should allow the SMB decoder to handle NetBIOS atop other protocols as well, if the source and destination address and port values in the "packet_info" structure are set appropriately). In the "Follow TCP Connection" code, check to make sure that the addresses are IPv4 addressses; ultimately, that code should be changed to use the conversation code instead, which will let it handle IPv6 transparently. svn path=/trunk/; revision=909
1999-10-20Added Nathan's patch for AFS and RX dissection.Gilbert Ramirez1-0/+2502
svn path=/trunk/; revision=894