2 * Units to append to field values
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License
10 * as published by the Free Software Foundation; either version 2
11 * of the License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23 #ifndef __UNIT_STRINGS_H__
24 #define __UNIT_STRINGS_H__
26 #include "ws_symbol_export.h"
30 #endif /* __cplusplus */
33 * Units to append to field values
36 /* For BASE_UNIT_STRING, the display format for adding units */
37 typedef struct unit_name_string {
38 char *singular; /* name to use for 1 unit */
39 char *plural; /* name to use for < 1 or > 1 units */
42 WS_DLL_PUBLIC char* unit_name_string_get_value(guint32 value, unit_name_string* units);
43 WS_DLL_PUBLIC char* unit_name_string_get_value64(guint64 value, unit_name_string* units);
46 * A default set of unit strings that dissectors can use for
49 WS_DLL_PUBLIC const unit_name_string units_foot_feet;
50 WS_DLL_PUBLIC const unit_name_string units_bit_bits;
51 WS_DLL_PUBLIC const unit_name_string units_byte_bytes;
52 WS_DLL_PUBLIC const unit_name_string units_octet_octets;
53 WS_DLL_PUBLIC const unit_name_string units_word_words;
54 WS_DLL_PUBLIC const unit_name_string units_tick_ticks;
55 WS_DLL_PUBLIC const unit_name_string units_meters;
56 WS_DLL_PUBLIC const unit_name_string units_meter_meters;
57 WS_DLL_PUBLIC const unit_name_string units_hour_hours;
58 WS_DLL_PUBLIC const unit_name_string units_hours;
59 WS_DLL_PUBLIC const unit_name_string units_minute_minutes;
60 WS_DLL_PUBLIC const unit_name_string units_minutes;
61 WS_DLL_PUBLIC const unit_name_string units_second_seconds; // full unit name "second[s?]"
62 WS_DLL_PUBLIC const unit_name_string units_seconds; //only seconds abbreviation "s"
63 WS_DLL_PUBLIC const unit_name_string units_millisecond_milliseconds; // full unit name "millisecond[s?]"
64 WS_DLL_PUBLIC const unit_name_string units_milliseconds; //only seconds abbreviation "ms"
65 WS_DLL_PUBLIC const unit_name_string units_microsecond_microseconds; // full unit name "microsecond[s?]"
66 WS_DLL_PUBLIC const unit_name_string units_microseconds; //only seconds abbreviation "us"
67 WS_DLL_PUBLIC const unit_name_string units_nanosecond_nanoseconds; // full unit name "nanosecond[s?]"
68 WS_DLL_PUBLIC const unit_name_string units_nanoseconds; //only seconds abbreviation "ns"
69 WS_DLL_PUBLIC const unit_name_string units_nanometers;
70 WS_DLL_PUBLIC const unit_name_string units_degree_degrees;
71 WS_DLL_PUBLIC const unit_name_string units_decibels;
72 WS_DLL_PUBLIC const unit_name_string units_dbm;
73 WS_DLL_PUBLIC const unit_name_string units_dbi;
74 WS_DLL_PUBLIC const unit_name_string units_percent;
75 WS_DLL_PUBLIC const unit_name_string units_khz;
76 WS_DLL_PUBLIC const unit_name_string units_ghz;
77 WS_DLL_PUBLIC const unit_name_string units_mhz;
78 WS_DLL_PUBLIC const unit_name_string units_hz;
79 WS_DLL_PUBLIC const unit_name_string units_hz_s;
80 WS_DLL_PUBLIC const unit_name_string units_kbit;
81 WS_DLL_PUBLIC const unit_name_string units_kbps;
82 WS_DLL_PUBLIC const unit_name_string units_kibps;
83 WS_DLL_PUBLIC const unit_name_string units_kmh;
84 WS_DLL_PUBLIC const unit_name_string units_microwatts;
85 WS_DLL_PUBLIC const unit_name_string units_meter_sec;
86 WS_DLL_PUBLIC const unit_name_string units_meter_sec_squared;
87 WS_DLL_PUBLIC const unit_name_string units_bit_sec;
88 WS_DLL_PUBLIC const unit_name_string units_segment_remaining;
92 #endif /* __cplusplus */
94 #endif /* __UNIT_STRINGS_H__ */
102 * indent-tabs-mode: nil
105 * ex: set shiftwidth=4 tabstop=8 expandtab:
106 * :indentSize=4:tabSize=8:noTabs=true: