2013-04-10 21:24:19 +00:00
|
|
|
/* Do not modify this file. Changes will be overwritten. */
|
|
|
|
/* Generated automatically by the ASN.1 to Wireshark dissector compiler */
|
2007-11-04 16:47:30 +00:00
|
|
|
/* packet-snmp.h */
|
2013-06-19 22:47:36 +00:00
|
|
|
/* ../../tools/asn2wrs.py -b -p snmp -c ./snmp.cnf -s ./packet-snmp-template -D . -O ../../epan/dissectors snmp.asn */
|
2006-05-03 19:09:03 +00:00
|
|
|
|
|
|
|
/* Input file: packet-snmp-template.h */
|
|
|
|
|
2011-04-08 19:51:39 +00:00
|
|
|
#line 1 "../../asn1/snmp/packet-snmp-template.h"
|
1999-11-18 07:29:55 +00:00
|
|
|
/* packet-snmp.h
|
2006-05-03 19:09:03 +00:00
|
|
|
* Routines for snmp packet dissection
|
1999-11-18 07:29:55 +00:00
|
|
|
*
|
2006-05-21 04:49:01 +00:00
|
|
|
* Wireshark - Network traffic analyzer
|
|
|
|
* By Gerald Combs <gerald@wireshark.org>
|
2006-05-03 19:09:03 +00:00
|
|
|
* Copyright 1998 Gerald Combs
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-11-18 07:29:55 +00:00
|
|
|
* This program is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2
|
|
|
|
* of the License, or (at your option) any later version.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-11-18 07:29:55 +00:00
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
2002-08-28 21:04:11 +00:00
|
|
|
*
|
1999-11-18 07:29:55 +00:00
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to the Free Software
|
2012-06-28 22:56:06 +00:00
|
|
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
1999-11-18 07:29:55 +00:00
|
|
|
*/
|
|
|
|
|
2006-05-03 19:09:03 +00:00
|
|
|
#ifndef PACKET_SNMP_H
|
|
|
|
#define PACKET_SNMP_H
|
2000-08-11 13:37:21 +00:00
|
|
|
|
2007-01-09 18:38:55 +00:00
|
|
|
typedef struct _snmp_usm_key {
|
|
|
|
guint8* data;
|
|
|
|
guint len;
|
|
|
|
} snmp_usm_key_t;
|
|
|
|
|
|
|
|
typedef struct _snmp_ue_assoc_t snmp_ue_assoc_t;
|
|
|
|
typedef struct _snmp_usm_params_t snmp_usm_params_t;
|
|
|
|
|
2007-01-11 17:39:16 +00:00
|
|
|
typedef gboolean (*snmp_usm_authenticator_t)(snmp_usm_params_t*, guint8** calc_auth, guint* calc_auth_len, gchar const** error);
|
2007-01-10 01:16:22 +00:00
|
|
|
typedef tvbuff_t* (*snmp_usm_decoder_t)(snmp_usm_params_t*, tvbuff_t* encryptedData, gchar const** error);
|
2007-01-11 00:29:50 +00:00
|
|
|
typedef void (*snmp_usm_password_to_key_t)(const guint8 *password, guint passwordlen, const guint8 *engineID, guint engineLength, guint8 *key);
|
2007-01-09 18:38:55 +00:00
|
|
|
|
|
|
|
typedef struct _snmp_usm_auth_model_t {
|
|
|
|
snmp_usm_password_to_key_t pass2key;
|
|
|
|
snmp_usm_authenticator_t authenticate;
|
|
|
|
guint key_size;
|
|
|
|
} snmp_usm_auth_model_t;
|
|
|
|
|
|
|
|
typedef struct _snmp_user_t {
|
|
|
|
snmp_usm_key_t userName;
|
2014-02-26 19:29:17 +00:00
|
|
|
|
2007-01-09 18:38:55 +00:00
|
|
|
snmp_usm_auth_model_t* authModel;
|
|
|
|
snmp_usm_key_t authPassword;
|
|
|
|
snmp_usm_key_t authKey;
|
|
|
|
|
|
|
|
snmp_usm_decoder_t privProtocol;
|
|
|
|
snmp_usm_key_t privPassword;
|
|
|
|
snmp_usm_key_t privKey;
|
|
|
|
} snmp_user_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
guint8* data;
|
|
|
|
guint len;
|
|
|
|
} snmp_engine_id_t;
|
|
|
|
|
|
|
|
struct _snmp_ue_assoc_t {
|
|
|
|
snmp_user_t user;
|
|
|
|
snmp_engine_id_t engine;
|
2007-02-07 14:54:35 +00:00
|
|
|
guint auth_model;
|
|
|
|
guint priv_proto;
|
2007-01-11 00:29:50 +00:00
|
|
|
struct _snmp_ue_assoc_t* next;
|
2007-01-09 18:38:55 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _snmp_usm_params_t {
|
|
|
|
gboolean authenticated;
|
|
|
|
gboolean encrypted;
|
|
|
|
guint start_offset;
|
|
|
|
guint auth_offset;
|
2014-02-26 19:29:17 +00:00
|
|
|
|
2007-01-11 00:29:50 +00:00
|
|
|
guint32 boots;
|
|
|
|
guint32 time;
|
2007-01-09 18:38:55 +00:00
|
|
|
tvbuff_t* engine_tvb;
|
|
|
|
tvbuff_t* user_tvb;
|
|
|
|
proto_item* auth_item;
|
|
|
|
tvbuff_t* auth_tvb;
|
|
|
|
tvbuff_t* priv_tvb;
|
|
|
|
tvbuff_t* msg_tvb;
|
|
|
|
snmp_ue_assoc_t* user_assoc;
|
2007-01-11 00:29:50 +00:00
|
|
|
|
|
|
|
gboolean authOK;
|
2007-01-09 18:38:55 +00:00
|
|
|
};
|
|
|
|
|
1999-11-18 07:29:55 +00:00
|
|
|
/*
|
|
|
|
* Guts of the SNMP dissector - exported for use by protocols such as
|
|
|
|
* ILMI.
|
|
|
|
*/
|
2003-09-06 01:21:00 +00:00
|
|
|
extern guint dissect_snmp_pdu(tvbuff_t *, int, packet_info *, proto_tree *tree,
|
|
|
|
int, gint, gboolean);
|
2005-07-25 23:33:44 +00:00
|
|
|
extern int dissect_snmp_engineid(proto_tree *, tvbuff_t *, int, int);
|
2000-08-11 13:37:21 +00:00
|
|
|
|
2006-05-03 19:09:03 +00:00
|
|
|
/*#include "packet-snmp-exp.h"*/
|
|
|
|
|
|
|
|
#endif /* PACKET_SNMP_H */
|