Find a specific attribute in a Netlink message.

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

    Positional arguments:
    nlh -- Netlink message header (nlmsghdr class instance).
    hdrlen -- length of family specific header (integer).
    attrtype -- type of attribute to look for (integer).

    Returns:
    The first attribute which matches the specified type (nlattr class instance).

def nlmsg_find_attr(nlh, hdrlen, attrtype):
    """Find a specific attribute in a Netlink message.

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

    Positional arguments:
    nlh -- Netlink message header (nlmsghdr class instance).
    hdrlen -- length of family specific header (integer).
    attrtype -- type of attribute to look for (integer).

    Returns:
    The first attribute which matches the specified type (nlattr class instance).
    """
    return nla_find(nlmsg_attrdata(nlh, hdrlen), nlmsg_attrlen(nlh, hdrlen), attrtype)