Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / dissectors / packet-ppi-geolocation-common.h
blob9aefc5b8a349be01f3f2740630c831239f2d6fe0
1 /* packet-ppi-geolocation-common.h
2 * Routines for PPI-GEOLOCATION dissection
3 * Copyright 2010, Harris Corp, jellch@harris.com
5 * Wireshark - Network traffic analyzer
6 * By Gerald Combs <gerald@wireshark.org>
7 * Copyright 1998 Gerald Combs
9 * SPDX-License-Identifier: GPL-2.0-or-later
12 #ifndef __PPI_GEOLOCATION_COMMON_H
13 #define __PPI_GEOLOCATION_COMMON_H
15 #include <inttypes.h>
18 * Declarations from shared PPI-GEOLOCATION functions.
23 * these constants are offsets into base_geotag header, which is bitwise-compatible
24 * with a radiotap header
26 #define PPI_GEOBASE_MIN_HEADER_LEN 8 /* minimum header length */
27 #define PPI_GEOBASE_VERSION_OFFSET 0 /* offset of version field */
28 #define PPI_GEOBASE_LENGTH_OFFSET 2 /* offset of length field */
29 #define PPI_GEOBASE_PRESENT_OFFSET 4 /* offset of "present" field */
31 * These BITNO macros were accquired from the radiotap parser. maybe we can share them
32 * eventually
34 #define BITNO_32(x) (((x) >> 16) ? 16 + BITNO_16((x) >> 16) : BITNO_16((x)))
35 #define BITNO_16(x) (((x) >> 8) ? 8 + BITNO_8((x) >> 8) : BITNO_8((x)))
36 #define BITNO_8(x) (((x) >> 4) ? 4 + BITNO_4((x) >> 4) : BITNO_4((x)))
37 #define BITNO_4(x) (((x) >> 2) ? 2 + BITNO_2((x) >> 2) : BITNO_2((x)))
38 #define BITNO_2(x) (((x) & 2) ? 1 : 0)
39 #define BIT(n) (1 << n)
44 * Floating point numbers are stored on disk in a handful of fixed-point formats (fixedX_Y)
45 * designed to preserve the appropriate amount of precision vs range. These functions convert
46 * the fixedX_Y fixed point values into 'native' doubles for displaying.
47 * Documentation on these formats can be found in the PPI-GEOLOCATION specification
49 double ppi_fixed3_7_to_double(uint32_t in);
50 double ppi_fixed3_6_to_double(uint32_t in);
51 double ppi_fixed6_4_to_double(uint32_t in);
53 * Some values are encoded as 32-bit unsigned nano-second counters.
54 * Usually we want to display these values as doubles.
56 double ppi_ns_counter_to_double(uint32_t in);
59 typedef enum {
60 PPI_GEOLOCATION_HARRIS = 0x00485253 /* 00SRH */
61 } ppi_geolocation_appstr_num;
64 #endif
67 * Editor modelines
69 * Local Variables:
70 * c-basic-offset: 4
71 * tab-width: 8
72 * indent-tabs-mode: nil
73 * End:
75 * ex: set shiftwidth=4 tabstop=8 expandtab:
76 * :indentSize=4:tabSize=8:noTabs=true: