Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / epan / manuf.h
blobce3cc0fd76357568bd1da230e25f800a07a2934c
1 /* manuf.h
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
8 */
9 #ifndef __MANUF_H__
10 #define __MANUF_H__
12 #include <wireshark.h>
14 #ifdef __cplusplus
15 extern "C" {
16 #endif /* __cplusplus */
18 #define MANUF_BLOCK_SIZE 5
20 struct ws_manuf {
21 uint8_t block[MANUF_BLOCK_SIZE];
22 uint8_t mask;
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. */
38 WS_DLL_PUBLIC
39 const char *
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. */
44 WS_DLL_PUBLIC
45 const char *
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. */
50 WS_DLL_PUBLIC
51 const char *
52 ws_manuf_lookup_oui24(const uint8_t oui[3], const char **long_name_ptr);
54 WS_DLL_PUBLIC
55 void
56 ws_manuf_iter_init(ws_manuf_iter_t *iter);
58 WS_DLL_PUBLIC
59 bool
60 ws_manuf_iter_next(ws_manuf_iter_t *iter, struct ws_manuf *result);
62 WS_DLL_PUBLIC
63 const char *
64 ws_manuf_block_str(char *buf, size_t buf_size, const struct ws_manuf *ptr);
66 WS_DLL_PUBLIC void
67 ws_manuf_dump(FILE *fp);
69 WS_DLL_PUBLIC
70 size_t
71 ws_manuf_count(void);
73 #ifdef __cplusplus
75 #endif /* __cplusplus */
77 #endif