tipc.h
001:
002:
003:
004:
005:
006:
007:
008:
009:
010:
011:
012:
013:
014:
015:
016:
017:
018:
019:
020:
021:
022:
023:
024:
025:
026:
027:
028:
029:
030:
031:
032:
033:
034:
035:
036:
037: #ifndef _LINUX_TIPC_H_
038: #define _LINUX_TIPC_H_
039:
040: #include <linux/types.h>
041:
042:
043:
044:
045:
046: struct tipc_portid {
047: __u32 ref;
048: __u32 node;
049: };
050:
051: struct tipc_name {
052: __u32 type;
053: __u32 instance;
054: };
055:
056: struct tipc_name_seq {
057: __u32 type;
058: __u32 lower;
059: __u32 upper;
060: };
061:
062: static __inline__ __u32 tipc_addr(unsigned int zone,
063: unsigned int cluster,
064: unsigned int node)
065: {
066: return (zone << 24) | (cluster << 12) | node;
067: }
068:
069: static __inline__ unsigned int tipc_zone(__u32 addr)
070: {
071: return addr >> 24;
072: }
073:
074: static __inline__ unsigned int tipc_cluster(__u32 addr)
075: {
076: return (addr >> 12) & 0xfff;
077: }
078:
079: static __inline__ unsigned int tipc_node(__u32 addr)
080: {
081: return addr & 0xfff;
082: }
083:
084:
085:
086:
087:
088: #define TIPC_CFG_SRV 0
089: #define TIPC_TOP_SRV 1
090: #define TIPC_RESERVED_TYPES 64
091:
092:
093:
094:
095:
096: #define TIPC_ZONE_SCOPE 1
097: #define TIPC_CLUSTER_SCOPE 2
098: #define TIPC_NODE_SCOPE 3
099:
100:
101:
102:
103:
104: #define TIPC_MAX_USER_MSG_SIZE 66000U
105:
106:
107:
108:
109:
110: #define TIPC_LOW_IMPORTANCE 0
111: #define TIPC_MEDIUM_IMPORTANCE 1
112: #define TIPC_HIGH_IMPORTANCE 2
113: #define TIPC_CRITICAL_IMPORTANCE 3
114:
115:
116:
117:
118:
119: #define TIPC_OK 0
120: #define TIPC_ERR_NO_NAME 1
121: #define TIPC_ERR_NO_PORT 2
122: #define TIPC_ERR_NO_NODE 3
123: #define TIPC_ERR_OVERLOAD 4
124: #define TIPC_CONN_SHUTDOWN 5
125:
126:
127:
128:
129:
130: #define TIPC_SUB_PORTS 0x01
131: #define TIPC_SUB_SERVICE 0x02
132: #define TIPC_SUB_CANCEL 0x04
133:
134: #define TIPC_WAIT_FOREVER (~0)
135:
136: struct tipc_subscr {
137: struct tipc_name_seq seq;
138: __u32 timeout;
139: __u32 filter;
140: char usr_handle[8];
141: };
142:
143: #define TIPC_PUBLISHED 1
144: #define TIPC_WITHDRAWN 2
145: #define TIPC_SUBSCR_TIMEOUT 3
146:
147: struct tipc_event {
148: __u32 event;
149: __u32 found_lower;
150: __u32 found_upper;
151: struct tipc_portid port;
152: struct tipc_subscr s;
153: };
154:
155:
156:
157:
158:
159: #ifndef AF_TIPC
160: #define AF_TIPC 30
161: #endif
162:
163: #ifndef PF_TIPC
164: #define PF_TIPC AF_TIPC
165: #endif
166:
167: #ifndef SOL_TIPC
168: #define SOL_TIPC 271
169: #endif
170:
171: #define TIPC_ADDR_NAMESEQ 1
172: #define TIPC_ADDR_MCAST 1
173: #define TIPC_ADDR_NAME 2
174: #define TIPC_ADDR_ID 3
175:
176: struct sockaddr_tipc {
177: unsigned short family;
178: unsigned char addrtype;
179: signed char scope;
180: union {
181: struct tipc_portid id;
182: struct tipc_name_seq nameseq;
183: struct {
184: struct tipc_name name;
185: __u32 domain;
186: } name;
187: } addr;
188: };
189:
190:
191:
192:
193:
194: #define TIPC_ERRINFO 1
195: #define TIPC_RETDATA 2
196: #define TIPC_DESTNAME 3
197:
198:
199:
200:
201:
202: #define TIPC_IMPORTANCE 127
203: #define TIPC_SRC_DROPPABLE 128
204: #define TIPC_DEST_DROPPABLE 129
205: #define TIPC_CONN_TIMEOUT 130
206: #define TIPC_NODE_RECVQ_DEPTH 131
207: #define TIPC_SOCK_RECVQ_DEPTH 132
208:
209: #endif
210:
© Andrew Scott 2006 -
2025,
All Rights Reserved