/* packet-snmp.c
* Routines for SNMP (simple network management protocol)
- * D.Jorand (c) 1998
+ * Copyright (C) 1998 Didier Jorand
*
* See RFC 1157 for SNMPv1.
*
*
* 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.71 2001/09/03 10:33:07 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:
*
{
char *result;
int result_len;
- int len, i;
+ int len;
+ unsigned int i;
char *buf;
result_len = oid_length * 22;
long value;
#endif
#endif /* HAVE_SPRINT_VALUE */
- int i;
+ unsigned int i;
gchar *buf;
int len;
* 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);
+ pinfo->srcport, 0, NO_PORT2);
conversation_set_dissector(conversation, dissect_snmp);
}
}
static hf_register_info hf[] = {
{ &hf_snmpv3_flags,
{ "SNMPv3 Flags", "snmpv3.flags", FT_UINT8, BASE_HEX, NULL,
- 0x0, "" }},
+ 0x0, "", HFILL }},
{ &hf_snmpv3_flags_auth,
{ "Authenticated", "snmpv3.flags.auth", FT_BOOLEAN, 8,
- TFS(&flags_set_truth), TH_AUTH, "" }},
+ TFS(&flags_set_truth), TH_AUTH, "", HFILL }},
{ &hf_snmpv3_flags_crypt,
{ "Encrypted", "snmpv3.flags.crypt", FT_BOOLEAN, 8,
- TFS(&flags_set_truth), TH_CRYPT, "" }},
+ TFS(&flags_set_truth), TH_CRYPT, "", HFILL }},
{ &hf_snmpv3_flags_report,
{ "Reportable", "snmpv3.flags.report", FT_BOOLEAN, 8,
- TFS(&flags_set_truth), TH_REPORT, "" }},
+ TFS(&flags_set_truth), TH_REPORT, "", HFILL }},
};
static gint *ett[] = {
&ett_snmp,