Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
manuf.h
1/* manuf.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <[email protected]>
5 * Copyright 1998 Gerald Combs
6 *
7 * SPDX-License-Identifier: GPL-2.0-or-later
8 */
9#pragma once
10#include <wireshark.h>
11
12#ifdef __cplusplus
13extern "C" {
14#endif /* __cplusplus */
15
16#define MANUF_BLOCK_SIZE 5
17
18struct ws_manuf {
19 uint8_t block[MANUF_BLOCK_SIZE];
20 uint8_t mask;
21 const char *short_name;
22 const char *long_name;
23};
24
25/* Internal structure, not supposed to be accessed by users. */
27 size_t idx24, idx28, idx36;
28 struct ws_manuf buf24;
29 struct ws_manuf buf28;
30 struct ws_manuf buf36;
31};
32
33typedef struct ws_manuf_iter ws_manuf_iter_t;
34
42WS_DLL_PUBLIC
43const char *
44ws_manuf_lookup_str(const uint8_t addr[6], const char **long_name_ptr);
45
54WS_DLL_PUBLIC
55const char *
56ws_manuf_lookup(const uint8_t addr[6], const char **long_name_ptr, unsigned *mask_ptr);
57
68WS_DLL_PUBLIC
69const char *
70ws_manuf_lookup_oui24(const uint8_t oui[3], const char **long_name_ptr);
71
77WS_DLL_PUBLIC
78void
79ws_manuf_iter_init(ws_manuf_iter_t *iter);
80
88WS_DLL_PUBLIC
89bool
90ws_manuf_iter_next(ws_manuf_iter_t *iter, struct ws_manuf *result);
91
100WS_DLL_PUBLIC
101const char *
102ws_manuf_block_str(char *buf, size_t buf_size, const struct ws_manuf *ptr);
103
109WS_DLL_PUBLIC void
110ws_manuf_dump(FILE *fp);
111
120WS_DLL_PUBLIC
121size_t
122ws_manuf_count(void);
123
124#ifdef __cplusplus
125}
126#endif /* __cplusplus */
Definition manuf.h:26
Definition manuf.h:18