diff options
Diffstat (limited to 'net/tipc/bearer.h')
-rw-r--r-- | net/tipc/bearer.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/net/tipc/bearer.h b/net/tipc/bearer.h index 4e9367f956a4..41a61d219c38 100644 --- a/net/tipc/bearer.h +++ b/net/tipc/bearer.h | |||
@@ -43,6 +43,17 @@ | |||
43 | #define MAX_MEDIA 2 | 43 | #define MAX_MEDIA 2 |
44 | 44 | ||
45 | /* | 45 | /* |
46 | * Identifiers associated with TIPC message header media address info | ||
47 | * | ||
48 | * - address info field is 20 bytes long | ||
49 | * - media type identifier located at offset 3 | ||
50 | * - remaining bytes vary according to media type | ||
51 | */ | ||
52 | |||
53 | #define TIPC_MEDIA_ADDR_SIZE 20 | ||
54 | #define TIPC_MEDIA_TYPE_OFFSET 3 | ||
55 | |||
56 | /* | ||
46 | * Identifiers of supported TIPC media types | 57 | * Identifiers of supported TIPC media types |
47 | */ | 58 | */ |
48 | #define TIPC_MEDIA_TYPE_ETH 1 | 59 | #define TIPC_MEDIA_TYPE_ETH 1 |
@@ -68,7 +79,10 @@ struct tipc_bearer; | |||
68 | * @send_msg: routine which handles buffer transmission | 79 | * @send_msg: routine which handles buffer transmission |
69 | * @enable_bearer: routine which enables a bearer | 80 | * @enable_bearer: routine which enables a bearer |
70 | * @disable_bearer: routine which disables a bearer | 81 | * @disable_bearer: routine which disables a bearer |
71 | * @addr2str: routine which converts bearer's address to string form | 82 | * @addr2str: routine which converts media address to string |
83 | * @str2addr: routine which converts media address from string | ||
84 | * @addr2msg: routine which converts media address to protocol message area | ||
85 | * @msg2addr: routine which converts media address from protocol message area | ||
72 | * @bcast_addr: media address used in broadcasting | 86 | * @bcast_addr: media address used in broadcasting |
73 | * @priority: default link (and bearer) priority | 87 | * @priority: default link (and bearer) priority |
74 | * @tolerance: default time (in ms) before declaring link failure | 88 | * @tolerance: default time (in ms) before declaring link failure |
@@ -84,6 +98,9 @@ struct media { | |||
84 | int (*enable_bearer)(struct tipc_bearer *b_ptr); | 98 | int (*enable_bearer)(struct tipc_bearer *b_ptr); |
85 | void (*disable_bearer)(struct tipc_bearer *b_ptr); | 99 | void (*disable_bearer)(struct tipc_bearer *b_ptr); |
86 | int (*addr2str)(struct tipc_media_addr *a, char *str_buf, int str_size); | 100 | int (*addr2str)(struct tipc_media_addr *a, char *str_buf, int str_size); |
101 | int (*str2addr)(struct tipc_media_addr *a, char *str_buf); | ||
102 | int (*addr2msg)(struct tipc_media_addr *a, char *msg_area); | ||
103 | int (*msg2addr)(struct tipc_media_addr *a, char *msg_area); | ||
87 | struct tipc_media_addr bcast_addr; | 104 | struct tipc_media_addr bcast_addr; |
88 | u32 priority; | 105 | u32 priority; |
89 | u32 tolerance; | 106 | u32 tolerance; |