函数源码

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source File:include\net\netlink.h Create Date:2022-07-27 07:04:56
首页 Copyright©Brick

1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
/**
 * nla_put_u8 - Add a u8 netlink attribute to a socket buffer
 * @skb: socket buffer to add attribute to
 * @attrtype: attribute type
 * @value: numeric value
 */
static inline int nla_put_u8(struct sk_buff *skb, int attrtype, u8 value)
{
    /* temporary variables to work around GCC PR81715 with asan-stack=1 */
    u8 tmp = value;
 
    return nla_put(skb, attrtype, sizeof(u8), &tmp);
}