Home | History | Annotate | Download | only in linux
      1 /****************************************************************************
      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>
     22 #include <linux/sockios.h>
     23 struct tipc_portid {
     24   __u32 ref;
     25   __u32 node;
     26 };
     27 struct tipc_name {
     28   __u32 type;
     29   __u32 instance;
     30 };
     31 struct tipc_name_seq {
     32   __u32 type;
     33   __u32 lower;
     34   __u32 upper;
     35 };
     36 #define TIPC_NODE_BITS 12
     37 #define TIPC_CLUSTER_BITS 12
     38 #define TIPC_ZONE_BITS 8
     39 #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)
     43 #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)
     47 #define TIPC_ZONE_MASK (TIPC_ZONE_SIZE << TIPC_ZONE_OFFSET)
     48 #define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK | TIPC_CLUSTER_MASK)
     49 #define TIPC_CFG_SRV 0
     50 #define TIPC_TOP_SRV 1
     51 #define TIPC_LINK_STATE 2
     52 #define TIPC_RESERVED_TYPES 64
     53 #define TIPC_ZONE_SCOPE 1
     54 #define TIPC_CLUSTER_SCOPE 2
     55 #define TIPC_NODE_SCOPE 3
     56 #define TIPC_MAX_USER_MSG_SIZE 66000U
     57 #define TIPC_LOW_IMPORTANCE 0
     58 #define TIPC_MEDIUM_IMPORTANCE 1
     59 #define TIPC_HIGH_IMPORTANCE 2
     60 #define TIPC_CRITICAL_IMPORTANCE 3
     61 #define TIPC_OK 0
     62 #define TIPC_ERR_NO_NAME 1
     63 #define TIPC_ERR_NO_PORT 2
     64 #define TIPC_ERR_NO_NODE 3
     65 #define TIPC_ERR_OVERLOAD 4
     66 #define TIPC_CONN_SHUTDOWN 5
     67 #define TIPC_SUB_PORTS 0x01
     68 #define TIPC_SUB_SERVICE 0x02
     69 #define TIPC_SUB_CANCEL 0x04
     70 #define TIPC_WAIT_FOREVER (~0)
     71 struct tipc_subscr {
     72   struct tipc_name_seq seq;
     73   __u32 timeout;
     74   __u32 filter;
     75   char usr_handle[8];
     76 };
     77 #define TIPC_PUBLISHED 1
     78 #define TIPC_WITHDRAWN 2
     79 #define TIPC_SUBSCR_TIMEOUT 3
     80 struct tipc_event {
     81   __u32 event;
     82   __u32 found_lower;
     83   __u32 found_upper;
     84   struct tipc_portid port;
     85   struct tipc_subscr s;
     86 };
     87 #ifndef AF_TIPC
     88 #define AF_TIPC 30
     89 #endif
     90 #ifndef PF_TIPC
     91 #define PF_TIPC AF_TIPC
     92 #endif
     93 #ifndef SOL_TIPC
     94 #define SOL_TIPC 271
     95 #endif
     96 #define TIPC_ADDR_NAMESEQ 1
     97 #define TIPC_ADDR_MCAST 1
     98 #define TIPC_ADDR_NAME 2
     99 #define TIPC_ADDR_ID 3
    100 struct sockaddr_tipc {
    101   unsigned short family;
    102   unsigned char addrtype;
    103   signed char scope;
    104   union {
    105     struct tipc_portid id;
    106     struct tipc_name_seq nameseq;
    107     struct {
    108       struct tipc_name name;
    109       __u32 domain;
    110     } name;
    111   } addr;
    112 };
    113 #define TIPC_ERRINFO 1
    114 #define TIPC_RETDATA 2
    115 #define TIPC_DESTNAME 3
    116 #define TIPC_IMPORTANCE 127
    117 #define TIPC_SRC_DROPPABLE 128
    118 #define TIPC_DEST_DROPPABLE 129
    119 #define TIPC_CONN_TIMEOUT 130
    120 #define TIPC_NODE_RECVQ_DEPTH 131
    121 #define TIPC_SOCK_RECVQ_DEPTH 132
    122 #define TIPC_MCAST_BROADCAST 133
    123 #define TIPC_MCAST_REPLICAST 134
    124 #define TIPC_GROUP_JOIN 135
    125 #define TIPC_GROUP_LEAVE 136
    126 #define TIPC_GROUP_LOOPBACK 0x1
    127 #define TIPC_GROUP_MEMBER_EVTS 0x2
    128 struct tipc_group_req {
    129   __u32 type;
    130   __u32 instance;
    131   __u32 scope;
    132   __u32 flags;
    133 };
    134 #define TIPC_MAX_MEDIA_NAME 16
    135 #define TIPC_MAX_IF_NAME 16
    136 #define TIPC_MAX_BEARER_NAME 32
    137 #define TIPC_MAX_LINK_NAME 60
    138 #define SIOCGETLINKNAME SIOCPROTOPRIVATE
    139 struct tipc_sioc_ln_req {
    140   __u32 peer;
    141   __u32 bearer_id;
    142   char linkname[TIPC_MAX_LINK_NAME];
    143 };
    144 #endif
    145