summaryrefslogtreecommitdiff
path: root/include/linux/tipc.h
diff options
context:
space:
mode:
authorJon Paul Maloy <jon.maloy@ericsson.com>2010-04-06 11:40:52 +0000
committerDavid S. Miller <davem@davemloft.net>2010-04-06 19:50:19 -0700
commitc6537d6742985da1fbf12ae26cde6a096fd35b5c (patch)
treec6a9bcb6d500f81efc1ead5d32f8d369b1e8ccb4 /include/linux/tipc.h
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/linux/tipc.h')
-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 3d92396639d..9536d8aeadf 100644
--- a/include/linux/tipc.h
+++ b/include/linux/tipc.h
@@ -127,23 +127,17 @@ static inline unsigned int tipc_node(__u32 addr)
* TIPC topology subscription service definitions
*/
-#define TIPC_SUB_PORTS 0x01 /* filter for port availability */
-#define TIPC_SUB_SERVICE 0x02 /* filter for service availability */
-#define TIPC_SUB_CANCEL 0x04 /* cancel a subscription */
-#if 0
-/* The following filter options are not currently implemented */
-#define TIPC_SUB_NO_BIND_EVTS 0x04 /* filter out "publish" events */
-#define TIPC_SUB_NO_UNBIND_EVTS 0x08 /* filter out "withdraw" events */
-#define TIPC_SUB_SINGLE_EVT 0x10 /* expire after first event */
-#endif
+#define TIPC_SUB_SERVICE 0x00 /* Filter for service availability */
+#define TIPC_SUB_PORTS 0x01 /* Filter for port availability */
+#define TIPC_SUB_CANCEL 0x04 /* Cancel a subscription */
#define TIPC_WAIT_FOREVER ~0 /* timeout for permanent subscription */
struct tipc_subscr {
- struct tipc_name_seq seq; /* name sequence of interest */
- __u32 timeout; /* subscription duration (in ms) */
- __u32 filter; /* bitmask of filter options */
- char usr_handle[8]; /* available for subscriber use */
+ struct tipc_name_seq seq; /* NBO. Name sequence of interest */
+ __u32 timeout; /* NBO. Subscription duration (in ms) */
+ __u32 filter; /* NBO. Bitmask of filter options */
+ char usr_handle[8]; /* Opaque. Available for subscriber use */
};
#define TIPC_PUBLISHED 1 /* publication event */
@@ -151,11 +145,11 @@ struct tipc_subscr {
#define TIPC_SUBSCR_TIMEOUT 3 /* subscription timeout event */
struct tipc_event {
- __u32 event; /* event type */
- __u32 found_lower; /* matching name seq instances */
- __u32 found_upper; /* " " " " */
- struct tipc_portid port; /* associated port */
- struct tipc_subscr s; /* associated subscription */
+ __u32 event; /* NBO. Event type, as defined above */
+ __u32 found_lower; /* NBO. Matching name seq instances */
+ __u32 found_upper; /* " " " " " */
+ struct tipc_portid port; /* NBO. Associated port */
+ struct tipc_subscr s; /* Original, associated subscription */
};
/*