Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / wsutil / application_flavor.c
blob5de907fe6c3b7df65d24c238caec9dc2641bbf35
1 /* application_flavor.c
2 * Application flavor routines
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
11 #include "config.h"
12 #define WS_LOG_DOMAIN LOG_DOMAIN_WSUTIL
14 #include "application_flavor.h"
16 static enum application_flavor_e application_flavor = APPLICATION_FLAVOR_WIRESHARK;
18 void set_application_flavor(enum application_flavor_e flavor)
20 application_flavor = flavor;
23 enum application_flavor_e get_application_flavor(void)
25 return application_flavor;
28 const char *application_flavor_name_proper(void) {
29 switch (get_application_flavor()) {
30 case APPLICATION_FLAVOR_WIRESHARK:
31 return "Wireshark";
32 case APPLICATION_FLAVOR_STRATOSHARK:
33 return "Stratoshark";
34 default:
35 ws_assert_not_reached();
39 const char *application_flavor_name_lower(void) {
40 switch (get_application_flavor()) {
41 case APPLICATION_FLAVOR_WIRESHARK:
42 return "wireshark";
43 case APPLICATION_FLAVOR_STRATOSHARK:
44 return "stratoshark";
45 default:
46 ws_assert_not_reached();
50 enum application_flavor_e application_name_to_flavor(const char *name)
52 if (g_ascii_strcasecmp(name, "stratoshark") == 0) {
53 return APPLICATION_FLAVOR_STRATOSHARK;
55 return APPLICATION_FLAVOR_WIRESHARK;
58 bool application_flavor_is_wireshark(void)
60 return get_application_flavor() == APPLICATION_FLAVOR_WIRESHARK;
63 bool application_flavor_is_stratoshark(void)
65 return get_application_flavor() == APPLICATION_FLAVOR_STRATOSHARK;
69 * Editor modelines
71 * Local Variables:
72 * c-basic-offset: 4
73 * tab-width: 8
74 * indent-tabs-mode: nil
75 * End:
77 * ex: set shiftwidth=4 tabstop=8 expandtab:
78 * :indentSize=4:tabSize=8:noTabs=true: