mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
netlink: add IPv4/IPv6 attribute writers using in[6]_addr instead of
sockaddrs. MFC after: 2 weeks
This commit is contained in:
1 parent
6408d025cf
commit
1377eb268a
1 file changed
+12
@@ -127,6 +127,18 @@ snl_attr_get_ipvia(struct snl_state *ss, struct nlattr *nla,
|
||||
return (false);
|
||||
}
|
||||
|
||||
static inline bool
|
||||
snl_add_msg_attr_ip4(struct snl_writer *nw, int attrtype, const struct in_addr *addr)
|
||||
{
|
||||
return (snl_add_msg_attr(nw, attrtype, 4, addr));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
snl_add_msg_attr_ip6(struct snl_writer *nw, int attrtype, const struct in6_addr *addr)
|
||||
{
|
||||
return (snl_add_msg_attr(nw, attrtype, 16, addr));
|
||||
}
|
||||
|
||||
static inline bool
|
||||
snl_add_msg_attr_ip(struct snl_writer *nw, int attrtype, const struct sockaddr *sa)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user