2 * Routines for snmp packet dissection
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 typedef struct _snmp_usm_key {
31 typedef struct _snmp_ue_assoc_t snmp_ue_assoc_t;
32 typedef struct _snmp_usm_params_t snmp_usm_params_t;
34 typedef gboolean (*snmp_usm_authenticator_t)(snmp_usm_params_t*, guint8** calc_auth, guint* calc_auth_len, gchar const** error);
35 typedef tvbuff_t* (*snmp_usm_decoder_t)(snmp_usm_params_t*, tvbuff_t* encryptedData, gchar const** error);
36 typedef void (*snmp_usm_password_to_key_t)(const guint8 *password, guint passwordlen, const guint8 *engineID, guint engineLength, guint8 *key);
38 typedef struct _snmp_usm_auth_model_t {
39 snmp_usm_password_to_key_t pass2key;
40 snmp_usm_authenticator_t authenticate;
42 } snmp_usm_auth_model_t;
44 typedef struct _snmp_user_t {
45 snmp_usm_key_t userName;
47 snmp_usm_auth_model_t* authModel;
48 snmp_usm_key_t authPassword;
49 snmp_usm_key_t authKey;
51 snmp_usm_decoder_t privProtocol;
52 snmp_usm_key_t privPassword;
53 snmp_usm_key_t privKey;
61 struct _snmp_ue_assoc_t {
63 snmp_engine_id_t engine;
66 struct _snmp_ue_assoc_t* next;
69 struct _snmp_usm_params_t {
70 gboolean authenticated;
79 proto_item* auth_item;
83 snmp_ue_assoc_t* user_assoc;
89 * Guts of the SNMP dissector - exported for use by protocols such as
92 extern guint dissect_snmp_pdu(tvbuff_t *, int, packet_info *, proto_tree *tree,
94 extern int dissect_snmp_engineid(proto_tree *, packet_info *, tvbuff_t *, int, int);
96 /*#include "packet-snmp-exp.h"*/
98 #endif /* PACKET_SNMP_H */