| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Enumerations | Functions
/builds/wireshark/wireshark/text2pcap.h File Reference

Go to the source code of this file.

## Enumerations
enum | token_t { T_BYTE = 1 , T_OFFSET , T_DIRECTIVE , T_TEXT , T_EOL }
| Token types produced by the bytecode/directive lexer. More...

## Functions
int | parse_token (token_t token, char *str)
| Parses a token from a string.
int | text2pcap_scan (void)
| Scans for text2pcap utility functionality.

## Detailed Description

Utility to convert an ASCII hexdump into a libpcap-format capture file

(c) Copyright 2001 Ashok Narayanan ashok.nosp@m.n@ci.nosp@m.sco.c.nosp@m.om

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

SPDX-License-Identifier: GPL-2.0-or-later

## Enumeration Type Documentation

## ◆ token_t

enum token_t

Token types produced by the bytecode/directive lexer.

Enumerator
T_BYTE | A raw byte value token
T_OFFSET | An offset value token
T_DIRECTIVE | A directive keyword token
T_TEXT | A plain text string token
T_EOL | End-of-line token

## Function Documentation

## ◆ parse_token()

int parse_token | ( | token_t | token,
|  | char * | str )

Parses a token from a string.

This function takes a token type and a string as input and processes the token accordingly.

Parameters

  token | The type of token to parse.
  str | The string containing the token data.

Returns
  int 0 on success, -1 on failure.

## ◆ text2pcap_scan()

int text2pcap_scan | ( | void |  | ) |

Scans for text2pcap utility functionality.

This function is used to scan and identify the capabilities of the text2pcap utility, which converts an ASCII hexdump into a libpcap-format capture file.

Returns
  0 on success, -1 on failure.