1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
4 /* asn2wrs.py -b -q -L -p snmp -c ./snmp.cnf -s ./packet-snmp-template -D . -O ../.. snmp.asn */
7 * Routines for snmp packet dissection
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * SPDX-License-Identifier: GPL-2.0-or-later
19 #define SNMP_REQ_GET 0
20 #define SNMP_REQ_GETNEXT 1
21 #define SNMP_REQ_SET 3
22 #define SNMP_REQ_GETBULK 5
23 #define SNMP_REQ_INFORM 6
25 #define SNMP_RES_GET 2
31 typedef struct _snmp_usm_key
{
36 typedef struct _snmp_ue_assoc_t snmp_ue_assoc_t
;
37 typedef struct _snmp_usm_params_t snmp_usm_params_t
;
39 typedef tvbuff_t
* (*snmp_usm_decoder_t
)(snmp_usm_params_t
*, tvbuff_t
* encryptedData
, packet_info
*pinfo
, char const** error
);
41 typedef enum _snmp_usm_auth_model_t
{
42 SNMP_USM_AUTH_MD5
= 0,
44 SNMP_USM_AUTH_SHA2_224
,
45 SNMP_USM_AUTH_SHA2_256
,
46 SNMP_USM_AUTH_SHA2_384
,
47 SNMP_USM_AUTH_SHA2_512
48 } snmp_usm_auth_model_t
;
50 typedef struct _snmp_user_t
{
51 snmp_usm_key_t userName
;
53 snmp_usm_auth_model_t authModel
;
54 snmp_usm_key_t authPassword
;
55 snmp_usm_key_t authKey
;
57 snmp_usm_decoder_t privProtocol
;
58 snmp_usm_key_t privPassword
;
59 snmp_usm_key_t privKey
;
67 struct _snmp_ue_assoc_t
{
69 snmp_engine_id_t engine
;
72 unsigned priv_key_exp
;
73 struct _snmp_ue_assoc_t
* next
;
76 struct _snmp_usm_params_t
{
79 unsigned start_offset
;
86 proto_item
* auth_item
;
90 snmp_ue_assoc_t
* user_assoc
;
95 typedef struct snmp_request_response
{
96 uint32_t request_frame_id
;
97 uint32_t response_frame_id
;
98 nstime_t request_time
;
100 unsigned request_procedure_id
;
101 } snmp_request_response_t
;
104 * Guts of the SNMP dissector - exported for use by protocols such as
107 extern unsigned dissect_snmp_pdu(tvbuff_t
*, int, packet_info
*, proto_tree
*tree
,
109 extern int dissect_snmp_engineid(proto_tree
*, packet_info
*, tvbuff_t
*, int, int);
111 /*#include "packet-snmp-exp.h"*/
113 #endif /* PACKET_SNMP_H */