1 /* Do not modify this file. */
2 /* It is created automatically by the ASN.1 to Wireshark dissector compiler */
4 /* ../../tools/asn2wrs.py -b -p snmp -c ./snmp.cnf -s ./packet-snmp-template -D . snmp.asn */
6 /* Input file: packet-snmp-template.h */
8 #line 1 "packet-snmp-template.h"
10 * Routines for snmp packet dissection
14 * Wireshark - Network traffic analyzer
15 * By Gerald Combs <gerald@wireshark.org>
16 * Copyright 1998 Gerald Combs
18 * This program is free software; you can redistribute it and/or
19 * modify it under the terms of the GNU General Public License
20 * as published by the Free Software Foundation; either version 2
21 * of the License, or (at your option) any later version.
23 * This program is distributed in the hope that it will be useful,
24 * but WITHOUT ANY WARRANTY; without even the implied warranty of
25 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26 * GNU General Public License for more details.
28 * You should have received a copy of the GNU General Public License
29 * along with this program; if not, write to the Free Software
30 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
36 typedef struct _snmp_usm_key {
41 typedef struct _snmp_ue_assoc_t snmp_ue_assoc_t;
42 typedef struct _snmp_usm_params_t snmp_usm_params_t;
44 typedef gboolean (*snmp_usm_authenticator_t)(snmp_usm_params_t*, guint8** calc_auth, guint* calc_auth_len, gchar const** error);
45 typedef tvbuff_t* (*snmp_usm_decoder_t)(snmp_usm_params_t*, tvbuff_t* encryptedData, gchar const** error);
46 typedef void (*snmp_usm_password_to_key_t)(const guint8 *password, guint passwordlen, const guint8 *engineID, guint engineLength, guint8 *key);
48 typedef struct _snmp_usm_auth_model_t {
49 snmp_usm_password_to_key_t pass2key;
50 snmp_usm_authenticator_t authenticate;
52 } snmp_usm_auth_model_t;
54 typedef struct _snmp_user_t {
55 snmp_usm_key_t userName;
57 snmp_usm_auth_model_t* authModel;
58 snmp_usm_key_t authPassword;
59 snmp_usm_key_t authKey;
61 snmp_usm_decoder_t privProtocol;
62 snmp_usm_key_t privPassword;
63 snmp_usm_key_t privKey;
71 struct _snmp_ue_assoc_t {
73 snmp_engine_id_t engine;
76 struct _snmp_ue_assoc_t* next;
79 struct _snmp_usm_params_t {
80 gboolean authenticated;
89 proto_item* auth_item;
93 snmp_ue_assoc_t* user_assoc;
99 * Guts of the SNMP dissector - exported for use by protocols such as
102 extern guint dissect_snmp_pdu(tvbuff_t *, int, packet_info *, proto_tree *tree,
103 int, gint, gboolean);
104 extern int dissect_snmp_engineid(proto_tree *, tvbuff_t *, int, int);
106 /*#include "packet-snmp-exp.h"*/
108 #endif /* PACKET_SNMP_H */