summaryrefslogtreecommitdiff
path: root/include/uapi
diff options
context:
space:
mode:
authorRichard Alpe <richard.alpe@ericsson.com>2015-02-09 09:50:05 +0100
committerDavid S. Miller <davem@davemloft.net>2015-02-09 13:20:47 -0800
commit9ab154658a7ff2c5076607e02f18581c6859fc2a (patch)
treeba24e4c4be11b9d61d290d1cd9423dd15eaf84c1 /include/uapi
parentd0796d1ef63deb38147729664691ba3090930b26 (diff)
downloadlinux-rpi3-9ab154658a7ff2c5076607e02f18581c6859fc2a.tar.gz
linux-rpi3-9ab154658a7ff2c5076607e02f18581c6859fc2a.tar.bz2
linux-rpi3-9ab154658a7ff2c5076607e02f18581c6859fc2a.zip
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. Signed-off-by: Richard Alpe <richard.alpe@ericsson.com> Reviewed-by: Erik Hugne <erik.hugne@ericsson.com> Reviewed-by: Ying Xue <ying.xue@windriver.com> Reviewed-by: Jon Maloy <jon.maloy@ericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/uapi')
-rw-r--r--include/uapi/linux/tipc_config.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/uapi/linux/tipc_config.h b/include/uapi/linux/tipc_config.h
index e1f4f05f4c5c..f9226566c1b8 100644
--- a/include/uapi/linux/tipc_config.h
+++ b/include/uapi/linux/tipc_config.h
@@ -277,6 +277,11 @@ static inline int TLV_GET_LEN(struct tlv_desc *tlv)
return ntohs(tlv->tlv_len);
}
+static inline int TLV_CHECK_TYPE(struct tlv_desc *tlv, __u16 type)
+{
+ return (ntohs(tlv->tlv_type) == type);
+}
+
static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len)
{
struct tlv_desc *tlv_ptr;