Wireshark 4.7.2
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
keytab_krb5_ctx.h
1/* keytab_krb5_ctx.h
2 * Declare krb5_context structure used with keytab file.
3 * Copyright 2007, Anders Broman <[email protected]>
4 *
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <[email protected]>
7 * Copyright 1998 Gerald Combs
8 *
9 * SPDX-License-Identifier: GPL-2.0-or-later
10 */
11#pragma once
12
13#ifdef __cplusplus
14extern "C" {
15#endif /* __cplusplus */
16
17/*
18 * We declare this here, rather than in epan/read_keytab_file.h, so that
19 * callers of routines declared in epan/read_keytab_file.h that don't
20 * need this structure don't need to include krb5.h.
21 *
22 * Do *not* attempt to put this back in epan/read_keytab_file.h without
23 * adding an include of krb5.h in epan/read_keytab_file.h; there is *no*
24 * guarantee that the krb5_context is a typedef for struct _krb5_context;
25 * on NetBSD 10, it's a typedef for struct krb5_context_data, and that
26 * causes compilation errors. To tweak a line from Henry Spencer, "If you
27 * lie to the development environment, it will get its revenge."
28 */
29
30#ifdef HAVE_KERBEROS
31
32#if defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS)
33
34#include <krb5.h>
35
36extern krb5_context keytab_krb5_ctx;
37
38#endif /* defined(HAVE_HEIMDAL_KERBEROS) || defined(HAVE_MIT_KERBEROS) */
39
40#endif /* HAVE_KERBEROS */
41
42#ifdef __cplusplus
43}
44#endif /* __cplusplus */