| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
packet-kerberos.h
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 -q -L -p kerberos -c ./kerberos.cnf -s ./packet-kerberos-template -D . -O ../.. KerberosV5Spec2.asn k5.asn RFC3244.asn RFC6113.asn SPAKE.asn */
5
6/* packet-kerberos.h
7 * Routines for kerberos packet dissection
8 * Copyright 2007, Anders Broman <anders.broman@ericsson.com>
9 *
10 * Wireshark - Network traffic analyzer
11 * By Gerald Combs <gerald@wireshark.org>
12 * Copyright 1998 Gerald Combs
13 *
14 * SPDX-License-Identifier: GPL-2.0-or-later
15 */
16
17#ifndef __PACKET_KERBEROS_H
18#define __PACKET_KERBEROS_H
19
20#include "ws_symbol_export.h"
21
22#ifdef __cplusplus
23 extern "C" {
24#endif /* __cplusplus */
25
26#include <epan/asn1.h>
27
28
29/* enumerated values for Applications */
30#define KERBEROS_APPLICATIONS_TICKET 1
31#define KERBEROS_APPLICATIONS_AUTHENTICATOR 2
32#define KERBEROS_APPLICATIONS_ENCTICKETPART 3
33#define KERBEROS_APPLICATIONS_AS_REQ 10
34#define KERBEROS_APPLICATIONS_AS_REP 11
35#define KERBEROS_APPLICATIONS_TGS_REQ 12
36#define KERBEROS_APPLICATIONS_TGS_REP 13
37#define KERBEROS_APPLICATIONS_AP_REQ 14
38#define KERBEROS_APPLICATIONS_AP_REP 15
39#define KERBEROS_APPLICATIONS_KRB_SAFE 20
40#define KERBEROS_APPLICATIONS_KRB_PRIV 21
41#define KERBEROS_APPLICATIONS_KRB_CRED 22
42#define KERBEROS_APPLICATIONS_ENCASREPPART 25
43#define KERBEROS_APPLICATIONS_ENCTGSREPPART 26
44#define KERBEROS_APPLICATIONS_ENCAPREPPART 27
45#define KERBEROS_APPLICATIONS_ENCKRBPRIVPART 28
46#define KERBEROS_APPLICATIONS_ENCKRBCREDPART 29
47#define KERBEROS_APPLICATIONS_KRB_ERROR 30
48 unsigned dissect_kerberos_TGT_REQ(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
49 unsigned dissect_kerberos_TGT_REP(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
50 unsigned dissect_kerberos_ChangePasswdData(bool implicit_tag _U_, tvbuff_t *tvb _U_, unsigned offset _U_, asn1_ctx_t *actx _U_, proto_tree *tree _U_, int hf_index _U_);
51
52#ifndef KRB5_KU_USAGE_ACCEPTOR_SEAL
53#define KRB5_KU_USAGE_ACCEPTOR_SEAL 22
54#endif
55#ifndef KRB5_KU_USAGE_ACCEPTOR_SIGN
56#define KRB5_KU_USAGE_ACCEPTOR_SIGN 23
57#endif
58#ifndef KRB5_KU_USAGE_INITIATOR_SEAL
59#define KRB5_KU_USAGE_INITIATOR_SEAL 24
60#endif
61#ifndef KRB5_KU_USAGE_INITIATOR_SIGN
62#define KRB5_KU_USAGE_INITIATOR_SIGN 25
63#endif
64
65/* This is a list of callback functions a caller can use to specify that
66 octet strings in kerberos to be passed back to application specific
67 dissectors, outside of kerberos.
68 This is used for dissection of application specific data for PacketCable
69 KRB_SAFE user data and eventually to pass kerberos session keys
70 to future DCERPC decryption and other uses.
71 The list is terminated by {0, NULL }
72*/
73#define KRB_CBTAG_SAFE_USER_DATA 1
74#define KRB_CBTAG_PRIV_USER_DATA 2
75 typedef struct _kerberos_callbacks {
76 int tag;
77 int (*callback)(packet_info *pinfo, tvbuff_t *tvb, proto_tree *tree);
78} kerberos_callbacks;
79
80/* Function prototypes */
81
82 bool
83kerberos_is_win2k_pkinit(asn1_ctx_t *actx);
84
85 int
86dissect_kerberos_main(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, bool do_col_info, kerberos_callbacks *cb);
87
88 int
89dissect_krb5_Checksum(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
90
91 int
92dissect_krb5_ctime(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
93
94 int dissect_krb5_cname(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
95 int dissect_krb5_realm(proto_tree *tree, tvbuff_t *tvb, int offset, asn1_ctx_t *actx _U_);
96uint32_t kerberos_output_keytype(void);
97
98 unsigned get_krb_pdu_len(packet_info *, tvbuff_t *tvb, int offset, void *data _U_);
99
100 int kerberos_rm_to_reclen(unsigned krb_rm);
101
102 void
103show_krb_recordmark(proto_tree *tree, tvbuff_t *tvb, int start, uint32_t krb_rm);
104
105 int
106dissect_kerberos_KERB_TICKET_LOGON(tvbuff_t *tvb, int offset, asn1_ctx_t *actx, proto_tree *tree);
107
108#ifdef HAVE_KERBEROS
109
110#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS)
111
112uint8_t *
113decrypt_krb5_data(proto_tree *tree, packet_info *pinfo,
114 int usage,
115 tvbuff_t *crypototvb,
116 int keytype,
117 int *datalen);
118
119 tvbuff_t *
120decrypt_krb5_krb_cfx_dce(proto_tree *tree,
121 packet_info *pinfo,
122 int usage,
123 int keytype,
124 tvbuff_t *gssapi_header_tvb,
125 tvbuff_t *gssapi_encrypted_tvb,
126 tvbuff_t *gssapi_trailer_tvb,
127 tvbuff_t *checksum_tvb);
128
129#endif /* HAVE_HEIMDAL_KERBEROS || HAVE_MIT_KERBEROS */
130
131 extern bool krb_decrypt;
132
133WS_DLL_PUBLIC
134 void read_keytab_file_from_preferences(void);
135
136#endif /* HAVE_KERBEROS */
137
138#ifdef __cplusplus
139}
140#endif /* __cplusplus */
141
142#endif /* __PACKET_KERBEROS_H */
asn1.h
_asn1_ctx_t
Definition asn1.h:66
_kerberos_callbacks
Definition packet-kerberos.h:75
_packet_info
Definition packet_info.h:43
_proto_node
Definition proto.h:905
tvbuff
Definition tvbuff-int.h:36