···9191 * nla_reserve_nohdr(skb, len) reserve room for an attribute w/o hdr9292 * nla_put(skb, type, len, data) add attribute to skb9393 * nla_put_nohdr(skb, len, data) add attribute w/o hdr9494+ * nla_append(skb, len, data) append data to skb9495 *9596 * Attribute Construction for Basic Types:9697 * nla_put_u8(skb, type, value) add u8 attribute to skb···255254 int attrlen, const void *data);256255extern int nla_put_nohdr(struct sk_buff *skb, int attrlen,257256 const void *data);257257+extern int nla_append(struct sk_buff *skb, int attrlen,258258+ const void *data);258259259260/**************************************************************************260261 * Netlink Messages
+19
net/netlink/attr.c
···430430 return 0;431431}432432433433+/**434434+ * nla_append - Add a netlink attribute without header or padding435435+ * @skb: socket buffer to add attribute to436436+ * @attrlen: length of attribute payload437437+ * @data: head of attribute payload438438+ *439439+ * Returns -1 if the tailroom of the skb is insufficient to store440440+ * the attribute payload.441441+ */442442+int nla_append(struct sk_buff *skb, int attrlen, const void *data)443443+{444444+ if (unlikely(skb_tailroom(skb) < NLA_ALIGN(attrlen)))445445+ return -1;446446+447447+ memcpy(skb_put(skb, attrlen), data, attrlen);448448+ return 0;449449+}450450+433451EXPORT_SYMBOL(nla_validate);434452EXPORT_SYMBOL(nla_parse);435453EXPORT_SYMBOL(nla_find);···463445EXPORT_SYMBOL(nla_memcpy);464446EXPORT_SYMBOL(nla_memcmp);465447EXPORT_SYMBOL(nla_strcmp);448448+EXPORT_SYMBOL(nla_append);