Wireshark 4.5.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
randpkt_core.h
Go to the documentation of this file.
1
13#ifndef __RANDPKT_CORE_H__
14#define __RANDPKT_CORE_H__
15
16#include <glib.h>
17#include "wiretap/wtap.h"
18
19typedef struct {
20 const char* abbrev;
21 const char* longname;
22 int produceable_type;
23 int sample_wtap_encap;
24 uint8_t* sample_buffer;
25 int sample_length;
26 uint8_t* pseudo_buffer;
27 unsigned pseudo_length;
28 wtap_dumper* dump;
29 const char* filename;
30 unsigned produce_max_bytes;
31
33
34/* Return the number of active examples */
35unsigned randpkt_example_count(void);
36
37/* Return the list of the active examples */
38void randpkt_example_list(char*** abbrev_list, char*** longname_list);
39
40/* Parse command-line option "type" and return enum type */
41int randpkt_parse_type(char *string);
42
43/* Find pkt_example record and return pointer to it */
44randpkt_example* randpkt_find_example(int type);
45
46/* Init a new example */
47int randpkt_example_init(randpkt_example* example, char* produce_filename, int produce_max_bytes, int file_type_subtype);
48
49/* Loop the packet generation */
50void randpkt_loop(randpkt_example* example, uint64_t produce_count, uint64_t packet_delay_ms);
51
52/* Close the current example */
53bool randpkt_example_close(randpkt_example* example);
54
55#endif
56
57/*
58 * Editor modelines - https://www.wireshark.org/tools/modelines.html
59 *
60 * Local variables:
61 * c-basic-offset: 8
62 * tab-width: 8
63 * indent-tabs-mode: t
64 * End:
65 *
66 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
67 * :indentSize=8:tabSize=8:noTabs=false:
68 */
Definition randpkt_core.h:19
Definition wtap-int.h:98