+static const int default_app_data_size = 256;
+/* Default set to be as small as possible to exercise fragmentation. */
+static const int default_max_fragment_size = 512;
+
+static int parse_boolean(const char *value, int *result)
+{
+ if (strcasecmp(value, "Yes") == 0) {
+ *result = 1;
+ return 1;
+ }
+ else if (strcasecmp(value, "No") == 0) {
+ *result = 0;
+ return 1;
+ }
+ return 0;
+}
+
+#define IMPLEMENT_SSL_TEST_BOOL_OPTION(struct_type, name, field) \
+ static int parse_##name##_##field(struct_type *ctx, const char *value) \
+ { \
+ return parse_boolean(value, &ctx->field); \
+ }
+
+#define IMPLEMENT_SSL_TEST_STRING_OPTION(struct_type, name, field) \
+ static int parse_##name##_##field(struct_type *ctx, const char *value) \
+ { \
+ OPENSSL_free(ctx->field); \
+ ctx->field = OPENSSL_strdup(value); \
+ TEST_check(ctx->field != NULL); \
+ return 1; \
+ }
+
+#define IMPLEMENT_SSL_TEST_INT_OPTION(struct_type, name, field) \
+ static int parse_##name##_##field(struct_type *ctx, const char *value) \
+ { \
+ ctx->field = atoi(value); \
+ return 1; \
+ }
+