| Wireshark 4.7.3 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Classes | Macros | Functions
logcat.h File Reference
`#include "wtap.h"`

Go to the source code of this file.

## Classes
struct | logger_entry
| Version 1 Android logger entry header, preceding the log message payload. More...
struct | logger_entry_v2
| Version 2/3 Android logger entry header, extending v1 with a self-describing size field and an ID union. More...

## Macros
#define | LOGGER_ENTRY_MAX_PAYLOAD 4076

## Functions
wtap_open_return_val | logcat_open (wtap *wth, int *err, char **err_info)
| Opens a logcat capture file for reading.
bool | logcat_exported_pdu_length (const uint8_t *pd, unsigned caplen, unsigned *length)
| Calculate the length of a PDU (Protocol Data Unit) in a Logcat packet.

## Detailed Description

Copyright 2014, Michal Labedzki for Tieto Corporation

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

## Function Documentation

## ◆ logcat_exported_pdu_length()

bool logcat_exported_pdu_length | ( | const uint8_t * | pd,
|  | unsigned | caplen,
|  | unsigned * | length )

Calculate the length of a PDU (Protocol Data Unit) in a Logcat packet.

This function calculates the total length of a PDU by iterating through the tags and their lengths.

Parameters

  pd | Pointer to the beginning of the PDU data.
  caplen | The remaining length of the packet data, i.e. the size of pd.
  length | The calculated length of the PDU.

Returns
  Whether the function succeeded.

## ◆ logcat_open()

wtap_open_return_val logcat_open | ( | wtap * | wth,
|  | int * | err,
|  | char ** | err_info )

Opens a logcat capture file for reading.

This function initializes the wtap structure to read from a JSON log file.

Parameters

  wth | Pointer to the wtap structure that will be initialized.
  err | Pointer to an integer where error codes can be stored.
  err_info | Pointer to a string where error information can be stored.

Returns
  A value indicating the success or failure of the operation.

< Precision: 1 microsecond (6 fractional digits).