Main Page | Modules | Namespace List | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

Network Routines

Collaboration diagram for Network Routines:


Modules

 Socket option definitions
 IP Protocol Definitions for use when creating sockets

Data Structures

struct  in_addr
struct  apr_sockaddr_t
struct  apr_hdtr_t

Defines

#define APR_MAX_SECS_TO_LINGER   30
#define MAX_SECS_TO_LINGER   APR_MAX_SECS_TO_LINGER
#define APRMAXHOSTLEN   256
#define APR_ANYADDR   "0.0.0.0"
#define APR_IPV4_ADDR_OK   0x01
#define APR_IPV6_ADDR_OK   0x02
#define APR_INET   AF_INET
#define APR_UNSPEC   0

Typedefs

typedef apr_socket_t apr_socket_t
typedef apr_hdtr_t apr_hdtr_t
typedef in_addr apr_in_addr_t
typedef apr_ipsubnet_t apr_ipsubnet_t
typedef apr_uint16_t apr_port_t
typedef apr_sockaddr_t apr_sockaddr_t

Enumerations

enum  apr_shutdown_how_e { APR_SHUTDOWN_READ, APR_SHUTDOWN_WRITE, APR_SHUTDOWN_READWRITE }
enum  apr_interface_e { APR_LOCAL, APR_REMOTE }

Functions

 APR_DECLARE (apr_status_t) apr_socket_create(apr_socket_t **new_sock
 APR_DECLARE (int) apr_sockaddr_equal(const apr_sockaddr_t *addr1
 APR_DECLARE_INHERIT_SET (socket)
 APR_DECLARE (void) apr_socket_set_inherit(apr_socket_t *skt)
 APR_DECLARE_INHERIT_UNSET (socket)

Variables

int family
int int type
int int apr_pool_tcont
int int int protocol
apr_shutdown_how_e how
apr_sockaddr_tsa
apr_int32_t backlog
apr_socket_tsock
apr_socket_t apr_pool_tconnection_pool
const char * hostname
const char apr_int32_t apr_port_t port
const char apr_int32_t apr_port_t
apr_int32_t 
flags
const char apr_int32_t apr_port_t
apr_int32_t apr_pool_t
p
char ** scope_id
char apr_port_t const char * str
int len
const char * key
void * data
void const char apr_status_t(* cleanup )(void *))
const char * buf
const struct iovec * vec
const struct iovec apr_int32_t nvec
apr_sockaddr_twhere
apr_int32_t opt
apr_int32_t apr_int32_t on
apr_interval_time_t t
intatmark
apr_interface_e which
apr_sockaddr_tsockaddr
const char * addr
const apr_sockaddr_taddr2
const char * servname
const char * ipstr
const char const char * mask_or_numbits
void int type
const char apr_port_t port
intlen
apr_time_t t

Define Documentation

#define APR_ANYADDR   "0.0.0.0"
 

Default 'any' address

Definition at line 61 of file apr_network_io.h.

#define APR_INET   AF_INET
 

Not all platforms have these defined, so we'll define them here The default values come from FreeBSD 4.1.1

Definition at line 132 of file apr_network_io.h.

Referenced by alloc_listener(), apr_os_sock_put(), apr_sockaddr_vars_set(), apr_socket_create_ex(), create_socket(), dump_a_vhost(), find_default_family(), get_addresses(), init_server_config(), nwssl_post_config(), tcp_socket(), test_interesting_subnets(), test_singleton_subnets(), and udp_socket().

#define APR_IPV4_ADDR_OK   0x01
 

See also:
apr_sockaddr_info_get()

Definition at line 114 of file apr_network_io.h.

#define APR_IPV6_ADDR_OK   0x02
 

See also:
apr_sockaddr_info_get()

Definition at line 115 of file apr_network_io.h.

#define APR_MAX_SECS_TO_LINGER   30
 

Maximum seconds to linger

Definition at line 46 of file apr_network_io.h.

Referenced by apr_socket_opt_set().

#define APR_UNSPEC   0
 

Let the system decide which address family to use

Definition at line 139 of file apr_network_io.h.

Referenced by alloc_listener(), ap_mpm_run(), ap_proxy_connect_handler(), ap_proxy_ftp_handler(), ap_proxy_http_determine_connection(), apr_socket_create_ex(), do_double_reverse(), find_default_family(), get_addresses(), main(), make_socket(), nwssl_post_config(), proxy_match_ipaddr(), recv_msg(), rfc1413_connect(), sendto_receivefrom(), set_proxy_exclude(), test(), and worker_thread().

#define APRMAXHOSTLEN   256
 

Maximum hostname length

Definition at line 56 of file apr_network_io.h.

Referenced by unique_id_global_init().

#define MAX_SECS_TO_LINGER   APR_MAX_SECS_TO_LINGER
 

Deprecated:
See also:
APR_MAX_SECS_TO_LINGER

Definition at line 51 of file apr_network_io.h.


Typedef Documentation

typedef struct apr_hdtr_t apr_hdtr_t
 

A structure to encapsulate headers and trailers for apr_socket_sendfile

Definition at line 182 of file apr_network_io.h.

typedef struct in_addr apr_in_addr_t
 

A structure to represent in_addr

Definition at line 184 of file apr_network_io.h.

typedef struct apr_ipsubnet_t apr_ipsubnet_t
 

A structure to represent an IP subnet

Definition at line 186 of file apr_network_io.h.

typedef apr_uint16_t apr_port_t
 

Remarks:
use apr_uint16_t just in case some system has a short that isn't 16 bits...

Definition at line 189 of file apr_network_io.h.

typedef struct apr_sockaddr_t apr_sockaddr_t
 

Remarks:
It's defined here as I think it should all be platform safe...
See also:
apr_sockaddr_t

Definition at line 194 of file apr_network_io.h.

typedef struct apr_socket_t apr_socket_t
 

A structure to represent sockets

Definition at line 178 of file apr_network_io.h.


Enumeration Type Documentation

enum apr_interface_e
 

Enum to tell us if we're interested in remote or local socket

Enumeration values:
APR_LOCAL 
APR_REMOTE 

Definition at line 157 of file apr_network_io.h.

enum apr_shutdown_how_e
 

Define what type of socket shutdown should occur.

Enumeration values:
APR_SHUTDOWN_READ  no longer allow read request
APR_SHUTDOWN_WRITE  no longer allow write requests
APR_SHUTDOWN_READWRITE  no longer allow read or write requests

Definition at line 108 of file apr_network_io.h.


Function Documentation

APR_DECLARE void   ) 
 

Register an other_child -- a child associated to its registered maintence callback. This callback is invoked when the process dies, is disconnected or disappears.

Parameters:
proc The child process to register.
maintenance maintenance is a function that is invoked with a reason and the data pointer passed here.
data Opaque context data passed to the maintenance function.
write_fd An fd that is probed for writing. If it is ever unwritable then the maintenance is invoked with reason OC_REASON_UNWRITABLE.
p The pool to use for allocating memory.
Bug:
write_fd duplicates the proc->out stream, it's really redundant and should be replaced in the APR 1.0 API with a bitflag of which proc->in/out/err handles should be health checked.

no platform currently tests the pipes health.

Definition at line 131 of file apr_pools.c.

APR_DECLARE int   )  const
 

See if the IP addresses in two APR socket addresses are equivalent. Appropriate logic is present for comparing IPv4-mapped IPv6 addresses with IPv4 addresses.

Parameters:
addr1 One of the APR socket addresses.
addr2 The other APR socket address.
Remarks:
The return value will be non-zero if the addresses are equivalent.

Definition at line 950 of file unix/sockaddr.c.

APR_DECLARE apr_status_t   ) 
 

Create a socket.

Remarks:
With APR 1.0, this function follows the prototype of apr_socket_create_ex.
Parameters:
new_sock The new socket that has been set up.
family The address family of the socket (e.g., APR_INET).
type The type of the socket (e.g., SOCK_STREAM).
cont The pool to use

Definition at line 24 of file netware/dso.c.

APR_DECLARE_INHERIT_SET socket   ) 
 

Set a socket to be inherited by child processes.

APR_DECLARE_INHERIT_UNSET socket   ) 
 

Unset a socket from being inherited by child processes.


Variable Documentation

const char* addr
 

Definition at line 730 of file apr_network_io.h.

Referenced by ap_proxy_canon_netloc(), APR_DECLARE(), conv_in_addr(), main(), make_secure_socket(), set_proxy_exclude(), set_secure_listener(), and set_secure_upgradeable_listener().

const apr_sockaddr_t* addr2
 

Definition at line 753 of file apr_network_io.h.

int* atmark
 

Definition at line 692 of file apr_network_io.h.

apr_int32_t backlog
 

Definition at line 334 of file apr_network_io.h.

char* buf
 

Definition at line 611 of file apr_network_io.h.

void const char apr_status_t(* cleanup)(void *))
 

Definition at line 471 of file apr_network_io.h.

apr_socket_t apr_pool_t * connection_pool
 

Definition at line 350 of file apr_network_io.h.

int apr_pool_t* cont
 

Definition at line 451 of file apr_network_io.h.

void* data
 

Definition at line 469 of file apr_network_io.h.

const char apr_int32_t family
 

Definition at line 391 of file apr_network_io.h.

Referenced by apr_socket_create_ex(), main(), and test_interesting_subnets().

apr_socket_t apr_int32_t flags
 

Definition at line 553 of file apr_network_io.h.

const char* hostname
 

Definition at line 391 of file apr_network_io.h.

apr_shutdown_how_e how
 

Definition at line 302 of file apr_network_io.h.

const char* ipstr
 

Definition at line 789 of file apr_network_io.h.

Referenced by test_bad_input(), and test_interesting_subnets().

void const char* key
 

Definition at line 469 of file apr_network_io.h.

apr_file_t apr_off_t apr_size_t len
 

Definition at line 1477 of file apr_buckets.h.

Referenced by add_password(), addBinding(), AP_DECLARE(), ap_proxy_ftp_handler(), ap_proxy_http_process_response(), ap_proxy_send_dir_filter(), APR_DECLARE(), APR_DECLARE_NONSTD(), APR_OPTIONAL_FN_TYPE(), apr_socket_connect(), apr_wastrtoastr(), APU_DECLARE(), bucketeer_out_filter(), CaseFilterInFilter(), CaseFilterOutFilter(), cgid_handler(), cgid_server(), check_nonce(), chunk_filter(), config_log_transaction(), core_input_filter(), current_logtime(), CuStrCopy(), DAV_DECLARE(), dav_fs_copymove_file(), dav_fs_get_resource(), dav_fs_remove_locknull_member(), dav_fs_walker(), dav_method_put(), deflate_in_filter(), deflate_out_filter(), discard_script_output(), doContent(), double_quotes(), drain_available_output(), dump_a_vhost(), dump_hash(), ef_output_filter(), feedback(), file_cache_recall_mydata(), gen_nonce(), get_include_var(), getContext(), GetServerVariable(), hash(), log_error_core(), log_script(), main(), mcheck(), MDFile(), MDFilter(), MDString(), mime_match(), netware_rewrite_args(), path_canonicalize(), pcre_get_substring_list(), PROXY_DECLARE(), proxy_trans(), read_request_line(), read_type_map(), send_msg(), send_parsed_content(), send_req(), sendto_receivefrom(), serialize_table(), ServerSupportFunction(), set_neg_headers(), ssl_expr_eval_func_file(), ssl_io_filter_input(), ssl_io_filter_output(), ssl_pphrase_Handle_CB(), store_body(), store_headers(), strdup(), subst_prefix_path(), tell_workers_to_exit(), truncate_dll_name(), worker_main(), worker_thread(), write_elem(), and write_text().

char apr_size_t* len
 

Definition at line 611 of file apr_network_io.h.

const char const char* mask_or_numbits
 

Definition at line 789 of file apr_network_io.h.

const struct iovec apr_int32_t nvec
 

Definition at line 519 of file apr_network_io.h.

apr_int32_t apr_int32_t * on
 

Definition at line 675 of file apr_network_io.h.

Referenced by pipeblock(), pipenonblock(), soblock(), and sononblock().

apr_int32_t opt
 

Definition at line 675 of file apr_network_io.h.

Referenced by main(), netware_rewrite_args(), no_options(), no_options_found(), optional_option(), optional_option_notgiven(), required_option(), required_option_notgiven(), set_options(), and ssl_cmd_SSLOptions().

const char const char apr_pool_t* p
 

Definition at line 789 of file apr_network_io.h.

apr_port_t port
 

Definition at line 711 of file apr_network_io.h.

Referenced by add_proxy(), AP_DECLARE(), ap_mpm_child_main(), ap_proxy_ftp_canon(), ap_proxy_http_canon(), ap_set_listener(), APU_DECLARE(), check_hostalias(), check_serverpath(), DAV_DECLARE(), fix_hostname(), fully_qualify_uri(), get_addresses(), hook_uri2file(), isSecureConnEx(), main(), output_html_results(), output_results(), parse_url(), proxy_get_host_of_request(), proxy_handler(), reduce_uri(), server_hostname_port(), set_secure_listener(), set_secure_upgradeable_listener(), ssl_hook_ReadReq(), ssl_util_vhostid(), and test().

apr_port_t port
 

Definition at line 711 of file apr_network_io.h.

int * protocol
 

Definition at line 820 of file apr_network_io.h.

Referenced by AP_CORE_DECLARE_NONSTD(), AP_DECLARE(), main(), modssl_ctx_cfg_merge(), and ssl_init_ctx_protocol().

apr_sockaddr_t * sa
 

Definition at line 800 of file apr_network_io.h.

Referenced by alloc_listener(), ap_mpm_child_main(), ap_mpm_run(), apr_create_nt_pipe(), APR_DECLARE(), do_double_reverse(), find_default_family(), get_sid_string(), GetNullACL(), mpm_nt_eventlog_stderr_open(), test_interesting_subnets(), and test_singleton_subnets().

char** scope_id
 

Definition at line 438 of file apr_network_io.h.

Referenced by ap_proxy_canon_netloc(), ap_set_listener(), fix_hostname(), get_addresses(), and parse_url().

const char* servname
 

Definition at line 779 of file apr_network_io.h.

apr_socket_t * sock
 

Definition at line 186 of file apr_poll.h.

Referenced by ap_mpm_run(), ap_proxy_connect_handler(), ap_proxy_ftp_handler(), ap_rfc1413(), child_main(), convert_secure_socket(), main(), sendto_receivefrom(), tcp6_socket(), tcp_socket(), udp6_socket(), and udp_socket().

apr_sockaddr_t * sockaddr
 

Definition at line 740 of file apr_network_io.h.

Referenced by APR_DECLARE(), apr_socket_accept(), apr_socket_bind(), apr_socket_connect(), apr_socket_recvfrom(), apr_socket_sendto(), cgid_server(), connect_to_daemon(), get_local_addr(), get_remote_addr(), main(), nwssl_post_config(), start_connect(), and unique_id_global_init().

char apr_port_t const char* str
 

Definition at line 438 of file apr_network_io.h.

apr_time_t t
 

Definition at line 217 of file apr_time.h.

Referenced by __ssl_expr_yy_memcpy(), action_handler(), add_include_vars(), APU_DECLARE(), authenticate_digest_user(), check_speling(), check_user_access(), conv_10(), conv_10_quad(), current_logtime(), dav_method_options(), dav_send_one_response(), dbm_check_auth(), digest_check_auth(), displaynw(), expires_filter(), find_partial_start_sequence(), gen_nonce(), get_random_info(), getsfunc_STRING(), hook_mimetype(), mod_auth_ldap_auth_checker(), output_directories(), parse(), parse_network(), ssl_rand_seed(), ssl_util_algotypeof(), store_cache_string(), table_nelts(), table_unset(), test_2038(), test_aup(), and test_uph().

apr_interval_time_t* t
 

Definition at line 683 of file apr_network_io.h.

const char * type
 

Definition at line 197 of file apr_dbm.h.

Referenced by ap_proxy_send_dir_filter(), APR_DECLARE(), apr_wait_for_io_or_timeout(), CACHE_DECLARE(), filetype_from_mode(), find_allowdeny(), find_ct(), rewritelog(), set_accept_quality(), set_charset_quality(), ssl_filter_io_shutdown(), ssl_server_import_cert(), ssl_server_import_key(), and utf8_toUtf16().

int int type
 

Definition at line 280 of file apr_network_io.h.

const struct iovec* vec
 

Definition at line 519 of file apr_network_io.h.

apr_sockaddr_t* where
 

Definition at line 535 of file apr_network_io.h.

apr_interface_e which
 

Definition at line 701 of file apr_network_io.h.