| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Functions
wtap-int.h File Reference
`#include "wtap.h"`
`#include <time.h>`

Go to the source code of this file.

## Classes
struct | backwards_compatibiliity_lua_name
| Mapping between a Lua name and a file type. More...

## Functions
void | wtap_init_file_type_subtypes (const char *app_env_var_prefix)
| Initialize file type subtypes for wiretap.
void | wtap_init_file_type_extensions (const struct file_extension_info *file_extensions, unsigned num_extensions)
| Initialize the extensions array.
WS_DLL_PUBLIC const GArray * | get_backwards_compatibility_lua_table (void)
| Retrieve the table of backwards compatibility Lua names.
GArray * | wtap_file_get_shb_for_new_file (wtap *wth)
| Gets new section header block for new file, based on existing info.
wtap_block_t | wtap_dump_params_generate_idb (const wtap_dump_params *params)
| Generate an IDB, given a set of dump parameters, using the parameters' encapsulation type, snapshot length, and time stamp resolution. For use when a dump file has a given encapsulation type, and the source is not passing IDBs.
GArray * | wtap_file_get_nrb_for_new_file (wtap *wth)
| Gets new name resolution info for new file, based on existing info.

## Detailed Description

Wiretap Library Copyright (c) 1998 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

## Function Documentation

## ◆ get_backwards_compatibility_lua_table()

WS_DLL_PUBLIC const GArray * get_backwards_compatibility_lua_table | ( | void |  | ) |

Retrieve the table of backwards compatibility Lua names.

Returns a GArray of backwards_compatibiliity_lua_name entries.

Returns
  Pointer to GArray of compatibility mappings.

## ◆ wtap_dump_params_generate_idb()

wtap_block_t wtap_dump_params_generate_idb | ( | const wtap_dump_params * | params | ) |

Generate an IDB, given a set of dump parameters, using the parameters' encapsulation type, snapshot length, and time stamp resolution. For use when a dump file has a given encapsulation type, and the source is not passing IDBs.

Note
  This requires that the encapsulation type and time stamp resolution not be per-packet; it will terminate the process if either of them are.

Parameters

  params | The wtap dump parameters.

Returns
  A newly allocated IDB block.

## ◆ wtap_file_get_nrb_for_new_file()

GArray * wtap_file_get_nrb_for_new_file | ( | wtap * | wth | ) |

Gets new name resolution info for new file, based on existing info.

Creates a new wtap_block_t of name resolution info and only copies appropriate members for a new file.

Note
  Use wtap_free_nrb() to free the returned pointer.

Parameters

  wth | The wiretap session.

Returns
  The new name resolution info, which must be freed.

## ◆ wtap_file_get_shb_for_new_file()

GArray * wtap_file_get_shb_for_new_file | ( | wtap * | wth | ) |

Gets new section header block for new file, based on existing info.

Creates a new wtap_block_t section header block and only copies appropriate members of the SHB for a new file. In particular, the comment string is copied, and any custom options which should be copied are copied. The os, hardware, and application strings are not copied.

Note
  Use wtap_free_shb() to free the returned section header.

Parameters

  wth | The wiretap session.

Returns
  The new section header, which must be wtap_free_shb'd.

## ◆ wtap_init_file_type_extensions()

void wtap_init_file_type_extensions | ( | const struct file_extension_info * | file_extensions,
|  | unsigned | num_extensions
| ) |  |

Initialize the extensions array.

Parameters

  file_extensions | Array of file extension info structures
  num_extensions | Number of extensions in the array

## ◆ wtap_init_file_type_subtypes()

void wtap_init_file_type_subtypes | ( | const char * | app_env_var_prefix | ) |

Initialize file type subtypes for wiretap.

Parameters

  app_env_var_prefix | The prefix for the application to determine what pcapNG behavior to use