blob: cf16725ff75367d4d53b9d22846720b24bb2ea16 [file] [log] [blame]
Ben Cheng655a7c02013-10-16 16:09:24 -07001/****************************************************************************
2 ****************************************************************************
3 ***
4 *** This header was automatically generated from a Linux kernel header
5 *** of the same name, to make information necessary for userspace to
6 *** call into the kernel available to libc. It contains only constants,
7 *** structures, and macros generated from the original header, and thus,
8 *** contains no copyrightable information.
9 ***
10 *** To edit the content of this header, modify the corresponding
11 *** source file (e.g. under external/kernel-headers/original/) then
12 *** run bionic/libc/kernel/tools/update_all.py
13 ***
14 *** Any manual change here will be lost the next time this script will
15 *** be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef _LINUX_TIPC_H_
20#define _LINUX_TIPC_H_
21#include <linux/types.h>
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070022#include <linux/sockios.h>
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070023struct tipc_portid {
Tao Baod7db5942015-01-28 10:07:51 -080024 __u32 ref;
25 __u32 node;
Ben Cheng655a7c02013-10-16 16:09:24 -070026};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070027struct tipc_name {
Tao Baod7db5942015-01-28 10:07:51 -080028 __u32 type;
29 __u32 instance;
Ben Cheng655a7c02013-10-16 16:09:24 -070030};
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070031struct tipc_name_seq {
Tao Baod7db5942015-01-28 10:07:51 -080032 __u32 type;
33 __u32 lower;
34 __u32 upper;
Christopher Ferrisba8d4f42014-09-03 19:56:49 -070035};
Christopher Ferris49f525c2016-12-12 14:55:36 -080036#define TIPC_NODE_BITS 12
37#define TIPC_CLUSTER_BITS 12
38#define TIPC_ZONE_BITS 8
Christopher Ferris49f525c2016-12-12 14:55:36 -080039#define TIPC_NODE_OFFSET 0
40#define TIPC_CLUSTER_OFFSET TIPC_NODE_BITS
41#define TIPC_ZONE_OFFSET (TIPC_CLUSTER_OFFSET + TIPC_CLUSTER_BITS)
42#define TIPC_NODE_SIZE ((1UL << TIPC_NODE_BITS) - 1)
Christopher Ferris49f525c2016-12-12 14:55:36 -080043#define TIPC_CLUSTER_SIZE ((1UL << TIPC_CLUSTER_BITS) - 1)
44#define TIPC_ZONE_SIZE ((1UL << TIPC_ZONE_BITS) - 1)
45#define TIPC_NODE_MASK (TIPC_NODE_SIZE << TIPC_NODE_OFFSET)
46#define TIPC_CLUSTER_MASK (TIPC_CLUSTER_SIZE << TIPC_CLUSTER_OFFSET)
Christopher Ferris49f525c2016-12-12 14:55:36 -080047#define TIPC_ZONE_MASK (TIPC_ZONE_SIZE << TIPC_ZONE_OFFSET)
48#define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK | TIPC_CLUSTER_MASK)
Ben Cheng655a7c02013-10-16 16:09:24 -070049#define TIPC_CFG_SRV 0
50#define TIPC_TOP_SRV 1
Christopher Ferris49f525c2016-12-12 14:55:36 -080051#define TIPC_LINK_STATE 2
Ben Cheng655a7c02013-10-16 16:09:24 -070052#define TIPC_RESERVED_TYPES 64
53#define TIPC_ZONE_SCOPE 1
Ben Cheng655a7c02013-10-16 16:09:24 -070054#define TIPC_CLUSTER_SCOPE 2
Christopher Ferris49f525c2016-12-12 14:55:36 -080055#define TIPC_NODE_SCOPE 3
Ben Cheng655a7c02013-10-16 16:09:24 -070056#define TIPC_MAX_USER_MSG_SIZE 66000U
57#define TIPC_LOW_IMPORTANCE 0
Ben Cheng655a7c02013-10-16 16:09:24 -070058#define TIPC_MEDIUM_IMPORTANCE 1
Christopher Ferris49f525c2016-12-12 14:55:36 -080059#define TIPC_HIGH_IMPORTANCE 2
Ben Cheng655a7c02013-10-16 16:09:24 -070060#define TIPC_CRITICAL_IMPORTANCE 3
61#define TIPC_OK 0
Ben Cheng655a7c02013-10-16 16:09:24 -070062#define TIPC_ERR_NO_NAME 1
Christopher Ferris49f525c2016-12-12 14:55:36 -080063#define TIPC_ERR_NO_PORT 2
Ben Cheng655a7c02013-10-16 16:09:24 -070064#define TIPC_ERR_NO_NODE 3
65#define TIPC_ERR_OVERLOAD 4
Ben Cheng655a7c02013-10-16 16:09:24 -070066#define TIPC_CONN_SHUTDOWN 5
Christopher Ferris49f525c2016-12-12 14:55:36 -080067#define TIPC_SUB_PORTS 0x01
Ben Cheng655a7c02013-10-16 16:09:24 -070068#define TIPC_SUB_SERVICE 0x02
69#define TIPC_SUB_CANCEL 0x04
Ben Cheng655a7c02013-10-16 16:09:24 -070070#define TIPC_WAIT_FOREVER (~0)
Christopher Ferris49f525c2016-12-12 14:55:36 -080071struct tipc_subscr {
Tao Baod7db5942015-01-28 10:07:51 -080072 struct tipc_name_seq seq;
73 __u32 timeout;
74 __u32 filter;
Christopher Ferris49f525c2016-12-12 14:55:36 -080075 char usr_handle[8];
Ben Cheng655a7c02013-10-16 16:09:24 -070076};
77#define TIPC_PUBLISHED 1
Ben Cheng655a7c02013-10-16 16:09:24 -070078#define TIPC_WITHDRAWN 2
Christopher Ferris49f525c2016-12-12 14:55:36 -080079#define TIPC_SUBSCR_TIMEOUT 3
Ben Cheng655a7c02013-10-16 16:09:24 -070080struct tipc_event {
Tao Baod7db5942015-01-28 10:07:51 -080081 __u32 event;
82 __u32 found_lower;
Christopher Ferris49f525c2016-12-12 14:55:36 -080083 __u32 found_upper;
Tao Baod7db5942015-01-28 10:07:51 -080084 struct tipc_portid port;
85 struct tipc_subscr s;
Ben Cheng655a7c02013-10-16 16:09:24 -070086};
Christopher Ferris49f525c2016-12-12 14:55:36 -080087#ifndef AF_TIPC
Ben Cheng655a7c02013-10-16 16:09:24 -070088#define AF_TIPC 30
89#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070090#ifndef PF_TIPC
Christopher Ferris49f525c2016-12-12 14:55:36 -080091#define PF_TIPC AF_TIPC
Ben Cheng655a7c02013-10-16 16:09:24 -070092#endif
93#ifndef SOL_TIPC
Ben Cheng655a7c02013-10-16 16:09:24 -070094#define SOL_TIPC 271
Christopher Ferris49f525c2016-12-12 14:55:36 -080095#endif
Ben Cheng655a7c02013-10-16 16:09:24 -070096#define TIPC_ADDR_NAMESEQ 1
97#define TIPC_ADDR_MCAST 1
Ben Cheng655a7c02013-10-16 16:09:24 -070098#define TIPC_ADDR_NAME 2
Christopher Ferris49f525c2016-12-12 14:55:36 -080099#define TIPC_ADDR_ID 3
Ben Cheng655a7c02013-10-16 16:09:24 -0700100struct sockaddr_tipc {
Tao Baod7db5942015-01-28 10:07:51 -0800101 unsigned short family;
102 unsigned char addrtype;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800103 signed char scope;
Tao Baod7db5942015-01-28 10:07:51 -0800104 union {
105 struct tipc_portid id;
106 struct tipc_name_seq nameseq;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800107 struct {
Tao Baod7db5942015-01-28 10:07:51 -0800108 struct tipc_name name;
109 __u32 domain;
110 } name;
Christopher Ferris49f525c2016-12-12 14:55:36 -0800111 } addr;
Ben Cheng655a7c02013-10-16 16:09:24 -0700112};
113#define TIPC_ERRINFO 1
Ben Cheng655a7c02013-10-16 16:09:24 -0700114#define TIPC_RETDATA 2
Christopher Ferris49f525c2016-12-12 14:55:36 -0800115#define TIPC_DESTNAME 3
Ben Cheng655a7c02013-10-16 16:09:24 -0700116#define TIPC_IMPORTANCE 127
117#define TIPC_SRC_DROPPABLE 128
Ben Cheng655a7c02013-10-16 16:09:24 -0700118#define TIPC_DEST_DROPPABLE 129
Christopher Ferris49f525c2016-12-12 14:55:36 -0800119#define TIPC_CONN_TIMEOUT 130
Ben Cheng655a7c02013-10-16 16:09:24 -0700120#define TIPC_NODE_RECVQ_DEPTH 131
121#define TIPC_SOCK_RECVQ_DEPTH 132
Christopher Ferris525ce912017-07-26 13:12:53 -0700122#define TIPC_MCAST_BROADCAST 133
123#define TIPC_MCAST_REPLICAST 134
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700124#define TIPC_MAX_MEDIA_NAME 16
Christopher Ferris49f525c2016-12-12 14:55:36 -0800125#define TIPC_MAX_IF_NAME 16
Christopher Ferrisba8d4f42014-09-03 19:56:49 -0700126#define TIPC_MAX_BEARER_NAME 32
127#define TIPC_MAX_LINK_NAME 60
128#define SIOCGETLINKNAME SIOCPROTOPRIVATE
Christopher Ferris49f525c2016-12-12 14:55:36 -0800129struct tipc_sioc_ln_req {
Tao Baod7db5942015-01-28 10:07:51 -0800130 __u32 peer;
131 __u32 bearer_id;
132 char linkname[TIPC_MAX_LINK_NAME];
Christopher Ferris49f525c2016-12-12 14:55:36 -0800133};
Ben Cheng655a7c02013-10-16 16:09:24 -0700134#endif