Expand maximum payload size of a netlink message
- n Netlink message.
- newlen New maximum payload size.
Reallocates the payload section of a netlink message and increases the maximum payload size of the message.
- Any pointers pointing to old payload block will be stale and need to be refetched. Therfore, do not expand while constructing nested attributes or while reserved data blocks are held.
- 0 on success or a negative error code.
Definition at line 578 of file msg.c.
if (newlen <= n->nm_size)
tmp = realloc(n->nm_nlh, newlen);
if (tmp == NULL)
n->nm_nlh = tmp;
n->nm_size = newlen;