forked from osmocom/wireshark
248 lines
6.5 KiB
INI
248 lines
6.5 KiB
INI
# snmp.cnf
|
|
# snmp conformation file
|
|
|
|
# $Id$
|
|
|
|
|
|
#.PDU
|
|
SMUX-PDUs
|
|
|
|
#.NO_EMIT
|
|
|
|
#.TYPE_RENAME
|
|
|
|
#.FIELD_RENAME
|
|
Messagev2u/datav2u/plaintext v2u_plaintext
|
|
BulkPDU/request-id bulkPDU_request-id
|
|
|
|
#.FN_PARS PDUs
|
|
|
|
VAL_PTR = &pdu_type
|
|
|
|
#.FN_BODY PDUs
|
|
|
|
gint pdu_type;
|
|
|
|
%(DEFAULT_BODY)s
|
|
if (check_col(pinfo->cinfo, COL_INFO))
|
|
col_add_str(pinfo->cinfo, COL_INFO, val_to_str(pdu_type, snmp_PDUs_vals,"Unknown PDU type (%%u)"));
|
|
|
|
#.FN_BODY PDUs/get-request
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
#.FN_BODY PDUs/get-next-request
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
#.FN_BODY PDUs/get-response
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
#.FN_BODY PDUs/set-request
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
|
|
#.FN_BODY PDUs/trap
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_Trap_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
#.FN_BODY PDUs/getBulkRequest
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_GetBulkRequest_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
#.FN_BODY PDUs/informRequest
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_InformRequest_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
#.FN_BODY PDUs/sNMPv2-Trap
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_SNMPv2_Trap_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
#.FN_BODY PDUs/report
|
|
gint8 class;
|
|
gboolean pc, ind_field;
|
|
gint32 tag;
|
|
guint32 len1;
|
|
|
|
if(!implicit_tag){
|
|
/* XXX asn2eth can not yet handle tagged assignment yes so this
|
|
* XXX is some conformance file magic to work around that bug
|
|
*/
|
|
offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
|
|
offset = get_ber_length(tree, tvb, offset, &len1, &ind_field);
|
|
}
|
|
offset = dissect_snmp_Report_PDU(TRUE, tvb, offset, pinfo, tree, hf_index);
|
|
|
|
#.FN_PARS HeaderData/msgSecurityModel
|
|
|
|
VAL_PTR = &MsgSecurityModel
|
|
|
|
#.FN_BODY SNMPv3Message/msgSecurityParameters
|
|
|
|
switch(MsgSecurityModel){
|
|
case SNMP_SEC_USM: /* 3 */
|
|
offset = dissect_snmp_UsmSecurityParameters(FALSE, tvb, offset+2, pinfo, tree, -1);
|
|
break;
|
|
case SNMP_SEC_ANY: /* 0 */
|
|
case SNMP_SEC_V1: /* 1 */
|
|
case SNMP_SEC_V2C: /* 2 */
|
|
default:
|
|
%(DEFAULT_BODY)s
|
|
break;
|
|
}
|
|
|
|
#.FN_PARS SnmpEngineID
|
|
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY SnmpEngineID
|
|
tvbuff_t *parameter_tvb = NULL;
|
|
proto_tree *engineid_tree = NULL;
|
|
proto_item *item = NULL;
|
|
|
|
%(DEFAULT_BODY)s
|
|
if (parameter_tvb)
|
|
dissect_snmp_engineid(tree, parameter_tvb, 0, tvb_length_remaining(parameter_tvb,0));
|
|
|
|
#.FN_PARS HeaderData/msgFlags
|
|
|
|
VAL_PTR = ¶meter_tvb
|
|
|
|
#.FN_BODY HeaderData/msgFlags
|
|
tvbuff_t *parameter_tvb = NULL;
|
|
|
|
%(DEFAULT_BODY)s
|
|
if (parameter_tvb){
|
|
|
|
proto_tree_add_item(tree, hf_snmp_v3_flags_report, parameter_tvb, 0, 1, FALSE);
|
|
proto_tree_add_item(tree, hf_snmp_v3_flags_crypt, parameter_tvb, 0, 1, FALSE);
|
|
proto_tree_add_item(tree, hf_snmp_v3_flags_auth, parameter_tvb, 0, 1, FALSE);
|
|
}
|
|
|
|
#.FN_PARS ObjectName
|
|
|
|
VAL_PTR = &oid_tvb
|
|
|
|
#.FN_BODY String-value
|
|
guint length;
|
|
|
|
snmp_variable_decode(tvb, tree, pinfo, oid_tvb, offset, &length, NULL);
|
|
offset = offset + length;
|
|
|
|
#.FN_BODY Integer-value
|
|
guint length;
|
|
|
|
snmp_variable_decode(tvb, tree, pinfo, oid_tvb, offset, &length, NULL);
|
|
offset = offset + length;
|
|
|
|
#.FN_BODY ObjectID-value
|
|
guint length;
|
|
|
|
snmp_variable_decode(tvb, tree, pinfo, oid_tvb, offset, &length, NULL);
|
|
offset = offset + length;
|
|
|
|
#.FN_BODY Empty
|
|
guint length;
|
|
|
|
snmp_variable_decode(tvb, tree, pinfo, oid_tvb, offset, &length, NULL);
|
|
offset = offset + length;
|
|
|
|
|
|
|
|
#.TYPE_ATTR
|
|
IpAddress TYPE = FT_IPv4 DISPLAY = BASE_NONE STRINGS = NULL
|
|
Message/community TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
|
|
HeaderData/msgSecurityModel TYPE = FT_UINT32 DISPLAY = BASE_DEC STRINGS = VALS(sec_models)
|
|
UsmSecurityParameters/msgUserName TYPE = FT_STRING DISPLAY = BASE_HEX STRINGS = NULL
|
|
#.END
|