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