wireshark/epan/tfs.h

149 lines
6.6 KiB
C
Raw Normal View History

/* tfs.h
* true_false strings
* Copyright 2007, Jaap Keuter <jaap.keuter@xs4all.nl>
*
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#ifndef __TFS_H__
#define __TFS_H__
#include <glib.h>
#include "ws_symbol_export.h"
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/** @file
* true_false strings
*/
/** Struct for boolean representation */
typedef struct true_false_string {
const char *true_string; /**< The string presented when true */
const char *false_string; /**< The string presented when false */
} true_false_string;
/** Returns the string representing the true or false value.
*
* From the given true_false_string return the appropriate string pointer
* @param[in] value The boolean value for which the string representation is sought
* @param[in] tfs The true_false_string containing the relevant strings
* @return Pointer to the appropriate string
*/
WS_DLL_PUBLIC const char *tfs_get_string(gboolean value, const true_false_string *tfs);
/*
* A default set of true/false strings that dissectors can use for
* FT_BOOLEAN header fields.
*/
WS_DLL_PUBLIC const true_false_string tfs_true_false;
WS_DLL_PUBLIC const true_false_string tfs_yes_no;
WS_DLL_PUBLIC const true_false_string tfs_no_yes;
WS_DLL_PUBLIC const true_false_string tfs_set_notset;
WS_DLL_PUBLIC const true_false_string tfs_enabled_disabled;
WS_DLL_PUBLIC const true_false_string tfs_disabled_enabled;
WS_DLL_PUBLIC const true_false_string tfs_ok_error;
WS_DLL_PUBLIC const true_false_string tfs_error_ok;
WS_DLL_PUBLIC const true_false_string tfs_success_fail;
WS_DLL_PUBLIC const true_false_string tfs_fail_success;
WS_DLL_PUBLIC const true_false_string tfs_on_off;
WS_DLL_PUBLIC const true_false_string tfs_ack_nack;
WS_DLL_PUBLIC const true_false_string tfs_odd_even;
WS_DLL_PUBLIC const true_false_string tfs_allow_block;
WS_DLL_PUBLIC const true_false_string tfs_restricted_allowed;
WS_DLL_PUBLIC const true_false_string tfs_restricted_not_restricted;
WS_DLL_PUBLIC const true_false_string tfs_accept_reject;
WS_DLL_PUBLIC const true_false_string tfs_more_nomore;
WS_DLL_PUBLIC const true_false_string tfs_present_absent;
WS_DLL_PUBLIC const true_false_string tfs_present_not_present;
WS_DLL_PUBLIC const true_false_string tfs_active_inactive;
WS_DLL_PUBLIC const true_false_string tfs_activated_deactivated;
WS_DLL_PUBLIC const true_false_string tfs_found_not_found;
WS_DLL_PUBLIC const true_false_string tfs_command_response;
WS_DLL_PUBLIC const true_false_string tfs_response_command;
WS_DLL_PUBLIC const true_false_string tfs_capable_not_capable;
WS_DLL_PUBLIC const true_false_string tfs_supported_not_supported;
WS_DLL_PUBLIC const true_false_string tfs_not_supported_supported;
WS_DLL_PUBLIC const true_false_string tfs_used_notused;
WS_DLL_PUBLIC const true_false_string tfs_high_low;
WS_DLL_PUBLIC const true_false_string tfs_high_normal;
WS_DLL_PUBLIC const true_false_string tfs_low_normal;
WS_DLL_PUBLIC const true_false_string tfs_pressed_not_pressed;
WS_DLL_PUBLIC const true_false_string tfs_implemented_not_implemented;
WS_DLL_PUBLIC const true_false_string tfs_requested_not_requested;
WS_DLL_PUBLIC const true_false_string tfs_reliable_not_reliable;
WS_DLL_PUBLIC const true_false_string tfs_allowed_not_allowed;
WS_DLL_PUBLIC const true_false_string tfs_not_allowed_allowed;
WS_DLL_PUBLIC const true_false_string tfs_accepted_not_accepted;
WS_DLL_PUBLIC const true_false_string tfs_detected_not_detected;
WS_DLL_PUBLIC const true_false_string tfs_available_not_available;
WS_DLL_PUBLIC const true_false_string tfs_shared_independent;
WS_DLL_PUBLIC const true_false_string tfs_valid_invalid;
WS_DLL_PUBLIC const true_false_string tfs_invalid_valid;
WS_DLL_PUBLIC const true_false_string tfs_group_unique_name;
WS_DLL_PUBLIC const true_false_string tfs_inuse_not_inuse;
WS_DLL_PUBLIC const true_false_string tfs_critical_not_critical;
WS_DLL_PUBLIC const true_false_string tfs_complete_incomplete;
WS_DLL_PUBLIC const true_false_string tfs_valid_not_valid;
WS_DLL_PUBLIC const true_false_string tfs_do_not_clear_clear;
WS_DLL_PUBLIC const true_false_string tfs_confirmed_unconfirmed;
WS_DLL_PUBLIC const true_false_string tfs_enforced_not_enforced;
WS_DLL_PUBLIC const true_false_string tfs_possible_not_possible;
WS_DLL_PUBLIC const true_false_string tfs_required_not_required;
WS_DLL_PUBLIC const true_false_string tfs_registered_not_registered;
WS_DLL_PUBLIC const true_false_string tfs_provisioned_not_provisioned;
WS_DLL_PUBLIC const true_false_string tfs_included_not_included;
WS_DLL_PUBLIC const true_false_string tfs_allocated_by_receiver_sender;
WS_DLL_PUBLIC const true_false_string tfs_asynchronous_synchronous;
WS_DLL_PUBLIC const true_false_string tfs_protocol_sensative_bit_transparent;
WS_DLL_PUBLIC const true_false_string tfs_full_half;
Fixed bug in ZigBee (zbee) decryption, added Key Establishment cluster and moved IAS, Thermostat and Poll clusters out of the ZCL foundation dissector. Removed attrID and cmdID ZCL cluster functions. Bug in ZCL HVAC attribute registration. Fixed bug in ZCL command ID field registration. Update Manufacturer Codes and Profile Ids to ZigBee-053874r26 Oct 2014 Fixed broken fragmented ZigBee packet collection and reassembly Use protocol fields for Thermostat schedule transitions. Added support for Key Establishment Cluster (CBKE) at SE 1.2a Updated Message cluster to SE 1.2a spec Added attribute reporting status which is common to all SE 1.2a clusters Added SE 1.2a tunnel cluster support ZigBee Smart Energy (SE) decryption appears to have been broken for some time. For SE you do not know the Link Key until after successful completion of Key Establishment and then manually enter it into preferences. Entry in preferences was broken such that when the new Link Key was entered all existing link keys would be lost. This lead to the loss of the Network Key as well when the Transport Key message was re-processed without the Pre-Configured Link Key. The Link Key 'key ring' has been moved to the UAT post-update callback so that it will always be updated correctly after changes to the link keys in preferences The attribute reporting status attribute which is common to all SE clusters was accidentally shared, now each cluster has it's own instance ZigBee security added key display for decrypted packets ZigBee Security Preferences fixed UAT type for Label so key label is editable again Added definition for Retail Service profile Added dissection for profile-wide (General Command Frame) commands when the profile is unknown Added zbee-zcl-misc.c to precommit check whitelist as it contains ias and hvac clusters avoiding proliferation of too many small files Change-Id: I53d85ba9d782db6a0e7e78c51b0bc7cdcdbca3ad Reviewed-on: https://code.wireshark.org/review/5565 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-11-07 22:11:02 +00:00
WS_DLL_PUBLIC const true_false_string tfs_acknowledged_not_acknowledged;
WS_DLL_PUBLIC const true_false_string tfs_segmentation_no_segmentation;
WS_DLL_PUBLIC const true_false_string tfs_response_request;
WS_DLL_PUBLIC const true_false_string tfs_defined_not_defined;
WS_DLL_PUBLIC const true_false_string tfs_constructed_primitive;
WS_DLL_PUBLIC const true_false_string tfs_client_server;
WS_DLL_PUBLIC const true_false_string tfs_server_client;
WS_DLL_PUBLIC const true_false_string tfs_preferred_no_preference;
WS_DLL_PUBLIC const true_false_string tfs_encrypt_do_not_encrypt;
WS_DLL_PUBLIC const true_false_string tfs_down_up;
WS_DLL_PUBLIC const true_false_string tfs_up_down;
WS_DLL_PUBLIC const true_false_string tfs_downlink_uplink;
WS_DLL_PUBLIC const true_false_string tfs_uplink_downlink;
WS_DLL_PUBLIC const true_false_string tfs_s2c_c2s;
WS_DLL_PUBLIC const true_false_string tfs_c2s_s2c;
WS_DLL_PUBLIC const true_false_string tfs_open_closed;
WS_DLL_PUBLIC const true_false_string tfs_external_internal;
WS_DLL_PUBLIC const true_false_string tfs_changed_not_changed;
WS_DLL_PUBLIC const true_false_string tfs_needed_not_needed;
WS_DLL_PUBLIC const true_false_string tfs_selected_not_selected;
WS_DLL_PUBLIC const true_false_string tfs_add_drop;
TFS: Add some commonly-defined string pairs to tfs.c 'check_tfs.py --common' can look for tfs values that appear multiple times. Current output prior to these dssector changes was: ('No Extension', 'Extension') appears 3 times in: ['epan/dissectors/packet-bssap.c', 'epan/dissectors/packet-camel.c', 'epan/dissectors/packet-gsm_map.c'] ('Optimised for signalling traffic', 'Not optimised for signalling traffic') appears 3 times in: ['epan/dissectors/packet-gsm_a_gm.c', 'epan/dissectors/packet-gsm_map.c', 'epan/dissectors/packet-gtp.c'] ('Data PDU', 'Control PDU') appears 3 times in: ['epan/dissectors/packet-pdcp-lte.c', 'epan/dissectors/packet-pdcp-nr.c', 'epan/dissectors/packet-rlc-nr.c'] ('Message sent to originating side', 'Message sent from originating side') appears 3 times in: ['epan/dissectors/packet-q2931.c', 'epan/dissectors/packet-q931.c', 'epan/dissectors/packet-q933.c'] ('User', 'Provider') appears 3 times in: ['epan/dissectors/packet-q2931.c', 'epan/dissectors/packet-q931.c', 'epan/dissectors/packet-q933.c'] The first and last ones were made common, the others seem a little too specialised. Checking some of the existing items in tfs.c (using QtCreator's 'Find Usages'), some of the common items are used a lot, but many of them are not referenced. Change-Id: Ia4006d2c4fa7cafbc3b004dc7a367a986dbeb0c4 Reviewed-on: https://code.wireshark.org/review/38177 Petri-Dish: Martin Mathieson <martin.r.mathieson@googlemail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2020-08-16 20:41:18 +00:00
WS_DLL_PUBLIC const true_false_string tfs_no_extension_extension;
WS_DLL_PUBLIC const true_false_string tfs_user_provider;
2020-12-17 08:59:52 +00:00
WS_DLL_PUBLIC const true_false_string tfs_applicable_not_applicable;
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* __TFS_H__ */
/*
* Editor modelines - https://www.wireshark.org/tools/modelines.html
*
* Local variables:
* c-basic-offset: 4
* tab-width: 8
* indent-tabs-mode: nil
* End:
*
* vi: set shiftwidth=4 tabstop=8 expandtab:
* :indentSize=4:tabSize=8:noTabs=true:
*/