INNER CODE UNIT · C

payload_len

ukanth/afwall · external/nflog/attr.c:417

	uint16_t payload_len = MNL_ALIGN(sizeof(struct nlattr)) + len;

	attr->nla_type = type;
	attr->nla_len = payload_len;
	memcpy(mnl_attr_get_payload(attr), data, len);
	nlh->nlmsg_len += MNL_ALIGN(payload_len);
}
EXPORT_SYMBOL(mnl_attr_put);

/**
 * mnl_attr_put_u8 - add 8-bit unsigned integer attribute to netlink message
 * \param nlh pointer to the netlink message
 * \param type netlink attribute type
 * \param len netlink attribute payload size
 * \param data 8-bit unsigned integer data that is stored by the new attribute
 *
 * This function updates the length field of the Netlink message (nlmsg_len)
 * by adding the size (header + payload) of the new attribute.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…