diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-06-10 09:50:20 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-06-10 09:50:20 +0000 |
commit | 3c7b6471e3c64529a942ef549c0953325d3f7b45 (patch) | |
tree | b99a27ef275977c8554de6154ca5ff2940df2cbe /packet-tftp.c | |
parent | 78f6f176d41dc0af73ca22d7f94d726309cc55b2 (diff) |
Rename the arguments and flags for the conversation routines, so as not
to imply that
1) conversations have source and destination addresses and ports
- they don't (if they did, they'd be monologues, not
conversations), they just have two address/port pairs for the
two endpoints, with one or more of the address or port in the
second pair possibly being wildcarded;
2) the first and second address or port argument to
"find_conversation()" or "try_conversation_dissector()" have
anything to do with the first or second address/port pair in
a conversation - they don't, the two arguments to those
routines are matched against *both* address/port pairs for a
conversation;
as otherwise people might think that they need to add flags to wildcard
the first arguments "conversation_new()" or "find_conversation()" (they
don't, they just have to pass the non-wildcarded address/port first and
then pass the wildcarded one, even if that means passing the destination
first and source second).
svn path=/trunk/; revision=3537
Diffstat (limited to 'packet-tftp.c')
-rw-r--r-- | packet-tftp.c | 22 |
1 files changed, 13 insertions, 9 deletions
diff --git a/packet-tftp.c b/packet-tftp.c index e95f0f4dee..eaef370b72 100644 --- a/packet-tftp.c +++ b/packet-tftp.c @@ -5,10 +5,10 @@ * Craig Newell <CraigN@cheque.uq.edu.au> * RFC2347 TFTP Option Extension * - * $Id: packet-tftp.c,v 1.24 2001/02/09 06:08:11 guy Exp $ + * $Id: packet-tftp.c,v 1.25 2001/06/10 09:50:18 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> + * By Gerald Combs <gerald@ethereal.com> * Copyright 1998 Gerald Combs * * Copied from packet-bootp.c @@ -110,19 +110,23 @@ dissect_tftp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * and ports. * * If this packet went to the TFTP port, we check to see if - * there's already a conversation with the source IP address - * and port of this packet, the destination IP address of this - * packet, and any destination UDP port. If not, we create - * one, with a wildcard UDP port, and give it the TFTP dissector - * as a dissector. + * there's already a conversation with one address/port pair + * matching the source IP address and port of this packet, + * the other address matching the destination IP address of this + * packet, and any destination port. + * + * If not, we create one, with its address 1/port 1 pair being + * the source address/port of this packet, its address 2 being + * the destination address of this packet, and its port 2 being + * wildcarded, and give it the TFTP dissector as a dissector. */ if (pinfo->destport == UDP_PORT_TFTP) { conversation = find_conversation(&pinfo->src, &pinfo->dst, PT_UDP, - pinfo->srcport, 0, NO_DST_PORT); + pinfo->srcport, 0, NO_PORT_B); if (conversation == NULL) { conversation = conversation_new(&pinfo->src, &pinfo->dst, PT_UDP, pinfo->srcport, 0, NULL, - NO_DST_PORT); + NO_PORT2); conversation_set_dissector(conversation, dissect_tftp); } } |