def nl_msg_dump(msg, ofd=_LOGGER.debug):
hdr = nlmsg_hdr(msg)<EOL>ofd('<STR_LIT>')<EOL>ofd('<STR_LIT>', hdr.SIZEOF)<EOL>print_hdr(ofd, msg)<EOL>if hdr.nlmsg_type == libnl.linux_private.netlink.NLMSG_ERROR:<EOL><INDENT>dump_error_msg(msg, ofd)<EOL><DEDENT>elif nlmsg_len(hdr) > <NUM_LIT:0>:<EOL><INDENT>print_msg(msg, ofd, hdr)<EOL><DEDENT>ofd('<STR_LIT>')<EOL>
Dump message in human readable format to callable.

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

    Positional arguments:
    msg -- message to print (nl_msg class instance).

    Keyword arguments:
    ofd -- function to call with arguments similar to `logging.debug`.