~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/uapi/linux/tipc.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/uapi/linux/tipc.h (Version linux-6.11.5) and /include/uapi/linux/tipc.h (Version linux-4.16.18)


  1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Lin      1 /* SPDX-License-Identifier: ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) */
  2 /*                                                  2 /*
  3  * include/uapi/linux/tipc.h: Header for TIPC       3  * include/uapi/linux/tipc.h: Header for TIPC socket interface
  4  *                                                  4  *
  5  * Copyright (c) 2003-2006, 2015-2016 Ericsson      5  * Copyright (c) 2003-2006, 2015-2016 Ericsson AB
  6  * Copyright (c) 2005, 2010-2011, Wind River S      6  * Copyright (c) 2005, 2010-2011, Wind River Systems
  7  * All rights reserved.                             7  * All rights reserved.
  8  *                                                  8  *
  9  * Redistribution and use in source and binary      9  * Redistribution and use in source and binary forms, with or without
 10  * modification, are permitted provided that t     10  * modification, are permitted provided that the following conditions are met:
 11  *                                                 11  *
 12  * 1. Redistributions of source code must reta     12  * 1. Redistributions of source code must retain the above copyright
 13  *    notice, this list of conditions and the      13  *    notice, this list of conditions and the following disclaimer.
 14  * 2. Redistributions in binary form must repr     14  * 2. Redistributions in binary form must reproduce the above copyright
 15  *    notice, this list of conditions and the      15  *    notice, this list of conditions and the following disclaimer in the
 16  *    documentation and/or other materials pro     16  *    documentation and/or other materials provided with the distribution.
 17  * 3. Neither the names of the copyright holde     17  * 3. Neither the names of the copyright holders nor the names of its
 18  *    contributors may be used to endorse or p     18  *    contributors may be used to endorse or promote products derived from
 19  *    this software without specific prior wri     19  *    this software without specific prior written permission.
 20  *                                                 20  *
 21  * Alternatively, this software may be distrib     21  * Alternatively, this software may be distributed under the terms of the
 22  * GNU General Public License ("GPL") version      22  * GNU General Public License ("GPL") version 2 as published by the Free
 23  * Software Foundation.                            23  * Software Foundation.
 24  *                                                 24  *
 25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT      25  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 26  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCL     26  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND F     27  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 28  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYR     28  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
 29  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL     29  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 30  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT L     30  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,      31  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THE     32  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 33  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUD     33  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 34  * ARISING IN ANY WAY OUT OF THE USE OF THIS S     34  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 35  * POSSIBILITY OF SUCH DAMAGE.                     35  * POSSIBILITY OF SUCH DAMAGE.
 36  */                                                36  */
 37                                                    37 
 38 #ifndef _LINUX_TIPC_H_                             38 #ifndef _LINUX_TIPC_H_
 39 #define _LINUX_TIPC_H_                             39 #define _LINUX_TIPC_H_
 40                                                    40 
 41 #include <linux/types.h>                           41 #include <linux/types.h>
 42 #include <linux/sockios.h>                         42 #include <linux/sockios.h>
 43                                                    43 
 44 /*                                                 44 /*
 45  * TIPC addressing primitives                      45  * TIPC addressing primitives
 46  */                                                46  */
 47                                                    47 
 48 struct tipc_socket_addr {                      !!  48 struct tipc_portid {
 49         __u32 ref;                                 49         __u32 ref;
 50         __u32 node;                                50         __u32 node;
 51 };                                                 51 };
 52                                                    52 
 53 struct tipc_service_addr {                     !!  53 struct tipc_name {
 54         __u32 type;                                54         __u32 type;
 55         __u32 instance;                            55         __u32 instance;
 56 };                                                 56 };
 57                                                    57 
 58 struct tipc_service_range {                    !!  58 struct tipc_name_seq {
 59         __u32 type;                                59         __u32 type;
 60         __u32 lower;                               60         __u32 lower;
 61         __u32 upper;                               61         __u32 upper;
 62 };                                                 62 };
 63                                                    63 
                                                   >>  64 /* TIPC Address Size, Offset, Mask specification for Z.C.N
                                                   >>  65  */
                                                   >>  66 #define TIPC_NODE_BITS          12
                                                   >>  67 #define TIPC_CLUSTER_BITS       12
                                                   >>  68 #define TIPC_ZONE_BITS          8
                                                   >>  69 
                                                   >>  70 #define TIPC_NODE_OFFSET        0
                                                   >>  71 #define TIPC_CLUSTER_OFFSET     TIPC_NODE_BITS
                                                   >>  72 #define TIPC_ZONE_OFFSET        (TIPC_CLUSTER_OFFSET + TIPC_CLUSTER_BITS)
                                                   >>  73 
                                                   >>  74 #define TIPC_NODE_SIZE          ((1UL << TIPC_NODE_BITS) - 1)
                                                   >>  75 #define TIPC_CLUSTER_SIZE       ((1UL << TIPC_CLUSTER_BITS) - 1)
                                                   >>  76 #define TIPC_ZONE_SIZE          ((1UL << TIPC_ZONE_BITS) - 1)
                                                   >>  77 
                                                   >>  78 #define TIPC_NODE_MASK          (TIPC_NODE_SIZE << TIPC_NODE_OFFSET)
                                                   >>  79 #define TIPC_CLUSTER_MASK       (TIPC_CLUSTER_SIZE << TIPC_CLUSTER_OFFSET)
                                                   >>  80 #define TIPC_ZONE_MASK          (TIPC_ZONE_SIZE << TIPC_ZONE_OFFSET)
                                                   >>  81 
                                                   >>  82 #define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK | TIPC_CLUSTER_MASK)
                                                   >>  83 
                                                   >>  84 static inline __u32 tipc_addr(unsigned int zone,
                                                   >>  85                               unsigned int cluster,
                                                   >>  86                               unsigned int node)
                                                   >>  87 {
                                                   >>  88         return (zone << TIPC_ZONE_OFFSET) |
                                                   >>  89                 (cluster << TIPC_CLUSTER_OFFSET) |
                                                   >>  90                 node;
                                                   >>  91 }
                                                   >>  92 
                                                   >>  93 static inline unsigned int tipc_zone(__u32 addr)
                                                   >>  94 {
                                                   >>  95         return addr >> TIPC_ZONE_OFFSET;
                                                   >>  96 }
                                                   >>  97 
                                                   >>  98 static inline unsigned int tipc_cluster(__u32 addr)
                                                   >>  99 {
                                                   >> 100         return (addr & TIPC_CLUSTER_MASK) >> TIPC_CLUSTER_OFFSET;
                                                   >> 101 }
                                                   >> 102 
                                                   >> 103 static inline unsigned int tipc_node(__u32 addr)
                                                   >> 104 {
                                                   >> 105         return addr & TIPC_NODE_MASK;
                                                   >> 106 }
                                                   >> 107 
 64 /*                                                108 /*
 65  * Application-accessible service types        !! 109  * Application-accessible port name types
 66  */                                               110  */
 67                                                   111 
 68 #define TIPC_NODE_STATE         0       /* nod !! 112 #define TIPC_CFG_SRV            0       /* configuration service name type */
 69 #define TIPC_TOP_SRV            1       /* top !! 113 #define TIPC_TOP_SRV            1       /* topology service name type */
 70 #define TIPC_LINK_STATE         2       /* lin !! 114 #define TIPC_LINK_STATE         2       /* link state name type */
 71 #define TIPC_RESERVED_TYPES     64      /* low !! 115 #define TIPC_RESERVED_TYPES     64      /* lowest user-publishable name type */
 72                                                   116 
 73 /*                                                117 /*
 74  * Publication scopes when binding service / s !! 118  * Publication scopes when binding port names and port name sequences
 75  */                                               119  */
 76 enum tipc_scope {                              !! 120 #define TIPC_ZONE_SCOPE         1
 77         TIPC_CLUSTER_SCOPE = 2, /* 0 can also  !! 121 #define TIPC_CLUSTER_SCOPE      2
 78         TIPC_NODE_SCOPE    = 3                 !! 122 #define TIPC_NODE_SCOPE         3
 79 };                                             << 
 80                                                   123 
 81 /*                                                124 /*
 82  * Limiting values for messages                   125  * Limiting values for messages
 83  */                                               126  */
 84                                                   127 
 85 #define TIPC_MAX_USER_MSG_SIZE  66000U            128 #define TIPC_MAX_USER_MSG_SIZE  66000U
 86                                                   129 
 87 /*                                                130 /*
 88  * Message importance levels                      131  * Message importance levels
 89  */                                               132  */
 90                                                   133 
 91 #define TIPC_LOW_IMPORTANCE             0         134 #define TIPC_LOW_IMPORTANCE             0
 92 #define TIPC_MEDIUM_IMPORTANCE          1         135 #define TIPC_MEDIUM_IMPORTANCE          1
 93 #define TIPC_HIGH_IMPORTANCE            2         136 #define TIPC_HIGH_IMPORTANCE            2
 94 #define TIPC_CRITICAL_IMPORTANCE        3         137 #define TIPC_CRITICAL_IMPORTANCE        3
 95                                                   138 
 96 /*                                                139 /*
 97  * Msg rejection/connection shutdown reasons      140  * Msg rejection/connection shutdown reasons
 98  */                                               141  */
 99                                                   142 
100 #define TIPC_OK                 0                 143 #define TIPC_OK                 0
101 #define TIPC_ERR_NO_NAME        1                 144 #define TIPC_ERR_NO_NAME        1
102 #define TIPC_ERR_NO_PORT        2                 145 #define TIPC_ERR_NO_PORT        2
103 #define TIPC_ERR_NO_NODE        3                 146 #define TIPC_ERR_NO_NODE        3
104 #define TIPC_ERR_OVERLOAD       4                 147 #define TIPC_ERR_OVERLOAD       4
105 #define TIPC_CONN_SHUTDOWN      5                 148 #define TIPC_CONN_SHUTDOWN      5
106                                                   149 
107 /*                                                150 /*
108  * TIPC topology subscription service definiti    151  * TIPC topology subscription service definitions
109  */                                               152  */
110                                                   153 
111 #define TIPC_SUB_PORTS          0x01    /* fil !! 154 #define TIPC_SUB_PORTS          0x01    /* filter for port availability */
112 #define TIPC_SUB_SERVICE        0x02    /* fil !! 155 #define TIPC_SUB_SERVICE        0x02    /* filter for service availability */
113 #define TIPC_SUB_CANCEL         0x04    /* fil !! 156 #define TIPC_SUB_CANCEL         0x04    /* cancel a subscription */
114                                                   157 
115 #define TIPC_WAIT_FOREVER       (~0)    /* tim    158 #define TIPC_WAIT_FOREVER       (~0)    /* timeout for permanent subscription */
116                                                   159 
117 struct tipc_subscr {                              160 struct tipc_subscr {
118         struct tipc_service_range seq;  /* ran !! 161         struct tipc_name_seq seq;       /* name sequence of interest */
119         __u32 timeout;                  /* sub    162         __u32 timeout;                  /* subscription duration (in ms) */
120         __u32 filter;                   /* bit    163         __u32 filter;                   /* bitmask of filter options */
121         char usr_handle[8];             /* ava    164         char usr_handle[8];             /* available for subscriber use */
122 };                                                165 };
123                                                   166 
124 #define TIPC_PUBLISHED          1       /* pub    167 #define TIPC_PUBLISHED          1       /* publication event */
125 #define TIPC_WITHDRAWN          2       /* wit !! 168 #define TIPC_WITHDRAWN          2       /* withdraw event */
126 #define TIPC_SUBSCR_TIMEOUT     3       /* sub    169 #define TIPC_SUBSCR_TIMEOUT     3       /* subscription timeout event */
127                                                   170 
128 struct tipc_event {                               171 struct tipc_event {
129         __u32 event;                    /* eve    172         __u32 event;                    /* event type */
130         __u32 found_lower;              /* mat !! 173         __u32 found_lower;              /* matching name seq instances */
131         __u32 found_upper;              /*     !! 174         __u32 found_upper;              /*    "      "    "     "      */
132         struct tipc_socket_addr port;   /* ass !! 175         struct tipc_portid port;        /* associated port */
133         struct tipc_subscr s;           /* ass    176         struct tipc_subscr s;           /* associated subscription */
134 };                                                177 };
135                                                   178 
136 /*                                                179 /*
137  * Socket API                                     180  * Socket API
138  */                                               181  */
139                                                   182 
140 #ifndef AF_TIPC                                   183 #ifndef AF_TIPC
141 #define AF_TIPC         30                        184 #define AF_TIPC         30
142 #endif                                            185 #endif
143                                                   186 
144 #ifndef PF_TIPC                                   187 #ifndef PF_TIPC
145 #define PF_TIPC         AF_TIPC                   188 #define PF_TIPC         AF_TIPC
146 #endif                                            189 #endif
147                                                   190 
148 #ifndef SOL_TIPC                                  191 #ifndef SOL_TIPC
149 #define SOL_TIPC        271                       192 #define SOL_TIPC        271
150 #endif                                            193 #endif
151                                                   194 
152 #define TIPC_ADDR_MCAST         1              !! 195 #define TIPC_ADDR_NAMESEQ       1
153 #define TIPC_SERVICE_RANGE      1              !! 196 #define TIPC_ADDR_MCAST         1
154 #define TIPC_SERVICE_ADDR       2              !! 197 #define TIPC_ADDR_NAME          2
155 #define TIPC_SOCKET_ADDR        3              !! 198 #define TIPC_ADDR_ID            3
156                                                   199 
157 struct sockaddr_tipc {                            200 struct sockaddr_tipc {
158         unsigned short family;                    201         unsigned short family;
159         unsigned char  addrtype;                  202         unsigned char  addrtype;
160         signed   char  scope;                     203         signed   char  scope;
161         union {                                   204         union {
162                 struct tipc_socket_addr id;    !! 205                 struct tipc_portid id;
163                 struct tipc_service_range name !! 206                 struct tipc_name_seq nameseq;
164                 struct {                          207                 struct {
165                         struct tipc_service_ad !! 208                         struct tipc_name name;
166                         __u32 domain;             209                         __u32 domain;
167                 } name;                           210                 } name;
168         } addr;                                   211         } addr;
169 };                                                212 };
170                                                   213 
171 /*                                                214 /*
172  * Ancillary data objects supported by recvmsg    215  * Ancillary data objects supported by recvmsg()
173  */                                               216  */
174                                                   217 
175 #define TIPC_ERRINFO    1       /* error info     218 #define TIPC_ERRINFO    1       /* error info */
176 #define TIPC_RETDATA    2       /* returned da    219 #define TIPC_RETDATA    2       /* returned data */
177 #define TIPC_DESTNAME   3       /* destination    220 #define TIPC_DESTNAME   3       /* destination name */
178                                                   221 
179 /*                                                222 /*
180  * TIPC-specific socket option names              223  * TIPC-specific socket option names
181  */                                               224  */
182                                                   225 
183 #define TIPC_IMPORTANCE         127     /* Def    226 #define TIPC_IMPORTANCE         127     /* Default: TIPC_LOW_IMPORTANCE */
184 #define TIPC_SRC_DROPPABLE      128     /* Def    227 #define TIPC_SRC_DROPPABLE      128     /* Default: based on socket type */
185 #define TIPC_DEST_DROPPABLE     129     /* Def    228 #define TIPC_DEST_DROPPABLE     129     /* Default: based on socket type */
186 #define TIPC_CONN_TIMEOUT       130     /* Def    229 #define TIPC_CONN_TIMEOUT       130     /* Default: 8000 (ms)  */
187 #define TIPC_NODE_RECVQ_DEPTH   131     /* Def    230 #define TIPC_NODE_RECVQ_DEPTH   131     /* Default: none (read only) */
188 #define TIPC_SOCK_RECVQ_DEPTH   132     /* Def    231 #define TIPC_SOCK_RECVQ_DEPTH   132     /* Default: none (read only) */
189 #define TIPC_MCAST_BROADCAST    133     /* Def    232 #define TIPC_MCAST_BROADCAST    133     /* Default: TIPC selects. No arg */
190 #define TIPC_MCAST_REPLICAST    134     /* Def    233 #define TIPC_MCAST_REPLICAST    134     /* Default: TIPC selects. No arg */
191 #define TIPC_GROUP_JOIN         135     /* Tak    234 #define TIPC_GROUP_JOIN         135     /* Takes struct tipc_group_req* */
192 #define TIPC_GROUP_LEAVE        136     /* No     235 #define TIPC_GROUP_LEAVE        136     /* No argument */
193 #define TIPC_SOCK_RECVQ_USED    137     /* Def << 
194 #define TIPC_NODELAY            138     /* Def << 
195                                                   236 
196 /*                                                237 /*
197  * Flag values                                    238  * Flag values
198  */                                               239  */
199 #define TIPC_GROUP_LOOPBACK     0x1  /* Receiv    240 #define TIPC_GROUP_LOOPBACK     0x1  /* Receive copy of sent msg when match */
200 #define TIPC_GROUP_MEMBER_EVTS  0x2  /* Receiv    241 #define TIPC_GROUP_MEMBER_EVTS  0x2  /* Receive membership events in socket */
201                                                   242 
202 struct tipc_group_req {                           243 struct tipc_group_req {
203         __u32 type;      /* group id */           244         __u32 type;      /* group id */
204         __u32 instance;  /* member id */          245         __u32 instance;  /* member id */
205         __u32 scope;     /* cluster/node */    !! 246         __u32 scope;     /* zone/cluster/node */
206         __u32 flags;                              247         __u32 flags;
207 };                                                248 };
208                                                   249 
209 /*                                                250 /*
210  * Maximum sizes of TIPC bearer-related names     251  * Maximum sizes of TIPC bearer-related names (including terminating NULL)
211  * The string formatting for each name element    252  * The string formatting for each name element is:
212  * media: media                                   253  * media: media
213  * interface: media:interface name                254  * interface: media:interface name
214  * link: node:interface-node:interface         !! 255  * link: Z.C.N:interface-Z.C.N:interface
                                                   >> 256  *
215  */                                               257  */
216 #define TIPC_NODEID_LEN         16             !! 258 
217 #define TIPC_MAX_MEDIA_NAME     16                259 #define TIPC_MAX_MEDIA_NAME     16
218 #define TIPC_MAX_IF_NAME        16                260 #define TIPC_MAX_IF_NAME        16
219 #define TIPC_MAX_BEARER_NAME    32                261 #define TIPC_MAX_BEARER_NAME    32
220 #define TIPC_MAX_LINK_NAME      68             !! 262 #define TIPC_MAX_LINK_NAME      60
221                                                   263 
222 #define SIOCGETLINKNAME        SIOCPROTOPRIVAT !! 264 #define SIOCGETLINKNAME         SIOCPROTOPRIVATE
223 #define SIOCGETNODEID          (SIOCPROTOPRIVA << 
224                                                   265 
225 struct tipc_sioc_ln_req {                         266 struct tipc_sioc_ln_req {
226         __u32 peer;                               267         __u32 peer;
227         __u32 bearer_id;                          268         __u32 bearer_id;
228         char linkname[TIPC_MAX_LINK_NAME];        269         char linkname[TIPC_MAX_LINK_NAME];
229 };                                                270 };
230                                                << 
231 struct tipc_sioc_nodeid_req {                  << 
232         __u32 peer;                            << 
233         char node_id[TIPC_NODEID_LEN];         << 
234 };                                             << 
235                                                << 
236 /*                                             << 
237  * TIPC Crypto, AEAD                           << 
238  */                                            << 
239 #define TIPC_AEAD_ALG_NAME              (32)   << 
240                                                << 
241 struct tipc_aead_key {                         << 
242         char alg_name[TIPC_AEAD_ALG_NAME];     << 
243         unsigned int keylen;    /* in bytes */ << 
244         char key[];                            << 
245 };                                             << 
246                                                << 
247 #define TIPC_AEAD_KEYLEN_MIN            (16 +  << 
248 #define TIPC_AEAD_KEYLEN_MAX            (32 +  << 
249 #define TIPC_AEAD_KEY_SIZE_MAX          (sizeo << 
250                                                << 
251                                                << 
252 static inline int tipc_aead_key_size(struct ti << 
253 {                                              << 
254         return sizeof(*key) + key->keylen;     << 
255 }                                              << 
256                                                << 
257 #define TIPC_REKEYING_NOW               (~0U)  << 
258                                                << 
259 /* The macros and functions below are deprecat << 
260  */                                            << 
261                                                << 
262 #define TIPC_CFG_SRV            0              << 
263 #define TIPC_ZONE_SCOPE         1              << 
264                                                << 
265 #define TIPC_ADDR_NAMESEQ       1              << 
266 #define TIPC_ADDR_NAME          2              << 
267 #define TIPC_ADDR_ID            3              << 
268                                                << 
269 #define TIPC_NODE_BITS          12             << 
270 #define TIPC_CLUSTER_BITS       12             << 
271 #define TIPC_ZONE_BITS          8              << 
272                                                << 
273 #define TIPC_NODE_OFFSET        0              << 
274 #define TIPC_CLUSTER_OFFSET     TIPC_NODE_BITS << 
275 #define TIPC_ZONE_OFFSET        (TIPC_CLUSTER_ << 
276                                                << 
277 #define TIPC_NODE_SIZE          ((1UL << TIPC_ << 
278 #define TIPC_CLUSTER_SIZE       ((1UL << TIPC_ << 
279 #define TIPC_ZONE_SIZE          ((1UL << TIPC_ << 
280                                                << 
281 #define TIPC_NODE_MASK          (TIPC_NODE_SIZ << 
282 #define TIPC_CLUSTER_MASK       (TIPC_CLUSTER_ << 
283 #define TIPC_ZONE_MASK          (TIPC_ZONE_SIZ << 
284                                                << 
285 #define TIPC_ZONE_CLUSTER_MASK (TIPC_ZONE_MASK << 
286                                                << 
287 #define tipc_portid tipc_socket_addr           << 
288 #define tipc_name tipc_service_addr            << 
289 #define tipc_name_seq tipc_service_range       << 
290                                                << 
291 static inline __u32 tipc_addr(unsigned int zon << 
292                               unsigned int clu << 
293                               unsigned int nod << 
294 {                                              << 
295         return (zone << TIPC_ZONE_OFFSET) |    << 
296                 (cluster << TIPC_CLUSTER_OFFSE << 
297                 node;                          << 
298 }                                              << 
299                                                << 
300 static inline unsigned int tipc_zone(__u32 add << 
301 {                                              << 
302         return addr >> TIPC_ZONE_OFFSET;       << 
303 }                                              << 
304                                                << 
305 static inline unsigned int tipc_cluster(__u32  << 
306 {                                              << 
307         return (addr & TIPC_CLUSTER_MASK) >> T << 
308 }                                              << 
309                                                << 
310 static inline unsigned int tipc_node(__u32 add << 
311 {                                              << 
312         return addr & TIPC_NODE_MASK;          << 
313 }                                              << 
314                                                << 
315 #endif                                            271 #endif
316                                                   272 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php