1 /* Do not modify this file. Changes will be overwritten. */
2 /* Generated automatically by the ASN.1 to Wireshark dissector compiler */
3 /* packet-kerberos.h */
4 /* asn2wrs.py -b -p kerberos -c ./kerberos.cnf -s ./packet-kerberos-template -D . -O ../.. KerberosV5Spec2.asn k5.asn RFC3244.asn RFC6113.asn */
6 /* Input file: packet-kerberos-template.h */
8 #line 1 "./asn1/kerberos/packet-kerberos-template.h"
10 * Routines for kerberos packet dissection
11 * Copyright 2007, Anders Broman <anders.broman@ericsson.com>
13 * Wireshark - Network traffic analyzer
14 * By Gerald Combs <gerald@wireshark.org>
15 * Copyright 1998 Gerald Combs
17 * This program is free software; you can redistribute it and/or
18 * modify it under the terms of the GNU General Public License
19 * as published by the Free Software Foundation; either version 2
20 * of the License, or (at your option) any later version.
22 * This program is distributed in the hope that it will be useful,
23 * but WITHOUT ANY WARRANTY; without even the implied warranty of
24 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 * GNU General Public License for more details.
27 * You should have received a copy of the GNU General Public License
28 * along with this program; if not, write to the Free Software
29 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
32 #ifndef __PACKET_KERBEROS_H
33 #define __PACKET_KERBEROS_H
35 #include "ws_symbol_export.h"
39 #endif /* __cplusplus */
41 /* This is a list of callback functions a caller can use to specify that
42 octet strings in kerberos to be passed back to application specific
43 dissectors, outside of kerberos.
44 This is used for dissection of application specific data for PacketCable
45 KRB_SAFE user data and eventually to pass kerberos session keys
46 to future DCERPC decryption and other uses.
47 The list is terminated by {0, NULL }
49 #define KRB_CBTAG_SAFE_USER_DATA 1
50 #define KRB_CBTAG_PRIV_USER_DATA 2
51 typedef struct _kerberos_callbacks {
53 int (*callback)(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree);
56 /* Function prototypes */
59 dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, gboolean do_col_info, kerberos_callbacks *cb);
62 dissect_krb5_Checksum(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
65 dissect_krb5_ctime(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
67 int dissect_krb5_cname(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
68 int dissect_krb5_realm(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
69 guint32 kerberos_output_keytype(void);
71 guint get_krb_pdu_len(packet_info *, tvbuff_t *tvb, int offset, void *data _U_);
73 gint kerberos_rm_to_reclen(guint krb_rm);
76 show_krb_recordmark(proto_tree *tree, tvbuff_t *tvb, gint start, guint32 krb_rm);
79 #define KRB_MAX_ORIG_LEN 256
81 #if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS)
82 typedef struct _enc_key_t {
83 struct _enc_key_t *next;
87 char key_origin[KRB_MAX_ORIG_LEN+1];
88 int fd_num; /* remember where we learned a key */
90 extern enc_key_t *enc_key_list;
93 decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
99 #endif /* HAVE_HEIMDAL_KERBEROS || HAVE_MIT_KERBEROS */
101 extern gboolean krb_decrypt;
103 #endif /* HAVE_KERBEROS */
106 /*--- Included file: packet-kerberos-exp.h ---*/
107 #line 1 "./asn1/kerberos/packet-kerberos-exp.h"
109 /* enumerated values for Applications */
110 #define KERBEROS_APPLICATIONS_TICKET 1
111 #define KERBEROS_APPLICATIONS_AUTHENTICATOR 2
112 #define KERBEROS_APPLICATIONS_ENCTICKETPART 3
113 #define KERBEROS_APPLICATIONS_AS_REQ 10
114 #define KERBEROS_APPLICATIONS_AS_REP 11
115 #define KERBEROS_APPLICATIONS_TGS_REQ 12
116 #define KERBEROS_APPLICATIONS_TGS_REP 13
117 #define KERBEROS_APPLICATIONS_AP_REQ 14
118 #define KERBEROS_APPLICATIONS_AP_REP 15
119 #define KERBEROS_APPLICATIONS_KRB_SAFE 20
120 #define KERBEROS_APPLICATIONS_KRB_PRIV 21
121 #define KERBEROS_APPLICATIONS_KRB_CRED 22
122 #define KERBEROS_APPLICATIONS_ENCASREPPART 25
123 #define KERBEROS_APPLICATIONS_ENCTGSREPPART 26
124 #define KERBEROS_APPLICATIONS_ENCAPREPPART 27
125 #define KERBEROS_APPLICATIONS_ENCKRBPRIVPART 28
126 #define KERBEROS_APPLICATIONS_ENCKRBCREDPART 29
127 #define KERBEROS_APPLICATIONS_KRB_ERROR 30
128 int dissect_kerberos_ChangePasswdData(gboolean implicit_tag _U_, tvbuff_t *tvb _U_, int offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
130 /*--- End of included file: packet-kerberos-exp.h ---*/
131 #line 98 "./asn1/kerberos/packet-kerberos-template.h"
135 #endif /* __cplusplus */
137 #endif /* __PACKET_KERBEROS_H */