def nlmsg_attrlen(nlh, hdrlen):
    """Length of attributes data.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/msg.c#L154

    nlh -- Netlink message header (nlmsghdr class instance).
    hdrlen -- length of family specific header (integer).

    Returns:
    Integer.
    """
    return max(nlmsg_len(nlh) - libnl.linux_private.netlink.NLMSG_ALIGN(hdrlen), 0)
Length of attributes data.

    https://github.com/thom311/libnl/blob/libnl3_2_25/lib/msg.c#L154

    nlh -- Netlink message header (nlmsghdr class instance).
    hdrlen -- length of family specific header (integer).

    Returns:
    Integer.