mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
netlink: add IPv4/IPv6 attribute writers using in[6]_addr instead of
sockaddrs. MFC after: 2 weeks
This commit is contained in:
parent
6408d025cf
commit
1377eb268a
|
@ -127,6 +127,18 @@ snl_attr_get_ipvia(struct snl_state *ss, struct nlattr *nla,
|
||||||
return (false);
|
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
|
static inline bool
|
||||||
snl_add_msg_attr_ip(struct snl_writer *nw, int attrtype, const struct sockaddr *sa)
|
snl_add_msg_attr_ip(struct snl_writer *nw, int attrtype, const struct sockaddr *sa)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue