|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Classes | |
| struct | randpkt_example |
Functions | |
| unsigned | randpkt_example_count (void) |
| Return the count of active examples. | |
| void | randpkt_example_list (char ***abbrev_list, char ***longname_list) |
| Returns the list of active examples, including their abbreviations and long names. | |
| int | randpkt_parse_type (char *string) |
| Parse command-line option "type" and return enum type. | |
| randpkt_example * | randpkt_find_example (int type) |
| Find pkt_example record and return pointer to it. | |
| int | randpkt_example_init (randpkt_example *example, char *produce_filename, int produce_max_bytes, int file_type_subtype) |
| Initializes a random packet example with parameters for packet production. | |
| void | randpkt_loop (randpkt_example *example, uint64_t produce_count, uint64_t packet_delay_ms) |
| Loops to produce a specified number of random packets with a given delay. | |
| bool | randpkt_example_close (randpkt_example *example) |
| Closes a random packet example. | |
Creates random packet traces. Useful for debugging sniffers by testing assumptions about the veracity of the data found in the packet.
Copyright (C) 1999 by Gilbert Ramirez gram@.nosp@m.alum.nosp@m.ni.ri.nosp@m.ce.e.nosp@m.du
SPDX-License-Identifier: GPL-2.0-or-later
| bool randpkt_example_close | ( | randpkt_example * | example | ) |
Closes a random packet example.
This function closes the specified random packet example, ensuring all resources are properly released.
| example | Pointer to the randpkt_example structure to be closed. |
| unsigned randpkt_example_count | ( | void | ) |
Return the count of active examples.
| int randpkt_example_init | ( | randpkt_example * | example, |
| char * | produce_filename, | ||
| int | produce_max_bytes, | ||
| int | file_type_subtype | ||
| ) |
Initializes a random packet example with parameters for packet production.
This function initializes the necessary structures and opens the file or standard output to begin producing random packets.
| example | Pointer to the randpkt_example structure to be initialized. |
| produce_filename | The filename where packets will be written, or "-" for stdout. |
| produce_max_bytes | The maximum number of bytes per packet. |
| file_type_subtype | The type and subtype of the file format. |
| void randpkt_example_list | ( | char *** | abbrev_list, |
| char *** | longname_list | ||
| ) |
Returns the list of active examples, including their abbreviations and long names.
| abbrev_list | Pointer to a list where the abbreviations of the examples will be stored. |
| longname_list | Pointer to a list where the long names of the examples will be stored. |
| randpkt_example * randpkt_find_example | ( | int | type | ) |
Find pkt_example record and return pointer to it.
| type | The type of the example to find. |
| void randpkt_loop | ( | randpkt_example * | example, |
| uint64_t | produce_count, | ||
| uint64_t | packet_delay_ms | ||
| ) |
Loops to produce a specified number of random packets with a given delay.
This function generates and sends a series of random packets, each delayed by a specified amount of time.
| example | Pointer to the randpkt_example structure containing configuration and state information. |
| produce_count | The number of packets to generate and send. |
| packet_delay_ms | The delay in milliseconds between sending each packet. |
| int randpkt_parse_type | ( | char * | string | ) |
Parse command-line option "type" and return enum type.
| string | The string to parse, which may be NULL or empty to indicate a random type. |