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-snmp.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-snmp.c')
-rw-r--r-- | packet-snmp.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/packet-snmp.c b/packet-snmp.c index 176d3da78c..0ec3a93a98 100644 --- a/packet-snmp.c +++ b/packet-snmp.c @@ -1,6 +1,6 @@ /* packet-snmp.c * Routines for SNMP (simple network management protocol) - * D.Jorand (c) 1998 + * Copyright (C) 1998 Didier Jorand * * See RFC 1157 for SNMPv1. * @@ -8,11 +8,11 @@ * * See RFCs 1905, 1906, 1909, and 1910 for SNMPv2u. * - * $Id: packet-snmp.c,v 1.67 2001/04/23 04:29:53 guy Exp $ + * $Id: packet-snmp.c,v 1.68 2001/06/10 09:50:18 guy Exp $ * * Ethereal - Network traffic analyzer - * By Gerald Combs <gerald@zing.org> - * Copyright 1998 Didier Jorand + * By Gerald Combs <gerald@ethereal.com> + * Copyright 1998 Gerald Combs * * Some stuff from: * @@ -2114,19 +2114,23 @@ dissect_snmp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) * IP addresses and ports. * * If this packet went to the SNMP 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 SNMP 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 SNMP dissector as a dissector. */ if (pinfo->destport == UDP_PORT_SNMP) { 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_snmp); } } |