[vala/wip/tintou/linux-connector] linux: add Connector bindings



commit 74c6ca7ca754240a3d73c50f602962538da06ed2
Author: Corentin Noël <corentin elementary io>
Date:   Thu Feb 7 10:12:11 2019 +0100

    linux: add Connector bindings

 vapi/linux.vapi | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 122 insertions(+)
---
diff --git a/vapi/linux.vapi b/vapi/linux.vapi
index 64b255445..aab29b4cd 100644
--- a/vapi/linux.vapi
+++ b/vapi/linux.vapi
@@ -3208,6 +3208,76 @@ namespace Linux {
         public const int FF_STATUS_MAX;
     }
 
+    /*
+     * Connector
+     */
+    [CCode (cheader_filename = "linux/connector.h")]
+    namespace Connector {
+        [CCode (cname="CONNECTOR_MAX_MSG_SIZE")]
+        public const int MAX_MSG_SIZE;
+        [CCode (cname="CN_NETLINK_USERS")]
+        public const int NETLINK_USERS;
+
+        [CCode (cname = "struct cb_id", has_type_id = false, destroy_function = "")]
+        public struct CbId {
+            public Linux.Connector.IDX idx;
+            public Linux.Connector.Val val;
+        }
+
+        [CCode (cname = "struct cn_msg", has_type_id = false, destroy_function = "")]
+        public struct CnMsg {
+            public Linux.Connector.CbId id;
+
+            public uint32 seq;
+            public uint32 ack;
+
+            public uint16 len;
+            public uint16 flags;
+            [CCode (array_length_cname = "len", array_length_type = "uint16")]
+            public uint8 data[0];
+        }
+
+        [CCode (cheader_filename = "linux/cn_proc.h", cname = "enum proc_cn_mcast_op", cprefix = 
"PROC_CN_MCAST_", has_type_id = false)]
+        public enum ProcMcastOp {
+            LISTEN,
+            IGNORE
+        }
+
+        [CCode (cname = "__u32", has_type_id = false, cprefix = "CN_IDX_")]
+        public enum IDX {
+            PROC,
+            CIFS,
+            [CCode (cname = "CN_W1_IDX")]
+            W1,
+            V86D,
+            BB,
+            [CCode (cname = "CN_DST_IDX")]
+            DST,
+            DM,
+            DRBD,
+            [CCode (cname = "CN_KVP_IDX")]
+            KVP,
+            [CCode (cname = "CN_VSS_IDX")]
+            VSS,
+        }
+
+        [CCode (cname = "__u32", has_type_id = false, cprefix = "CN_VAL_")]
+        public enum Val {
+            PROC,
+            CIFS,
+            [CCode (cname = "CN_W1_VAL")]
+            W1,
+            V86D_UVESAFB,
+            [CCode (cname = "CN_DST_VAL")]
+            DST,
+            DM_USERSPACE_LOG,
+            [CCode (cname = "CN_KVP_VAL")]
+            KVP,
+            [CCode (cname = "CN_VSS_VAL")]
+            VSS,
+        }
+    }
+
     /*
      * Netlink subsystem
      */
@@ -3562,6 +3632,58 @@ namespace Linux {
         [CCode (cheader_filename = "sys/socket.h")]
         public const int SOCK_CLOEXEC;
 
+        [CCode (cname = "__u32", has_type_id = false, cprefix = "PF_", cheader_filename = "sys/socket.h")]
+        public enum ProtocolFamily {
+            UNSPEC,
+            LOCAL,
+            UNIX,
+            FILE,
+            INET,
+            AX25,
+            IPX,
+            APPLETALK,
+            NETROM,
+            BRIDGE,
+            ATMPVC,
+            X25,
+            INET6,
+            ROSE,
+            DECnet,
+            NETBEUI,
+            SECURITY,
+            KEY,
+            NETLINK,
+            ROUTE,
+            PACKET,
+            ASH,
+            ECONET,
+            ATMSVC,
+            RDS,
+            SNA,
+            IRDA,
+            PPPOX,
+            WANPIPE,
+            LLC,
+            IB,
+            MPLS,
+            CAN,
+            TIPC,
+            BLUETOOTH,
+            IUCV,
+            RXRPC,
+            ISDN,
+            PHONET,
+            IEEE802154,
+            CAIF,
+            ALG,
+            NFC,
+            VSOCK,
+            KCM,
+            QIPCRTR,
+            SMC,
+            MAX
+        }
+
         [CCode (cname = "struct ucred", has_type_id = false, cheader_filename = "linux/socket.h", 
destroy_function = "")]
         public struct ucred {
             public uint32 pid;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]