3 * Wireshark - Network traffic analyzer
4 * By Gerald Combs <gerald@wireshark.org>
5 * Copyright 1998 Gerald Combs
7 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include <wireshark.h>
16 #endif /* __cplusplus */
18 #define MANUF_BLOCK_SIZE 5
21 uint8_t block
[MANUF_BLOCK_SIZE
];
23 const char *short_name
;
24 const char *long_name
;
27 /* Internal structure, not supposed to be accessed by users. */
28 struct ws_manuf_iter
{
29 size_t idx24
, idx28
, idx36
;
30 struct ws_manuf buf24
;
31 struct ws_manuf buf28
;
32 struct ws_manuf buf36
;
35 typedef struct ws_manuf_iter ws_manuf_iter_t
;
37 /* Returns the short name. Takes an optional pointer to return the long name. */
40 ws_manuf_lookup_str(const uint8_t addr
[6], const char **long_name_ptr
);
42 /* Returns the short name. Takes an optional pointer to return the long name.
43 * Takes an optional pointer to return the length of the mask. */
46 ws_manuf_lookup(const uint8_t addr
[6], const char **long_name_ptr
, unsigned *mask_ptr
);
48 /* Search only in the OUI/MA-L/CID tables for a 24-bit OUI. Returns the short
49 * name. Takes an optional pointer to return the long time. */
52 ws_manuf_lookup_oui24(const uint8_t oui
[3], const char **long_name_ptr
);
56 ws_manuf_iter_init(ws_manuf_iter_t
*iter
);
60 ws_manuf_iter_next(ws_manuf_iter_t
*iter
, struct ws_manuf
*result
);
64 ws_manuf_block_str(char *buf
, size_t buf_size
, const struct ws_manuf
*ptr
);
67 ws_manuf_dump(FILE *fp
);
75 #endif /* __cplusplus */