|
Wireshark 4.7.0
The Wireshark network protocol analyzer
|
Go to the source code of this file.
Classes | |
| struct | text_import_info_t |
Functions | |
| int | text_import (text_import_info_t *const info) |
| Import a text file. | |
| int | text_import_pre_open (wtap_dump_params *const params, int file_type_subtype, const char *const input_filename, const char *const interface_name) |
| Prepares the wtap_dump_params with necessary headers before opening the wtap dump file. | |
text_import.h State machine for text import November 2010, Jaap Keuter jaap..nosp@m.keut.nosp@m.er@xs.nosp@m.4all.nosp@m..nl Modified February 2021, Paul Weiß
Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs
Based on text2pcap.h by Ashok Narayanan ashok.nosp@m.n@ci.nosp@m.sco.c.nosp@m.om
SPDX-License-Identifier: GPL-2.0-or-later*
| int text_import | ( | text_import_info_t *const | info | ) |
Import a text file.
This function imports a text file and writes the SHB and IDB to the wtap_dump_params before opening the wtap dump file. It initializes various parameters for packet processing, including timestamps and direction.
| info | Pointer to the text import information structure. |
| int text_import_pre_open | ( | wtap_dump_params *const | params, |
| int | file_type_subtype, | ||
| const char *const | input_filename, | ||
| const char *const | interface_name | ||
| ) |
Prepares the wtap_dump_params with necessary headers before opening the wtap dump file.
Write the SHB and IDB to the wtap_dump_params before opening the wtap dump file. While dummy headers can be written automatically, this writes out some extra information including an optional interface name.
NOTE: The caller will be responsible for freeing params->idb_inf after finished with the wtap_dumper to avoid a memory leak. wtap_dump_close does not free it.
| params | Pointer to the wtap_dump_params structure. |
| file_type_subtype | The type of the file to be opened. |
| input_filename | The name of the input file. |
| interface_name | The name of the interface. |