Wireshark
4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
epan
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
#ifndef __MANUF_H__
10
#define __MANUF_H__
11
12
#include <wireshark.h>
13
14
#ifdef __cplusplus
15
extern
"C"
{
16
#endif
/* __cplusplus */
17
18
#define MANUF_BLOCK_SIZE 5
19
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;
25
};
26
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;
33
};
34
35
typedef
struct
ws_manuf_iter
ws_manuf_iter_t
;
36
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);
41
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);
47
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);
53
54
WS_DLL_PUBLIC
55
void
56
ws_manuf_iter_init(
ws_manuf_iter_t
*iter);
57
58
WS_DLL_PUBLIC
59
bool
60
ws_manuf_iter_next(
ws_manuf_iter_t
*iter,
struct
ws_manuf
*result);
61
62
WS_DLL_PUBLIC
63
const
char
*
64
ws_manuf_block_str(
char
*buf,
size_t
buf_size,
const
struct
ws_manuf
*ptr);
65
66
WS_DLL_PUBLIC
void
67
ws_manuf_dump(FILE *fp);
68
69
WS_DLL_PUBLIC
70
size_t
71
ws_manuf_count(
void
);
72
73
#ifdef __cplusplus
74
}
75
#endif
/* __cplusplus */
76
77
#endif
ws_manuf_iter
Definition
manuf.h:28
ws_manuf
Definition
manuf.h:20
Generated by
1.9.8