Go to the source code of this file.
|
|
#define | CAN_MAX_DLEN 8 |
| |
|
#define | CANFD_MAX_DLEN 64 |
| |
|
#define | WTAP_SOCKETCAN_INVALID_INTERFACE_ID 0xFFFFFFFF |
| |
|
| enum | wtap_can_msg_type_t {
MSG_TYPE_STD
, MSG_TYPE_EXT
, MSG_TYPE_STD_RTR
, MSG_TYPE_EXT_RTR
,
MSG_TYPE_STD_FD
, MSG_TYPE_EXT_FD
, MSG_TYPE_ERR
} |
| |
|
| void | wtap_set_as_socketcan (wtap *wth, int file_type_subtype, int tsprec, void *tap_priv, void(*tap_close)(void *)) |
| | Set up a wiretap session for SOCKETCAN capture.
|
| |
| bool | wtap_socketcan_gen_packet (wtap *wth, wtap_rec *rec, const wtap_can_msg_t *msg, char *module_name, int *err, char **err_info) |
| | Generate a packet for SocketCAN.
|
| |
| uint32_t | wtap_socketcan_find_or_create_new_interface (wtap *wth, const char *name) |
| | Find or create a PCAPNG interface block.
|
| |
| void * | wtap_socketcan_get_private_data (wtap *wth) |
| | Retrieves private data associated with a socketCAN capture.
|
| |
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
◆ wtap_set_as_socketcan()
| void wtap_set_as_socketcan |
( |
wtap * |
wth, |
|
|
int |
file_type_subtype, |
|
|
int |
tsprec, |
|
|
void * |
tap_priv, |
|
|
void(*)(void *) |
tap_close |
|
) |
| |
|
extern |
Set up a wiretap session for SOCKETCAN capture.
- Parameters
-
| wth | Pointer to the wiretap handle. |
| file_type_subtype | Subtype of the file type. |
| tsprec | Precision of the timestamp. |
| tap_priv | Private data for the tap. |
| tap_close | Function to close the tap. |
◆ wtap_socketcan_find_or_create_new_interface()
| uint32_t wtap_socketcan_find_or_create_new_interface |
( |
wtap * |
wth, |
|
|
const char * |
name |
|
) |
| |
|
extern |
Find or create a PCAPNG interface block.
- Parameters
-
| wth | Pointer to the wtap structure. |
| name | Name of the interface. |
- Returns
- uint32_t The interface ID used for the packet.
◆ wtap_socketcan_gen_packet()
| bool wtap_socketcan_gen_packet |
( |
wtap * |
wth, |
|
|
wtap_rec * |
rec, |
|
|
const wtap_can_msg_t * |
msg, |
|
|
char * |
module_name, |
|
|
int * |
err, |
|
|
char ** |
err_info |
|
) |
| |
|
extern |
Generate a packet for SocketCAN.
- Parameters
-
| wth | Pointer to the wtap structure. |
| rec | Pointer to the wtap_rec structure. |
| msg | Pointer to the wtap_can_msg_t structure containing the CAN message. |
| module_name | Name of the module generating the packet. |
| err | Pointer to an integer for error reporting. |
| err_info | Pointer to a string for additional error information. |
- Returns
- void
◆ wtap_socketcan_get_private_data()
| void * wtap_socketcan_get_private_data |
( |
wtap * |
wth | ) |
|
|
extern |
Retrieves private data associated with a socketCAN capture.
- Parameters
-
| wth | Pointer to the wtap structure containing the capture information. |
- Returns
- void* Pointer to the private data set for the socketCAN capture, or NULL if not set.