diff options
author | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-12-06 22:59:30 +0000 |
---|---|---|
committer | guy <guy@f5534014-38df-0310-8fa8-9805f1628bb7> | 2005-12-06 22:59:30 +0000 |
commit | 082745e148e95e2b68fff56eef856551da2feeab (patch) | |
tree | f3016eb151c5da0b8ed7a8931c0a34c62b8ea239 /epan/dissectors/packet-x509af.c | |
parent | 51d19c5824ad9282a40104d379171a23517a4d5b (diff) |
Squelch some compiler const vs. non-const warnings.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@16710 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-x509af.c')
-rw-r--r-- | epan/dissectors/packet-x509af.c | 43 |
1 files changed, 27 insertions, 16 deletions
diff --git a/epan/dissectors/packet-x509af.c b/epan/dissectors/packet-x509af.c index f68a04f482..022c8f97a9 100644 --- a/epan/dissectors/packet-x509af.c +++ b/epan/dissectors/packet-x509af.c @@ -5,6 +5,7 @@ /* Input file: packet-x509af-template.c */ +#line 1 "packet-x509af-template.c" /* packet-x509af.c * Routines for X.509 Authentication Framework packet dissection * Ronnie Sahlberg 2004 @@ -57,7 +58,7 @@ static int hf_x509af_algorithm_id = -1; static int hf_x509af_extension_id = -1; /*--- Included file: packet-x509af-hf.c ---*/ - +#line 1 "packet-x509af-hf.c" static int hf_x509af_Certificate_PDU = -1; /* Certificate */ static int hf_x509af_CertificatePair_PDU = -1; /* CertificatePair */ static int hf_x509af_CertificateList_PDU = -1; /* CertificateList */ @@ -134,13 +135,13 @@ static int hf_x509af_q = -1; /* INTEGER */ static int hf_x509af_g = -1; /* INTEGER */ /*--- End of included file: packet-x509af-hf.c ---*/ - +#line 52 "packet-x509af-template.c" /* Initialize the subtree pointers */ static gint ett_pkix_crl = -1; /*--- Included file: packet-x509af-ett.c ---*/ - +#line 1 "packet-x509af-ett.c" static gint ett_x509af_Certificate = -1; static gint ett_x509af_T_signedCertificate = -1; static gint ett_x509af_SubjectName = -1; @@ -175,14 +176,14 @@ static gint ett_x509af_SET_OF_AttributeType = -1; static gint ett_x509af_DSS_Params = -1; /*--- End of included file: packet-x509af-ett.c ---*/ - +#line 56 "packet-x509af-template.c" static const char *algorithm_id; static const char *extension_id; /*--- Included file: packet-x509af-fn.c ---*/ - +#line 1 "packet-x509af-fn.c" /*--- Fields for imported types ---*/ static int dissect_issuer(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { @@ -262,7 +263,8 @@ static int dissect_serial(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, i static int dissect_x509af_T_algorithmId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { - char *name; +#line 74 "x509af.cnf" + const char *name; offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509af_algorithm_id, &algorithm_id); @@ -274,6 +276,7 @@ dissect_x509af_T_algorithmId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offse } + return offset; } static int dissect_algorithmId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { @@ -284,9 +287,11 @@ static int dissect_algorithmId(packet_info *pinfo, proto_tree *tree, tvbuff_t *t static int dissect_x509af_T_parameters(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { +#line 85 "x509af.cnf" offset=call_ber_oid_callback(algorithm_id, tvb, offset, pinfo, tree); + return offset; } static int dissect_parameters(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { @@ -420,6 +425,7 @@ static const ber_choice_t SubjectName_choice[] = { static int dissect_x509af_SubjectName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { +#line 112 "x509af.cnf" offset = dissect_ber_choice(pinfo, tree, tvb, offset, SubjectName_choice, hf_index, ett_x509af_SubjectName, @@ -429,6 +435,7 @@ dissect_x509af_SubjectName(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, proto_item_append_text(proto_item_get_parent(tree), " (%s)", x509if_get_last_dn()); + return offset; } static int dissect_subject(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { @@ -477,7 +484,8 @@ static int dissect_subjectPublicKeyInfo(packet_info *pinfo, proto_tree *tree, tv static int dissect_x509af_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { - char *name; +#line 91 "x509af.cnf" + const char *name; offset = dissect_ber_object_identifier_str(implicit_tag, pinfo, tree, tvb, offset, hf_x509af_extension_id, &extension_id); @@ -489,6 +497,7 @@ dissect_x509af_T_extnId(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, pa } + return offset; } static int dissect_extnId(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { @@ -511,6 +520,7 @@ static int dissect_critical(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, static int dissect_x509af_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, packet_info *pinfo _U_, proto_tree *tree, int hf_index _U_) { +#line 102 "x509af.cnf" gint8 class; gboolean pc, ind; gint32 tag; @@ -521,6 +531,7 @@ dissect_x509af_T_extnValue(gboolean implicit_tag _U_, tvbuff_t *tvb, int offset, offset=call_ber_oid_callback(extension_id, tvb, offset, pinfo, tree); + return offset; } static int dissect_extnValue(packet_info *pinfo, proto_tree *tree, tvbuff_t *tvb, int offset) { @@ -1079,7 +1090,7 @@ static void dissect_DSS_Params_PDU(tvbuff_t *tvb, packet_info *pinfo, proto_tree /*--- End of included file: packet-x509af-fn.c ---*/ - +#line 61 "packet-x509af-template.c" const char *x509af_get_last_algorithm_id(void) { return algorithm_id; @@ -1125,7 +1136,7 @@ void proto_register_x509af(void) { "Extension Id", HFILL }}, /*--- Included file: packet-x509af-hfarr.c ---*/ - +#line 1 "packet-x509af-hfarr.c" { &hf_x509af_Certificate_PDU, { "Certificate", "x509af.Certificate", FT_NONE, BASE_NONE, NULL, 0, @@ -1204,7 +1215,7 @@ void proto_register_x509af(void) { "SubjectName/rdnSequence", HFILL }}, { &hf_x509af_algorithmId, { "algorithmId", "x509af.algorithmId", - FT_STRING, BASE_NONE, NULL, 0, + FT_OID, BASE_NONE, NULL, 0, "AlgorithmIdentifier/algorithmId", HFILL }}, { &hf_x509af_parameters, { "parameters", "x509af.parameters", @@ -1240,7 +1251,7 @@ void proto_register_x509af(void) { "Extensions/_item", HFILL }}, { &hf_x509af_extnId, { "extnId", "x509af.extnId", - FT_STRING, BASE_NONE, NULL, 0, + FT_OID, BASE_NONE, NULL, 0, "Extension/extnId", HFILL }}, { &hf_x509af_critical, { "critical", "x509af.critical", @@ -1424,7 +1435,7 @@ void proto_register_x509af(void) { "DSS-Params/g", HFILL }}, /*--- End of included file: packet-x509af-hfarr.c ---*/ - +#line 105 "packet-x509af-template.c" }; /* List of subtrees */ @@ -1432,7 +1443,7 @@ void proto_register_x509af(void) { &ett_pkix_crl, /*--- Included file: packet-x509af-ettarr.c ---*/ - +#line 1 "packet-x509af-ettarr.c" &ett_x509af_Certificate, &ett_x509af_T_signedCertificate, &ett_x509af_SubjectName, @@ -1467,7 +1478,7 @@ void proto_register_x509af(void) { &ett_x509af_DSS_Params, /*--- End of included file: packet-x509af-ettarr.c ---*/ - +#line 111 "packet-x509af-template.c" }; /* Register protocol */ @@ -1489,7 +1500,7 @@ void proto_reg_handoff_x509af(void) { /*--- Included file: packet-x509af-dis-tab.c ---*/ - +#line 1 "packet-x509af-dis-tab.c" register_ber_oid_dissector("2.5.4.36", dissect_Certificate_PDU, proto_x509af, "id-at-userCertificate"); register_ber_oid_dissector("2.5.4.37", dissect_Certificate_PDU, proto_x509af, "id-at-cAcertificate"); register_ber_oid_dissector("2.5.4.38", dissect_CertificateList_PDU, proto_x509af, "id-at-authorityRevocationList"); @@ -1501,7 +1512,7 @@ void proto_reg_handoff_x509af(void) { /*--- End of included file: packet-x509af-dis-tab.c ---*/ - +#line 131 "packet-x509af-template.c" /*XXX these should really go to a better place but since that I have not that ITU standard, ill put it here for the time |