[NETLINK]: Introduce nested and byteorder flag to netlink attribute
This change allows the generic attribute interface to be used within the netfilter subsystem where this flag was initially introduced. The byte-order flag is yet unused, it's intended use is to allow automatic byte order convertions for all atomic types. Signed-off-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
9d5010db7e
commit
8f4c1f9b04
@@ -666,6 +666,15 @@ static inline int nla_padlen(int payload)
|
||||
return nla_total_size(payload) - nla_attr_size(payload);
|
||||
}
|
||||
|
||||
/**
|
||||
* nla_type - attribute type
|
||||
* @nla: netlink attribute
|
||||
*/
|
||||
static inline int nla_type(const struct nlattr *nla)
|
||||
{
|
||||
return nla->nla_type & NLA_TYPE_MASK;
|
||||
}
|
||||
|
||||
/**
|
||||
* nla_data - head of payload
|
||||
* @nla: netlink attribute
|
||||
|
Reference in New Issue
Block a user