diff options
author | Steve French <sfrench@us.ibm.com> | 2012-01-14 00:59:13 -0500 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2012-01-14 00:59:13 -0500 |
commit | dcd169b761d52e3f9122e30442b83863bdf1d9d9 (patch) | |
tree | 5e79741f1865a3aef840e68d7db9e7ed4d685b5a /net/tipc/msg.h | |
parent | aaf015890754d58dcb71a4aa44ed246bb082bcf6 (diff) | |
parent | 7250170c9ed00f3b74b11b98afefab45020672dd (diff) |
Merge branch 'master' of git+ssh://git.samba.org/data/git/sfrench/cifs-2.6
Diffstat (limited to 'net/tipc/msg.h')
-rw-r--r-- | net/tipc/msg.h | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/net/tipc/msg.h b/net/tipc/msg.h index d93178f2e852..7b0cda167107 100644 --- a/net/tipc/msg.h +++ b/net/tipc/msg.h | |||
@@ -78,6 +78,8 @@ | |||
78 | 78 | ||
79 | #define MAX_MSG_SIZE (MAX_H_SIZE + TIPC_MAX_USER_MSG_SIZE) | 79 | #define MAX_MSG_SIZE (MAX_H_SIZE + TIPC_MAX_USER_MSG_SIZE) |
80 | 80 | ||
81 | #define TIPC_MEDIA_ADDR_OFFSET 5 | ||
82 | |||
81 | 83 | ||
82 | struct tipc_msg { | 84 | struct tipc_msg { |
83 | __be32 hdr[15]; | 85 | __be32 hdr[15]; |
@@ -682,6 +684,10 @@ static inline void msg_set_redundant_link(struct tipc_msg *m, u32 r) | |||
682 | msg_set_bits(m, 5, 12, 0x1, r); | 684 | msg_set_bits(m, 5, 12, 0x1, r); |
683 | } | 685 | } |
684 | 686 | ||
687 | static inline char *msg_media_addr(struct tipc_msg *m) | ||
688 | { | ||
689 | return (char *)&m->hdr[TIPC_MEDIA_ADDR_OFFSET]; | ||
690 | } | ||
685 | 691 | ||
686 | /* | 692 | /* |
687 | * Word 9 | 693 | * Word 9 |
@@ -734,14 +740,4 @@ int tipc_msg_build(struct tipc_msg *hdr, struct iovec const *msg_sect, | |||
734 | u32 num_sect, unsigned int total_len, | 740 | u32 num_sect, unsigned int total_len, |
735 | int max_size, int usrmem, struct sk_buff **buf); | 741 | int max_size, int usrmem, struct sk_buff **buf); |
736 | 742 | ||
737 | static inline void msg_set_media_addr(struct tipc_msg *m, struct tipc_media_addr *a) | ||
738 | { | ||
739 | memcpy(&((int *)m)[5], a, sizeof(*a)); | ||
740 | } | ||
741 | |||
742 | static inline void msg_get_media_addr(struct tipc_msg *m, struct tipc_media_addr *a) | ||
743 | { | ||
744 | memcpy(a, &((int *)m)[5], sizeof(*a)); | ||
745 | } | ||
746 | |||
747 | #endif | 743 | #endif |