| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
manuf.h
1/* manuf.h
2 *
3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
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
13 extern "C" {
14#endif /* __cplusplus */
15
16#define MANUF_BLOCK_SIZE 5
17
21 struct ws_manuf {
22 uint8_t block[MANUF_BLOCK_SIZE];
23 uint8_t mask;
24 const char* short_name;
25 const char* long_name;
26};
27
33 struct ws_manuf_iter {
34 size_t idx24;
35 size_t idx28;
36 size_t idx36;
37 struct ws_manuf buf24;
38 struct ws_manuf buf28;
39 struct ws_manuf buf36;
40};
41
42 typedef struct ws_manuf_iter ws_manuf_iter_t;
43
51WS_DLL_PUBLIC
52 const char *
53ws_manuf_lookup_str(const uint8_t addr[6], const char **long_name_ptr);
54
63WS_DLL_PUBLIC
64 const char *
65ws_manuf_lookup(const uint8_t addr[6], const char **long_name_ptr, unsigned *mask_ptr);
66
77WS_DLL_PUBLIC
78 const char *
79ws_manuf_lookup_oui24(const uint8_t oui[3], const char **long_name_ptr);
80
86WS_DLL_PUBLIC
87 void
88ws_manuf_iter_init(ws_manuf_iter_t *iter);
89
97WS_DLL_PUBLIC
98 bool
99ws_manuf_iter_next(ws_manuf_iter_t *iter, struct ws_manuf *result);
100
109WS_DLL_PUBLIC
110 const char *
111ws_manuf_block_str(char *buf, size_t buf_size, const struct ws_manuf *ptr);
112
118WS_DLL_PUBLIC void
119ws_manuf_dump(FILE *fp);
120
129WS_DLL_PUBLIC
130 size_t
131ws_manuf_count(void);
132
133#ifdef __cplusplus
134}
135#endif /* __cplusplus */
ws_manuf_iter
Internal iterator state for traversing all manufacturer entries across the 24-, 28-,...
Definition manuf.h:33
ws_manuf_iter::idx36
size_t idx36
Definition manuf.h:36
ws_manuf_iter::idx24
size_t idx24
Definition manuf.h:34
ws_manuf_iter::buf24
struct ws_manuf buf24
Definition manuf.h:37
ws_manuf_iter::buf28
struct ws_manuf buf28
Definition manuf.h:38
ws_manuf_iter::buf36
struct ws_manuf buf36
Definition manuf.h:39
ws_manuf_iter::idx28
size_t idx28
Definition manuf.h:35
ws_manuf
Represents a single manufacturer entry mapping an OUI or MA block to a vendor name.
Definition manuf.h:21
ws_manuf::block
uint8_t block[5]
Definition manuf.h:22
ws_manuf::long_name
const char * long_name
Definition manuf.h:25
ws_manuf::mask
uint8_t mask
Definition manuf.h:23
ws_manuf::short_name
const char * short_name
Definition manuf.h:24