mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 01:40:16 +00:00
zebra: Add nl_attr_put8 so we can put uint8_t in netlink messages
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
parent
b7ece6e7fc
commit
94d70a6533
@ -550,6 +550,12 @@ bool nl_attr_put(struct nlmsghdr *n, unsigned int maxlen, int type,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool nl_attr_put8(struct nlmsghdr *n, unsigned int maxlen, int type,
|
||||||
|
uint8_t data)
|
||||||
|
{
|
||||||
|
return nl_attr_put(n, maxlen, type, &data, sizeof(uint8_t));
|
||||||
|
}
|
||||||
|
|
||||||
bool nl_attr_put16(struct nlmsghdr *n, unsigned int maxlen, int type,
|
bool nl_attr_put16(struct nlmsghdr *n, unsigned int maxlen, int type,
|
||||||
uint16_t data)
|
uint16_t data)
|
||||||
{
|
{
|
||||||
|
@ -38,6 +38,8 @@ extern "C" {
|
|||||||
*/
|
*/
|
||||||
extern bool nl_attr_put(struct nlmsghdr *n, unsigned int maxlen, int type,
|
extern bool nl_attr_put(struct nlmsghdr *n, unsigned int maxlen, int type,
|
||||||
const void *data, unsigned int alen);
|
const void *data, unsigned int alen);
|
||||||
|
extern bool nl_attr_put8(struct nlmsghdr *n, unsigned int maxlen, int type,
|
||||||
|
uint8_t data);
|
||||||
extern bool nl_attr_put16(struct nlmsghdr *n, unsigned int maxlen, int type,
|
extern bool nl_attr_put16(struct nlmsghdr *n, unsigned int maxlen, int type,
|
||||||
uint16_t data);
|
uint16_t data);
|
||||||
extern bool nl_attr_put32(struct nlmsghdr *n, unsigned int maxlen, int type,
|
extern bool nl_attr_put32(struct nlmsghdr *n, unsigned int maxlen, int type,
|
||||||
|
Loading…
Reference in New Issue
Block a user