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.
Showing the changes to include/uapi/linux (1 of 5 files). Show all
Unified · Split
| @@ -277,6 +277,11 @@ static inline int TLV_GET_LEN(struct tlv_desc *tlv) · 276 unmodified lines | ||
| 277 | 277 | return ntohs(tlv->tlv_len); |
| 278 | 278 | } |
| 279 | 279 | |
| 280 | +static inline int TLV_CHECK_TYPE(struct tlv_desc *tlv, __u16 type) | |
| 281 | +{ | |
| 282 | + return (ntohs(tlv->tlv_type) == type); | |
| 283 | +} | |
| 284 | + | |
| 280 | 285 | static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len) |
| 281 | 286 | { |
| 282 | 287 | struct tlv_desc *tlv_ptr; |