Skip to main content

Crate apr_sys

Crate apr_sys 

Source

Structs§

__BindgenBitfieldUnit
__va_list_tag
apr_allocator_t
apr_array_header_t
An opaque array type
apr_crypto_block_key_mode_t
apr_crypto_block_key_type_t
apr_crypto_block_t
apr_crypto_config_t
apr_crypto_driver_t
apr_crypto_key_rec_t
apr_crypto_key_t
apr_crypto_passphrase_t
apr_crypto_secret_t
apr_crypto_t
apr_dir_t
apr_dso_handle_t
apr_file_t
Unused
apr_finfo_t
The file information structure. This is analogous to the POSIX stat structure.
apr_getopt_option_t
Structure used to describe options that getopt should search for.
apr_getopt_t
Structure to store command line argument information.
apr_hash_index_t
apr_hash_t
apr_hdtr_t
A structure to encapsulate headers and trailers for apr_socket_sendfile
apr_ipsubnet_t
apr_md5_ctx_t
MD5 context.
apr_memnode_t
basic memory node structure @note The next, ref and first_avail fields are available for use by the caller of apr_allocator_alloc(), the remaining fields are read-only. The next field has to be used with caution and sensibly set when the memnode is passed back to apr_allocator_free(). See apr_allocator_free() for details. The ref and first_avail fields will be properly restored by apr_allocator_free().
apr_mmap_t
@remark As far as I can tell the only really sane way to store an MMAP is as a void * and a length. BeOS requires this area_id, but that’s just a little something extra. I am exposing this type, because it doesn’t make much sense to keep it private, and opening it up makes some stuff easier in Apache. / /** The MMAP structure
apr_mmap_t__bindgen_ty_1
ring of apr_mmap_t’s that reference the same mmap’ed region; acts in place of a reference count
apr_other_child_rec_t
apr_pool_t
apr_proc_t
The APR process type
apr_procattr_t
apr_queue_t
apr_sha1_ctx_t
SHA1 context structure
apr_sockaddr_t
APRs socket address type, used to ensure protocol independence
apr_socket_t
apr_strmatch_pattern
Precompiled search pattern
apr_table_entry_t
The type for each entry in a string-content table
apr_table_t
apr_text
Structure to keep a linked list of pieces of text
apr_text_header
A list of pieces of text
apr_thread_cond_t
apr_thread_mutex_t
apr_thread_once_t
apr_thread_t
apr_threadattr_t
apr_threadkey_t
apr_time_exp_t
a structure similar to ANSI struct tm with the following differences:
apr_uri_t
A structure to encompass all of the fields in a uri
apr_uuid_t
we represent a UUID as a block of 16 bytes.
apr_version_t
The numeric version information is broken out into fields within this structure.
apr_xlate_t
apr_xml_attr
apr_xml_attr: holds a parsed XML attribute
apr_xml_doc
apr_xml_doc: holds a parsed XML document
apr_xml_elem
apr_xml_elem: holds a parsed XML element
apr_xml_ns_scope
namespaces scoped by this elem
apr_xml_parser
apu_err_t
This structure allows the underlying API error codes to be returned along with plain text error messages that explain to us mere mortals what really happened.
hostent
structure returned from gethostbyname()
in6_addr
in_addr
iovec
rlimit
sockaddr_in
sockaddr_in6
sockaddr_storage
sockaddr_un

Constants§

APRMAXHOSTLEN
APR_ALLOCATOR_MAX_FREE_UNLIMITED
APR_ANONYMOUS
APR_ANYADDR
APR_APPEND
APR_ASCII_BLANK
APR_ASCII_CR
APR_ASCII_LF
APR_ASCII_TAB
APR_BADARG
APR_BADCH
APR_BINARY
APR_BUFFERED
APR_CHARSET_EBCDIC
APR_CHILD_BLOCK
APR_CHILD_DONE
APR_CHILD_NOTDONE
APR_COPYRIGHT
APR_CREATE
APR_CTIME_LEN
APR_CUR
APR_DELONCLOSE
APR_DETACH
APR_DSOPATH
APR_EABOVEROOT
APR_EABSOLUTE
APR_EACCES
APR_EAFNOSUPPORT
APR_EAGAIN
APR_EBADDATE
APR_EBADF
APR_EBADIP
APR_EBADMASK
APR_EBADPATH
APR_EBUSY
APR_ECONNABORTED
APR_ECONNREFUSED
APR_ECONNRESET
APR_EDSOOPEN
APR_EEXIST
APR_EFTYPE
APR_EGENERAL
APR_EHOSTUNREACH
APR_EINCOMPLETE
APR_EINIT
APR_EINPROGRESS
APR_EINTR
APR_EINVAL
APR_EINVALSOCK
APR_EMFILE
APR_EMISMATCH
APR_ENAMETOOLONG
APR_END
APR_ENETUNREACH
APR_ENFILE
APR_ENODIR
APR_ENOENT
APR_ENOLOCK
APR_ENOMEM
APR_ENOPOLL
APR_ENOPOOL
APR_ENOPROC
APR_ENOSHMAVAIL
APR_ENOSOCKET
APR_ENOSPC
APR_ENOSTAT
APR_ENOTDIR
APR_ENOTEMPTY
APR_ENOTENOUGHENTROPY
APR_ENOTHDKEY
APR_ENOTHREAD
APR_ENOTIME
APR_ENOTIMPL
APR_ENOTSOCK
APR_EOF
APR_EOL_STR
APR_EOPNOTSUPP
APR_EPATHWILD
APR_EPIPE
APR_EPROC_UNKNOWN
APR_ERANGE
APR_ERELATIVE
APR_ESPIPE
APR_ESYMNOTFOUND
APR_ETIMEDOUT
APR_EXCL
APR_EXDEV
APR_FILEBASED
APR_FILEPATH_ENCODING_LOCALE
APR_FILEPATH_ENCODING_UNKNOWN
APR_FILEPATH_ENCODING_UTF8
APR_FILEPATH_NATIVE
APR_FILEPATH_NOTABOVEROOT
APR_FILEPATH_NOTABSOLUTE
APR_FILEPATH_NOTRELATIVE
APR_FILEPATH_SECUREROOT
APR_FILEPATH_SECUREROOTTEST
APR_FILEPATH_TRUENAME
APR_FILES_AS_SOCKETS
APR_FILE_ATTR_EXECUTABLE
APR_FILE_ATTR_HIDDEN
APR_FILE_ATTR_READONLY
APR_FILE_NOCLEANUP
APR_FILE_SOURCE_PERMS
APR_FINFO_ATIME
APR_FINFO_CSIZE
APR_FINFO_CTIME
APR_FINFO_DEV
APR_FINFO_DIRENT
APR_FINFO_GPROT
APR_FINFO_GROUP
APR_FINFO_ICASE
APR_FINFO_IDENT
APR_FINFO_INODE
APR_FINFO_LINK
APR_FINFO_MIN
APR_FINFO_MTIME
APR_FINFO_NAME
APR_FINFO_NLINK
APR_FINFO_NORM
APR_FINFO_OWNER
APR_FINFO_PROT
APR_FINFO_SIZE
APR_FINFO_TYPE
APR_FINFO_UPROT
APR_FINFO_USER
APR_FINFO_WPROT
APR_FLOCK_EXCLUSIVE
APR_FLOCK_NONBLOCK
APR_FLOCK_SHARED
APR_FLOCK_TYPEMASK
APR_FOPEN_APPEND
APR_FOPEN_BINARY
APR_FOPEN_BUFFERED
APR_FOPEN_CREATE
APR_FOPEN_DELONCLOSE
APR_FOPEN_EXCL
APR_FOPEN_LARGEFILE
APR_FOPEN_NOCLEANUP
APR_FOPEN_NONBLOCK
APR_FOPEN_READ
APR_FOPEN_SENDFILE_ENABLED
APR_FOPEN_SHARELOCK
APR_FOPEN_SPARSE
APR_FOPEN_TRUNCATE
APR_FOPEN_WRITE
APR_FOPEN_XTHREAD
APR_FPROT_FILE_SOURCE_PERMS
APR_FPROT_GEXECUTE
APR_FPROT_GREAD
APR_FPROT_GSETID
APR_FPROT_GWRITE
APR_FPROT_OS_DEFAULT
APR_FPROT_UEXECUTE
APR_FPROT_UREAD
APR_FPROT_USETID
APR_FPROT_UWRITE
APR_FPROT_WEXECUTE
APR_FPROT_WREAD
APR_FPROT_WSTICKY
APR_FPROT_WWRITE
APR_FULL_BLOCK
APR_FULL_NONBLOCK
APR_GEXECUTE
APR_GREAD
APR_GSETID
APR_GWRITE
APR_HASH_KEY_STRING
APR_HAS_DSO
APR_HAS_FCNTL_SERIALIZE
APR_HAS_FLOCK_SERIALIZE
APR_HAS_FORK
APR_HAS_INLINE
APR_HAS_LARGE_FILES
APR_HAS_MMAP
APR_HAS_OS_UUID
APR_HAS_OTHER_CHILD
APR_HAS_POSIXSEM_SERIALIZE
APR_HAS_PROC_INVOKED
APR_HAS_PROC_PTHREAD_SERIALIZE
APR_HAS_RANDOM
APR_HAS_SENDFILE
APR_HAS_SHARED_MEMORY
APR_HAS_SO_ACCEPTFILTER
APR_HAS_SYSVSEM_SERIALIZE
APR_HAS_THREADS
APR_HAS_TIMEDLOCKS
APR_HAS_UNICODE_FS
APR_HAS_USER
APR_HAS_XTHREAD_FILES
APR_HAVE_ARPA_INET_H
APR_HAVE_CONIO_H
APR_HAVE_CORKABLE_TCP
APR_HAVE_CRYPT_H
APR_HAVE_CTYPE_H
APR_HAVE_DIRENT_H
APR_HAVE_ERRNO_H
APR_HAVE_FCNTL_H
APR_HAVE_GETRLIMIT
APR_HAVE_INET_ADDR
APR_HAVE_INET_NETWORK
APR_HAVE_INTTYPES_H
APR_HAVE_IN_ADDR
APR_HAVE_IOVEC
APR_HAVE_IO_H
APR_HAVE_IPV6
APR_HAVE_LIMITS_H
APR_HAVE_MEMCHR
APR_HAVE_MEMMOVE
APR_HAVE_NETDB_H
APR_HAVE_NETINET_IN_H
APR_HAVE_NETINET_SCTP_H
APR_HAVE_NETINET_SCTP_UIO_H
APR_HAVE_NETINET_TCP_H
APR_HAVE_PROCESS_H
APR_HAVE_PTHREAD_H
APR_HAVE_SA_STORAGE
APR_HAVE_SCTP
APR_HAVE_SEMAPHORE_H
APR_HAVE_SETRLIMIT
APR_HAVE_SHMEM_BEOS
APR_HAVE_SHMEM_MMAP_ANON
APR_HAVE_SHMEM_MMAP_SHM
APR_HAVE_SHMEM_MMAP_TMP
APR_HAVE_SHMEM_MMAP_ZERO
APR_HAVE_SHMEM_SHMGET
APR_HAVE_SHMEM_SHMGET_ANON
APR_HAVE_SIGACTION
APR_HAVE_SIGNAL_H
APR_HAVE_SIGSUSPEND
APR_HAVE_SIGWAIT
APR_HAVE_SOCKADDR_UN
APR_HAVE_STDARG_H
APR_HAVE_STDINT_H
APR_HAVE_STDIO_H
APR_HAVE_STDLIB_H
APR_HAVE_STRCASECMP
APR_HAVE_STRDUP
APR_HAVE_STRICMP
APR_HAVE_STRINGS_H
APR_HAVE_STRING_H
APR_HAVE_STRNCASECMP
APR_HAVE_STRNICMP
APR_HAVE_STRSTR
APR_HAVE_STRUCT_RLIMIT
APR_HAVE_SYS_IOCTL_H
APR_HAVE_SYS_SENDFILE_H
APR_HAVE_SYS_SIGNAL_H
APR_HAVE_SYS_SOCKET_H
APR_HAVE_SYS_SOCKIO_H
APR_HAVE_SYS_SYSLIMITS_H
APR_HAVE_SYS_TIME_H
APR_HAVE_SYS_TYPES_H
APR_HAVE_SYS_UIO_H
APR_HAVE_SYS_UN_H
APR_HAVE_SYS_WAIT_H
APR_HAVE_TIME_H
APR_HAVE_UNION_SEMUN
APR_HAVE_UNISTD_H
APR_HAVE_WINDOWS_H
APR_HAVE_WINSOCK2_H
APR_INCHILD
APR_INCOMPLETE
APR_INCOMPLETE_READ
APR_INCOMPLETE_WRITE
APR_INET
APR_INET6
APR_INPARENT
APR_INT16_MAX
APR_INT16_MIN
APR_INT32_MAX
APR_INT32_MIN
APR_INT64_T_FMT
APR_IPV4_ADDR_OK
APR_IPV6_ADDR_OK
APR_IPV6_V6ONLY
APR_IS_BIGENDIAN
APR_IS_DEV_STRING
APR_KEYBASED
APR_LARGEFILE
APR_LIMIT_CPU
APR_LIMIT_MEM
APR_LIMIT_NOFILE
APR_LIMIT_NPROC
APR_MAJOR_VERSION
APR_MAX_IOVEC_SIZE
APR_MAX_SECS_TO_LINGER
APR_MD5_DIGESTSIZE
APR_MINOR_VERSION
APR_MMAP_LIMIT
APR_MMAP_READ
APR_MMAP_THRESHOLD
APR_MMAP_WRITE
APR_NOTDETACH
APR_NOTFOUND
APR_NO_FILE
APR_NO_PIPE
APR_OC_REASON_DEATH
APR_OC_REASON_LOST
APR_OC_REASON_RESTART
APR_OC_REASON_RUNNING
APR_OC_REASON_UNREGISTER
APR_OC_REASON_UNWRITABLE
APR_OFF_T_FMT
APR_OS_DEFAULT
APR_OS_ERRSPACE_SIZE
APR_OS_START_CANONERR
APR_OS_START_EAIERR
APR_OS_START_ERROR
APR_OS_START_STATUS
APR_OS_START_SYSERR
APR_OS_START_USEERR
APR_OS_START_USERERR
APR_OVERLAP_TABLES_ADD
APR_OVERLAP_TABLES_MERGE
APR_OVERLAP_TABLES_SET
APR_O_NONBLOCK_INHERITED
APR_PARENT_BLOCK
APR_PATCH_VERSION
APR_PATH_MAX
APR_PID_T_FMT
APR_POOL_DEBUG
APR_PROCATTR_USER_SET_REQUIRES_PASSWORD
APR_PROCESS_LOCK_IS_GLOBAL
APR_PROC_DETACH_DAEMONIZE
APR_PROC_DETACH_FOREGROUND
APR_PROC_MUTEX_IS_GLOBAL
APR_PROTO_SCTP
APR_PROTO_TCP
APR_PROTO_UDP
APR_READ
APR_READ_BLOCK
APR_RESET_NODELAY
APR_RFC822_DATE_LEN
APR_SENDFILE_DISCONNECT_SOCKET
APR_SENDFILE_ENABLED
APR_SET
APR_SHA1PW_ID
APR_SHA1PW_IDLEN
APR_SHA1_DIGESTSIZE
APR_SHARELOCK
APR_SIZEOF_VOIDP
APR_SIZE_T_FMT
APR_SO_BROADCAST
APR_SO_DEBUG
APR_SO_DISCONNECTED
APR_SO_FREEBIND
APR_SO_KEEPALIVE
APR_SO_LINGER
APR_SO_NONBLOCK
APR_SO_RCVBUF
APR_SO_REUSEADDR
APR_SO_SNDBUF
APR_SSIZE_T_FMT
APR_SUCCESS
APR_TCP_DEFER_ACCEPT
APR_TCP_NODELAY
APR_TCP_NODELAY_INHERITED
APR_TCP_NOPUSH
APR_THREAD_MUTEX_DEFAULT
APR_THREAD_MUTEX_NESTED
APR_THREAD_MUTEX_TIMED
APR_THREAD_MUTEX_UNNESTED
APR_TIMEUP
APR_TIME_T_FMT
APR_TRUNCATE
APR_UEXECUTE
APR_UINT16_MAX
APR_UINT32_MAX
APR_UINT64_T_FMT
APR_UINT64_T_HEX_FMT
APR_UNIX
APR_UNSPEC
APR_UREAD
APR_URI_ACAP_DEFAULT_PORT
APR_URI_FTP_DEFAULT_PORT
APR_URI_GOPHER_DEFAULT_PORT
APR_URI_HTTPS_DEFAULT_PORT
APR_URI_HTTP_DEFAULT_PORT
APR_URI_IMAP_DEFAULT_PORT
APR_URI_LDAP_DEFAULT_PORT
APR_URI_NFS_DEFAULT_PORT
APR_URI_NNTP_DEFAULT_PORT
APR_URI_POP_DEFAULT_PORT
APR_URI_PROSPERO_DEFAULT_PORT
APR_URI_RTSP_DEFAULT_PORT
APR_URI_SIP_DEFAULT_PORT
APR_URI_SNEWS_DEFAULT_PORT
APR_URI_SSH_DEFAULT_PORT
APR_URI_TELNET_DEFAULT_PORT
APR_URI_TIP_DEFAULT_PORT
APR_URI_UNP_OMITPASSWORD
APR_URI_UNP_OMITPATHINFO
APR_URI_UNP_OMITQUERY
APR_URI_UNP_OMITSITEPART
APR_URI_UNP_OMITUSER
APR_URI_UNP_OMITUSERINFO
APR_URI_UNP_REVEALPASSWORD
APR_URI_WAIS_DEFAULT_PORT
APR_USETID
APR_USE_FCNTL_SERIALIZE
APR_USE_FLOCK_SERIALIZE
APR_USE_POSIXSEM_SERIALIZE
APR_USE_PROC_PTHREAD_SERIALIZE
APR_USE_PTHREAD_SERIALIZE
APR_USE_SHMEM_BEOS
APR_USE_SHMEM_MMAP_ANON
APR_USE_SHMEM_MMAP_SHM
APR_USE_SHMEM_MMAP_TMP
APR_USE_SHMEM_MMAP_ZERO
APR_USE_SHMEM_SHMGET
APR_USE_SHMEM_SHMGET_ANON
APR_USE_SYSVSEM_SERIALIZE
APR_UTIL_ERRSPACE_SIZE
APR_UTIL_START_STATUS
APR_UUID_FORMATTED_LENGTH
APR_UWRITE
APR_WEXECUTE
APR_WREAD
APR_WRITE
APR_WRITE_BLOCK
APR_WSTICKY
APR_WWRITE
APR_XML_NS_DAV_ID
APR_XML_NS_ERROR_BASE
APR_XML_NS_NONE
APR_XML_X2T_FULL
APR_XML_X2T_FULL_NS_LANG
APR_XML_X2T_INNER
APR_XML_X2T_LANG_INNER
APR_XML_X2T_PARSED
APR_XTHREAD
APU_COPYRIGHT
APU_CRYPTO_RECOMMENDED_DRIVER
APU_IS_DEV_STRING
APU_MAJOR_VERSION
APU_MINOR_VERSION
APU_PATCH_VERSION
FALSE
apr_cmdtype_e_APR_PROGRAM
< invoke the program directly, no copied env
apr_cmdtype_e_APR_PROGRAM_ENV
< invoke the program, replicating our environment
apr_cmdtype_e_APR_PROGRAM_PATH
< find program on PATH, use our environment
apr_cmdtype_e_APR_SHELLCMD
< use the shell to invoke the program
apr_cmdtype_e_APR_SHELLCMD_ENV
< use the shell to invoke the program, replicating our environment
apr_crypto_block_key_mode_e_APR_MODE_CBC
Electronic Code Book
apr_crypto_block_key_mode_e_APR_MODE_ECB
An error condition
apr_crypto_block_key_mode_e_APR_MODE_NONE
apr_crypto_block_key_type_e_APR_KEY_3DES_192
apr_crypto_block_key_type_e_APR_KEY_AES_128
192 bit (3-Key) 3DES
apr_crypto_block_key_type_e_APR_KEY_AES_192
128 bit AES
apr_crypto_block_key_type_e_APR_KEY_AES_256
192 bit AES
apr_crypto_block_key_type_e_APR_KEY_NONE
apr_crypto_key_type_APR_CRYPTO_KTYPE_PASSPHRASE
Key is derived from a passphrase
apr_crypto_key_type_APR_CRYPTO_KTYPE_SECRET
Key is derived from a raw key
apr_exit_why_e_APR_PROC_EXIT
< process exited normally
apr_exit_why_e_APR_PROC_SIGNAL
< process exited due to a signal
apr_exit_why_e_APR_PROC_SIGNAL_CORE
< process exited and dumped a core file
apr_filetype_e_APR_BLK
< a block device
apr_filetype_e_APR_CHR
< a character device
apr_filetype_e_APR_DIR
< a directory
apr_filetype_e_APR_LNK
< a symbolic link
apr_filetype_e_APR_NOFILE
< no file type determined
apr_filetype_e_APR_PIPE
< a FIFO / pipe
apr_filetype_e_APR_REG
< a regular file
apr_filetype_e_APR_SOCK
< a [unix domain] socket
apr_filetype_e_APR_UNKFILE
< a file of some other unknown type
apr_interface_e_APR_LOCAL
< Socket information for local end of connection
apr_interface_e_APR_REMOTE
< Socket information for remote end of connection
apr_kill_conditions_e_APR_JUST_WAIT
< wait forever for the process to complete
apr_kill_conditions_e_APR_KILL_AFTER_TIMEOUT
< SIGTERM, wait 3 seconds, SIGKILL
apr_kill_conditions_e_APR_KILL_ALWAYS
< process is sent SIGKILL on apr_pool_t cleanup
apr_kill_conditions_e_APR_KILL_NEVER
< process is never killed (i.e., never sent any signals), but it will be reaped if it exits before the pool is cleaned up
apr_kill_conditions_e_APR_KILL_ONLY_ONCE
< send SIGTERM and then wait
apr_shutdown_how_e_APR_SHUTDOWN_READ
< no longer allow read request
apr_shutdown_how_e_APR_SHUTDOWN_READWRITE
< no longer allow read or write requests
apr_shutdown_how_e_APR_SHUTDOWN_WRITE
< no longer allow write requests
apr_wait_how_e_APR_NOWAIT
< do not wait – just see if it has finished
apr_wait_how_e_APR_WAIT
< wait for the specified process to finish

Statics§

apr_day_snames
day names
apr_month_snames
month names

Functions§

apr_allocator_align
Get the true size that would be allocated for the given size (including the header and alignment). @param allocator The allocator from which to the memory would be allocated @param size The size to align @return The aligned size (or zero on apr_size_t overflow)
apr_allocator_alloc
Allocate a block of mem from the allocator @param allocator The allocator to allocate from @param size The size of the mem to allocate (excluding the memnode structure)
apr_allocator_create
Create a new allocator @param allocator The allocator we have just created.
apr_allocator_destroy
Destroy an allocator @param allocator The allocator to be destroyed @remark Any memnodes not given back to the allocator prior to destroying will not be free()d.
apr_allocator_free
Free a list of blocks of mem, giving them back to the allocator. The list is typically terminated by a memnode with its next field set to NULL. @param allocator The allocator to give the mem back to @param memnode The memory node to return
apr_allocator_max_free_set
Set the current threshold at which the allocator should start giving blocks back to the system. @param allocator The allocator to set the threshold on @param size The threshold. 0 == unlimited.
apr_allocator_mutex_get
Get the mutex currently set for the allocator @param allocator The allocator
apr_allocator_mutex_set
Set a mutex for the allocator to use @param allocator The allocator to set the mutex for @param mutex The mutex
apr_allocator_owner_get
Get the current owner of the allocator @param allocator The allocator to get the owner from
apr_allocator_owner_set
Set the owner of the allocator @param allocator The allocator to set the owner for @param pool The pool that is to own the allocator @remark Typically pool is the highest level pool using the allocator
apr_app_initialize
Set up an application with normalized argc, argv (and optionally env) in order to deal with platform-specific oddities, such as Win32 services, code pages and signals. This must be the first function called for any APR program. @param argc Pointer to the argc that may be corrected @param argv Pointer to the argv that may be corrected @param env Pointer to the env that may be corrected, may be NULL @remark See apr_initialize() if this is a library consumer of apr. Otherwise, this call is identical to apr_initialize(), and must be closed with a call to apr_terminate() at the end of program execution.
apr_array_append
Append one array to the end of another, creating a new array in the process. @param p The pool to allocate the new array out of @param first The array to put first in the new array. @param second The array to put second in the new array. @return A new array containing the data from the two arrays passed in.
apr_array_cat
Concatenate two arrays together. @param dst The destination array, and the one to go first in the combined array @param src The source array to add to the destination array
apr_array_clear
Remove all elements from an array. @param arr The array to remove all elements from. @remark As the underlying storage is allocated from a pool, no memory is freed by this operation, but is available for reuse.
apr_array_copy
Copy the entire array. @param p The pool to allocate the copy of the array out of @param arr The array to copy @return An exact copy of the array passed in @remark The alternate apr_array_copy_hdr() copies only the header, and arranges for the elements to be copied if (and only if) the code subsequently does a push or arraycat.
apr_array_copy_hdr
Copy the headers of the array, and arrange for the elements to be copied if and only if the code subsequently does a push or arraycat. @param p The pool to allocate the copy of the array out of @param arr The array to copy @return An exact copy of the array passed in @remark The alternate apr_array_copy() copies the entire array.
apr_array_make
Create an array. @param p The pool to allocate the memory out of @param nelts the number of elements in the initial array @param elt_size The size of each element in the array. @return The new array
apr_array_pop
Remove an element from an array (as a first-in, last-out stack). @param arr The array to remove an element from. @return Location of the element in the array. @remark If there are no elements in the array, NULL is returned.
apr_array_pstrcat
Generate a new string from the apr_pool_t containing the concatenated sequence of substrings referenced as elements within the array. The string will be empty if all substrings are empty or null, or if there are no elements in the array. If sep is non-NUL, it will be inserted between elements as a separator. @param p The pool to allocate the string out of @param arr The array to generate the string from @param sep The separator to use @return A string containing all of the data in the array.
apr_array_push
Add a new element to an array (as a first-in, last-out stack). @param arr The array to add an element to. @return Location for the new element in the array. @remark If there are no free spots in the array, then this function will allocate new space for the new element.
apr_atoi64
parse a base-10 numeric string into a 64-bit numeric value. Equivalent to apr_strtoi64(buf, (char**)NULL, 10). @param buf The string to parse @return The numeric value of the string. On overflow, errno is set to ERANGE. On success, errno is set to 0.
apr_base64_decode
Decode a string to plain text @param plain_dst The destination string for the plain text @param coded_src The encoded string @return the length of the plain text string
apr_base64_decode_binary
Decode an EBCDIC string to plain text @param plain_dst The destination string for the plain text @param coded_src The encoded string @return the length of the plain text string
apr_base64_decode_len
Determine the maximum buffer length required to decode the plain text string given the encoded string. @param coded_src The encoded string @return the maximum required buffer length for the plain text string
apr_base64_encode
Encode a text string using base64encoding. @param coded_dst The destination string for the encoded string. @param plain_src The original string in plain text @param len_plain_src The length of the plain text string @return the length of the encoded string
apr_base64_encode_binary
Encode an EBCDIC string using base64encoding. @param coded_dst The destination string for the encoded string. @param plain_src The original string in plain text @param len_plain_src The length of the plain text string @return the length of the encoded string
apr_base64_encode_len
Given the length of an un-encoded string, get the length of the encoded string. @param len the length of an unencoded string. @return the length of the string after it is encoded, including the trailing \0
apr_bcrypt_encode
Encode a password using the bcrypt algorithm @param password The password to encode @param count The cost of the encoding, possible values are 4 to 31 @param salt Pointer to binary data to be used as salt for the encoding @param salt_len The size of the salt data (must be >= 16) @param out The string to store the encoded password in @param out_len The size of the result buffer (must be >= 61)
apr_collapse_spaces
Remove all whitespace from a string @param dest The destination string. It is okay to modify the string in place. Namely dest == src @param src The string to rid the spaces from. @return A pointer to the destination string’s null terminator.
apr_cpystrn
Copy up to dst_size characters from src to dst; does not copy past a NUL terminator in src, but always terminates dst with a NUL regardless. @param dst The destination string @param src The source string @param dst_size The space available in dst; dst always receives NUL termination, so if src is longer than dst_size, the actual number of characters copied is dst_size - 1. @return Pointer to the NUL terminator of the destination string, dst @remark
apr_crypto_block_cleanup
@brief Clean encryption / decryption context. @note After cleanup, a context is free to be reused if necessary. @param ctx The block context to use. @return Returns APR_ENOTIMPL if not supported.
apr_crypto_block_decrypt
@brief Decrypt data provided by in, write it to out. @note The number of bytes written will be written to outlen. If out is NULL, outlen will contain the maximum size of the buffer needed to hold the data, including any data generated by apr_crypto_block_decrypt_finish below. If *out points to NULL, a buffer sufficiently large will be created from the pool provided. If *out points to a not-NULL value, this value will be used as a buffer instead. @param out Address of a buffer to which data will be written, see note. @param outlen Length of the output will be written here. @param in Address of the buffer to read. @param inlen Length of the buffer to read. @param ctx The block context to use. @return APR_ECRYPT if an error occurred. Returns APR_ENOTIMPL if not implemented.
apr_crypto_block_decrypt_finish
@brief Decrypt final data block, write it to out. @note If necessary the final block will be written out after being padded. Typically the final block will be written to the same buffer used by apr_crypto_block_decrypt, offset by the number of bytes returned as actually written by the apr_crypto_block_decrypt() call. After this call, the context is cleaned and can be reused by apr_crypto_block_decrypt_init(). @param out Address of a buffer to which data will be written. This buffer must already exist, and is usually the same buffer used by apr_evp_crypt(). See note. @param outlen Length of the output will be written here. @param ctx The block context to use. @return APR_ECRYPT if an error occurred. @return APR_EPADDING if padding was enabled and the block was incorrectly formatted. @return APR_ENOTIMPL if not implemented.
apr_crypto_block_decrypt_init
@brief Initialise a context for decrypting arbitrary data using the given key. @note If *ctx is NULL, a apr_crypto_block_t will be created from a pool. If *ctx is not NULL, *ctx must point at a previously created structure. @param ctx The block context returned, see note. @param blockSize The block size of the cipher. @param iv Optional initialisation vector. @param key The key structure to use. @param p The pool to use. @return Returns APR_ENOIV if an initialisation vector is required but not specified. Returns APR_EINIT if the backend failed to initialise the context. Returns APR_ENOTIMPL if not implemented.
apr_crypto_block_encrypt
@brief Encrypt data provided by in, write it to out. @note The number of bytes written will be written to outlen. If out is NULL, outlen will contain the maximum size of the buffer needed to hold the data, including any data generated by apr_crypto_block_encrypt_finish below. If *out points to NULL, a buffer sufficiently large will be created from the pool provided. If *out points to a not-NULL value, this value will be used as a buffer instead. @param out Address of a buffer to which data will be written, see note. @param outlen Length of the output will be written here. @param in Address of the buffer to read. @param inlen Length of the buffer to read. @param ctx The block context to use. @return APR_ECRYPT if an error occurred. Returns APR_ENOTIMPL if not implemented.
apr_crypto_block_encrypt_finish
@brief Encrypt final data block, write it to out. @note If necessary the final block will be written out after being padded. Typically the final block will be written to the same buffer used by apr_crypto_block_encrypt, offset by the number of bytes returned as actually written by the apr_crypto_block_encrypt() call. After this call, the context is cleaned and can be reused by apr_crypto_block_encrypt_init(). @param out Address of a buffer to which data will be written. This buffer must already exist, and is usually the same buffer used by apr_evp_crypt(). See note. @param outlen Length of the output will be written here. @param ctx The block context to use. @return APR_ECRYPT if an error occurred. @return APR_EPADDING if padding was enabled and the block was incorrectly formatted. @return APR_ENOTIMPL if not implemented.
apr_crypto_block_encrypt_init
@brief Initialise a context for encrypting arbitrary data using the given key. @note If *ctx is NULL, a apr_crypto_block_t will be created from a pool. If *ctx is not NULL, *ctx must point at a previously created structure. @param ctx The block context returned, see note. @param iv Optional initialisation vector. If the buffer pointed to is NULL, an IV will be created at random, in space allocated from the pool. If the buffer pointed to is not NULL, the IV in the buffer will be used. @param key The key structure to use. @param blockSize The block size of the cipher. @param p The pool to use. @return Returns APR_ENOIV if an initialisation vector is required but not specified. Returns APR_EINIT if the backend failed to initialise the context. Returns APR_ENOTIMPL if not implemented.
apr_crypto_cleanup
@brief Clean encryption / decryption context. @note After cleanup, a context is free to be reused if necessary. @param f The context to use. @return Returns APR_ENOTIMPL if not supported.
apr_crypto_clear
@brief Zero out the buffer provided when the pool is cleaned up.
apr_crypto_driver_name
@brief Return the name of the driver.
apr_crypto_equals
@brief Timing attacks safe buffers comparison, where the executing time does not depend on the bytes compared but solely on the number of bytes.
apr_crypto_error
@brief Get the result of the last operation on a context. If the result is NULL, the operation was successful. @param result - the result structure @param f - context pointer @return APR_SUCCESS for success
apr_crypto_get_block_key_modes
@brief Get a hash table of key modes, keyed by the name of the mode against a pointer to apr_crypto_block_key_mode_t, which in turn begins with an integer.
apr_crypto_get_block_key_types
@brief Get a hash table of key types, keyed by the name of the type against a pointer to apr_crypto_block_key_type_t, which in turn begins with an integer.
apr_crypto_get_driver
@brief Get the driver struct for a name
apr_crypto_init
@brief Perform once-only initialisation. Call once only.
apr_crypto_key
@brief Create a key from the provided secret or passphrase. The key is cleaned up when the context is cleaned, and may be reused with multiple encryption or decryption operations. @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If *key is not NULL, *key must point at a previously created structure. @param key The key returned, see note. @param rec The key record, from which the key will be derived. @param f The context to use. @param p The pool to use. @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend error occurred while generating the key. APR_ENOCIPHER if the type or mode is not supported by the particular backend. APR_EKEYTYPE if the key type is not known. APR_EPADDING if padding was requested but is not supported. APR_ENOTIMPL if not implemented.
apr_crypto_make
@brief Create a context for supporting encryption. Keys, certificates, algorithms and other parameters will be set per context. More than one context can be created at one time. A cleanup will be automatically registered with the given pool to guarantee a graceful shutdown. @param f - context pointer will be written here @param driver - driver to use @param params - array of key parameters @param pool - process pool @return APR_ENOENGINE when the engine specified does not exist. APR_EINITENGINE if the engine cannot be initialised. @remarks NSS: currently no params are supported. @remarks OpenSSL: the params can have “engine” as a key, followed by an equal sign and a value.
apr_crypto_memzero
@brief Always zero out the buffer provided, without being optimized out by the compiler.
apr_crypto_passphrase
@brief Create a key from the given passphrase. By default, the PBKDF2 algorithm is used to generate the key from the passphrase. It is expected that the same pass phrase will generate the same key, regardless of the backend crypto platform used. The key is cleaned up when the context is cleaned, and may be reused with multiple encryption or decryption operations. @note If *key is NULL, a apr_crypto_key_t will be created from a pool. If *key is not NULL, *key must point at a previously created structure. @param key The key returned, see note. @param ivSize The size of the initialisation vector will be returned, based on whether an IV is relevant for this type of crypto. @param pass The passphrase to use. @param passLen The passphrase length in bytes @param salt The salt to use. @param saltLen The salt length in bytes @param type 3DES_192, AES_128, AES_192, AES_256. @param mode Electronic Code Book / Cipher Block Chaining. @param doPad Pad if necessary. @param iterations Number of iterations to use in algorithm @param f The context to use. @param p The pool to use. @return Returns APR_ENOKEY if the pass phrase is missing or empty, or if a backend error occurred while generating the key. APR_ENOCIPHER if the type or mode is not supported by the particular backend. APR_EKEYTYPE if the key type is not known. APR_EPADDING if padding was requested but is not supported. APR_ENOTIMPL if not implemented. @deprecated Replaced by apr_crypto_key().
apr_crypto_shutdown
@brief Shutdown the crypto library. @note After shutdown, it is expected that the init function can be called again. @param driver - driver to use @return Returns APR_ENOTIMPL if not supported.
apr_ctime
apr_ctime formats dates in the ctime() format in an efficient manner. It is a fixed length format and requires APR_CTIME_LEN bytes of storage including the trailing NUL terminator. Unlike ANSI/ISO C ctime(), apr_ctime() does not include a \n at the end of the string. @param date_str String to write to. @param t the time to convert
apr_date_checkmask
Compare a string to a mask @param data The string to compare @param mask Mask characters (arbitrary maximum is 256 characters):
apr_date_parse_http
Parses an HTTP date in one of three standard forms:
apr_date_parse_rfc
Parses a string resembling an RFC 822 date. This is meant to be leinent in its parsing of dates. Hence, this will parse a wider range of dates than apr_date_parse_http.
apr_dir_close
close the specified directory. @param thedir the directory descriptor to close.
apr_dir_make
Create a new directory on the file system. @param path the path for the directory to be created. (use / on all systems) @param perm Permissions for the new directory. @param pool the pool to use.
apr_dir_make_recursive
Creates a new directory on the file system, but behaves like ‘mkdir -p’. Creates intermediate directories as required. No error will be reported if PATH already exists. @param path the path for the directory to be created. (use / on all systems) @param perm Permissions for the new directory. @param pool the pool to use.
apr_dir_open
Open the specified directory. @param new_dir The opened directory descriptor. @param dirname The full path to the directory (use / on all systems) @param pool The pool to use.
apr_dir_read
Read the next entry from the specified directory. @param finfo the file info structure and filled in by apr_dir_read @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values @param thedir the directory descriptor returned from apr_dir_open @remark No ordering is guaranteed for the entries read.
apr_dir_remove
Remove directory from the file system. @param path the path for the directory to be removed. (use / on all systems) @param pool the pool to use. @remark Removing a directory which is in-use (e.g., the current working directory, or during apr_dir_read, or with an open file) is not portable.
apr_dir_rewind
Rewind the directory to the first entry. @param thedir the directory descriptor to rewind.
apr_dso_error
Report more information when a DSO function fails. @param dso The dso handle that has been opened @param buf Location to store the dso error @param bufsize The size of the provided buffer
apr_dso_load
Load a DSO library. @param res_handle Location to store new handle for the DSO. @param path Path to the DSO library @param ctx Pool to use. @bug We aught to provide an alternative to RTLD_GLOBAL, which is the only supported method of loading DSOs today.
apr_dso_sym
Load a symbol from a DSO handle. @param ressym Location to store the loaded symbol @param handle handle to load the symbol from. @param symname Name of the symbol to load.
apr_dso_unload
Close a DSO library. @param handle handle to close.
apr_env_delete
Delete a variable from the environment @param envvar the name of the environment variable @param pool where to allocate temporary storage from
apr_env_get
Get the value of an environment variable @param value the returned value, allocated from @a pool @param envvar the name of the environment variable @param pool where to allocate @a value and any temporary storage from
apr_env_set
Set the value of an environment variable @param envvar the name of the environment variable @param value the value to set @param pool where to allocate temporary storage from
apr_file_append
Append the specified file to another file. @param from_path The full path to the source file (use / on all systems) @param to_path The full path to the destination file (use / on all systems) @param perms Access permissions for the destination file if it is created. In place of the usual or’d combination of file permissions, the value #APR_FPROT_FILE_SOURCE_PERMS may be given, in which case the source file’s permissions are copied. @param pool The pool to use. @remark The new file does not need to exist, it will be created if required. @remark Note that advanced filesystem permissions such as ACLs are not duplicated by this API. The target permissions (including duplicating the source file permissions) are assigned only when the target file does not yet exist.
apr_file_attrs_set
Set attributes of the specified file. @param fname The full path to the file (using / on all systems) @param attributes Or’d combination of @li #APR_FILE_ATTR_READONLY - make the file readonly @li #APR_FILE_ATTR_EXECUTABLE - make the file executable @li #APR_FILE_ATTR_HIDDEN - make the file hidden @param attr_mask Mask of valid bits in attributes. @param pool the pool to use. @remark This function should be used in preference to explicit manipulation of the file permissions, because the operations to provide these attributes are platform specific and may involve more than simply setting permission bits. @warning Platforms which do not implement this feature will return #APR_ENOTIMPL.
apr_file_buffer_set
Give the specified apr file handle a new buffer @param thefile The file handle that is to be modified @param buffer The buffer @param bufsize The size of the buffer @remark It is possible to add a buffer to previously unbuffered file handles, the #APR_FOPEN_BUFFERED flag will be added to the file handle’s flags. Likewise, with buffer=NULL and bufsize=0 arguments it is possible to make a previously buffered file handle unbuffered.
apr_file_buffer_size_get
Get the size of any buffer for the specified apr file handle @param thefile The file handle
apr_file_close
Close the specified file. @param file The file descriptor to close.
apr_file_copy
Copy the specified file to another file. @param from_path The full path to the original file (using / on all systems) @param to_path The full path to the new file (using / on all systems) @param perms Access permissions for the new file if it is created. In place of the usual or’d combination of file permissions, the value #APR_FPROT_FILE_SOURCE_PERMS may be given, in which case the source file’s permissions are copied. @param pool The pool to use. @remark The new file does not need to exist, it will be created if required. @warning If the new file already exists, its contents will be overwritten.
apr_file_data_get
Return the data associated with the current file. @param data The user data associated with the file. @param key The key to use for retrieving data associated with this file. @param file The currently open file.
apr_file_data_set
Set the data associated with the current file. @param file The currently open file. @param data The user data to associate with the file. @param key The key to use for associating data with the file. @param cleanup The cleanup routine to use when the file is destroyed.
apr_file_datasync
Transfer all file modified data to disk. @param thefile The file descriptor to sync
apr_file_dup
Duplicate the specified file descriptor. @param new_file The structure to duplicate into. @param old_file The file to duplicate. @param p The pool to use for the new file. @remark *new_file must point to a valid apr_file_t, or point to NULL.
apr_file_dup2
Duplicate the specified file descriptor and close the original @param new_file The old file that is to be closed and reused @param old_file The file to duplicate @param p The pool to use for the new file
apr_file_eof
Are we at the end of the file @param fptr The apr file we are testing. @remark Returns #APR_EOF if we are at the end of file, #APR_SUCCESS otherwise.
apr_file_flags_get
Retrieve the flags that were passed into apr_file_open() when the file was opened. @return apr_int32_t the flags
apr_file_flush
Flush the file’s buffer. @param thefile The file descriptor to flush
apr_file_getc
Read a character from the specified file. @param ch The character to read into @param thefile The file descriptor to read from
apr_file_gets
Read a line from the specified file @param str The buffer to store the string in. @param len The length of the string @param thefile The file descriptor to read from @remark The buffer will be NUL-terminated if any characters are stored. The newline at the end of the line will not be stripped.
apr_file_info_get
get the specified file’s stats. @param finfo Where to store the information about the file. @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_* values @param thefile The file to get information about.
apr_file_inherit_set
Set a file to be inherited by child processes.
apr_file_inherit_unset
Unset a file from being inherited by child processes.
apr_file_link
Create a hard link to the specified file. @param from_path The full path to the original file (using / on all systems) @param to_path The full path to the new file (using / on all systems) @remark Both files must reside on the same device.
apr_file_lock
Establish a lock on the specified, open file. The lock may be advisory or mandatory, at the discretion of the platform. The lock applies to the file as a whole, rather than a specific range. Locks are established on a per-thread/process basis; a second lock by the same thread will not block. @param thefile The file to lock. @param type The type of lock to establish on the file.
apr_file_mktemp
Open a temporary file @param fp The apr file to use as a temporary file. @param templ The template to use when creating a temp file. @param flags The flags to open the file with. If this is zero, the file is opened with #APR_FOPEN_CREATE | #APR_FOPEN_READ | #APR_FOPEN_WRITE | #APR_FOPEN_EXCL | #APR_FOPEN_DELONCLOSE @param p The pool to allocate the file out of. @remark This function generates a unique temporary file name from template. The last six characters of template must be XXXXXX and these are replaced with a string that makes the filename unique. Since it will be modified, template must not be a string constant, but should be declared as a character array.
apr_file_mtime_set
Set the mtime of the specified file. @param fname The full path to the file (using / on all systems) @param mtime The mtime to apply to the file. @param pool The pool to use. @warning Platforms which do not implement this feature will return #APR_ENOTIMPL.
apr_file_name_get
return the file name of the current file. @param new_path The path of the file. @param thefile The currently open file.
apr_file_namedpipe_create
Create a named pipe. @param filename The filename of the named pipe @param perm The permissions for the newly created pipe. @param pool The pool to operate on.
apr_file_open
Open the specified file. @param newf The opened file descriptor. @param fname The full path to the file (using / on all systems) @param flag Or’ed value of: @li #APR_FOPEN_READ open for reading @li #APR_FOPEN_WRITE open for writing @li #APR_FOPEN_CREATE create the file if not there @li #APR_FOPEN_APPEND file ptr is set to end prior to all writes @li #APR_FOPEN_TRUNCATE set length to zero if file exists @li #APR_FOPEN_BINARY not a text file @li #APR_FOPEN_BUFFERED buffer the data. Default is non-buffered @li #APR_FOPEN_EXCL return error if #APR_FOPEN_CREATE and file exists @li #APR_FOPEN_DELONCLOSE delete the file after closing @li #APR_FOPEN_XTHREAD Platform dependent tag to open the file for use across multiple threads @li #APR_FOPEN_SHARELOCK Platform dependent support for higher level locked read/write access to support writes across process/machines @li #APR_FOPEN_NOCLEANUP Do not register a cleanup with the pool passed in on the @a pool argument (see below) @li #APR_FOPEN_SENDFILE_ENABLED Open with appropriate platform semantics for sendfile operations. Advisory only, apr_socket_sendfile does not check this flag @li #APR_FOPEN_LARGEFILE Platform dependent flag to enable large file support, see WARNING below @li #APR_FOPEN_SPARSE Platform dependent flag to enable sparse file support, see WARNING below @li #APR_FOPEN_NONBLOCK Platform dependent flag to enable non blocking file io @param perm Access permissions for file. @param pool The pool to use. @remark If perm is #APR_FPROT_OS_DEFAULT and the file is being created, appropriate default permissions will be used. @remark By default, the returned file descriptor will not be inherited by child processes created by apr_proc_create(). This can be changed using apr_file_inherit_set().
apr_file_open_flags_stderr
open standard error as an apr file pointer, with flags. @param thefile The apr file to use as stderr. @param flags The flags to open the file with. Only the @li #APR_FOPEN_EXCL @li #APR_FOPEN_BUFFERED @li #APR_FOPEN_XTHREAD @li #APR_FOPEN_SHARELOCK @li #APR_FOPEN_SENDFILE_ENABLED @li #APR_FOPEN_LARGEFILE
apr_file_open_flags_stdin
open standard input as an apr file pointer, with flags. @param thefile The apr file to use as stdin. @param flags The flags to open the file with. Only the @li #APR_FOPEN_EXCL @li #APR_FOPEN_BUFFERED @li #APR_FOPEN_XTHREAD @li #APR_FOPEN_SHARELOCK @li #APR_FOPEN_SENDFILE_ENABLED @li #APR_FOPEN_LARGEFILE
apr_file_open_flags_stdout
open standard output as an apr file pointer, with flags. @param thefile The apr file to use as stdout. @param flags The flags to open the file with. Only the @li #APR_FOPEN_EXCL @li #APR_FOPEN_BUFFERED @li #APR_FOPEN_XTHREAD @li #APR_FOPEN_SHARELOCK @li #APR_FOPEN_SENDFILE_ENABLED @li #APR_FOPEN_LARGEFILE
apr_file_open_stderr
Open standard error as an apr file pointer. @param thefile The apr file to use as stderr. @param pool The pool to allocate the file out of.
apr_file_open_stdin
open standard input as an apr file pointer. @param thefile The apr file to use as stdin. @param pool The pool to allocate the file out of.
apr_file_open_stdout
open standard output as an apr file pointer. @param thefile The apr file to use as stdout. @param pool The pool to allocate the file out of.
apr_file_perms_set
set the specified file’s permission bits. @param fname The file (name) to apply the permissions to. @param perms The permission bits to apply to the file.
apr_file_pipe_create
Create an anonymous pipe. @param in The newly created pipe’s file for reading. @param out The newly created pipe’s file for writing. @param pool The pool to operate on. @remark By default, the returned file descriptors will be inherited by child processes created using apr_proc_create(). This can be changed using apr_file_inherit_unset(). @bug Some platforms cannot toggle between blocking and nonblocking, and when passing a pipe as a standard handle to an application which does not expect it, a non-blocking stream will fluxor the client app. @deprecated @see apr_file_pipe_create_pools()
apr_file_pipe_create_ex
Create an anonymous pipe which portably supports async timeout options. @param in The newly created pipe’s file for reading. @param out The newly created pipe’s file for writing. @param blocking one of these values defined in apr_thread_proc.h; @li #APR_FULL_BLOCK @li #APR_READ_BLOCK @li #APR_WRITE_BLOCK @li #APR_FULL_NONBLOCK @param pool The pool to operate on. @remark By default, the returned file descriptors will be inherited by child processes created using apr_proc_create(). This can be changed using apr_file_inherit_unset(). @remark Some platforms cannot toggle between blocking and nonblocking, and when passing a pipe as a standard handle to an application which does not expect it, a non-blocking stream will fluxor the client app. Use this function rather than apr_file_pipe_create() to create pipes where one or both ends require non-blocking semantics. @deprecated @see apr_file_pipe_create_pools()
apr_file_pipe_create_pools
Create an anonymous pipe which portably supports async timeout options, placing each side of the pipe in a different pool. @param in The newly created pipe’s file for reading. @param out The newly created pipe’s file for writing. @param blocking one of these values defined in apr_thread_proc.h; @li #APR_FULL_BLOCK @li #APR_READ_BLOCK @li #APR_WRITE_BLOCK @li #APR_FULL_NONBLOCK @param pool_in The pool for the reading pipe. @param pool_out The pool for the writing pipe. @remark By default, the returned file descriptors will be inherited by child processes created using apr_proc_create(). This can be changed using apr_file_inherit_unset(). @remark Some platforms cannot toggle between blocking and nonblocking, and when passing a pipe as a standard handle to an application which does not expect it, a non-blocking stream will fluxor the client app. Use this function rather than apr_file_pipe_create() to create pipes where one or both ends require non-blocking semantics.
apr_file_pipe_timeout_get
Get the timeout value for a pipe or manipulate the blocking state. @param thepipe The pipe we are getting a timeout for. @param timeout The current timeout value in microseconds.
apr_file_pipe_timeout_set
Set the timeout value for a pipe or manipulate the blocking state. @param thepipe The pipe we are setting a timeout on. @param timeout The timeout value in microseconds. Values < 0 mean wait forever, 0 means do not wait at all.
apr_file_pool_get
Get the pool used by the file.
apr_file_printf
Write a string to a file using a printf format. @param fptr The file to write to. @param format The format string @param … The values to substitute in the format string @return The number of bytes written
apr_file_putc
Write a character into the specified file. @param ch The character to write. @param thefile The file descriptor to write to
apr_file_puts
Write the string into the specified file. @param str The string to write. @param thefile The file descriptor to write to
apr_file_read
Read data from the specified file. @param thefile The file descriptor to read from. @param buf The buffer to store the data to. @param nbytes On entry, the number of bytes to read; on exit, the number of bytes read.
apr_file_read_full
Read data from the specified file, ensuring that the buffer is filled before returning. @param thefile The file descriptor to read from. @param buf The buffer to store the data to. @param nbytes The number of bytes to read. @param bytes_read If non-NULL, this will contain the number of bytes read.
apr_file_remove
Delete the specified file. @param path The full path to the file (using / on all systems) @param pool The pool to use. @remark If the file is open, it won’t be removed until all instances are closed.
apr_file_rename
Rename the specified file. @param from_path The full path to the original file (using / on all systems) @param to_path The full path to the new file (using / on all systems) @param pool The pool to use. @warning If a file exists at the new location, then it will be overwritten. Moving files or directories across devices may not be possible.
apr_file_seek
Move the read/write file offset to a specified byte within a file. @param thefile The file descriptor @param where How to move the pointer, one of: @li #APR_SET – set the offset to offset @li #APR_CUR – add the offset to the current position @li #APR_END – add the offset to the current file size @param offset The offset to move the pointer to. @remark The third argument is modified to be the offset the pointer was actually moved to.
apr_file_setaside
Move the specified file descriptor to a new pool @param new_file Pointer in which to return the new apr_file_t @param old_file The file to move @param p The pool to which the descriptor is to be moved @remark Unlike apr_file_dup2(), this function doesn’t do an OS dup() operation on the underlying descriptor; it just moves the descriptor’s apr_file_t wrapper to a new pool. @remark The new pool need not be an ancestor of old_file’s pool. @remark After calling this function, old_file may not be used
apr_file_sync
Transfer all file modified data and metadata to disk. @param thefile The file descriptor to sync
apr_file_trunc
Truncate the file’s length to the specified offset @param fp The file to truncate @param offset The offset to truncate to. @remark The read/write file offset is repositioned to offset.
apr_file_ungetc
Put a character back onto a specified stream. @param ch The character to write. @param thefile The file descriptor to write to
apr_file_unlock
Remove any outstanding locks on the file. @param thefile The file to unlock.
apr_file_write
Write data to the specified file. @param thefile The file descriptor to write to. @param buf The buffer which contains the data. @param nbytes On entry, the number of bytes to write; on exit, the number of bytes written.
apr_file_write_full
Write data to the specified file, ensuring that all of the data is written before returning. @param thefile The file descriptor to write to. @param buf The buffer which contains the data. @param nbytes The number of bytes to write. @param bytes_written If non-NULL, set to the number of bytes written.
apr_file_writev
Write data from iovec array to the specified file. @param thefile The file descriptor to write to. @param vec The array from which to get the data to write to the file. @param nvec The number of elements in the struct iovec array. This must be smaller than #APR_MAX_IOVEC_SIZE. If it isn’t, the function will fail with #APR_EINVAL. @param nbytes The number of bytes written.
apr_file_writev_full
Write data from iovec array to the specified file, ensuring that all of the data is written before returning. @param thefile The file descriptor to write to. @param vec The array from which to get the data to write to the file. @param nvec The number of elements in the struct iovec array. This must be smaller than #APR_MAX_IOVEC_SIZE. If it isn’t, the function will fail with #APR_EINVAL. @param nbytes The number of bytes written.
apr_filepath_encoding
Determine the encoding used internally by the FilePath functions @param style points to a variable which receives the encoding style flag @param p the pool to allocate any working storage @remark Use apr_os_locale_encoding() and/or apr_os_default_encoding() to get the name of the path encoding if it’s not UTF-8.
apr_filepath_get
Return the default file path (for relative file names) @param path the default path string returned @param flags optional flag APR_FILEPATH_NATIVE to retrieve the default file path in os-native format. @param p the pool to allocate the default path string from
apr_filepath_list_merge
Merge a list of search path components into a single search path @param liststr the returned search path; may be NULL if @a pathelts is empty @param pathelts the components of the search path @param p the pool to allocate the search path from @remark emtpy strings in the source array are ignored. @remark the path separator in @a liststr is system specific; e.g., ‘:’ on Unix, ‘;’ on Windows, etc.
apr_filepath_list_split
Split a search path into separate components @param pathelts the returned components of the search path @param liststr the search path (e.g., getenv(“PATH”)) @param p the pool to allocate the array and path components from @remark empty path components do not become part of @a pathelts. @remark the path separator in @a liststr is system specific; e.g., ‘:’ on Unix, ‘;’ on Windows, etc.
apr_filepath_merge
Merge additional file path onto the previously processed rootpath @param newpath the merged paths returned @param rootpath the root file path (NULL uses the current working path) @param addpath the path to add to the root path @param flags the desired APR_FILEPATH_ rules to apply when merging @param p the pool to allocate the new path string from @remark if the flag APR_FILEPATH_TRUENAME is given, and the addpath contains wildcard characters (‘*’, ‘?’) on platforms that don’t support such characters within filenames, the paths will be merged, but the result code will be APR_EPATHWILD, and all further segments will not reflect the true filenames including the wildcard and following segments.
apr_filepath_root
Extract the rootpath from the given filepath @param rootpath the root file path returned with APR_SUCCESS or APR_EINCOMPLETE @param filepath the pathname to parse for its root component @param flags the desired rules to apply, from
apr_filepath_set
Set the default file path (for relative file names) @param path the default path returned @param p the pool to allocate any working storage
apr_generate_random_bytes
Generate random bytes. @param buf Buffer to fill with random bytes @param length Length of buffer in bytes
apr_gethostname
Get name of the current machine @param buf A buffer to store the hostname in. @param len The maximum length of the hostname that can be stored in the buffer provided. The suggested length is APRMAXHOSTLEN + 1. @param cont The pool to use. @remark If the buffer was not large enough, an error will be returned.
apr_getnameinfo
Look up the host name from an apr_sockaddr_t. @param hostname The hostname. @param sa The apr_sockaddr_t. @param flags Special processing flags. @remark Results can vary significantly between platforms when processing wildcard socket addresses.
apr_getopt
Parse the options initialized by apr_getopt_init(). @param os The apr_opt_t structure returned by apr_getopt_init() @param opts A string of characters that are acceptable options to the program. Characters followed by “:” are required to have an option associated @param option_ch The next option character parsed @param option_arg The argument following the option character: @return There are four potential status values on exit. They are:
apr_getopt_init
Initialize the arguments for parsing by apr_getopt(). @param os The options structure created for apr_getopt() @param cont The pool to operate on @param argc The number of arguments to parse @param argv The array of arguments to parse @remark Arguments 3 and 4 are most commonly argc and argv from main(argc, argv) The (*os)->errfn is initialized to fprintf(stderr… but may be overridden.
apr_getopt_long
Parse the options initialized by apr_getopt_init(), accepting long options beginning with “–” in addition to single-character options beginning with “-”. @param os The apr_getopt_t structure created by apr_getopt_init() @param opts A pointer to a list of apr_getopt_option_t structures, which can be initialized with { “name”, optch, has_args }. has_args is nonzero if the option requires an argument. A structure with an optch value of 0 terminates the list. @param option_ch Receives the value of “optch” from the apr_getopt_option_t structure corresponding to the next option matched. @param option_arg Receives the argument following the option, if any. @return There are four potential status values on exit. They are:
apr_getservbyname
Given an apr_sockaddr_t and a service name, set the port for the service @param sockaddr The apr_sockaddr_t that will have its port set @param servname The name of the service you wish to use
apr_gid_get
Get the groupid for a specified group name @param groupid Pointer to the group id (on output) @param groupname The group name to look up @param p The pool from which to allocate the string @remark This function is available only if APR_HAS_USER is defined.
apr_gid_name_get
Get the group name for a specified groupid @param groupname Pointer to new string containing group name (on output) @param groupid The groupid @param p The pool from which to allocate the string @remark This function is available only if APR_HAS_USER is defined.
apr_hash_clear
Clear any key/value pairs in the hash table. @param ht The hash table
apr_hash_copy
Make a copy of a hash table @param pool The pool from which to allocate the new hash table @param h The hash table to clone @return The hash table just created @remark Makes a shallow copy
apr_hash_count
Get the number of key/value pairs in the hash table. @param ht The hash table @return The number of key/value pairs in the hash table.
apr_hash_do
Iterate over a hash table running the provided function once for every element in the hash table. The @p comp function will be invoked for every element in the hash table.
apr_hash_first
Start iterating over the entries in a hash table. @param p The pool to allocate the apr_hash_index_t iterator. If this pool is NULL, then an internal, non-thread-safe iterator is used. @param ht The hash table @return The iteration state @remark There is no restriction on adding or deleting hash entries during an iteration (although the results may be unpredictable unless all you do is delete the current entry) and multiple iterations can be in progress at the same time.
apr_hash_get
Look up the value associated with a key in a hash table. @param ht The hash table @param key Pointer to the key @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length. @return Returns NULL if the key is not present.
apr_hash_make
Create a hash table. @param pool The pool to allocate the hash table out of @return The hash table just created
apr_hash_make_custom
Create a hash table with a custom hash function @param pool The pool to allocate the hash table out of @param hash_func A custom hash function. @return The hash table just created
apr_hash_merge
Merge two hash tables into one new hash table. If the same key is present in both tables, call the supplied merge function to produce a merged value for the key in the new table. Both hash tables must use the same hash function. @param p The pool to use for the new hash table @param h1 The first of the tables to merge @param h2 The second of the tables to merge @param merger A callback function to merge values, or NULL to make values from h1 override values from h2 (same semantics as apr_hash_overlay()) @param data Client data to pass to the merger function @return A new hash table containing all of the data from the two passed in
apr_hash_next
Continue iterating over the entries in a hash table. @param hi The iteration state @return a pointer to the updated iteration state. NULL if there are no more entries.
apr_hash_overlay
Merge two hash tables into one new hash table. The values of the overlay hash override the values of the base if both have the same key. Both hash tables must use the same hash function. @param p The pool to use for the new hash table @param overlay The table to add to the initial table @param base The table that represents the initial values of the new table @return A new hash table containing all of the data from the two passed in
apr_hash_pool_get
Get a pointer to the pool which the hash table was created in
apr_hash_set
Associate a value with a key in a hash table. @param ht The hash table @param key Pointer to the key @param klen Length of the key. Can be APR_HASH_KEY_STRING to use the string length. @param val Value to associate with the key @remark If the value is NULL the hash entry is deleted. The key is stored as is, and so must have a lifetime at least as long as the hash table’s pool.
apr_hash_this
Get the current entry’s details from the iteration state. @param hi The iteration state @param key Return pointer for the pointer to the key. @param klen Return pointer for the key length. @param val Return pointer for the associated value. @remark The return pointers should point to a variable that will be set to the corresponding data, or they may be NULL if the data isn’t interesting.
apr_hash_this_key
Get the current entry’s key from the iteration state. @param hi The iteration state @return The pointer to the key
apr_hash_this_key_len
Get the current entry’s key length from the iteration state. @param hi The iteration state @return The key length
apr_hash_this_val
Get the current entry’s value from the iteration state. @param hi The iteration state @return The pointer to the value
apr_hashfunc_default
The default hash function.
apr_initialize
Setup any APR internal data structures. This MUST be the first function called for any APR library. It is safe to call apr_initialize several times as long as apr_terminate() is called the same number of times. @remark See apr_app_initialize() if this is an application, rather than a library consumer of apr.
apr_ipsubnet_create
Build an ip-subnet representation from an IP address and optional netmask or number-of-bits. @param ipsub The new ip-subnet representation @param ipstr The input IP address string @param mask_or_numbits The input netmask or number-of-bits string, or NULL @param p The pool to allocate from
apr_ipsubnet_test
Test the IP address in an apr_sockaddr_t against a pre-built ip-subnet representation. @param ipsub The ip-subnet representation @param sa The socket address to test @return non-zero if the socket address is within the subnet, 0 otherwise
apr_is_empty_array
Determine if the array is empty (either NULL or having no elements). @param a The array to check @return True if empty, False otherwise
apr_is_empty_table
Determine if the table is empty (either NULL or having no elements). @param t The table to check @return True if empty, False otherwise
apr_itoa
create a string representation of an int, allocated from a pool @param p The pool from which to allocate @param n The number to format @return The string representation of the number
apr_ltoa
create a string representation of a long, allocated from a pool @param p The pool from which to allocate @param n The number to format @return The string representation of the number
apr_mcast_hops
Set the Multicast Time to Live (ttl) for a multicast transmission. @param sock The socket to set the multicast ttl @param ttl Time to live to Assign. 0-255, default=1 @remark If the TTL is 0, packets will only be seen by sockets on the local machine, and only when multicast loopback is enabled.
apr_mcast_interface
Set the Interface to be used for outgoing Multicast Transmissions. @param sock The socket to set the multicast interface on @param iface Address of the interface to use for Multicast
apr_mcast_join
Join a Multicast Group @param sock The socket to join a multicast group @param join The address of the multicast group to join @param iface Address of the interface to use. If NULL is passed, the default multicast interface will be used. (OS Dependent) @param source Source Address to accept transmissions from (non-NULL implies Source-Specific Multicast)
apr_mcast_leave
Leave a Multicast Group. All arguments must be the same as apr_mcast_join. @param sock The socket to leave a multicast group @param addr The address of the multicast group to leave @param iface Address of the interface to use. If NULL is passed, the default multicast interface will be used. (OS Dependent) @param source Source Address to accept transmissions from (non-NULL implies Source-Specific Multicast)
apr_mcast_loopback
Toggle IP Multicast Loopback @param sock The socket to set multicast loopback @param opt 0=disable, 1=enable
apr_md5
MD5 in one step @param digest The final MD5 digest @param input The message block to use @param inputLen The length of the message block
apr_md5_encode
Encode a password using an MD5 algorithm @param password The password to encode @param salt The salt string to use for the encoding @param result The string to store the encoded password in @param nbytes The size of the result buffer
apr_md5_final
MD5 finalization. Ends an MD5 message-digest operation, writing the message digest and zeroing the context @param digest The final MD5 digest @param context The MD5 content we are finalizing.
apr_md5_init
MD5 Initialize. Begins an MD5 operation, writing a new context. @param context The MD5 context to initialize.
apr_md5_set_xlate
MD5 translation setup. Provides the APR translation handle to be used for translating the content before calculating the digest. @param context The MD5 content to set the translation for. @param xlate The translation handle to use for this MD5 context
apr_md5_update
MD5 block update operation. Continue an MD5 message-digest operation, processing another message block, and updating the context. @param context The MD5 content to update. @param input next message block to update @param inputLen The length of the next message block
apr_mmap_create
Create a new mmap’ed file out of an existing APR file. @param newmmap The newly created mmap’ed file. @param file The file to turn into an mmap. @param offset The offset into the file to start the data pointer at. @param size The size of the file @param flag bit-wise or of:
apr_mmap_delete
Remove a mmap’ed. @param mm The mmap’ed file.
apr_mmap_dup
Duplicate the specified MMAP. @param new_mmap The structure to duplicate into. @param old_mmap The mmap to duplicate. @param p The pool to use for new_mmap.
apr_mmap_offset
Move the pointer into the mmap’ed file to the specified offset. @param addr The pointer to the offset specified. @param mm The mmap’ed file. @param offset The offset to move to.
apr_off_t_toa
create a string representation of an apr_off_t, allocated from a pool @param p The pool from which to allocate @param n The number to format @return The string representation of the number
apr_palloc
Allocate a block of memory from a pool @param p The pool to allocate from @param size The amount of memory to allocate @return The allocated memory
apr_palloc_debug
Debug version of apr_palloc @param p See: apr_palloc @param size See: apr_palloc @param file_line Where the function is called from. This is usually APR_POOL__FILE_LINE__. @return See: apr_palloc
apr_parse_addr_port
Parse hostname/IP address with scope id and port.
apr_password_validate
Validate hashes created by APR-supported algorithms: md5, bcrypt, and sha1. hashes created by crypt are supported only on platforms that provide crypt(3), so don’t rely on that function unless you know that your application will be run only on platforms that support it. On platforms that don’t support crypt(3), this falls back to a clear text string comparison. @param passwd The password to validate @param hash The password to validate against
apr_pcalloc_debug
Debug version of apr_pcalloc @param p See: apr_pcalloc @param size See: apr_pcalloc @param file_line Where the function is called from. This is usually APR_POOL__FILE_LINE__. @return See: apr_pcalloc
apr_pmemdup
Duplicate a block of memory.
apr_pool_abort_get
Get the abort function associated with the specified pool. @param pool The pool for retrieving the abort function. @return The abort function for the given pool.
apr_pool_abort_set
Set the function to be called when an allocation failure occurs. @remark If the program wants APR to exit on a memory allocation error, then this function can be called to set the callback to use (for performing cleanup and then exiting). If this function is not called, then APR will return an error and expect the calling program to deal with the error accordingly.
apr_pool_allocator_get
Find the pool’s allocator @param pool The pool to get the allocator from.
apr_pool_child_cleanup_set
Replace the child cleanup function of a previously registered cleanup.
apr_pool_cleanup_for_exec
Run all registered child cleanups, in preparation for an exec() call in a forked child – close files, etc., but don’t flush I/O buffers, don’t wait for subprocesses, and don’t free any memory.
apr_pool_cleanup_kill
Remove a previously registered cleanup function.
apr_pool_cleanup_null
An empty cleanup function.
apr_pool_cleanup_register
Register a function to be called when a pool is cleared or destroyed @param p The pool to register the cleanup with @param data The data to pass to the cleanup function. @param plain_cleanup The function to call when the pool is cleared or destroyed @param child_cleanup The function to call when a child process is about to exec - this function is called in the child, obviously!
apr_pool_cleanup_run
Run the specified cleanup function immediately and unregister it.
apr_pool_clear
Clear all memory in the pool and run all the cleanups. This also destroys all subpools. @param p The pool to clear @remark This does not actually free the memory, it just allows the pool to re-use this memory for the next allocation. @see apr_pool_destroy()
apr_pool_clear_debug
Debug version of apr_pool_clear. @param p See: apr_pool_clear. @param file_line Where the function is called from. This is usually APR_POOL__FILE_LINE__. @remark Only available when APR_POOL_DEBUG is defined. Call this directly if you have your apr_pool_clear calls in a wrapper function and wish to override the file_line argument to reflect the caller of your wrapper function. If you do not have apr_pool_clear in a wrapper, trust the macro and don’t call apr_pool_destroy_clear directly.
apr_pool_create_core_ex
Create a new pool. @deprecated @see apr_pool_create_unmanaged_ex.
apr_pool_create_core_ex_debug
Debug version of apr_pool_create_core_ex. @deprecated @see apr_pool_create_unmanaged_ex_debug.
apr_pool_create_ex
Create a new pool. @param newpool The pool we have just created. @param parent The parent pool. If this is NULL, the new pool is a root pool. If it is non-NULL, the new pool will inherit all of its parent pool’s attributes, except the apr_pool_t will be a sub-pool. @param abort_fn A function to use if the pool cannot allocate more memory. @param allocator The allocator to use with the new pool. If NULL the allocator of the parent pool will be used. @remark This function is thread-safe, in the sense that multiple threads can safely create subpools of the same parent pool concurrently. Similarly, a subpool can be created by one thread at the same time that another thread accesses the parent pool.
apr_pool_create_ex_debug
Debug version of apr_pool_create_ex. @param newpool @see apr_pool_create. @param parent @see apr_pool_create. @param abort_fn @see apr_pool_create. @param allocator @see apr_pool_create. @param file_line Where the function is called from. This is usually APR_POOL__FILE_LINE__. @remark Only available when APR_POOL_DEBUG is defined. Call this directly if you have your apr_pool_create_ex calls in a wrapper function and wish to override the file_line argument to reflect the caller of your wrapper function. If you do not have apr_pool_create_ex in a wrapper, trust the macro and don’t call apr_pool_create_ex_debug directly.
apr_pool_create_unmanaged_ex
Create a new unmanaged pool. @param newpool The pool we have just created. @param abort_fn A function to use if the pool cannot allocate more memory. @param allocator The allocator to use with the new pool. If NULL a new allocator will be created with the new pool as owner. @remark An unmanaged pool is a special pool without a parent; it will NOT be destroyed upon apr_terminate. It must be explicitly destroyed by calling apr_pool_destroy, to prevent memory leaks. Use of this function is discouraged, think twice about whether you really really need it. @warning Any child cleanups registered against the new pool, or against sub-pools thereof, will not be executed during an invocation of apr_proc_create(), so resources created in an “unmanaged” pool hierarchy will leak to child processes.
apr_pool_create_unmanaged_ex_debug
Debug version of apr_pool_create_unmanaged_ex. @param newpool @see apr_pool_create_unmanaged. @param abort_fn @see apr_pool_create_unmanaged. @param allocator @see apr_pool_create_unmanaged. @param file_line Where the function is called from. This is usually APR_POOL__FILE_LINE__. @remark Only available when APR_POOL_DEBUG is defined. Call this directly if you have your apr_pool_create_unmanaged_ex calls in a wrapper function and wish to override the file_line argument to reflect the caller of your wrapper function. If you do not have apr_pool_create_core_ex in a wrapper, trust the macro and don’t call apr_pool_create_core_ex_debug directly.
apr_pool_destroy
Destroy the pool. This takes similar action as apr_pool_clear() and then frees all the memory. @param p The pool to destroy @remark This will actually free the memory
apr_pool_destroy_debug
Debug version of apr_pool_destroy. @param p See: apr_pool_destroy. @param file_line Where the function is called from. This is usually APR_POOL__FILE_LINE__. @remark Only available when APR_POOL_DEBUG is defined. Call this directly if you have your apr_pool_destroy calls in a wrapper function and wish to override the file_line argument to reflect the caller of your wrapper function. If you do not have apr_pool_destroy in a wrapper, trust the macro and don’t call apr_pool_destroy_debug directly.
apr_pool_initialize
Setup all of the internal structures required to use pools @remark Programs do NOT need to call this directly. APR will call this automatically from apr_initialize. @internal
apr_pool_is_ancestor
Determine if pool a is an ancestor of pool b. @param a The pool to search @param b The pool to search for @return True if a is an ancestor of b, NULL is considered an ancestor of all pools. @remark if compiled with APR_POOL_DEBUG, this function will also return true if A is a pool which has been guaranteed by the caller (using apr_pool_join) to have a lifetime at least as long as some ancestor of pool B.
apr_pool_note_subprocess
Register a process to be killed when a pool dies. @param a The pool to use to define the processes lifetime @param proc The process to register @param how How to kill the process, one of:
apr_pool_parent_get
Get the parent pool of the specified pool. @param pool The pool for retrieving the parent pool. @return The parent of the given pool.
apr_pool_pre_cleanup_register
Register a function to be called when a pool is cleared or destroyed.
apr_pool_tag
Tag a pool (give it a name) @param pool The pool to tag @param tag The tag
apr_pool_terminate
Tear down all of the internal structures required to use pools @remark Programs do NOT need to call this directly. APR will call this automatically from apr_terminate. @internal
apr_pool_userdata_get
Return the data associated with the current pool. @param data The user data associated with the pool. @param key The key for the data to retrieve @param pool The current pool.
apr_pool_userdata_set
Set the data associated with the current pool @param data The user data associated with the pool. @param key The key to use for association @param cleanup The cleanup program to use to cleanup the data (NULL if none) @param pool The current pool @warning The data to be attached to the pool should have a life span at least as long as the pool it is being attached to.
apr_pool_userdata_setn
Set the data associated with the current pool @param data The user data associated with the pool. @param key The key to use for association @param cleanup The cleanup program to use to cleanup the data (NULL if none) @param pool The current pool @note same as apr_pool_userdata_set(), except that this version doesn’t make a copy of the key (this function is useful, for example, when the key is a string literal) @warning This should NOT be used if the key could change addresses by any means between the apr_pool_userdata_setn() call and a subsequent apr_pool_userdata_get() on that key, such as if a static string is used as a userdata key in a DSO and the DSO could be unloaded and reloaded between the _setn() and the _get(). You MUST use apr_pool_userdata_set() in such cases. @warning More generally, the key and the data to be attached to the pool should have a life span at least as long as the pool itself.
apr_proc_create
Create a new process and execute a new program within that process. @param new_proc The resulting process handle. @param progname The program to run @param args the arguments to pass to the new program. The first one should be the program name. @param env The new environment table for the new process. This should be a list of NULL-terminated strings. This argument is ignored for APR_PROGRAM_ENV, APR_PROGRAM_PATH, and APR_SHELLCMD_ENV types of commands. @param attr the procattr we should use to determine how to create the new process @param pool The pool to use. @note This function returns without waiting for the new process to terminate; use apr_proc_wait for that.
apr_proc_detach
Detach the process from the controlling terminal. @param daemonize set to non-zero if the process should daemonize and become a background process, else it will stay in the foreground.
apr_proc_fork
This is currently the only non-portable call in APR. This executes a standard unix fork. @param proc The resulting process handle. @param cont The pool to use. @remark returns APR_INCHILD for the child, and APR_INPARENT for the parent or an error.
apr_proc_kill
Terminate a process. @param proc The process to terminate. @param sig How to kill the process.
apr_proc_other_child_alert
Notify the maintenance callback of a registered other child process that application has detected an event, such as death. @param proc The process to check @param reason The reason code to pass to the maintenance function @param status The status to pass to the maintenance function @remark An example of code using this behavior;
apr_proc_other_child_refresh
Test one specific other child processes and invoke the maintenance callback with the appropriate reason code, if still running, or the appropriate reason code if the process is no longer healthy. @param ocr The registered other child @param reason The reason code (e.g. APR_OC_REASON_RESTART) if still running
apr_proc_other_child_refresh_all
Test all registered other child processes and invoke the maintenance callback with the appropriate reason code, if still running, or the appropriate reason code if the process is no longer healthy. @param reason The reason code (e.g. APR_OC_REASON_RESTART) to running processes
apr_proc_other_child_register
Register an other_child – a child associated to its registered maintence callback. This callback is invoked when the process dies, is disconnected or disappears. @param proc The child process to register. @param maintenance maintenance is a function that is invoked with a reason and the data pointer passed here. @param data Opaque context data passed to the maintenance function. @param write_fd An fd that is probed for writing. If it is ever unwritable then the maintenance is invoked with reason OC_REASON_UNWRITABLE. @param 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. @bug no platform currently tests the pipes health.
apr_proc_other_child_unregister
Stop watching the specified other child. @param data The data to pass to the maintenance function. This is used to find the process to unregister. @warning Since this can be called by a maintenance function while we’re scanning the other_children list, all scanners should protect themself by loading ocr->next before calling any maintenance function.
apr_proc_wait
Wait for a child process to die @param proc The process handle that corresponds to the desired child process @param exitcode The returned exit status of the child, if a child process dies, or the signal that caused the child to die. On platforms that don’t support obtaining this information, the status parameter will be returned as APR_ENOTIMPL. @param exitwhy Why the child died, the bitwise or of:
apr_proc_wait_all_procs
Wait for any current child process to die and return information about that child. @param proc Pointer to NULL on entry, will be filled out with child’s information @param exitcode The returned exit status of the child, if a child process dies, or the signal that caused the child to die. On platforms that don’t support obtaining this information, the status parameter will be returned as APR_ENOTIMPL. @param exitwhy Why the child died, the bitwise or of:
apr_procattr_addrspace_set
Determine if the child should start in its own address space or using the current one from its parent @param attr The procattr we care about. @param addrspace Should the child start in its own address space? Default is no on NetWare and yes on other platforms.
apr_procattr_child_err_set
Set the child_err and parent_err values to existing apr_file_t values. @param attr The procattr we care about. @param child_err apr_file_t value to use as child_err. Must be a valid file. @param parent_err apr_file_t value to use as parent_err. Must be a valid file. @remark This is NOT a required initializer function. This is useful if you have already opened a pipe (or multiple files) that you wish to use, perhaps persistently across multiple process invocations - such as a log file. @bug Note that calling this function with two NULL files on some platforms creates an APR_FULL_BLOCK pipe, but this behavior is neither portable nor is it supported. @see apr_procattr_io_set instead for simple pipes.
apr_procattr_child_errfn_set
Specify an error function to be called in the child process if APR encounters an error in the child prior to running the specified program. @param attr The procattr describing the child process to be created. @param errfn The function to call in the child process. @remark At the present time, it will only be called from apr_proc_create() on platforms where fork() is used. It will never be called on other platforms, on those platforms apr_proc_create() will return the error in the parent process rather than invoke the callback in the now-forked child process.
apr_procattr_child_in_set
Set the child_in and/or parent_in values to existing apr_file_t values. @param attr The procattr we care about. @param child_in apr_file_t value to use as child_in. Must be a valid file. @param parent_in apr_file_t value to use as parent_in. Must be a valid file. @remark This is NOT a required initializer function. This is useful if you have already opened a pipe (or multiple files) that you wish to use, perhaps persistently across multiple process invocations - such as a log file. You can save some extra function calls by not creating your own pipe since this creates one in the process space for you. @bug Note that calling this function with two NULL files on some platforms creates an APR_FULL_BLOCK pipe, but this behavior is neither portable nor is it supported. @see apr_procattr_io_set instead for simple pipes.
apr_procattr_child_out_set
Set the child_out and parent_out values to existing apr_file_t values. @param attr The procattr we care about. @param child_out apr_file_t value to use as child_out. Must be a valid file. @param parent_out apr_file_t value to use as parent_out. Must be a valid file. @remark This is NOT a required initializer function. This is useful if you have already opened a pipe (or multiple files) that you wish to use, perhaps persistently across multiple process invocations - such as a log file. @bug Note that calling this function with two NULL files on some platforms creates an APR_FULL_BLOCK pipe, but this behavior is neither portable nor is it supported. @see apr_procattr_io_set instead for simple pipes.
apr_procattr_cmdtype_set
Set what type of command the child process will call. @param attr The procattr we care about. @param cmd The type of command. One of:
apr_procattr_create
Create and initialize a new procattr variable @param new_attr The newly created procattr. @param cont The pool to use
apr_procattr_detach_set
Determine if the child should start in detached state. @param attr The procattr we care about. @param detach Should the child start in detached state? Default is no.
apr_procattr_dir_set
Set which directory the child process should start executing in. @param attr The procattr we care about. @param dir Which dir to start in. By default, this is the same dir as the parent currently resides in, when the createprocess call is made.
apr_procattr_error_check_set
Specify that apr_proc_create() should do whatever it can to report failures to the caller of apr_proc_create(), rather than find out in the child. @param attr The procattr describing the child process to be created. @param chk Flag to indicate whether or not extra work should be done to try to report failures to the caller. @remark This flag only affects apr_proc_create() on platforms where fork() is used. This leads to extra overhead in the calling process, but that may help the application handle such errors more gracefully.
apr_procattr_group_set
Set the group used for running process @param attr The procattr we care about. @param groupname The group name used
apr_procattr_io_set
Determine if any of stdin, stdout, or stderr should be linked to pipes when starting a child process. @param attr The procattr we care about. @param in Should stdin be a pipe back to the parent? @param out Should stdout be a pipe back to the parent? @param err Should stderr be a pipe back to the parent? @note If APR_NO_PIPE, there will be no special channel, the child inherits the parent’s corresponding stdio stream. If APR_NO_FILE is specified, that corresponding stream is closed in the child (and will be INVALID_HANDLE_VALUE when inspected on Win32). This can have ugly side effects, as the next file opened in the child on Unix will fall into the stdio stream fd slot!
apr_procattr_limit_set
Set the Resource Utilization limits when starting a new process. @param attr The procattr we care about. @param what Which limit to set, one of:
apr_procattr_perms_set_register
Register permission set function @param attr The procattr we care about. @param perms_set_fn Permission set callback @param data Data to pass to permission callback function @param perms Permissions to set
apr_procattr_user_set
Set the username used for running process @param attr The procattr we care about. @param username The username used @param password User password if needed. Password is needed on WIN32 or any other platform having APR_PROCATTR_USER_SET_REQUIRES_PASSWORD set.
apr_psprintf
printf-style style printing routine. The data is output to a string allocated from a pool @param p The pool to allocate out of @param fmt The format of the string @param … The arguments to use while printing the data @return The new string
apr_pstrcat
Concatenate multiple strings, allocating memory out a pool @param p The pool to allocate out of @param … The strings to concatenate. The final string must be NULL @return The new string
apr_pstrcatv
Concatenate multiple strings specified in a writev-style vector @param p The pool from which to allocate @param vec The strings to concatenate @param nvec The number of strings to concatenate @param nbytes (output) strlen of new string (pass in NULL to omit) @return The new string
apr_pstrdup
duplicate a string into memory allocated out of a pool @param p The pool to allocate out of @param s The string to duplicate @return The new string or NULL if s == NULL
apr_pstrmemdup
Create a null-terminated string by making a copy of a sequence of characters and appending a null byte @param p The pool to allocate out of @param s The block of characters to duplicate @param n The number of characters to duplicate @return The new string or NULL if s == NULL @remark This is a faster alternative to apr_pstrndup(), for use when you know that the string being duplicated really has ‘n’ or more characters. If the string might contain fewer characters, use apr_pstrndup().
apr_pstrndup
Duplicate at most n characters of a string into memory allocated out of a pool; the new string will be NUL-terminated @param p The pool to allocate out of @param s The string to duplicate @param n The maximum number of characters to duplicate @return The new string or NULL if s == NULL @remark The amount of memory allocated from the pool is the length of the returned string including the NUL terminator
apr_pvsprintf
printf-style style printing routine. The data is output to a string allocated from a pool @param p The pool to allocate out of @param fmt The format of the string @param ap The arguments to use while printing the data @return The new string
apr_queue_create
create a FIFO queue @param queue The new queue @param queue_capacity maximum size of the queue @param a pool to allocate queue from
apr_queue_interrupt_all
interrupt all the threads blocking on this queue.
apr_queue_pop
pop/get an object from the queue, blocking if the queue is already empty
apr_queue_push
push/add an object to the queue, blocking if the queue is already full
apr_queue_size
returns the size of the queue.
apr_queue_term
terminate the queue, sending an interrupt to all the blocking threads
apr_queue_trypop
pop/get an object to the queue, returning immediately if the queue is empty
apr_queue_trypush
push/add an object to the queue, returning immediately if the queue is full
apr_rfc822_date
apr_rfc822_date formats dates in the RFC822 format in an efficient manner. It is a fixed length format which requires APR_RFC822_DATA_LEN bytes of storage, including the trailing NUL terminator. @param date_str String to write to. @param t the time to convert
apr_setup_signal_thread
Setup the process for a single thread to be used for all signal handling. @warning This must be called before any threads are created
apr_sha1_base64
Provide a means to SHA1 crypt/encode a plaintext password in a way which makes password file compatible with those commonly use in netscape web and ldap installations. @param clear The plaintext password @param len The length of the plaintext password @param out The encrypted/encoded password @note SHA1 support is useful for migration purposes, but is less secure than Apache’s password format, since Apache’s (MD5) password format uses a random eight character salt to generate one of many possible hashes for the same password. Netscape uses plain SHA1 without a salt, so the same password will always generate the same hash, making it easier to break since the search space is smaller.
apr_sha1_final
Finish computing the SHA digest @param digest the output buffer in which to store the digest @param context The context to finalize
apr_sha1_init
Initialize the SHA digest @param context The SHA context to initialize
apr_sha1_update
Update the SHA digest @param context The SHA1 context to update @param input The buffer to add to the SHA digest @param inputLen The length of the input buffer
apr_sha1_update_binary
Update the SHA digest with binary data @param context The SHA1 context to update @param input The buffer to add to the SHA digest @param inputLen The length of the input buffer
apr_signal_thread
Make the current thread listen for signals. This thread will loop forever, calling a provided function whenever it receives a signal. That functions should return 1 if the signal has been handled, 0 otherwise. @param signal_handler The function to call when a signal is received apr_status_t apr_signal_thread((int)(*signal_handler)(int signum)) @note Synchronous signals like SIGABRT/SIGSEGV/SIGBUS/… are ignored by apr_signal_thread() and thus can’t be waited by this function (they remain handled by the operating system or its native signals interface). @remark In APR version 1.6 and ealier, SIGUSR2 was part of these ignored signals and thus was never passed in to the signal_handler. From APR 1.7 this is no more the case so SIGUSR2 can be handled in signal_handler and acted upon like the other asynchronous signals.
apr_sleep
Sleep for the specified number of micro-seconds. @param t desired amount of time to sleep. @warning May sleep for longer than the specified time.
apr_snprintf
snprintf routine based on apr_vformatter. This means it understands the same extensions. @param buf The buffer to write to @param len The size of the buffer @param format The format string @param … The arguments to use to fill out the format string.
apr_sockaddr_equal
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.
apr_sockaddr_info_copy
Copy apr_sockaddr_t src to dst on pool p. @param dst The destination apr_sockaddr_t. @param src The source apr_sockaddr_t. @param p The pool for the apr_sockaddr_t and associated storage.
apr_sockaddr_info_get
Create apr_sockaddr_t from hostname, address family, and port. @param sa The new apr_sockaddr_t. @param hostname The 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. @param family The address family to use, or APR_UNSPEC if the system should decide. @param port The port number. @param flags Special processing flags:
apr_sockaddr_ip_get
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. @param addr The IP address. @param sockaddr The socket address to reference.
apr_sockaddr_ip_getbuf
Write the IP address (in numeric address string format) of the APR socket address @a sockaddr into the buffer @a buf (of size @a buflen). @param sockaddr The socket address to reference.
apr_sockaddr_is_wildcard
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).
apr_sockaddr_zone_get
Retrieve the zone of an IPv6 link-local address object. @param sa Socket address object @param name If non-NULL, set to the textual representation of the zone id @param id If non-NULL, set to the integer zone id @param p Pool from which *name is allocated if used. @return 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. @remark Both name and id may be NULL, neither are modified if non-NULL in error cases.
apr_sockaddr_zone_set
Set the zone of an IPv6 link-local address object. @param sa Socket address object @param zone_id Zone ID (textual “eth0” or numeric “3”). @return Returns APR_EBADIP for non-IPv6 socket or an IPv6 address which isn’t link-local.
apr_socket_accept
Accept a new connection request @param new_sock A 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. @param sock The socket we are listening on. @param connection_pool The 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.
apr_socket_addr_get
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. @param sa The returned apr_sockaddr_t. @param which Whether to retrieve the local or remote address @param sock The socket to use
apr_socket_atmark
Query the specified socket if at the OOB/Urgent data mark @param sock The socket to query @param atmark Is set to true if socket is at the OOB/urgent mark, otherwise is set to false.
apr_socket_atreadeof
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.
apr_socket_bind
Bind the socket to its associated port @param sock The socket to bind @param sa The socket address to bind to @remark This may be where we will find out if there is any other process using the selected port.
apr_socket_close
Close a socket. @param thesocket The socket to close
apr_socket_connect
Issue a connection request to a socket either on the same machine or a different one. @param sock The socket we wish to use for our side of the connection @param sa The address of the machine we wish to connect to.
apr_socket_create
Create a socket. @param new_sock The new socket that has been set up. @param family The address family of the socket (e.g., APR_INET). @param type The type of the socket (e.g., SOCK_STREAM). @param protocol The protocol of the socket (e.g., APR_PROTO_TCP). @param cont The 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.
apr_socket_data_get
Return the data associated with the current socket @param data The user data associated with the socket. @param key The key to associate with the user data. @param sock The currently open socket.
apr_socket_data_set
Set the data associated with the current socket. @param sock The currently open socket. @param data The user data to associate with the socket. @param key The key to associate with the data. @param cleanup The cleanup to call when the socket is destroyed.
apr_socket_inherit_set
Set a socket to be inherited by child processes.
apr_socket_inherit_unset
Unset a socket from being inherited by child processes.
apr_socket_listen
Listen to a bound socket for connections. @param sock The socket to listen on @param backlog The 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.
apr_socket_opt_get
Query socket options for the specified socket @param sock The socket to query @param opt The option we would like to query. One of:
apr_socket_opt_set
Setup socket options for the specified socket @param sock The socket to set up. @param opt The option we would like to configure. One of:
apr_socket_perms_set
Set socket permissions.
apr_socket_pool_get
Get the pool used by the socket.
apr_socket_protocol_get
Return the protocol of the socket. @param sock The socket to query. @param protocol The returned protocol (e.g., APR_PROTO_TCP).
apr_socket_recv
Read data from a network. @param sock The socket to read the data from. @param buf The buffer to store the data in. @param len On entry, the number of bytes to receive; on exit, the number of bytes received. @remark
apr_socket_recvfrom
Read data from a socket. On success, the address of the peer from which the data was sent is copied into the @a from parameter, and the @a len parameter is updated to give the number of bytes written to @a buf.
apr_socket_send
Send data over a network. @param sock The socket to send the data over. @param buf The buffer which contains the data to be sent. @param len On entry, the number of bytes to send; on exit, the number of bytes sent. @remark
apr_socket_sendfile
Send a file from an open file descriptor to a socket, along with optional headers and trailers @param sock The socket to which we’re writing @param file The open file from which to read @param hdtr A structure containing the headers and trailers to send @param offset Offset into the file where we should begin writing @param len (input) - Number of bytes to send from the file (output) - Number of bytes actually sent, including headers, file, and trailers @param flags APR flags that are mapped to OS specific flags @remark 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 the len parameter. The offset parameter is passed by reference for no reason; its value will never be modified by the apr_socket_sendfile() function.
apr_socket_sendto
@param sock The socket to send from @param where The apr_sockaddr_t describing where to send the data @param flags The flags to use @param buf The data to send @param len The length of the data to send
apr_socket_sendv
Send multiple buffers over a network. @param sock The socket to send the data over. @param vec The array of iovec structs containing the data to send @param nvec The number of iovec structs in the array @param len Receives the number of bytes actually written @remark
apr_socket_shutdown
Shutdown either reading, writing, or both sides of a socket. @param thesocket The socket to close @param how How to shutdown the socket. One of:
apr_socket_timeout_get
Query socket timeout for the specified socket @param sock The socket to query @param t Socket timeout returned from the query.
apr_socket_timeout_set
Setup socket timeout for the specified socket @param sock The socket to set up. @param t Value for the timeout.
apr_socket_type_get
Return the type of the socket. @param sock The socket to query. @param type The returned type (e.g., SOCK_STREAM).
apr_stat
get the specified file’s stats. The file is specified by filename, instead of using a pre-opened file. @param finfo Where to store the information about the file, which is never touched if the call fails. @param fname The name of the file to stat. @param wanted The desired apr_finfo_t fields, as a bit flag of APR_FINFO_ values @param pool the pool to use to allocate the new file.
apr_strerror
Return a human readable string describing the specified error. @param statcode The error code to get a string for. @param buf A buffer to hold the error string. @param bufsize Size of the buffer to hold the string.
apr_strfsize
Format a binary size (magnitiudes are 2^10 rather than 10^3) from an apr_off_t, as bytes, K, M, T, etc, to a four character compacted human readable string. @param size The size to format @param buf The 5 byte text buffer (counting the trailing null) @return The buf passed to apr_strfsize() @remark All negative sizes report ’ - ’, apr_strfsize only formats positive values.
apr_strftime
Formats the exploded time according to the format specified @param s string to write to @param retsize The length of the returned string @param max The maximum length of the string @param format The format for the time string @param tm The time to convert
apr_strmatch_precompile
Precompile a pattern for matching using the Boyer-Moore-Horspool algorithm @param p The pool from which to allocate the pattern @param s The pattern string @param case_sensitive Whether the matching should be case-sensitive @return a pointer to the compiled pattern, or NULL if compilation fails
apr_strnatcasecmp
Do a natural order comparison of two strings ignoring the case of the strings. @param a The first string to compare @param b The second string to compare @return Either <0, 0, or >0. If the first string is less than the second this returns <0, if they are equivalent it returns 0, and if the first string is greater than second string it retuns >0.
apr_strnatcmp
Do a natural order comparison of two strings. @param a The first string to compare @param b The second string to compare @return Either <0, 0, or >0. If the first string is less than the second this returns <0, if they are equivalent it returns 0, and if the first string is greater than second string it retuns >0.
apr_strtoff
Convert a numeric string into an apr_off_t numeric value. @param offset The value of the parsed string. @param buf The string to parse. It may contain optional whitespace, followed by an optional ‘+’ (positive, default) or ‘-’ (negative) character, followed by an optional ‘0x’ prefix if base is 0 or 16, followed by numeric digits appropriate for base. @param end A pointer to the end of the valid character in buf. If not NULL, it is set to the first invalid character in buf. @param base A numeric base in the range between 2 and 36 inclusive, or 0. If base is zero, buf will be treated as base ten unless its digits are prefixed with ‘0x’, in which case it will be treated as base 16. @bug *end breaks type safety; where *buf is const, *end needs to be declared as const in APR 2.0
apr_strtoi64
parse a numeric string into a 64-bit numeric value @param buf The string to parse. It may contain optional whitespace, followed by an optional ‘+’ (positive, default) or ‘-’ (negative) character, followed by an optional ‘0x’ prefix if base is 0 or 16, followed by numeric digits appropriate for base. @param end A pointer to the end of the valid character in buf. If not NULL, it is set to the first invalid character in buf. @param base A numeric base in the range between 2 and 36 inclusive, or 0. If base is zero, buf will be treated as base ten unless its digits are prefixed with ‘0x’, in which case it will be treated as base 16. @return The numeric value of the string. On overflow, errno is set to ERANGE. On success, errno is set to 0.
apr_strtok
Split a string into separate null-terminated tokens. The tokens are delimited in the string by one or more characters from the sep argument. @param str The string to separate; this should be specified on the first call to apr_strtok() for a given string, and NULL on subsequent calls. @param sep The set of delimiters @param last State saved by apr_strtok() between calls. @return The next token from the string @note the ‘last’ state points to the trailing NUL char of the final token, otherwise it points to the character following the current token (all successive or empty occurances of sep are skiped on the subsequent call to apr_strtok). Therefore it is possible to avoid a strlen() determination, with the following logic; toklen = last - retval; if (*last) –toklen;
apr_table_add
Add data to a table, regardless of whether there is another element with the same key. @param t The table to add to @param key The key to use @param val The value to add. @remark When adding data, this function makes a copy of both the key and the value.
apr_table_addn
Add data to a table, regardless of whether there is another element with the same key. @param t The table to add to @param key The key to use @param val The value to add. @remark When adding data, this function does not make a copy of the key or the value, so care should be taken to ensure that the values will not change after they have been added.
apr_table_clear
Delete all of the elements from a table. @param t The table to clear
apr_table_clone
Create a new table whose contents are deep copied from the given table. A deep copy operation copies all fields, and makes copies of dynamically allocated memory pointed to by the fields. @param p The pool to allocate the new table out of @param t The table to clone @return A deep copy of the table passed in
apr_table_compress
Eliminate redundant entries in a table by either overwriting or merging duplicates.
apr_table_copy
Create a new table and copy another table into it. @param p The pool to allocate the new table out of @param t The table to copy @return A copy of the table passed in @warning The table keys and respective values are not copied
apr_table_do
Iterate over a table running the provided function once for every element in the table. The varargs array must be a list of zero or more (char *) keys followed by a NULL pointer. If zero keys are given, the @p comp function will be invoked for every element in the table. Otherwise, the function is invoked only for those elements matching the keys specified.
apr_table_elts
Get the elements from a table. @param t The table @return An array containing the contents of the table
apr_table_get
Get the value associated with a given key from the table. After this call, the data is still in the table. @param t The table to search for the key @param key The key to search for (case does not matter) @return The value associated with the key, or NULL if the key does not exist.
apr_table_getm
Get values associated with a given key from the table. If more than one value exists, return a comma separated list of values. After this call, the data is still in the table. @param p The pool to allocate the combined value from, if necessary @param t The table to search for the key @param key The key to search for (case does not matter) @return The value associated with the key, or NULL if the key does not exist.
apr_table_make
Make a new table. @param p The pool to allocate the pool out of @param nelts The number of elements in the initial table. @return The new table. @warning This table can only store text data
apr_table_merge
Add data to a table by merging the value with data that has already been stored. The merging is done by concatenating the two values, separated by the string “, “. @param t The table to search for the data @param key The key to merge data for (case does not matter) @param val The data to add @remark If the key is not found, then this function acts like apr_table_add()
apr_table_mergen
Add data to a table by merging the value with data that has already been stored. The merging is done by concatenating the two values, separated by the string “, “. @param t The table to search for the data @param key The key to merge data for (case does not matter) @param val The data to add @remark If the key is not found, then this function acts like apr_table_addn()
apr_table_overlap
For each element in table b, either use setn or mergen to add the data to table a. Which method is used is determined by the flags passed in. @param a The table to add the data to. @param b The table to iterate over, adding its data to table a @param flags How to add the table to table a. One of: APR_OVERLAP_TABLES_SET Use apr_table_setn APR_OVERLAP_TABLES_MERGE Use apr_table_mergen APR_OVERLAP_TABLES_ADD Use apr_table_addn @remark When merging duplicates, the two values are concatenated, separated by the string “, “. @remark This function is highly optimized, and uses less memory and CPU cycles than a function that just loops through table b calling other functions. / /** Conceptually, apr_table_overlap does this:
apr_table_overlay
Merge two tables into one new table. @param p The pool to use for the new table @param overlay The first table to put in the new table @param base The table to add at the end of the new table @return A new table containing all of the data from the two passed in
apr_table_set
Add a key/value pair to a table. If another element already exists with the same key, this will overwrite the old data. @param t The table to add the data to. @param key The key to use (case does not matter) @param val The value to add @remark When adding data, this function makes a copy of both the key and the value.
apr_table_setn
Add a key/value pair to a table. If another element already exists with the same key, this will overwrite the old data. @param t The table to add the data to. @param key The key to use (case does not matter) @param val The value to add @warning When adding data, this function does not make a copy of the key or the value, so care should be taken to ensure that the values will not change after they have been added..
apr_table_unset
Remove data from the table. @param t The table to remove data from @param key The key of the data being removed (case does not matter)
apr_table_vdo
Iterate over a table running the provided function once for every element in the table. The @p vp varargs parameter must be a list of zero or more (char *) keys followed by a NULL pointer. If zero keys are given, the @p comp function will be invoked for every element in the table. Otherwise, the function is invoked only for those elements matching the keys specified.
apr_temp_dir_get
Find an existing directory suitable as a temporary storage location. @param temp_dir The temp directory. @param p The pool to use for any necessary allocations. @remark This function uses an algorithm to search for a directory that an an application can use for temporary storage.
apr_terminate
Tear down any APR internal data structures which aren’t torn down automatically. apr_terminate must be called once for every call to apr_initialize() or apr_app_initialize(). @remark An APR program must call this function at termination once it has stopped using APR services. The APR developers suggest using @c atexit(apr_terminate) to ensure this is called. When using APR from a language other than C that has problems with the calling convention, use apr_terminate2() instead. @see apr_terminate2
apr_terminate2
Tear down any APR internal data structures which aren’t torn down automatically, same as apr_terminate() @remark An APR program must call either the apr_terminate() or apr_terminate2 function once it it has finished using APR services. The APR developers suggest using @c atexit(apr_terminate) to ensure this is done. apr_terminate2 exists to allow non-c language apps to tear down apr, while apr_terminate() is recommended from c language applications.
apr_text_append
Append a piece of text to the end of a list @param p The pool to allocate out of @param hdr The text header to append to @param text The new text to append
apr_thread_cond_broadcast
Signals all threads blocking on the given condition variable. Each thread that was signaled is then scheduled to wake up and acquire the associated mutex. This will happen in a serialized manner. @param cond the condition variable on which to produce the broadcast. @remark If no threads are waiting on the condition variable, nothing happens.
apr_thread_cond_create
Create and initialize a condition variable that can be used to signal and schedule threads in a single process. @param cond the memory address where the newly created condition variable will be stored. @param pool the pool from which to allocate the condition.
apr_thread_cond_destroy
Destroy the condition variable and free the associated memory. @param cond the condition variable to destroy.
apr_thread_cond_pool_get
Get the pool used by this thread_cond. @return apr_pool_t the pool
apr_thread_cond_signal
Signals a single thread, if one exists, that is blocking on the given condition variable. That thread is then scheduled to wake up and acquire the associated mutex. Although it is not required, if predictable scheduling is desired, that mutex must be locked while calling this function. @param cond the condition variable on which to produce the signal. @remark If no threads are waiting on the condition variable, nothing happens.
apr_thread_cond_timedwait
Put the active calling thread to sleep until signaled to wake up or the timeout is reached. Each condition variable must be associated with a mutex, and that mutex must be locked before calling this function, or the behavior will be undefined. As the calling thread is put to sleep, the given mutex will be simultaneously released; and as this thread wakes up the lock is again simultaneously acquired. @param cond the condition variable on which to block. @param mutex the mutex that must be locked upon entering this function, is released while the thread is asleep, and is again acquired before returning from this function. @param timeout The amount of time in microseconds to wait. This is a maximum, not a minimum. If the condition is signaled, we will wake up before this time, otherwise the error APR_TIMEUP is returned.
apr_thread_cond_wait
Put the active calling thread to sleep until signaled to wake up. Each condition variable must be associated with a mutex, and that mutex must be locked before calling this function, or the behavior will be undefined. As the calling thread is put to sleep, the given mutex will be simultaneously released; and as this thread wakes up the lock is again simultaneously acquired. @param cond the condition variable on which to block. @param mutex the mutex that must be locked upon entering this function, is released while the thread is asleep, and is again acquired before returning from this function. @remark Spurious wakeups may occur. Before and after every call to wait on a condition variable, the caller should test whether the condition is already met.
apr_thread_create
Create a new thread of execution @param new_thread The newly created thread handle. @param attr The threadattr to use to determine how to create the thread @param func The function to start the new thread in @param data Any data to be passed to the starting function @param cont The pool to use
apr_thread_data_get
Return user data associated with the current thread. @param data The user data associated with the thread. @param key The key to associate with the data @param thread The currently open thread.
apr_thread_data_set
Set user data associated with the current thread. @param data The user data to associate with the thread. @param key The key to use for associating the data with the thread @param cleanup The cleanup routine to use when the thread is destroyed. @param thread The currently open thread.
apr_thread_detach
detach a thread @param thd The thread to detach
apr_thread_exit
stop the current thread @param thd The thread to stop @param retval The return value to pass back to any thread that cares
apr_thread_join
block until the desired thread stops executing. @param retval The return value from the dead thread. @param thd The thread to join
apr_thread_mutex_create
Create and initialize a mutex that can be used to synchronize threads. @param mutex the memory address where the newly created mutex will be stored. @param flags Or’ed value of:
apr_thread_mutex_destroy
Destroy the mutex and free the memory associated with the lock. @param mutex the mutex to destroy.
apr_thread_mutex_lock
Acquire the lock for the given mutex. If the mutex is already locked, the current thread will be put to sleep until the lock becomes available. @param mutex the mutex on which to acquire the lock.
apr_thread_mutex_pool_get
Get the pool used by this thread_mutex. @return apr_pool_t the pool
apr_thread_mutex_timedlock
Attempt to acquire the lock for the given mutex until timeout expires. If the acquisition time outs, the call returns with APR_TIMEUP. @param mutex the mutex on which to attempt the lock acquiring. @param timeout the relative timeout (microseconds). @note A timeout negative or nul means immediate attempt, returning APR_TIMEUP without blocking if it the lock is already acquired.
apr_thread_mutex_trylock
Attempt to acquire the lock for the given mutex. If the mutex has already been acquired, the call returns immediately with APR_EBUSY. Note: it is important that the APR_STATUS_IS_EBUSY(s) macro be used to determine if the return value was APR_EBUSY, for portability reasons. @param mutex the mutex on which to attempt the lock acquiring.
apr_thread_mutex_unlock
Release the lock for the given mutex. @param mutex the mutex from which to release the lock.
apr_thread_once
Run the specified function one time, regardless of how many threads call it. @param control The control variable. The same variable should be passed in each time the function is tried to be called. This is how the underlying functions determine if the function has ever been called before. @param func The function to call.
apr_thread_once_init
Initialize the control variable for apr_thread_once. If this isn’t called, apr_initialize won’t work. @param control The control variable to initialize @param p The pool to allocate data from.
apr_thread_pool_get
Get the child-pool used by the thread from the thread info. @return apr_pool_t the pool
apr_thread_yield
force the current thread to yield the processor
apr_threadattr_create
Create and initialize a new threadattr variable @param new_attr The newly created threadattr. @param cont The pool to use
apr_threadattr_detach_get
Get the detach state for this threadattr. @param attr The threadattr to reference @return APR_DETACH if threads are to be detached, or APR_NOTDETACH if threads are to be joinable.
apr_threadattr_detach_set
Set if newly created threads should be created in detached state. @param attr The threadattr to affect @param on Non-zero if detached threads should be created.
apr_threadattr_guardsize_set
Set the stack guard area size of newly created threads. @param attr The threadattr to affect @param guardsize The stack guard area size in bytes @note Thread library implementations commonly use a “guard area” after each thread’s stack which is not readable or writable such that stack overflows cause a segfault; this consumes e.g. 4K of memory and increases memory management overhead. Setting the guard area size to zero hence trades off reliable behaviour on stack overflow for performance.
apr_threadattr_stacksize_set
Set the stack size of newly created threads. @param attr The threadattr to affect @param stacksize The stack size in bytes
apr_threadkey_data_get
Return the pool associated with the current threadkey. @param data The user data associated with the threadkey. @param key The key associated with the data @param threadkey The currently open threadkey.
apr_threadkey_data_set
Return the pool associated with the current threadkey. @param data The data to set. @param key The key to associate with the data. @param cleanup The cleanup routine to use when the file is destroyed. @param threadkey The currently open threadkey.
apr_threadkey_private_create
Create and initialize a new thread private address space @param key The thread private handle. @param dest The destructor to use when freeing the private memory. @param cont The pool to use
apr_threadkey_private_delete
Free the thread private memory @param key The handle for the desired thread private memory
apr_threadkey_private_get
Get a pointer to the thread private memory @param new_mem The data stored in private memory @param key The handle for the desired thread private memory
apr_threadkey_private_set
Set the data to be stored in thread private memory @param priv The data to be stored in private memory @param key The handle for the desired thread private memory
apr_time_ansi_put
Convert an ansi time_t to an apr_time_t @param result the resulting apr_time_t @param input the time_t to convert
apr_time_clock_hires
Improve the clock resolution for the lifetime of the given pool. Generally this is only desirable on benchmarking and other very time-sensitive applications, and has no impact on most platforms. @param p The pool to associate the finer clock resolution
apr_time_exp_get
Convert time value from human readable format to a numeric apr_time_t (elapsed microseconds since the epoch). @param result the resulting imploded time @param input the input exploded time
apr_time_exp_gmt
Convert a time to its human readable components (GMT). @param result the exploded time @param input the time to explode
apr_time_exp_gmt_get
Convert time value from human readable format to a numeric apr_time_t that always represents GMT. @param result the resulting imploded time @param input the input exploded time
apr_time_exp_lt
Convert a time to its human readable components in the local timezone. @param result the exploded time @param input the time to explode
apr_time_exp_tz
Convert a time to its human readable components using an offset from GMT. @param result the exploded time @param input the time to explode @param offs the number of seconds offset to apply
apr_time_now
@return the current time
apr_tokenize_to_argv
Convert the arguments to a program from one string to an array of strings terminated by a NULL pointer @param arg_str The arguments to convert @param argv_out Output location. This is a pointer to an array of strings. @param token_context Pool to use.
apr_uid_current
Get the userid (and groupid) of the calling process @param userid Returns the user id @param groupid Returns the user’s group id @param p The pool from which to allocate working space @remark This function is available only if APR_HAS_USER is defined.
apr_uid_get
Get the userid (and groupid) for the specified username @param userid Returns the user id @param groupid Returns the user’s group id @param username The username to look up @param p The pool from which to allocate working space @remark This function is available only if APR_HAS_USER is defined.
apr_uid_homepath_get
Get the home directory for the named user @param dirname Pointer to new string containing directory name (on output) @param username The named user @param p The pool from which to allocate the string @remark This function is available only if APR_HAS_USER is defined.
apr_uid_name_get
Get the user name for a specified userid @param username Pointer to new string containing user name (on output) @param userid The userid @param p The pool from which to allocate the string @remark This function is available only if APR_HAS_USER is defined.
apr_uri_parse
Parse a given URI, fill in all supplied fields of a apr_uri_t structure. This eliminates the necessity of extracting host, port, path, query info repeatedly in the modules. @param p The pool to allocate out of @param uri The uri to parse @param uptr The apr_uri_t to fill out @return APR_SUCCESS for success or error code
apr_uri_parse_hostinfo
Special case for CONNECT parsing: it comes with the hostinfo part only @param p The pool to allocate out of @param hostinfo The hostinfo string to parse @param uptr The apr_uri_t to fill out @return APR_SUCCESS for success or error code
apr_uri_port_of_scheme
Return the default port for a given scheme. The schemes recognized are http, ftp, https, gopher, wais, nntp, snews, and prospero @param scheme_str The string that contains the current scheme @return The default port for this scheme
apr_uri_unparse
Unparse a apr_uri_t structure to an URI string. Optionally suppress the password for security reasons. @param p The pool to allocate out of @param uptr All of the parts of the uri @param flags How to unparse the uri. One of:
apr_uuid_format
Format a UUID into a string, following the standard format @param buffer The buffer to place the formatted UUID string into. It must be at least APR_UUID_FORMATTED_LENGTH + 1 bytes long to hold the formatted UUID and a null terminator @param uuid The UUID to format
apr_uuid_get
Generate and return a (new) UUID @param uuid The resulting UUID
apr_uuid_parse
Parse a standard-format string into a UUID @param uuid The resulting UUID @param uuid_str The formatted UUID
apr_version
Return APR’s version information information in a numeric form.
apr_version_string
Return APR’s version information as a string.
apr_vsnprintf
vsnprintf routine based on apr_vformatter. This means it understands the same extensions. @param buf The buffer to write to @param len The size of the buffer @param format The format string @param ap The arguments to use to fill out the format string.
apr_xlate_close
Close a codepage translation handle. @param convset The codepage translation handle to close @remark Return APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).
apr_xlate_conv_buffer
Convert a buffer of text from one codepage to another. @param convset The handle allocated by apr_xlate_open, specifying the parameters of conversion @param inbuf The address of the source buffer @param inbytes_left Input: the amount of input data to be translated Output: the amount of input data not yet translated @param outbuf The address of the destination buffer @param outbytes_left Input: the size of the output buffer Output: the amount of the output buffer not yet used @remark Returns APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined). Returns APR_INCOMPLETE if the input buffer ends in an incomplete multi-byte character.
apr_xlate_conv_byte
Convert a single-byte character from one charset to another. @param convset The handle allocated by apr_xlate_open, specifying the parameters of conversion @param inchar The single-byte character to convert. @warning This only works when converting between single-byte character sets. -1 will be returned if the conversion can’t be performed.
apr_xlate_open
Set up for converting text from one charset to another. @param convset The handle to be filled in by this function @param topage The name of the target charset @param frompage The name of the source charset @param pool The pool to use @remark Specify APR_DEFAULT_CHARSET for one of the charset names to indicate the charset of the source code at compile time. This is useful if there are literal strings in the source code which must be translated according to the charset of the source code. APR_DEFAULT_CHARSET is not useful if the source code of the caller was not encoded in the same charset as APR at compile time.
apr_xlate_sb_get
Find out whether or not the specified conversion is single-byte-only. @param convset The handle allocated by apr_xlate_open, specifying the parameters of conversion @param onoff Output: whether or not the conversion is single-byte-only @remark Return APR_ENOTIMPL if charset transcoding is not available in this instance of apr-util (i.e., APR_HAS_XLATE is undefined).
apr_xml_empty_elem
empty XML element @param p The pool to allocate out of @param elem The XML element to empty @return the string that was stored in the XML element
apr_xml_insert_uri
return the URI’s (existing) index, or insert it and return a new index @param uri_array array to insert into @param uri The uri to insert @return int The uri’s index
apr_xml_parse_file
Parse a File, producing a xml_doc @param p The pool for allocating the parse results. @param parser A pointer to *parser (needed so calling function can get errors), will be set to NULL on successful completion. @param ppdoc A pointer to *apr_xml_doc (which has the parsed results in it) @param xmlfd A file to read from. @param buffer_length Buffer length which would be suitable @return Any errors found during parsing.
apr_xml_parser_create
Create an XML parser @param pool The pool for allocating the parser and the parse results. @return The new parser.
apr_xml_parser_done
Terminate the parsing and return the result @param parser The XML parser for parsing this data. @param pdoc The resulting parse information. May be NULL to simply terminate the parsing without fetching the info. @return Any errors found during the final stage of parsing. @remark Use apr_xml_parser_geterror() to get more error information.
apr_xml_parser_feed
Feed input into the parser @param parser The XML parser for parsing this data. @param data The data to parse. @param len The length of the data. @return Any errors found during parsing. @remark Use apr_xml_parser_geterror() to get more error information.
apr_xml_parser_geterror
Fetch additional error information from the parser. @param parser The XML parser to query for errors. @param errbuf A buffer for storing error text. @param errbufsize The length of the error text buffer. @return The error buffer
apr_xml_quote_elem
Quote an XML element @param p The pool to allocate out of @param elem The element to quote
apr_xml_quote_string
quote an XML string Replace ‘<’, ‘>’, and ‘&’ with ‘&lt;’, ‘&gt;’, and ‘&amp;’. @param p The pool to allocate out of @param s The string to quote @param quotes If quotes is true, then replace ‘"’ with ‘&quot;’. @return The quoted string @note If the string does not contain special characters, it is not duplicated into the pool and the original string is returned.
apr_xml_to_text
Converts an XML element tree to flat text @param p The pool to allocate out of @param elem The XML element to convert @param style How to covert the XML. One of:
apu_version
Return APR-util’s version information information in a numeric form.
apu_version_string
Return APU’s version information as a string.

Type Aliases§

__builtin_va_list
__dev_t
__gid_t
__ino_t
__off_t
__pid_t
__rlim_t
__socklen_t
__time_t
__uid_t
apr_abortfunc_t
A function that is called when allocation fails.
apr_byte_t
apr_child_errfn_t
The prototype for APR child errfn functions. (See the description of apr_procattr_child_errfn_set() for more information.) It is passed the following parameters: @param pool Pool associated with the apr_proc_t. If your child error function needs user data, associate it with this pool. @param err APR error code describing the error @param description Text description of type of processing which failed
apr_cmdtype_e
@defgroup apr_thread_proc Threads and Process Functions @ingroup APR @{
apr_crypto_block_key_mode_e
apr_crypto_block_key_type_e
Symmetric Key types understood by the library.
apr_crypto_key_type
apr_dev_t
Structure for determining the device the file is on.
apr_dso_handle_sym_t
Structure for referencing symbols from dynamic objects
apr_exit_why_e
apr_fileattrs_t
File attributes
apr_fileperms_t
Structure for determining file permissions.
apr_filetype_e
apr_filetype_e values for the filetype member of the apr_file_info_t structure @warning Not all of the filetypes below can be determined. For example, a given platform might not correctly report a socket descriptor as APR_SOCK if that type isn’t well-identified on that platform. In such cases where a filetype exists but cannot be described by the recognized flags below, the filetype will be APR_UNKFILE. If the filetype member is not determined, the type will be APR_NOFILE.
apr_getopt_err_fn_t
An @c apr_getopt_t error callback function.
apr_gid_t
apr_hash_do_callback_fn_t
Declaration prototype for the iterator callback function of apr_hash_do().
apr_hashfunc_t
Callback functions for calculating hash values. @param key The key. @param klen The length of the key, or APR_HASH_KEY_STRING to use the string length. If APR_HASH_KEY_STRING then returns the actual key length.
apr_in_addr_t
A structure to represent in_addr
apr_ino_t
apr_int16_t
apr_int32_t
apr_int64_t
apr_interface_e
Enum used to denote either the local and remote endpoint of a connection.
apr_interval_time_t
intervals for I/O timeouts, in microseconds
apr_kill_conditions_e
apr_off_t
apr_perms_setfn_t
Permission set callback function.
apr_port_t
@remark use apr_uint16_t just in case some system has a short that isn’t 16 bits…
apr_seek_where_t
Type to pass as whence argument to apr_file_seek.
apr_short_interval_time_t
short interval for I/O timeouts, in microseconds
apr_shutdown_how_e
Define what type of socket shutdown should occur.
apr_signum_t
signal numbers typedef
apr_size_t
apr_socklen_t
apr_ssize_t
apr_status_t
Type for specifying an error or status code.
apr_table_do_callback_fn_t
Declaration prototype for the iterator callback function of apr_table_do() and apr_table_vdo(). @param rec The data passed as the first argument to apr_table_[v]do() @param key The key from this iteration of the table @param value The value from this iteration of the table @remark Iteration continues while this callback function returns non-zero. To export the callback function for apr_table_[v]do() it must be declared in the _NONSTD convention. @see apr_table_do @see apr_table_vdo
apr_thread_start_t
The prototype for any APR thread worker functions.
apr_time_t
number of microseconds since 00:00:00 January 1, 1970 UTC
apr_uid_t
apr_uint16_t
apr_uint32_t
apr_uint64_t
apr_uintptr_t
apr_wait_how_e
dev_t
gid_t
in_addr_t
in_port_t
ino_t
off_t
pid_t
rlim_t
sa_family_t
socklen_t
time_t
uid_t
va_list

Unions§

apr_crypto_key_rec_t__bindgen_ty_1
apr_sockaddr_t__bindgen_ty_1
Union of either IPv4 or IPv6 sockaddr.
in6_addr__bindgen_ty_1