diff options
Diffstat (limited to 'net/tipc/subscr.h')
| -rw-r--r-- | net/tipc/subscr.h | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/net/tipc/subscr.h b/net/tipc/subscr.h index 93a8e674fac1..45d89bf4d202 100644 --- a/net/tipc/subscr.h +++ b/net/tipc/subscr.h | |||
| @@ -1,8 +1,8 @@ | |||
| 1 | /* | 1 | /* |
| 2 | * net/tipc/subscr.h: Include file for TIPC subscription service | 2 | * net/tipc/subscr.h: Include file for TIPC network topology service |
| 3 | * | 3 | * |
| 4 | * Copyright (c) 2003-2006, Ericsson AB | 4 | * Copyright (c) 2003-2006, Ericsson AB |
| 5 | * Copyright (c) 2005, Wind River Systems | 5 | * Copyright (c) 2005-2007, Wind River Systems |
| 6 | * All rights reserved. | 6 | * All rights reserved. |
| 7 | * | 7 | * |
| 8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
| @@ -37,34 +37,44 @@ | |||
| 37 | #ifndef _TIPC_SUBSCR_H | 37 | #ifndef _TIPC_SUBSCR_H |
| 38 | #define _TIPC_SUBSCR_H | 38 | #define _TIPC_SUBSCR_H |
| 39 | 39 | ||
| 40 | struct subscription; | ||
| 41 | |||
| 42 | typedef void (*tipc_subscr_event) (struct subscription *sub, | ||
| 43 | u32 found_lower, u32 found_upper, | ||
| 44 | u32 event, u32 port_ref, u32 node); | ||
| 45 | |||
| 40 | /** | 46 | /** |
| 41 | * struct subscription - TIPC network topology subscription object | 47 | * struct subscription - TIPC network topology subscription object |
| 42 | * @seq: name sequence associated with subscription | 48 | * @seq: name sequence associated with subscription |
| 43 | * @timeout: duration of subscription (in ms) | 49 | * @timeout: duration of subscription (in ms) |
| 44 | * @filter: event filtering to be done for subscription | 50 | * @filter: event filtering to be done for subscription |
| 45 | * @evt: template for events generated by subscription | 51 | * @event_cb: routine invoked when a subscription event is detected |
| 46 | * @subscription_list: adjacent subscriptions in subscriber's subscription list | 52 | * @timer: timer governing subscription duration (optional) |
| 47 | * @nameseq_list: adjacent subscriptions in name sequence's subscription list | 53 | * @nameseq_list: adjacent subscriptions in name sequence's subscription list |
| 48 | * @timer_ref: reference to timer governing subscription duration (may be NULL) | 54 | * @subscription_list: adjacent subscriptions in subscriber's subscription list |
| 49 | * @owner: pointer to subscriber object associated with this subscription | 55 | * @server_ref: object reference of server port associated with subscription |
| 56 | * @swap: indicates if subscriber uses opposite endianness in its messages | ||
| 57 | * @evt: template for events generated by subscription | ||
| 50 | */ | 58 | */ |
| 51 | 59 | ||
| 52 | struct subscription { | 60 | struct subscription { |
| 53 | struct tipc_name_seq seq; | 61 | struct tipc_name_seq seq; |
| 54 | u32 timeout; | 62 | u32 timeout; |
| 55 | u32 filter; | 63 | u32 filter; |
| 56 | struct tipc_event evt; | 64 | tipc_subscr_event event_cb; |
| 57 | struct list_head subscription_list; | ||
| 58 | struct list_head nameseq_list; | ||
| 59 | struct timer_list timer; | 65 | struct timer_list timer; |
| 60 | struct subscriber *owner; | 66 | struct list_head nameseq_list; |
| 67 | struct list_head subscription_list; | ||
| 68 | u32 server_ref; | ||
| 69 | int swap; | ||
| 70 | struct tipc_event evt; | ||
| 61 | }; | 71 | }; |
| 62 | 72 | ||
| 63 | int tipc_subscr_overlap(struct subscription * sub, | 73 | int tipc_subscr_overlap(struct subscription *sub, |
| 64 | u32 found_lower, | 74 | u32 found_lower, |
| 65 | u32 found_upper); | 75 | u32 found_upper); |
| 66 | 76 | ||
| 67 | void tipc_subscr_report_overlap(struct subscription * sub, | 77 | void tipc_subscr_report_overlap(struct subscription *sub, |
| 68 | u32 found_lower, | 78 | u32 found_lower, |
| 69 | u32 found_upper, | 79 | u32 found_upper, |
| 70 | u32 event, | 80 | u32 event, |
