Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
unit_strings.h
Go to the documentation of this file.
1/* unit_strings.h
2 * Units to append to field values
3 *
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <[email protected]>
6 * Copyright 1998 Gerald Combs
7 *
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
10
11#ifndef __UNIT_STRINGS_H__
12#define __UNIT_STRINGS_H__
13
14#include <stdint.h>
15#include "ws_symbol_export.h"
16
17#ifdef __cplusplus
18extern "C" {
19#endif /* __cplusplus */
20
30
38WS_DLL_PUBLIC const char* unit_name_string_get_value(uint32_t value, const unit_name_string* units);
39
47WS_DLL_PUBLIC const char* unit_name_string_get_value64(uint64_t value, const unit_name_string* units);
48
56WS_DLL_PUBLIC const char* unit_name_string_get_double(double value, const unit_name_string* units);
57
58/*
59 * A default set of unit strings that dissectors can use for
60 * header fields.
61 */
62WS_DLL_PUBLIC const unit_name_string units_foot_feet;
63WS_DLL_PUBLIC const unit_name_string units_bit_bits;
64WS_DLL_PUBLIC const unit_name_string units_byte_bytes;
65WS_DLL_PUBLIC const unit_name_string units_byte_bytespsecond;
66WS_DLL_PUBLIC const unit_name_string units_octet_octets;
67WS_DLL_PUBLIC const unit_name_string units_word_words;
68WS_DLL_PUBLIC const unit_name_string units_tick_ticks;
69WS_DLL_PUBLIC const unit_name_string units_meters;
70WS_DLL_PUBLIC const unit_name_string units_meter_meters;
71WS_DLL_PUBLIC const unit_name_string units_centimeters;
72WS_DLL_PUBLIC const unit_name_string units_centimeter_centimeters;
73WS_DLL_PUBLIC const unit_name_string units_millimeters;
74WS_DLL_PUBLIC const unit_name_string units_millimeter_millimeters;
75WS_DLL_PUBLIC const unit_name_string units_week_weeks;
76WS_DLL_PUBLIC const unit_name_string units_day_days;
77WS_DLL_PUBLIC const unit_name_string units_hour_hours;
78WS_DLL_PUBLIC const unit_name_string units_hours;
79WS_DLL_PUBLIC const unit_name_string units_minute_minutes;
80WS_DLL_PUBLIC const unit_name_string units_minutes;
81WS_DLL_PUBLIC const unit_name_string units_second_seconds; // full unit name "second[s?]"
82WS_DLL_PUBLIC const unit_name_string units_seconds; //only seconds abbreviation "s"
83WS_DLL_PUBLIC const unit_name_string units_millisecond_milliseconds; // full unit name "millisecond[s?]"
84WS_DLL_PUBLIC const unit_name_string units_milliseconds; //only seconds abbreviation "ms"
85WS_DLL_PUBLIC const unit_name_string units_microsecond_microseconds; // full unit name "microsecond[s?]"
86WS_DLL_PUBLIC const unit_name_string units_microseconds; //only seconds abbreviation "us"
87WS_DLL_PUBLIC const unit_name_string units_nanosecond_nanoseconds; // full unit name "nanosecond[s?]"
88WS_DLL_PUBLIC const unit_name_string units_nanoseconds; //only seconds abbreviation "ns"
89WS_DLL_PUBLIC const unit_name_string units_nanometers;
90WS_DLL_PUBLIC const unit_name_string units_degree_degrees;
91WS_DLL_PUBLIC const unit_name_string units_degree_celsius;
92WS_DLL_PUBLIC const unit_name_string units_degree_bearing;
93WS_DLL_PUBLIC const unit_name_string units_centibels;
94WS_DLL_PUBLIC const unit_name_string units_decibels;
95WS_DLL_PUBLIC const unit_name_string units_dbm;
96WS_DLL_PUBLIC const unit_name_string units_dbi;
97WS_DLL_PUBLIC const unit_name_string units_dbhz;
98WS_DLL_PUBLIC const unit_name_string units_mbm;
99WS_DLL_PUBLIC const unit_name_string units_percent;
100WS_DLL_PUBLIC const unit_name_string units_khz;
101WS_DLL_PUBLIC const unit_name_string units_ghz;
102WS_DLL_PUBLIC const unit_name_string units_mhz;
103WS_DLL_PUBLIC const unit_name_string units_hz;
104WS_DLL_PUBLIC const unit_name_string units_hz_s;
105WS_DLL_PUBLIC const unit_name_string units_kbit;
106WS_DLL_PUBLIC const unit_name_string units_kbps;
107WS_DLL_PUBLIC const unit_name_string units_kibps;
108WS_DLL_PUBLIC const unit_name_string units_pkts;
109WS_DLL_PUBLIC const unit_name_string units_pkts_per_sec;
110WS_DLL_PUBLIC const unit_name_string units_km;
111WS_DLL_PUBLIC const unit_name_string units_kmh;
112WS_DLL_PUBLIC const unit_name_string units_m_s;
113WS_DLL_PUBLIC const unit_name_string units_cm_s;
114WS_DLL_PUBLIC const unit_name_string units_mm_s;
115WS_DLL_PUBLIC const unit_name_string units_milliamps;
116WS_DLL_PUBLIC const unit_name_string units_watt;
117WS_DLL_PUBLIC const unit_name_string units_milliwatt;
118WS_DLL_PUBLIC const unit_name_string units_microwatt;
119WS_DLL_PUBLIC const unit_name_string units_volt;
120WS_DLL_PUBLIC const unit_name_string units_grams_per_second;
121WS_DLL_PUBLIC const unit_name_string units_meter_sec;
122WS_DLL_PUBLIC const unit_name_string units_meter_sec_squared;
123WS_DLL_PUBLIC const unit_name_string units_bit_sec;
124WS_DLL_PUBLIC const unit_name_string units_segment_remaining;
125WS_DLL_PUBLIC const unit_name_string units_frame_frames;
126WS_DLL_PUBLIC const unit_name_string units_revolutions_per_minute;
127WS_DLL_PUBLIC const unit_name_string units_pascal;
128WS_DLL_PUBLIC const unit_name_string units_kilopascal;
129WS_DLL_PUBLIC const unit_name_string units_newton_metre;
130WS_DLL_PUBLIC const unit_name_string units_liter_per_hour;
131WS_DLL_PUBLIC const unit_name_string units_amp;
132WS_DLL_PUBLIC const unit_name_string units_watthour;
133WS_DLL_PUBLIC const unit_name_string units_bpm;
134WS_DLL_PUBLIC const unit_name_string units_calorie;
135WS_DLL_PUBLIC const unit_name_string units_cycle_cycles;
136WS_DLL_PUBLIC const unit_name_string units_ppm;
137
138#ifdef __cplusplus
139}
140#endif /* __cplusplus */
141
142#endif /* __UNIT_STRINGS_H__ */
143
144/*
145 * Editor modelines
146 *
147 * Local Variables:
148 * c-basic-offset: 4
149 * tab-width: 8
150 * indent-tabs-mode: nil
151 * End:
152 *
153 * ex: set shiftwidth=4 tabstop=8 expandtab:
154 * :indentSize=4:tabSize=8:noTabs=true:
155 */
Definition unit_strings.h:26
char * singular
Definition unit_strings.h:27
char * plural
Definition unit_strings.h:28
WS_DLL_PUBLIC const char * unit_name_string_get_double(double value, const unit_name_string *units)
Definition unit_strings.c:36
WS_DLL_PUBLIC const char * unit_name_string_get_value(uint32_t value, const unit_name_string *units)
Definition unit_strings.c:18
WS_DLL_PUBLIC const char * unit_name_string_get_value64(uint64_t value, const unit_name_string *units)
Definition unit_strings.c:27