void value_dump(const value_t * value, fieldtype_t type) {
    switch (type) {
#ifdef USE_IPV4
        case TYPE_IPV4:
            ipv4_dump(&value->ipv4);
            break;
#endif
#ifdef USE_IPV6
        case TYPE_IPV6:
            ipv6_dump(&value->ipv6);
            break;
#endif
#ifdef USE_BITS
        case TYPE_BITS:
            fprintf(stderr, "value_dump: type not supported (%d) (%s), use value_dump_hex instead\n", type, field_type_to_string(type));
            break;
#endif
        case TYPE_UINT8:
            printf("%hhu", value->int8);
            break;
        case TYPE_UINT16:
            printf("%hu", value->int16);
            break;
        case TYPE_UINT32:
            printf("%u", value->int32);
            break;
        case TYPE_UINT64:
            printf("%llu", (unsigned long long) value->int64);
            break;
        case TYPE_DOUBLE:
            printf("%lf", value->dbl);
            break;
        case TYPE_UINTMAX:
            printf("%ju", value->intmax);
            break;
        case TYPE_STRING:
            printf("%s", value->string);
            break;
        case TYPE_GENERATOR:
            generator_dump(value->generator);
            break;
        case TYPE_UINT128:
        default:
            fprintf(stderr, "value_dump: type not supported (%d) (%s)\n", type, field_type_to_string(type));
            break;
    }
}
void protocol_field_dump(const protocol_field_t * protocol_field) {
    printf("> %s\t%s\n",
        field_type_to_string(protocol_field->type),
        protocol_field->key
    );
}