public dissect_krb5_PAC_NDRHEADERBLOB
[wireshark-sm.git] / randpkt_core / randpkt_core.h
blob46f056d32db641744ed55ebd6f9eab5ee20bc27c
1 /** @file
3 * randpkt_core.h
4 * ---------
5 * Creates random packet traces. Useful for debugging sniffers by testing
6 * assumptions about the veracity of the data found in the packet.
8 * Copyright (C) 1999 by Gilbert Ramirez <gram@alumni.rice.edu>
10 * SPDX-License-Identifier: GPL-2.0-or-later
13 #ifndef __RANDPKT_CORE_H__
14 #define __RANDPKT_CORE_H__
16 #include <glib.h>
17 #include "wiretap/wtap.h"
19 typedef 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;
32 } randpkt_example;
34 /* Return the number of active examples */
35 unsigned randpkt_example_count(void);
37 /* Return the list of the active examples */
38 void randpkt_example_list(char*** abbrev_list, char*** longname_list);
40 /* Parse command-line option "type" and return enum type */
41 int randpkt_parse_type(char *string);
43 /* Find pkt_example record and return pointer to it */
44 randpkt_example* randpkt_find_example(int type);
46 /* Init a new example */
47 int randpkt_example_init(randpkt_example* example, char* produce_filename, int produce_max_bytes, int file_type_subtype);
49 /* Loop the packet generation */
50 void randpkt_loop(randpkt_example* example, uint64_t produce_count, uint64_t packet_delay_ms);
52 /* Close the current example */
53 bool randpkt_example_close(randpkt_example* example);
55 #endif
58 * Editor modelines - https://www.wireshark.org/tools/modelines.html
60 * Local variables:
61 * c-basic-offset: 8
62 * tab-width: 8
63 * indent-tabs-mode: t
64 * End:
66 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
67 * :indentSize=8:tabSize=8:noTabs=false: