Apache HTTPD
Modules | Classes | Macros | Typedefs | Enumerations | Functions | Variables
Network Routines

Modules

 Socket option definitions
 
 IP Protocol Definitions for use when creating sockets
 
 IP Multicast
 

Classes

struct  in_addr
 
struct  apr_sockaddr_t
 
struct  apr_hdtr_t
 

Macros

#define APR_MAX_SECS_TO_LINGER   30
 
#define APRMAXHOSTLEN   256
 
#define APR_ANYADDR   "0.0.0.0"
 
#define APR_IPV4_ADDR_OK   0x01
 
#define APR_IPV6_ADDR_OK   0x02
 
#define APR_INADDR_NONE   ((unsigned int) 0xffffffff)
 
#define APR_INET   AF_INET
 
#define APR_UNSPEC   0
 
#define APR_UNIX   1234
 

Typedefs

typedef struct apr_socket_t apr_socket_t
 
typedef struct apr_hdtr_t apr_hdtr_t
 
typedef struct in_addr apr_in_addr_t
 
typedef struct apr_ipsubnet_t apr_ipsubnet_t
 
typedef apr_uint16_t apr_port_t
 
typedef struct 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 (apr_pool_t *) apr_socket_pool_get(const apr_socket_t *thesocket)
 

Variables

int family
 
int int type
 
int int int protocol
 
int int int apr_pool_tcont
 
apr_shutdown_how_e how
 
apr_sockaddr_tsa
 
apr_int32_t backlog
 
apr_socket_tsock
 
apr_socket_t apr_pool_tconnection_pool
 
intatreadeof
 
const charhostname
 
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_tp
 
const apr_sockaddr_tsrc
 
const charzone_id
 
const char ** name
 
const char apr_uint32_tid
 
char ** scope_id
 
char apr_port_t const charstr
 
int len
 
const charkey
 
void * data
 
void const char apr_status_t(* cleanup )(void *))
 
const charbuf
 
const struct iovecvec
 
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
 
apr_size_t buflen
 
const apr_sockaddr_taddr2
 
const charservname
 
const charipstr
 
const char const charmask_or_numbits
 
apr_fileperms_t perms
 
apr_fileperms_t apr_uid_t uid
 
apr_fileperms_t apr_uid_t apr_gid_t gid
 

Detailed Description

Macro Definition Documentation

◆ APR_ANYADDR

#define APR_ANYADDR   "0.0.0.0"

Default 'any' address

Definition at line 60 of file apr_network_io.h.

◆ APR_INADDR_NONE

#define APR_INADDR_NONE   ((unsigned int) 0xffffffff)

Not all platforms have a real INADDR_NONE. This macro replaces INADDR_NONE on all platforms.

Definition at line 141 of file apr_network_io.h.

◆ APR_INET

#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 149 of file apr_network_io.h.

◆ APR_IPV4_ADDR_OK

#define APR_IPV4_ADDR_OK   0x01
See also
apr_sockaddr_info_get()

Definition at line 121 of file apr_network_io.h.

◆ APR_IPV6_ADDR_OK

#define APR_IPV6_ADDR_OK   0x02
See also
apr_sockaddr_info_get()

Definition at line 122 of file apr_network_io.h.

◆ APR_MAX_SECS_TO_LINGER

#define APR_MAX_SECS_TO_LINGER   30

Maximum seconds to linger

Definition at line 50 of file apr_network_io.h.

◆ APR_UNIX

#define APR_UNIX   1234

Definition at line 181 of file apr_network_io.h.

◆ APR_UNSPEC

#define APR_UNSPEC   0

Let the system decide which address family to use

Definition at line 156 of file apr_network_io.h.

◆ APRMAXHOSTLEN

#define APRMAXHOSTLEN   256

Maximum hostname length

Definition at line 55 of file apr_network_io.h.

Typedef Documentation

◆ apr_hdtr_t

A structure to encapsulate headers and trailers for apr_socket_sendfile

Definition at line 223 of file apr_network_io.h.

◆ apr_in_addr_t

A structure to represent in_addr

Definition at line 225 of file apr_network_io.h.

◆ apr_ipsubnet_t

A structure to represent an IP subnet

Definition at line 227 of file apr_network_io.h.

◆ apr_port_t

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

Definition at line 230 of file apr_network_io.h.

◆ 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 235 of file apr_network_io.h.

◆ apr_socket_t

The specific declaration of inet_addr's ... some platforms fall back inet_network (this is not good, but necessary) A structure to represent sockets

Definition at line 219 of file apr_network_io.h.

Enumeration Type Documentation

◆ apr_interface_e

Enum used to denote either the local and remote endpoint of a connection.

Enumerator
APR_LOCAL 

Socket information for local end of connection

APR_REMOTE 

Socket information for remote end of connection

Definition at line 198 of file apr_network_io.h.

◆ apr_shutdown_how_e

Define what type of socket shutdown should occur.

Enumerator
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 115 of file apr_network_io.h.

Function Documentation

◆ APR_DECLARE() [1/2]

APR_DECLARE ( apr_pool_t ) const

Get the pool used by the socket.

◆ APR_DECLARE() [2/2]

APR_DECLARE ( apr_status_t  )

Create a socket.

Parameters
new_sockThe new socket that has been set up.
familyThe address family of the socket (e.g., APR_INET).
typeThe type of the socket (e.g., SOCK_STREAM).
protocolThe protocol of the socket (e.g., APR_PROTO_TCP).
contThe pool for the apr_socket_t and associated storage.
Note
The pool will be used by various functions that operate on the socket. The caller must ensure that it is not used by other threads at the same time.

Shutdown either reading, writing, or both sides of a socket.

Parameters
thesocketThe socket to close
howHow to shutdown the socket. One of:
           APR_SHUTDOWN_READ         no longer allow read requests
           APR_SHUTDOWN_WRITE        no longer allow write requests
           APR_SHUTDOWN_READWRITE    no longer allow read or write requests 
See also
apr_shutdown_how_e
Remarks
This does not actually close the socket descriptor, it just controls which calls are still valid on the socket.

Close a socket.

Parameters
thesocketThe socket to close

Bind the socket to its associated port

Parameters
sockThe socket to bind
saThe socket address to bind to
Remarks
This may be where we will find out if there is any other process using the selected port.

Listen to a bound socket for connections.

Parameters
sockThe socket to listen on
backlogThe number of outstanding connections allowed in the sockets listen queue. If this value is less than zero, the listen queue size is set to zero.

Accept a new connection request

Parameters
new_sockA copy of the socket that is connected to the socket that made the connection request. This is the socket which should be used for all future communication.
sockThe socket we are listening on.
connection_poolThe pool for the new socket.
Note
The pool will be used by various functions that operate on the socket. The caller must ensure that it is not used by other threads at the same time.

Issue a connection request to a socket either on the same machine or a different one.

Parameters
sockThe socket we wish to use for our side of the connection
saThe address of the machine we wish to connect to.

Determine whether the receive part of the socket has been closed by the peer (such that a subsequent call to apr_socket_read would return APR_EOF), if the socket's receive buffer is empty. This function does not block waiting for I/O.

Parameters
sockThe socket to check
atreadeofIf APR_SUCCESS is returned, *atreadeof is set to non-zero if a subsequent read would return APR_EOF
Returns
an error is returned if it was not possible to determine the status, in which case *atreadeof is not changed.

Create apr_sockaddr_t from hostname, address family, and port.

Parameters
saThe new apr_sockaddr_t.
hostnameThe hostname or numeric address string to resolve/parse, or NULL to build an address that corresponds to 0.0.0.0 or :: or in case of APR_UNIX family it is absolute socket filename.
familyThe address family to use, or APR_UNSPEC if the system should decide.
portThe port number.
flagsSpecial processing flags:
      APR_IPV4_ADDR_OK          first query for IPv4 addresses; only look
                                for IPv6 addresses if the first query failed;
                                only valid if family is APR_UNSPEC and hostname
                                isn't NULL; mutually exclusive with
                                APR_IPV6_ADDR_OK
      APR_IPV6_ADDR_OK          first query for IPv6 addresses; only look
                                for IPv4 addresses if the first query failed;
                                only valid if family is APR_UNSPEC and hostname
                                isn't NULL and APR_HAVE_IPV6; mutually exclusive
                                with APR_IPV4_ADDR_OK
pThe pool for the apr_sockaddr_t and associated storage.

Copy apr_sockaddr_t src to dst on pool p.

Parameters
dstThe destination apr_sockaddr_t.
srcThe source apr_sockaddr_t.
pThe pool for the apr_sockaddr_t and associated storage.

Set the zone of an IPv6 link-local address object.

Parameters
saSocket address object
zone_idZone ID (textual "eth0" or numeric "3").
Returns
Returns APR_EBADIP for non-IPv6 socket or an IPv6 address which isn't link-local.

Retrieve the zone of an IPv6 link-local address object.

Parameters
saSocket address object
nameIf non-NULL, set to the textual representation of the zone id
idIf non-NULL, set to the integer zone id
pPool from which *name is allocated if used.
Returns
Returns APR_EBADIP for non-IPv6 socket or socket without any zone id set, or other error if the interface could not be mapped to a name.
Remarks
Both name and id may be NULL, neither are modified if non-NULL in error cases.

Look up the host name from an apr_sockaddr_t.

Parameters
hostnameThe hostname.
saThe apr_sockaddr_t.
flagsSpecial processing flags.
Remarks
Results can vary significantly between platforms when processing wildcard socket addresses.

Parse hostname/IP address with scope id and port.

Any of the following strings are accepted: 8080 (just the port number) www.apache.org (just the hostname) www.apache.org:8080 (hostname and port number)

[fe80::1eth0] (IPv6 numeric address string and scope id)

Invalid strings: (empty string) [abc] (not valid IPv6 numeric address string) abc:65536 (invalid port number)

Parameters
addrThe new buffer containing just the hostname. On output, *addr will be NULL if no hostname/IP address was specfied.
scope_idThe new buffer containing just the scope id. On output, *scope_id will be NULL if no scope id was specified.
portThe port number. On output, *port will be 0 if no port was specified.

FIXME: 0 is a legal port (per RFC 1700). this should

return something besides zero if the port is missing.

Parameters
strThe input string to be parsed.
pThe pool from which *addr and *scope_id are allocated.
Remarks
If scope id shouldn't be allowed, check for scope_id != NULL in addition to checking the return code. If addr/hostname should be required, check for addr == NULL in addition to checking the return code.

Get name of the current machine

Parameters
bufA buffer to store the hostname in.
lenThe maximum length of the hostname that can be stored in the buffer provided. The suggested length is APRMAXHOSTLEN + 1.
contThe pool to use.
Remarks
If the buffer was not large enough, an error will be returned.

Return the data associated with the current socket

Parameters
dataThe user data associated with the socket.
keyThe key to associate with the user data.
sockThe currently open socket.

Set the data associated with the current socket.

Parameters
sockThe currently open socket.
dataThe user data to associate with the socket.
keyThe key to associate with the data.
cleanupThe cleanup to call when the socket is destroyed.

Send data over a network.

Parameters
sockThe socket to send the data over.
bufThe buffer which contains the data to be sent.
lenOn entry, the number of bytes to send; on exit, the number of bytes sent.
Remarks
This functions acts like a blocking write by default.  To change 
this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
socket option.

It is possible for both bytes to be sent and an error to be returned.

APR_EINTR is never returned.

Send multiple buffers over a network.

Parameters
sockThe socket to send the data over.
vecThe array of iovec structs containing the data to send
nvecThe number of iovec structs in the array
lenReceives the number of bytes actually written
Remarks
This functions acts like a blocking write by default.  To change 
this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
socket option.
The number of bytes actually sent is stored in argument 4.

It is possible for both bytes to be sent and an error to be returned.

APR_EINTR is never returned.
Parameters
sockThe socket to send from
whereThe apr_sockaddr_t describing where to send the data
flagsThe flags to use
bufThe data to send
lenThe length of the data to send

Read data from a socket. On success, the address of the peer from which the data was sent is copied into the from parameter, and the len parameter is updated to give the number of bytes written to buf.

Parameters
fromUpdated with the address from which the data was received
sockThe socket to use
flagsThe flags to use
bufThe buffer to use
lenThe length of the available buffer

Read data from a network.

Parameters
sockThe socket to read the data from.
bufThe buffer to store the data in.
lenOn entry, the number of bytes to receive; on exit, the number of bytes received.
Remarks
This functions acts like a blocking read by default.  To change 
this behavior, use apr_socket_timeout_set() or the APR_SO_NONBLOCK
socket option.
The number of bytes actually received is stored in argument 3.

It is possible for both bytes to be received and an APR_EOF or
other error to be returned.

APR_EINTR is never returned.

Setup socket options for the specified socket

Parameters
sockThe socket to set up.
optThe option we would like to configure. One of:
           APR_SO_DEBUG      --  turn on debugging information 
           APR_SO_KEEPALIVE  --  keep connections active
           APR_SO_LINGER     --  lingers on close if data is present
           APR_SO_NONBLOCK   --  Turns blocking on/off for socket
                                 When this option is enabled, use
                                 the APR_STATUS_IS_EAGAIN() macro to
                                 see if a send or receive function
                                 could not transfer data without
                                 blocking.
           APR_SO_REUSEADDR  --  The rules used in validating addresses
                                 supplied to bind should allow reuse
                                 of local addresses.
           APR_SO_SNDBUF     --  Set the SendBufferSize
           APR_SO_RCVBUF     --  Set the ReceiveBufferSize
           APR_SO_FREEBIND   --  Allow binding to non-local IP address.
onValue for the option.

Setup socket timeout for the specified socket

Parameters
sockThe socket to set up.
tValue for the timeout.
  t > 0  -- read and write calls return APR_TIMEUP if specified time
            elapsess with no data read or written
  t == 0 -- read and write calls never block
  t < 0  -- read and write calls block

Query socket options for the specified socket

Parameters
sockThe socket to query
optThe option we would like to query. One of:
           APR_SO_DEBUG      --  turn on debugging information 
           APR_SO_KEEPALIVE  --  keep connections active
           APR_SO_LINGER     --  lingers on close if data is present
           APR_SO_NONBLOCK   --  Turns blocking on/off for socket
           APR_SO_REUSEADDR  --  The rules used in validating addresses
                                 supplied to bind should allow reuse
                                 of local addresses.
           APR_SO_SNDBUF     --  Set the SendBufferSize
           APR_SO_RCVBUF     --  Set the ReceiveBufferSize
           APR_SO_DISCONNECTED -- Query the disconnected state of the socket.
                                 (Currently only used on Windows)
onSocket option returned on the call.

Query socket timeout for the specified socket

Parameters
sockThe socket to query
tSocket timeout returned from the query.

Query the specified socket if at the OOB/Urgent data mark

Parameters
sockThe socket to query
atmarkIs set to true if socket is at the OOB/urgent mark, otherwise is set to false.

Return an address associated with a socket; either the address to which the socket is bound locally or the address of the peer to which the socket is connected.

Parameters
saThe returned apr_sockaddr_t.
whichWhether to retrieve the local or remote address
sockThe socket to use

Return the IP address (in numeric address string format) in an APR socket address. APR will allocate storage for the IP address string from the pool of the apr_sockaddr_t.

Parameters
addrThe IP address.
sockaddrThe socket address to reference.

Write the IP address (in numeric address string format) of the APR socket address sockaddr into the buffer buf (of size buflen).

Parameters
sockaddrThe socket address to reference.

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
addr1One of the APR socket addresses.
addr2The other APR socket address.
Remarks
The return value will be non-zero if the addresses are equivalent.

See if the IP address in an APR socket address refers to the wildcard address for the protocol family (e.g., INADDR_ANY for IPv4).

Parameters
addrThe APR socket address to examine.
Remarks
The return value will be non-zero if the address is initialized and is the wildcard address.

Return the type of the socket.

Parameters
sockThe socket to query.
typeThe returned type (e.g., SOCK_STREAM).

Given an apr_sockaddr_t and a service name, set the port for the service

Parameters
sockaddrThe apr_sockaddr_t that will have its port set
servnameThe name of the service you wish to use

Build an ip-subnet representation from an IP address and optional netmask or number-of-bits.

Parameters
ipsubThe new ip-subnet representation
ipstrThe input IP address string
mask_or_numbitsThe input netmask or number-of-bits string, or NULL
pThe pool to allocate from

Test the IP address in an apr_sockaddr_t against a pre-built ip-subnet representation.

Parameters
ipsubThe ip-subnet representation
saThe socket address to test
Returns
non-zero if the socket address is within the subnet, 0 otherwise

Return the protocol of the socket.

Parameters
sockThe socket to query.
protocolThe returned protocol (e.g., APR_PROTO_TCP).

Set a socket to be inherited by child processes.

Unset a socket from being inherited by child processes.

Set socket permissions.

Join a Multicast Group

Parameters
sockThe socket to join a multicast group
joinThe address of the multicast group to join
ifaceAddress of the interface to use. If NULL is passed, the default multicast interface will be used. (OS Dependent)
sourceSource Address to accept transmissions from (non-NULL implies Source-Specific Multicast)

Leave a Multicast Group. All arguments must be the same as apr_mcast_join.

Parameters
sockThe socket to leave a multicast group
addrThe address of the multicast group to leave
ifaceAddress of the interface to use. If NULL is passed, the default multicast interface will be used. (OS Dependent)
sourceSource Address to accept transmissions from (non-NULL implies Source-Specific Multicast)

Set the Multicast Time to Live (ttl) for a multicast transmission.

Parameters
sockThe socket to set the multicast ttl
ttlTime to live to Assign. 0-255, default=1
Remarks
If the TTL is 0, packets will only be seen by sockets on the local machine, and only when multicast loopback is enabled.

Toggle IP Multicast Loopback

Parameters
sockThe socket to set multicast loopback
opt0=disable, 1=enable

Set the Interface to be used for outgoing Multicast Transmissions.

Parameters
sockThe socket to set the multicast interface on
ifaceAddress of the interface to use for Multicast

< File is read-only

< File is executable

< all protections

< File is read-only

< File is read-only

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Write by group

<

Deprecated:
See also
APR_FPROT_GWRITE

< Write by others

<

Deprecated:
See also
APR_FPROT_WWRITE

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Write by group

<

Deprecated:
See also
APR_FPROT_GWRITE

< Write by others

<

Deprecated:
See also
APR_FPROT_WWRITE

< File is executable

< File is executable

< Execute by user

<

Deprecated:
See also
APR_FPROT_UEXECUTE

< Execute by group

<

Deprecated:
See also
APR_FPROT_GEXECUTE

< Execute by others

<

Deprecated:
See also
APR_FPROT_WEXECUTE

< Execute by user

<

Deprecated:
See also
APR_FPROT_UEXECUTE

< Execute by group

<

Deprecated:
See also
APR_FPROT_GEXECUTE

< Execute by others

<

Deprecated:
See also
APR_FPROT_WEXECUTE

< Stat the link not the file itself if it is a link

< Stat the link not the file itself if it is a link

< ->name in proper case

< ->name in proper case

< Access Time

< Create the file if not there

< Open the file for reading

< Open the file for writing

< Delete the file after close

< Open should fail if APR_FOPEN_CREATE and file exists.

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Read by user

<

Deprecated:
See also
APR_FPROT_UREAD

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< ->name in proper case

< Modification Time

< Access Time

< Creation or inode-changed time

< Type

< Size of the file

< Storage size consumed by the file

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< ->name in proper case

< ->name in proper case

< Type

< all protections

< ->name in proper case

< ->name in proper case

< File is read-only

< File is hidden

< File is read-only

< File is read-only

< File is hidden

< File is hidden

< Platform dependent flag to enable * non blocking file io

< Open the file for reading

< Open the file for writing

< Open the file for reading

< Open the file for writing

< Open the file for buffered I/O

< Create the file if not there

< Open should fail if APR_FOPEN_CREATE and file exists.

< Open the file and truncate to 0 length

< Open should fail if APR_FOPEN_CREATE and file exists.

< Create the file if not there

< Open the file and truncate to 0 length

< Append to the end of the file

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Delete the file after close

< Open the file for buffered I/O

< Open the file for writing

< Open the file for writing

< Open the file for reading

< Append to the end of the file

< an atomic unix apr_stat()

< Open the file for writing

< Create the file if not there

< Open the file and truncate to 0 length

< Open the file for writing

< Create the file if not there

< Append to the end of the file

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< File is read-only

< File is executable

< all protections

< File is read-only

< File is read-only

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Write by group

<

Deprecated:
See also
APR_FPROT_GWRITE

< Write by others

<

Deprecated:
See also
APR_FPROT_WWRITE

< Write by user

<

Deprecated:
See also
APR_FPROT_UWRITE

< Write by group

<

Deprecated:
See also
APR_FPROT_GWRITE

< Write by others

<

Deprecated:
See also
APR_FPROT_WWRITE

< File is executable

< File is executable

< Execute by user

<

Deprecated:
See also
APR_FPROT_UEXECUTE

< Execute by group

<

Deprecated:
See also
APR_FPROT_GEXECUTE

< Execute by others

<

Deprecated:
See also
APR_FPROT_WEXECUTE

< Execute by user

<

Deprecated:
See also
APR_FPROT_UEXECUTE

< Execute by group

<

Deprecated:
See also
APR_FPROT_GEXECUTE

< Execute by others

<

Deprecated:
See also
APR_FPROT_WEXECUTE

< Access Time

< Stat the link not the file itself if it is a link

< Stat the link not the file itself if it is a link

< Stat the link not the file itself if it is a link

< Create the file if not there

< Open the file for reading

< Open the file for writing

< Open should fail if APR_FOPEN_CREATE and file exists.

< Delete the file after close

< Open the file for reading

< Open the file for writing

< Open the file for reading

< Open the file for writing

< Create the file if not there

< Open should fail if APR_FOPEN_CREATE and file exists.

< Open should fail if APR_FOPEN_CREATE and file exists.

< Create the file if not there

< Append to the end of the file

< Open the file and truncate to 0 length

< Platform dependent flag to enable * non blocking file io

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Open the file for buffered I/O

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Open the file for buffered I/O

< Open the file for writing

< Open the file for writing

< Open the file for reading

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

The problem with trying to output the entire iovec is that we cannot maintain the behaviour that a real writev would have. If we iterate over the iovec one at a time, we lose the atomic properties of writev(). The other option is to combine the entire iovec into one buffer that we could then send in one call to write(). This is not reasonable since we do not know how much data an iovec could contain.

The only reasonable option, that maintains the semantics of a real writev(), is to only write the first iovec. Callers of file_writev() must deal with partial writes as they normally would. If you want to ensure an entire iovec is written, use apr_file_writev_full().

< ->name in proper case

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Size of the file

< Size of the file

< dev and inode

< Number of links

< ->name in proper case

< Type

< Type

< ->name in proper case

< File is read-only

< File is hidden

< File is read-only

< File is read-only

< File is hidden

< File is hidden

< Open the file for reading

< use OS's default permissions

<

Deprecated:
See also
APR_FPROT_OS_DEFAULT

< Platform dependent flag to enable * non blocking file io

< Open the file for reading

< Open the file for writing

< Create the file if not there

< Open should fail if APR_FOPEN_CREATE and file exists.

< Open the file and truncate to 0 length

< Open the file and truncate to 0 length

< Open should fail if APR_FOPEN_CREATE and file exists.

< Create the file if not there

< Delete the file after close

< Open the file for reading

< Open the file for writing

< Platform dependent tag to open the file for use across multiple threads

< Append to the end of the file

< Open the file for buffered I/O

< Platform dependent flag to enable * sparse file support, see WARNING below

< Do not register a cleanup when the file is opened. The apr_os_file_t handle in apr_file_t will not be closed when the pool is destroyed.

< Append to the end of the file

< Open the file for buffered I/O

< Open the file for writing

< Open the file for writing

< Open the file for reading

< Platform dependent tag to open the file for use across multiple threads

< Platform dependent tag to open the file for use across multiple threads

< Platform dependent tag to open the file for use across multiple threads

< Platform dependent tag to open the file for use across multiple threads

< Platform dependent tag to open the file for use across multiple threads

< Platform dependent tag to open the file for use across multiple threads

< Exclusive lock. Only one process may hold an exclusive lock at any given time. This is analogous to a "write lock".

< Platform dependent tag to open the file for use across multiple threads

< Platform dependent tag to open the file for use across multiple threads

< Platform dependent tag to open the file for use across multiple threads

< Platform dependent tag to open the file for use across multiple threads

< Size of the file

< Platform dependent tag to open the file for use across multiple threads

< Size of the file

Definition at line 74 of file apr_atomic.c.

Variable Documentation

◆ addr2

Definition at line 792 of file apr_network_io.h.

◆ atmark

int* atmark

Definition at line 749 of file apr_network_io.h.

◆ atreadeof

int* atreadeof

Definition at line 401 of file apr_network_io.h.

◆ backlog

apr_int32_t backlog

Definition at line 362 of file apr_network_io.h.

◆ buf

char * buf

Definition at line 566 of file apr_network_io.h.

◆ buflen

apr_size_t buflen

Definition at line 778 of file apr_network_io.h.

◆ cleanup

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

Definition at line 547 of file apr_network_io.h.

◆ connection_pool

apr_socket_t apr_pool_t* connection_pool

Definition at line 377 of file apr_network_io.h.

◆ cont

int apr_pool_t * cont

Definition at line 320 of file apr_network_io.h.

◆ data

void* data

Definition at line 545 of file apr_network_io.h.

◆ family

Definition at line 318 of file apr_network_io.h.

◆ flags

Definition at line 431 of file apr_network_io.h.

◆ gid

Definition at line 881 of file apr_network_io.h.

◆ hostname

const char* hostname

Definition at line 428 of file apr_network_io.h.

◆ how

Definition at line 336 of file apr_network_io.h.

◆ id

Definition at line 468 of file apr_network_io.h.

◆ ipstr

const char* ipstr

Definition at line 828 of file apr_network_io.h.

◆ key

void const char * key

Definition at line 535 of file apr_network_io.h.

◆ len

Definition at line 527 of file apr_network_io.h.

◆ mask_or_numbits

const char const char* mask_or_numbits

Definition at line 829 of file apr_network_io.h.

◆ name

const char** name

Definition at line 467 of file apr_network_io.h.

◆ nvec

Definition at line 589 of file apr_network_io.h.

◆ on

Definition at line 696 of file apr_network_io.h.

◆ opt

Definition at line 696 of file apr_network_io.h.

◆ p

Definition at line 432 of file apr_network_io.h.

◆ perms

Definition at line 881 of file apr_network_io.h.

◆ port

char apr_port_t * port

Definition at line 430 of file apr_network_io.h.

◆ protocol

int * protocol

Definition at line 319 of file apr_network_io.h.

◆ sa

Definition at line 352 of file apr_network_io.h.

◆ scope_id

char** scope_id

Definition at line 514 of file apr_network_io.h.

◆ servname

const char* servname

Definition at line 818 of file apr_network_io.h.

◆ sock

Definition at line 376 of file apr_network_io.h.

◆ sockaddr

Definition at line 771 of file apr_network_io.h.

◆ src

Definition at line 441 of file apr_network_io.h.

◆ str

Definition at line 516 of file apr_network_io.h.

◆ t

Definition at line 710 of file apr_network_io.h.

◆ type

int * type

Definition at line 318 of file apr_network_io.h.

◆ uid

Definition at line 881 of file apr_network_io.h.

◆ vec

Definition at line 588 of file apr_network_io.h.

◆ where

Definition at line 599 of file apr_network_io.h.

◆ which

Definition at line 760 of file apr_network_io.h.

◆ zone_id

const char* zone_id

Definition at line 452 of file apr_network_io.h.