diff options
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r-- | net/tipc/msg.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index a0924956bb61..d7e4b8b93f9d 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -360,6 +360,28 @@ static inline void msg_set_bcast_ack(struct tipc_msg *m, u16 n) | |||
360 | msg_set_bits(m, 1, 0, 0xffff, n); | 360 | msg_set_bits(m, 1, 0, 0xffff, n); |
361 | } | 361 | } |
362 | 362 | ||
363 | /* Note: reusing bits in word 1 for ACTIVATE_MSG only, to re-synch | ||
364 | * link peer session number | ||
365 | */ | ||
366 | static inline bool msg_dest_session_valid(struct tipc_msg *m) | ||
367 | { | ||
368 | return msg_bits(m, 1, 16, 0x1); | ||
369 | } | ||
370 | |||
371 | static inline void msg_set_dest_session_valid(struct tipc_msg *m, bool valid) | ||
372 | { | ||
373 | msg_set_bits(m, 1, 16, 0x1, valid); | ||
374 | } | ||
375 | |||
376 | static inline u16 msg_dest_session(struct tipc_msg *m) | ||
377 | { | ||
378 | return msg_bits(m, 1, 0, 0xffff); | ||
379 | } | ||
380 | |||
381 | static inline void msg_set_dest_session(struct tipc_msg *m, u16 n) | ||
382 | { | ||
383 | msg_set_bits(m, 1, 0, 0xffff, n); | ||
384 | } | ||
363 | 385 | ||
364 | /* | 386 | /* |
365 | * Word 2 | 387 | * Word 2 |