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