.. | .. |
---|
47 | 47 | |
---|
48 | 48 | /** |
---|
49 | 49 | * struct tipc_subscription - TIPC network topology subscription object |
---|
50 | | - * @subscriber: pointer to its subscriber |
---|
51 | | - * @seq: name sequence associated with subscription |
---|
| 50 | + * @kref: reference count for this subscription |
---|
| 51 | + * @net: network namespace associated with subscription |
---|
52 | 52 | * @timer: timer governing subscription duration (optional) |
---|
53 | | - * @nameseq_list: adjacent subscriptions in name sequence's subscription list |
---|
| 53 | + * @service_list: adjacent subscriptions in name sequence's subscription list |
---|
54 | 54 | * @sub_list: adjacent subscriptions in subscriber's subscription list |
---|
55 | 55 | * @evt: template for events generated by subscription |
---|
| 56 | + * @conid: connection identifier of topology server |
---|
| 57 | + * @inactive: true if this subscription is inactive |
---|
| 58 | + * @lock: serialize up/down and timer events |
---|
56 | 59 | */ |
---|
57 | 60 | struct tipc_subscription { |
---|
58 | 61 | struct kref kref; |
---|
.. | .. |
---|
63 | 66 | struct tipc_event evt; |
---|
64 | 67 | int conid; |
---|
65 | 68 | bool inactive; |
---|
66 | | - spinlock_t lock; /* serialize up/down and timer events */ |
---|
| 69 | + spinlock_t lock; |
---|
67 | 70 | }; |
---|
68 | 71 | |
---|
69 | 72 | struct tipc_subscription *tipc_sub_subscribe(struct net *net, |
---|
.. | .. |
---|
96 | 99 | (swap_ ? swab32(val__) : val__); \ |
---|
97 | 100 | }) |
---|
98 | 101 | |
---|
| 102 | +/* tipc_sub_write - write val_ to field_ of struct sub_ in user endian format |
---|
| 103 | + */ |
---|
| 104 | +#define tipc_sub_write(sub_, field_, val_) \ |
---|
| 105 | + ({ \ |
---|
| 106 | + struct tipc_subscr *sub__ = sub_; \ |
---|
| 107 | + u32 val__ = val_; \ |
---|
| 108 | + int swap_ = !((sub__)->filter & TIPC_FILTER_MASK); \ |
---|
| 109 | + (sub__)->field_ = swap_ ? swab32(val__) : val__; \ |
---|
| 110 | + }) |
---|
| 111 | + |
---|
99 | 112 | /* tipc_evt_write - write val_ to field_ of struct evt_ in user endian format |
---|
100 | 113 | */ |
---|
101 | 114 | #define tipc_evt_write(evt_, field_, val_) \ |
---|