1
/* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
* you may not use this file except in compliance with the License.
6
* You may obtain a copy of the License at
8
* http://www.apache.org/licenses/LICENSE-2.0
10
* Unless required by applicable law or agreed to in writing, software
11
* distributed under the License is distributed on an "AS IS" BASIS,
12
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
* See the License for the specific language governing permissions and
14
* limitations under the License.
20
#include "apr_private.h"
21
#include "apr_network_io.h"
22
#include "apr_general.h"
23
#include "apr_arch_os2calls.h"
30
typedef struct sock_userdata_t sock_userdata_t;
31
struct sock_userdata_t {
32
sock_userdata_t *next;
42
apr_sockaddr_t *local_addr;
43
apr_sockaddr_t *remote_addr;
44
apr_interval_time_t timeout;
46
int local_port_unknown;
47
int local_interface_unknown;
48
int remote_addr_unknown;
51
sock_userdata_t *userdata;
53
/* if there is a timeout set, then this pollset is used */
54
apr_pollset_t *pollset;
57
/* Error codes returned from sock_errno() */
58
#define SOCBASEERR 10000
59
#define SOCEPERM (SOCBASEERR+1) /* Not owner */
60
#define SOCESRCH (SOCBASEERR+3) /* No such process */
61
#define SOCEINTR (SOCBASEERR+4) /* Interrupted system call */
62
#define SOCENXIO (SOCBASEERR+6) /* No such device or address */
63
#define SOCEBADF (SOCBASEERR+9) /* Bad file number */
64
#define SOCEACCES (SOCBASEERR+13) /* Permission denied */
65
#define SOCEFAULT (SOCBASEERR+14) /* Bad address */
66
#define SOCEINVAL (SOCBASEERR+22) /* Invalid argument */
67
#define SOCEMFILE (SOCBASEERR+24) /* Too many open files */
68
#define SOCEPIPE (SOCBASEERR+32) /* Broken pipe */
69
#define SOCEOS2ERR (SOCBASEERR+100) /* OS/2 Error */
71
const char *apr_inet_ntop(int af, const void *src, char *dst, apr_size_t size);
72
int apr_inet_pton(int af, const char *src, void *dst);
73
void apr_sockaddr_vars_set(apr_sockaddr_t *, int, apr_port_t);
75
#endif /* ! NETWORK_IO_H */