/usr/src/redhat/BUILD/httpd-2.2.3/srclib/apr/include/arch/win32/apr_arch_networkio.h

00001 /* Copyright 2000-2005 The Apache Software Foundation or its licensors, as
00002  * applicable.
00003  *
00004  * Licensed under the Apache License, Version 2.0 (the "License");
00005  * you may not use this file except in compliance with the License.
00006  * You may obtain a copy of the License at
00007  *
00008  *     http://www.apache.org/licenses/LICENSE-2.0
00009  *
00010  * Unless required by applicable law or agreed to in writing, software
00011  * distributed under the License is distributed on an "AS IS" BASIS,
00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00013  * See the License for the specific language governing permissions and
00014  * limitations under the License.
00015  */
00016 
00017 #ifndef NETWORK_IO_H
00018 #define NETWORK_IO_H
00019 
00020 #include "apr_network_io.h"
00021 #include "apr_general.h"
00022 #include "apr_poll.h"
00023 
00024 typedef struct sock_userdata_t sock_userdata_t;
00025 struct sock_userdata_t {
00026     sock_userdata_t *next;
00027     const char *key;
00028     void *data;
00029 };
00030 
00031 struct apr_socket_t {
00032     apr_pool_t         *pool;
00033     SOCKET              socketdes;
00034     int                 type; /* SOCK_STREAM, SOCK_DGRAM */
00035     int                 protocol;
00036     apr_sockaddr_t     *local_addr;
00037     apr_sockaddr_t     *remote_addr;
00038     int                 timeout_ms; /* MUST MATCH if timeout > 0 */
00039     apr_interval_time_t timeout;
00040     apr_int32_t         disconnected;
00041     int                 local_port_unknown;
00042     int                 local_interface_unknown;
00043     int                 remote_addr_unknown;
00044     apr_int32_t         options;
00045     apr_int32_t         inherit;
00046 #if APR_HAS_SENDFILE
00047     /* As of 07.20.04, the overlapped structure is only used by 
00048      * apr_socket_sendfile and that's where it will be allocated 
00049      * and initialized.
00050      */
00051     OVERLAPPED         *overlapped;
00052 #endif
00053     sock_userdata_t    *userdata;
00054 
00055     /* if there is a timeout set, then this pollset is used */
00056     apr_pollset_t *pollset;
00057 };
00058 
00059 #ifdef _WIN32_WCE
00060 #ifndef WSABUF
00061 typedef struct _WSABUF {
00062     u_long      len;     /* the length of the buffer */
00063     char FAR *  buf;     /* the pointer to the buffer */
00064 } WSABUF, FAR * LPWSABUF;
00065 #endif
00066 #else
00067 /* Not sure if this is the right place to define this */
00068 #define HAVE_STRUCT_IPMREQ
00069 #endif
00070 
00071 apr_status_t status_from_res_error(int);
00072 
00073 const char *apr_inet_ntop(int af, const void *src, char *dst, apr_size_t size);
00074 int apr_inet_pton(int af, const char *src, void *dst);
00075 void apr_sockaddr_vars_set(apr_sockaddr_t *, int, apr_port_t);
00076 
00077 #define apr_is_option_set(skt, option)  \
00078     (((skt)->options & (option)) == (option))
00079 
00080 #define apr_set_option(skt, option, on) \
00081     do {                                 \
00082         if (on)                          \
00083             (skt)->options |= (option);         \
00084         else                             \
00085             (skt)->options &= ~(option);        \
00086     } while (0)
00087 
00088 #endif  /* ! NETWORK_IO_H */
00089 

Apacheに対してSun Jul 19 22:05:24 2009に生成されました。  doxygen 1.4.7