diff options
Diffstat (limited to 'asn1/snmp/snmp.cnf')
-rw-r--r-- | asn1/snmp/snmp.cnf | 64 |
1 files changed, 31 insertions, 33 deletions
diff --git a/asn1/snmp/snmp.cnf b/asn1/snmp/snmp.cnf index b0c342a69e..c476530ea0 100644 --- a/asn1/snmp/snmp.cnf +++ b/asn1/snmp/snmp.cnf @@ -28,15 +28,15 @@ gint pdu_type=-1; col_clear(actx->pinfo->cinfo, COL_INFO); %(DEFAULT_BODY)s - if( (pdu_type!=-1) && snmp_PDUs_vals[pdu_type].strptr ){ - col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%%s", snmp_PDUs_vals[pdu_type].strptr); - } + if( (pdu_type!=-1) && snmp_PDUs_vals[pdu_type].strptr ){ + col_prepend_fstr(actx->pinfo->cinfo, COL_INFO, "%%s", snmp_PDUs_vals[pdu_type].strptr); + } #.END #.FN_BODY Trap-PDU/_untag - generic_trap = 0; - enterprise_oid = NULL; + generic_trap = 0; + enterprise_oid = NULL; %(DEFAULT_BODY)s @@ -47,28 +47,28 @@ gint pdu_type=-1; %(DEFAULT_BODY)s - if (generic_trap == 6) { /* enterprise specific */ - const gchar *specific_str = snmp_lookup_specific_trap (specific_trap); - if (specific_str) { - proto_item_append_text(actx->created_item, " (%%s)", specific_str); - } - } + if (generic_trap == 6) { /* enterprise specific */ + const gchar *specific_str = snmp_lookup_specific_trap (specific_trap); + if (specific_str) { + proto_item_append_text(actx->created_item, " (%%s)", specific_str); + } + } #.END #.FN_PARS EnterpriseOID FN_VARIANT = _str VAL_PTR = &enterprise_oid #.FN_BODY EnterpriseOID - const gchar* name; + const gchar* name; %(DEFAULT_BODY)s - if (display_oid && enterprise_oid) { - name = oid_resolved_from_string(enterprise_oid); - if (name) { - col_append_fstr (actx->pinfo->cinfo, COL_INFO, " %%s", name); - } - } + if (display_oid && enterprise_oid) { + name = oid_resolved_from_string(enterprise_oid); + if (name) { + col_append_fstr (actx->pinfo->cinfo, COL_INFO, " %%s", name); + } + } #.END @@ -86,8 +86,7 @@ gint pdu_type=-1; #.FN_BODY UsmSecurityParameters/msgAuthoritativeEngineID - offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, - &usm_p.engine_tvb); + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, &usm_p.engine_tvb); if (usm_p.engine_tvb) { proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid); dissect_snmp_engineid(engine_tree, actx->pinfo, usm_p.engine_tvb, 0, tvb_length_remaining(usm_p.engine_tvb,0)); @@ -96,8 +95,7 @@ gint pdu_type=-1; #.FN_BODY SnmpEngineID tvbuff_t* param_tvb = NULL; - offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, - ¶m_tvb); + offset = dissect_ber_octet_string(implicit_tag, actx, tree, tvb, offset, hf_index, ¶m_tvb); if (param_tvb) { proto_tree* engine_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_engineid); dissect_snmp_engineid(engine_tree, actx->pinfo, param_tvb, 0, tvb_length_remaining(param_tvb,0)); @@ -147,12 +145,12 @@ gint pdu_type=-1; } - add_new_data_source(actx->pinfo, cleartext_tvb, "Decrypted ScopedPDU"); + add_new_data_source(actx->pinfo, cleartext_tvb, "Decrypted ScopedPDU"); decrypted_item = proto_tree_add_item(encryptedpdu_tree, hf_snmp_decryptedPDU,cleartext_tvb,0,-1,ENC_NA); decrypted_tree = proto_item_add_subtree(decrypted_item,ett_decrypted); dissect_snmp_ScopedPDU(FALSE, cleartext_tvb, 0, actx, decrypted_tree, -1); - } + } } else { col_set_str(actx->pinfo->cinfo, COL_INFO, "encryptedPDU: privKey Unknown"); } @@ -213,17 +211,17 @@ gint pdu_type=-1; tvbuff_t *parameter_tvb = NULL; %(DEFAULT_BODY)s - if (parameter_tvb){ - guint8 v3_flags = tvb_get_guint8(parameter_tvb, 0); - proto_tree* flags_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_msgFlags); + if (parameter_tvb){ + guint8 v3_flags = tvb_get_guint8(parameter_tvb, 0); + proto_tree* flags_tree = proto_item_add_subtree(%(ACTX)s->created_item,ett_msgFlags); - proto_tree_add_item(flags_tree, hf_snmp_v3_flags_report, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(flags_tree, hf_snmp_v3_flags_crypt, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); - proto_tree_add_item(flags_tree, hf_snmp_v3_flags_auth, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_snmp_v3_flags_report, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_snmp_v3_flags_crypt, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); + proto_tree_add_item(flags_tree, hf_snmp_v3_flags_auth, parameter_tvb, 0, 1, ENC_BIG_ENDIAN); - usm_p.encrypted = v3_flags & TH_CRYPT ? TRUE : FALSE; - usm_p.authenticated = v3_flags & TH_AUTH ? TRUE : FALSE; - } + usm_p.encrypted = v3_flags & TH_CRYPT ? TRUE : FALSE; + usm_p.authenticated = v3_flags & TH_AUTH ? TRUE : FALSE; + } #.TYPE_ATTR |