History

tipc: convert legacy nl bearer enable/disable to nl compat

Introduce a framework for transcoding legacy nl action into actions (.doit) calls from the new nl API. This is done by converting the incoming TLV data into netlink data with nested netlink attributes. Unfortunately due to the randomness of the legacy API we can't do this generically so each legacy netlink command requires a specific transcoding recipe. In this case for bearer enable and bearer disable. Convert TIPC_CMD_ENABLE_BEARER and TIPC_CMD_DISABLE_BEARER into doit compat calls.

Richard Alpe committed 11 years ago

Commit 9ab15461 parent d0796d15 files · +154 −57Browse files

Showing the changes to include/uapi/linux (1 of 5 files). Show all

Unified · Split

include/uapi/linux/tipc_config.h+5−0
@@ -277,6 +277,11 @@ static inline int TLV_GET_LEN(struct tlv_desc *tlv) · 276 unmodified lines
277 return ntohs(tlv->tlv_len);277 return ntohs(tlv->tlv_len);
278}278}
279 279
280static inline int TLV_CHECK_TYPE(struct tlv_desc *tlv, __u16 type)
281{
282 return (ntohs(tlv->tlv_type) == type);
283}
284
280static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len)285static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len)
281{286{
282 struct tlv_desc *tlv_ptr;287 struct tlv_desc *tlv_ptr;