Allocate a new Netlink message.

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

    Positional arguments:
    nlmsgtype -- Netlink message type (integer).
    flags -- message flags (integer).

    Returns:
    Newly allocated Netlink message (nl_msg class instance) or None.

def nlmsg_alloc_simple(nlmsgtype, flags):
    """Allocate a new Netlink message.

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

    Positional arguments:
    nlmsgtype -- Netlink message type (integer).
    flags -- message flags (integer).

    Returns:
    Newly allocated Netlink message (nl_msg class instance) or None.
    """
    nlh = libnl.linux_private.netlink.nlmsghdr(nlmsg_type=nlmsgtype, nlmsg_flags=flags)
    msg = nlmsg_inherit(nlh)
    _LOGGER.debug('msg 0x%x: Allocated new simple message', id(msg))
    return msg