[vala/wip/mickeyl/linux-socketcan] linux: add SocketCAN ISOTP constants and options
- From: Dr. Mickey Lauer <mlauer src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/mickeyl/linux-socketcan] linux: add SocketCAN ISOTP constants and options
- Date: Tue, 25 May 2021 09:21:28 +0000 (UTC)
commit 400394a021778f4e7da1e8ef70e5c1ee5c77b591
Author: Dr. Michael Lauer <mickey vanille-media de>
Date: Tue May 25 11:20:07 2021 +0200
linux: add SocketCAN ISOTP constants and options
vapi/linux.vapi | 73 +++++++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 71 insertions(+), 2 deletions(-)
---
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index ff6fa3aaa..b6fd9efa1 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -1018,6 +1018,18 @@ namespace Linux {
[CCode (cheader_filename = "linux/can.h")]
public const int CAN_RAW;
[CCode (cheader_filename = "linux/can.h")]
+ public const int CAN_BCM;
+ [CCode (cheader_filename = "linux/can.h")]
+ public const int CAN_TP16;
+ [CCode (cheader_filename = "linux/can.h")]
+ public const int CAN_TP20;
+ [CCode (cheader_filename = "linux/can.h")]
+ public const int CAN_MCNET;
+ [CCode (cheader_filename = "linux/can.h")]
+ public const int CAN_ISOTP;
+ [CCode (cheader_filename = "linux/can.h")]
+ public const int CAN_J1939;
+ [CCode (cheader_filename = "linux/can.h")]
public const int CAN_MAX_DLEN;
[CCode (cheader_filename = "linux/can.h")]
public const int CANFD_MAX_DLEN;
@@ -1049,14 +1061,71 @@ namespace Linux {
uint8 flags;
uint8 data[64];
}
+ [CCode (cname = "struct tp", has_type_id = false, cheader_filename = "linux/can.h", destroy_function =
"")]
+ public struct CanTransportAddress {
+ uint32 rx_id;
+ uint32 tx_id;
+ }
[CCode (cname = "struct sockaddr_can", has_type_id = false, cheader_filename = "linux/can.h",
destroy_function = "")]
public struct SockAddrCan {
- public int can_family;
- public int can_ifindex;
+ int can_family;
+ int can_ifindex;
+ [CCode (cname = "can_addr.tp")]
+ CanTransportAddress tp;
}
[CCode (cheader_filename = "linux/can/raw.h")]
public const int SOL_CAN_RAW;
+ /* ISOTP */
+ [CCode (cheader_filename = "linux/can/isotp.h")]
+ public const int SOL_CAN_ISOTP;
+
+ [CCode (cname = "guint32", cprefix = "CAN_ISOTP_", has_type_id = false, cheader_filename =
"linux/can/isotp.h")]
+ public enum CanIsotpFlags {
+ LISTEN_MODE,
+ EXTEND_ADDR,
+ TX_PADDING,
+ RX_PADDING,
+ CHK_PAD_LEN,
+ CHK_PAD_DATA,
+ HALF_DUPLEX,
+ FORCE_TXSTMIN,
+ FORCE_RXSTMIN,
+ RX_EXT_ADDR,
+ WAIT_TX_DONE,
+ SF_BROADCAST,
+ }
+
+ [CCode (cname = "guint32", cprefix = "CAN_ISOTP_", has_type_id = false, cheader_filename =
"linux/can/isotp.h")]
+ public enum CanIsotpOptionType {
+ OPTS,
+ RECV_FC,
+ TX_STMIN,
+ RX_STMIN,
+ LL_OPTS,
+ }
+ [CCode (cname = "struct can_isotp_options", has_type_id = false, cheader_filename = "linux/can/isotp.h",
destroy_function = "")]
+ public struct CanIsotpOptions {
+ CanIsotpFlags flags;
+ uint32 frame_txtime;
+ uint8 ext_address;
+ uint8 txpad_content;
+ uint8 rxpad_content;
+ uint8 rx_ext_address;
+ }
+ [CCode (cname = "struct can_isotp_fc_options", has_type_id = false, cheader_filename =
"linux/can/isotp.h", destroy_function = "")]
+ public struct CanIsotpFlowControlOptions {
+ uint8 bs;
+ uint8 stmin;
+ uint8 wftmax;
+ }
+ [CCode (cname = "struct can_isotp_ll_options", has_type_id = false, cheader_filename =
"linux/can/isotp.h", destroy_function = "")]
+ public struct CanIsotpLowLevelOptions {
+ uint8 mtu;
+ uint8 tx_dl;
+ uint8 tx_flags;
+ }
+
/*
* SignalFd
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]