def print_genl_msg(_, ofd, hdr, ops, payloadlen):
data = nlmsg_data(hdr)<EOL>if payloadlen.value < GENL_HDRLEN:<EOL><INDENT>return data<EOL><DEDENT>print_genl_hdr(ofd, data)<EOL>payloadlen.value -= GENL_HDRLEN<EOL>data = bytearray_ptr(data, GENL_HDRLEN)<EOL>if ops:<EOL><INDENT>hdrsize = ops.co_hdrsize - GENL_HDRLEN<EOL>if hdrsize > <NUM_LIT:0>:<EOL><INDENT>if payloadlen.value < hdrsize:<EOL><INDENT>return data<EOL><DEDENT>ofd('<STR_LIT>', hdrsize)<EOL>dump_hex(ofd, data, hdrsize, <NUM_LIT:0>)<EOL>payloadlen.value -= hdrsize<EOL>data = bytearray_ptr(data, hdrsize)<EOL><DEDENT><DEDENT>return data<EOL>
https://github.com/thom311/libnl/blob/libnl3_2_25/lib/msg.c#L831.

    Positional arguments:
    _ -- unused.
    ofd -- function to call with arguments similar to `logging.debug`.
    hdr -- Netlink message header (nlmsghdr class instance).
    ops -- cache operations (nl_cache_ops class instance).
    payloadlen -- length of payload in message (ctypes.c_int instance).

    Returns:
    data (bytearray_ptr).