[vala/wip/mickeyl/linux-socketcan: 11/15] linux: bind SocketCAN
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/wip/mickeyl/linux-socketcan: 11/15] linux: bind SocketCAN
- Date: Tue, 25 May 2021 10:26:05 +0000 (UTC)
commit c9d3c83d16e3fbfdc50694f6a9eb993329164737
Author: Dr. Michael Lauer <mickey vanille-media de>
Date: Fri May 14 18:14:50 2021 +0200
linux: bind SocketCAN
vapi/linux.vapi | 47 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
---
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index 37441b0fa..8a877cdd4 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -1010,6 +1010,53 @@ namespace Linux {
NFC
}
+ /*
+ * SocketCAN
+ */
+ [CCode (cheader_filename = "sys/socket.h")]
+ public const int AF_CAN;
+ [CCode (cheader_filename = "linux/can.h")]
+ public const int CAN_RAW;
+ [CCode (cheader_filename = "linux/can.h")]
+ public const int CAN_MAX_DLEN;
+ [CCode (cheader_filename = "linux/can.h")]
+ public const int CANFD_MAX_DLEN;
+
+ [CCode (cname = "guint32", cprefix = "CAN_RAW_", has_type_id = false, cheader_filename =
"linux/can/raw.h")]
+ public enum CanRawOption {
+ FILTER,
+ ERR_FILTER,
+ LOOPBACK,
+ RECV_OWN_MSGS,
+ FD_FRAMES,
+ JOIN_FILTERS,
+ }
+ [CCode (cname = "struct can_filter", has_type_id = false, cheader_filename = "linux/can.h",
destroy_function = "")]
+ public struct CanFilter {
+ uint32 can_id;
+ uint32 can_mask;
+ }
+ [CCode (cname = "struct can_frame", has_type_id = false, cheader_filename = "linux/can.h",
destroy_function = "")]
+ public struct CanFrame {
+ uint32 can_id;
+ uint8 can_dlc;
+ uint8 data[8];
+ }
+ [CCode (cname = "struct canfd_frame", has_type_id = false, cheader_filename = "linux/can.h",
destroy_function = "")]
+ public struct CanFdFrame {
+ uint32 can_id;
+ uint8 len;
+ uint8 flags;
+ uint8 data[64];
+ }
+ [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;
+ }
+ [CCode (cheader_filename = "linux/can/raw.h")]
+ public const int SOL_CAN_RAW;
+
/*
* SignalFd
*/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]