1
/* Copyright 2011 Justin Erenkrantz and Greg Stein
3
* Licensed under the Apache License, Version 2.0 (the "License");
4
* you may not use this file except in compliance with the License.
5
* You may obtain a copy of the License at
7
* http://www.apache.org/licenses/LICENSE-2.0
9
* Unless required by applicable law or agreed to in writing, software
10
* distributed under the License is distributed on an "AS IS" BASIS,
11
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
* See the License for the specific language governing permissions and
13
* limitations under the License.
19
typedef struct serv_ctx_t serv_ctx_t;
21
#define TEST_SERVER_DUMP 1
23
/* Default port for our test server. */
24
#define SERV_PORT 12345
25
#define SERV_PORT_STR "12345"
27
#define PROXY_PORT 23456
35
SERVER_IGNORE_AND_KILL_CONNECTION,
36
SERVER_KILL_CONNECTION
40
} test_server_action_t;
45
} test_server_message_t;
47
apr_status_t test_start_server(serv_ctx_t **servctx_p,
48
apr_sockaddr_t *address,
49
test_server_message_t *message_list,
50
apr_size_t message_count,
51
test_server_action_t *action_list,
52
apr_size_t action_count,
56
apr_status_t test_server_run(serv_ctx_t *servctx,
57
apr_short_interval_time_t duration,
60
apr_status_t test_server_destroy(serv_ctx_t *servctx, apr_pool_t *pool);
62
#ifndef APR_VERSION_AT_LEAST /* Introduced in APR 1.3.0 */
63
#define APR_VERSION_AT_LEAST(major,minor,patch) \
64
(((major) < APR_MAJOR_VERSION) \
65
|| ((major) == APR_MAJOR_VERSION && (minor) < APR_MINOR_VERSION) \
66
|| ((major) == APR_MAJOR_VERSION && (minor) == APR_MINOR_VERSION && \
67
(patch) <= APR_PATCH_VERSION))
68
#endif /* APR_VERSION_AT_LEAST */
70
#endif /* TEST_SERVER_H */