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

    Positional arguments:
    ofd -- function to call with arguments similar to `logging.debug`.
    start -- bytearray() or bytearray_ptr() instance.

def print_genl_hdr(ofd, start):
    """https://github.com/thom311/libnl/blob/libnl3_2_25/lib/msg.c#L821.

    Positional arguments:
    ofd -- function to call with arguments similar to `logging.debug`.
    start -- bytearray() or bytearray_ptr() instance.
    """
    ghdr = genlmsghdr(start)
    ofd('  [GENERIC NETLINK HEADER] %d octets', GENL_HDRLEN)
    ofd('    .cmd = %d', ghdr.cmd)
    ofd('    .version = %d', ghdr.version)
    ofd('    .unused = %#d', ghdr.reserved)