tipc: convert legacy nl bearer dump to nl compat
Introduce a framework for dumping netlink data from the new netlink API and formatting it to the old legacy API format. This is done by looping the dump data and calling a format handler for each entity, in this case a bearer. We dump until either all data is dumped or we reach the limited buffer size of the legacy API. Remember, the legacy API doesn't scale. In this commit we convert TIPC_CMD_GET_BEARER_NAMES to use the compat layer. 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>
This commit is contained in:

committed by
David S. Miller

parent
bfb3e5dd8d
commit
d0796d1ef6
@@ -272,6 +272,11 @@ static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type)
|
||||
(ntohs(((struct tlv_desc *)tlv)->tlv_type) == exp_type);
|
||||
}
|
||||
|
||||
static inline int TLV_GET_LEN(struct tlv_desc *tlv)
|
||||
{
|
||||
return ntohs(tlv->tlv_len);
|
||||
}
|
||||
|
||||
static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len)
|
||||
{
|
||||
struct tlv_desc *tlv_ptr;
|
||||
|
Reference in New Issue
Block a user