| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Public Attributes | List of all members
open_info Struct Reference

Information about a given file type that applies to all subtypes of the file type. More...

`#include <wtap.h>`

## Public Attributes
const char * | name
wtap_open_type | type
wtap_open_routine_t | open_routine
const char * | extensions
char ** | extensions_set
void * | wslua_data

## Detailed Description

Information about a given file type that applies to all subtypes of the file type.

Each file type has:

a human-readable description of the file type, for use in the user interface; a wtap_open_type indication of how the open routine determines whether a file is of that type; an open routine; an optional list of extensions used for this file type; data to be passed to Lua file readers - this should be NULL for non-Lua (C) file readers.

The list of file extensions is used as a hint when calling open routines to open a file; heuristic open routines whose list of extensions includes the file's extension are called before heuristic open routines whose (possibly-empty) list of extensions doesn't contain the file's extension, to reduce the chances that a file will be misidentified due to an heuristic test with a weak heuristic being done before a heuristic test for the file's type.

The list of extensions should be NULL for magic-number open routines, as it will not be used for any purpose (no such hinting is done).

## Member Data Documentation

## ◆ extensions

const char* open_info::extensions

List of extensions used for this file type

## ◆ extensions_set

char** open_info::extensions_set

Array of those extensions; populated using extensions member during initialization

## ◆ name

const char* open_info::name

Description

## ◆ open_routine

wtap_open_routine_t open_info::open_routine

Open routine

## ◆ type

wtap_open_type open_info::type

Open routine type

## ◆ wslua_data

void* open_info::wslua_data

Data for Lua file readers

The documentation for this struct was generated from the following file:

- /builds/wireshark/wireshark/wiretap/wtap.h