Wireshark 4.7.0
The Wireshark network protocol analyzer
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
busmaster_priv.h File Reference
#include <gmodule.h>
#include <wiretap/wtap.h>
#include <wiretap/socketcan.h>

Go to the source code of this file.

Classes

struct  msg_date_t
 Represents a calendar date as parsed from a BusMaster log header. More...
 
struct  msg_time_t
 Represents a time-of-day value as parsed from a BusMaster log entry. More...
 
struct  msg_date_time_t
 Combines a calendar date and time-of-day into a single timestamp. More...
 
struct  msg_t
 Represents a single decoded CAN or LIN bus message record from the log. More...
 
struct  token_t
 General-purpose four-field integer token produced by the BusMaster log lexer. More...
 
struct  busmaster_priv_t
 Per-section metadata extracted from a BusMaster log file header. More...
 
struct  busmaster_state_t
 Complete parser state for an open BusMaster log file. More...
 

Enumerations

enum  log_entry_type_t {
  LOG_ENTRY_ERROR = -1 , LOG_ENTRY_NONE = 0 , LOG_ENTRY_EMPTY , LOG_ENTRY_HEADER ,
  LOG_ENTRY_FOOTER , LOG_ENTRY_FOOTER_AND_HEADER , LOG_ENTRY_MSG , LOG_ENTRY_EOF
}
 Classifies a parsed line or record within a BusMaster log file. More...
 
enum  protocol_type_t { PROTOCOL_UNKNOWN = 0 , PROTOCOL_CAN , PROTOCOL_LIN , PROTOCOL_J1939 }
 Identifies the bus protocol recorded in a BusMaster log file. More...
 
enum  data_mode_t { DATA_MODE_UNKNOWN = 0 , DATA_MODE_HEX , DATA_MODE_DEC }
 Indicates the numeric base used to encode payload data values in the log file. More...
 
enum  time_mode_t { TIME_MODE_UNKNOWN = 0 , TIME_MODE_ABSOLUTE , TIME_MODE_SYSTEM , TIME_MODE_RELATIVE }
 Indicates how timestamps are represented in the log file. More...
 

Functions

bool run_busmaster_parser (busmaster_state_t *state, int *err, char **err_info)
 Runs the Busmaster parser to process log entries.
 

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

Support for Busmaster log file format Copyright (c) 2019 by Maksim Salau maksi.nosp@m.m.sa.nosp@m.lau@g.nosp@m.mail.nosp@m..com

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

Enumeration Type Documentation

◆ data_mode_t

Indicates the numeric base used to encode payload data values in the log file.

Enumerator
DATA_MODE_UNKNOWN 

Data encoding format has not been identified

DATA_MODE_HEX 

Payload bytes are encoded as hexadecimal values

DATA_MODE_DEC 

Payload bytes are encoded as decimal values

◆ log_entry_type_t

Classifies a parsed line or record within a BusMaster log file.

Enumerator
LOG_ENTRY_ERROR 

A parse error was encountered while reading the entry

LOG_ENTRY_NONE 

No entry has been parsed yet; initial state

LOG_ENTRY_EMPTY 

A blank or whitespace-only line

LOG_ENTRY_HEADER 

A log file section header (contains metadata such as protocol and time mode)

LOG_ENTRY_FOOTER 

A log file section footer

LOG_ENTRY_FOOTER_AND_HEADER 

A line that simultaneously closes one section and opens another

LOG_ENTRY_MSG 

A CAN/LIN bus message data record

LOG_ENTRY_EOF 

End of the log file has been reached

◆ protocol_type_t

Identifies the bus protocol recorded in a BusMaster log file.

Enumerator
PROTOCOL_UNKNOWN 

Protocol has not been identified

PROTOCOL_CAN 

Controller Area Network (CAN) protocol

PROTOCOL_LIN 

Local Interconnect Network (LIN) protocol

PROTOCOL_J1939 

SAE J1939 protocol (CAN-based, heavy vehicle networking)

◆ time_mode_t

Indicates how timestamps are represented in the log file.

Enumerator
TIME_MODE_UNKNOWN 

Timestamp format has not been identified

TIME_MODE_ABSOLUTE 

Timestamps are absolute wall-clock times

TIME_MODE_SYSTEM 

Timestamps are sourced from the system clock at log time

TIME_MODE_RELATIVE 

Timestamps are relative to the start of the log session

Function Documentation

◆ run_busmaster_parser()

bool run_busmaster_parser ( busmaster_state_t state,
int *  err,
char **  err_info 
)

Runs the Busmaster parser to process log entries.

Parameters
statePointer to the busmaster state structure.
errPointer to an integer where any error code will be stored.
err_infoPointer to a char pointer where any error information will be stored.
Returns
true if the parser ran successfully, false if an error occurred.