def nl_nlmsg_flags2str(flags, buf, _=None):
del buf[:]<EOL>all_flags = (<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_REQUEST),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_MULTI),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_ACK),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_ECHO),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_ROOT),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_MATCH),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_ATOMIC),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_REPLACE),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_EXCL),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_CREATE),<EOL>('<STR_LIT>', libnl.linux_private.netlink.NLM_F_APPEND),<EOL>)<EOL>print_flags = []<EOL>for k, v in all_flags:<EOL><INDENT>if not flags & v:<EOL><INDENT>continue<EOL><DEDENT>flags &= ~v<EOL>print_flags.append(k)<EOL><DEDENT>if flags:<EOL><INDENT>print_flags.append('<STR_LIT>'.format(flags))<EOL><DEDENT>buf.extend('<STR_LIT:U+002C>'.join(print_flags).encode('<STR_LIT:ascii>'))<EOL>return buf<EOL>
Netlink Message Flags Translations.

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

    Positional arguments:
    flags -- integer.
    buf -- bytearray().

    Keyword arguments:
    _ -- unused.

    Returns:
    Reference to `buf`.