aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2010-04-06 07:40:52 -0400
committerDavid S. Miller <davem@davemloft.net>2010-04-06 22:50:19 -0400
commitc6537d6742985da1fbf12ae26cde6a096fd35b5c (patch)
treec6a9bcb6d500f81efc1ead5d32f8d369b1e8ccb4 /include
parent459569145516f7967b916c57445feb02c600668c (diff)
TIPC: Updated topology subscription protocol according to latest spec
This patch makes it explicit in the API that all fields in subscriptions and events exchanged with the Topology Server must be in network byte order. It also ensures that all fields of a subscription are compared when cancelling a subscription, in order to avoid inadvertent cancelling of the wrong subscription. Finally, the tipc module version is updated to 2.0.0, to reflect the API change. Signed-off-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/tipc.h30
1 files changed, 12 insertions, 18 deletions
diff --git a/include/linux/tipc.h b/include/linux/tipc.h
index 3d92396639de..9536d8aeadf1 100644
--- a/include/linux/tipc.h
+++ b/include/linux/tipc.h
@@ -127,23 +127,17 @@ static inline unsigned int tipc_node(__u32 addr)
127 * TIPC topology subscription service definitions 127 * TIPC topology subscription service definitions
128 */ 128 */
129 129
130#define TIPC_SUB_PORTS 0x01 /* filter for port availability */ 130#define TIPC_SUB_SERVICE 0x00 /* Filter for service availability */
131#define TIPC_SUB_SERVICE 0x02 /* filter for service availability */ 131#define TIPC_SUB_PORTS 0x01 /* Filter for port availability */
132#define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */ 132#define TIPC_SUB_CANCEL 0x04 /* Cancel a subscription */
133#if 0
134/* The following filter options are not currently implemented */
135#define TIPC_SUB_NO_BIND_EVTS 0x04 /* filter out "publish" events */
136#define TIPC_SUB_NO_UNBIND_EVTS 0x08 /* filter out "withdraw" events */
137#define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */
138#endif
139 133
140#define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */ 134#define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */
141 135
142struct tipc_subscr { 136struct tipc_subscr {
143 struct tipc_name_seq seq; /* name sequence of interest */ 137 struct tipc_name_seq seq; /* NBO. Name sequence of interest */
144 __u32 timeout; /* subscription duration (in ms) */ 138 __u32 timeout; /* NBO. Subscription duration (in ms) */
145 __u32 filter; /* bitmask of filter options */ 139 __u32 filter; /* NBO. Bitmask of filter options */
146 char usr_handle[8]; /* available for subscriber use */ 140 char usr_handle[8]; /* Opaque. Available for subscriber use */
147}; 141};
148 142
149#define TIPC_PUBLISHED 1 /* publication event */ 143#define TIPC_PUBLISHED 1 /* publication event */
@@ -151,11 +145,11 @@ struct tipc_subscr {
151#define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */ 145#define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */
152 146
153struct tipc_event { 147struct tipc_event {
154 __u32 event; /* event type */ 148 __u32 event; /* NBO. Event type, as defined above */
155 __u32 found_lower; /* matching name seq instances */ 149 __u32 found_lower; /* NBO. Matching name seq instances */
156 __u32 found_upper; /* " " " " */ 150 __u32 found_upper; /* " " " " " */
157 struct tipc_portid port; /* associated port */ 151 struct tipc_portid port; /* NBO. Associated port */
158 struct tipc_subscr s; /* associated subscription */ 152 struct tipc_subscr s; /* Original, associated subscription */
159}; 153};
160 154
161/* 155/*