Apache HTTPD
Macros | Functions

Macros

#define ajp_msg_append_string(m, v)   ajp_msg_append_string_ex(m, v, 1)
 
#define ajp_msg_append_string_ascii(m, v)   ajp_msg_append_string_ex(m, v, 0)
 

Functions

apr_status_t ajp_msg_check_header (ajp_msg_t *msg, apr_size_t *len)
 
apr_status_t ajp_msg_reset (ajp_msg_t *msg)
 
apr_status_t ajp_msg_reuse (ajp_msg_t *msg)
 
apr_status_t ajp_msg_end (ajp_msg_t *msg)
 
apr_status_t ajp_msg_append_uint32 (ajp_msg_t *msg, apr_uint32_t value)
 
apr_status_t ajp_msg_append_uint16 (ajp_msg_t *msg, apr_uint16_t value)
 
apr_status_t ajp_msg_append_uint8 (ajp_msg_t *msg, apr_byte_t value)
 
apr_status_t ajp_msg_append_string_ex (ajp_msg_t *msg, const char *value, int convert)
 
apr_status_t ajp_msg_append_bytes (ajp_msg_t *msg, const apr_byte_t *value, apr_size_t valuelen)
 
apr_status_t ajp_msg_get_uint32 (ajp_msg_t *msg, apr_uint32_t *rvalue)
 
apr_status_t ajp_msg_get_uint16 (ajp_msg_t *msg, apr_uint16_t *rvalue)
 
apr_status_t ajp_msg_peek_uint16 (ajp_msg_t *msg, apr_uint16_t *rvalue)
 
apr_status_t ajp_msg_get_uint8 (ajp_msg_t *msg, apr_byte_t *rvalue)
 
apr_status_t ajp_msg_peek_uint8 (ajp_msg_t *msg, apr_byte_t *rvalue)
 
apr_status_t ajp_msg_get_string (ajp_msg_t *msg, const char **rvalue)
 
apr_status_t ajp_msg_get_bytes (ajp_msg_t *msg, apr_byte_t **rvalue, apr_size_t *rvalue_len)
 
apr_status_t ajp_msg_create (apr_pool_t *pool, apr_size_t size, ajp_msg_t **rmsg)
 
apr_status_t ajp_msg_copy (ajp_msg_t *smsg, ajp_msg_t *dmsg)
 
apr_status_t ajp_msg_serialize_ping (ajp_msg_t *msg)
 
apr_status_t ajp_msg_serialize_cping (ajp_msg_t *msg)
 
apr_status_t ajp_msg_dump (apr_pool_t *pool, ajp_msg_t *msg, char *err, apr_size_t count, char **buf)
 
apr_status_t ajp_msg_log (request_rec *r, ajp_msg_t *msg, char *err)
 
apr_status_t ajp_ilink_send (apr_socket_t *sock, ajp_msg_t *msg)
 
apr_status_t ajp_ilink_receive (apr_socket_t *sock, ajp_msg_t *msg)
 
apr_status_t ajp_send_header (apr_socket_t *sock, request_rec *r, apr_size_t buffsize, apr_uri_t *uri, const char *secret)
 
apr_status_t ajp_read_header (apr_socket_t *sock, request_rec *r, apr_size_t buffsize, ajp_msg_t **msg)
 
apr_status_t ajp_alloc_data_msg (apr_pool_t *pool, char **ptr, apr_size_t *len, ajp_msg_t **msg)
 
apr_status_t ajp_send_data_msg (apr_socket_t *sock, ajp_msg_t *msg, apr_size_t len)
 
int ajp_parse_type (request_rec *r, ajp_msg_t *msg)
 
apr_status_t ajp_parse_header (request_rec *r, proxy_dir_conf *conf, ajp_msg_t *msg)
 
apr_status_t ajp_parse_data (request_rec *r, ajp_msg_t *msg, apr_uint16_t *len, char **ptr)
 
apr_status_t ajp_parse_reuse (request_rec *r, ajp_msg_t *msg, apr_byte_t *reuse)
 
apr_status_t ajp_handle_cping_cpong (apr_socket_t *sock, request_rec *r, apr_interval_time_t timeout)
 
const char * ajp_type_str (int type)
 

Detailed Description

Macro Definition Documentation

◆ ajp_msg_append_string

#define ajp_msg_append_string (   m,
  v 
)    ajp_msg_append_string_ex(m, v, 1)

Add a String in AJP message, and transform the String in ASCII if we're on an EBCDIC machine

Definition at line 241 of file ajp.h.

◆ ajp_msg_append_string_ascii

#define ajp_msg_append_string_ascii (   m,
  v 
)    ajp_msg_append_string_ex(m, v, 0)

Add a String in AJP message.

Definition at line 246 of file ajp.h.

Function Documentation

◆ ajp_alloc_data_msg()

apr_status_t ajp_alloc_data_msg ( apr_pool_t *  pool,
char **  ptr,
apr_size_t *  len,
ajp_msg_t **  msg 
)

Allocate a msg to send data

Parameters
poolpool to allocate from
ptrdata buffer
lenthe length of allocated data buffer
msgreturned AJP message
Returns
APR_SUCCESS or error

Definition at line 875 of file ajp_header.c.

◆ ajp_handle_cping_cpong()

apr_status_t ajp_handle_cping_cpong ( apr_socket_t *  sock,
request_rec *  r,
apr_interval_time_t  timeout 
)

Handle the CPING/CPONG messages

Parameters
sockbackend socket
rcurrent request
timeouttime window for receiving cpong reply
Returns
APR_SUCCESS or error

Definition at line 24 of file ajp_utils.c.

◆ ajp_ilink_receive()

apr_status_t ajp_ilink_receive ( apr_socket_t *  sock,
ajp_msg_t *  msg 
)

Receive an AJP message from backend

Parameters
sockbackend socket
msgAJP message to put serialized message
Returns
APR_SUCCESS or error

Definition at line 74 of file ajp_link.c.

◆ ajp_ilink_send()

apr_status_t ajp_ilink_send ( apr_socket_t *  sock,
ajp_msg_t *  msg 
)

Send an AJP message to backend

Parameters
sockbackend socket
msgAJP message to put serialized message
Returns
APR_SUCCESS or error

Definition at line 21 of file ajp_link.c.

◆ ajp_msg_append_bytes()

apr_status_t ajp_msg_append_bytes ( ajp_msg_t *  msg,
const apr_byte_t *  value,
apr_size_t  valuelen 
)

Add a Byte array to AJP Message

Parameters
msgAJP Message to get value from
valuePointer to Byte array
valuelenByte array len
Returns
APR_SUCCESS or error

Definition at line 369 of file ajp_msg.c.

◆ ajp_msg_append_string_ex()

apr_status_t ajp_msg_append_string_ex ( ajp_msg_t *  msg,
const char *  value,
int  convert 
)

Add a String in AJP message, and transform the String in ASCII if convert is set and we're on an EBCDIC machine

Parameters
msgAJP Message to get value from
valuePointer to String
convertWhen set told to convert String to ASCII
Returns
APR_SUCCESS or error

Definition at line 331 of file ajp_msg.c.

◆ ajp_msg_append_uint16()

apr_status_t ajp_msg_append_uint16 ( ajp_msg_t *  msg,
apr_uint16_t  value 
)

Add an unsigned 16bits value to AJP Message

Parameters
msgAJP Message to get value from
valuevalue to add to AJP Message
Returns
APR_SUCCESS or error

Definition at line 285 of file ajp_msg.c.

◆ ajp_msg_append_uint32()

apr_status_t ajp_msg_append_uint32 ( ajp_msg_t *  msg,
apr_uint32_t  value 
)

Add an unsigned 32bits value to AJP Message

Parameters
msgAJP Message to get value from
valuevalue to add to AJP Message
Returns
APR_SUCCESS or error

Definition at line 260 of file ajp_msg.c.

◆ ajp_msg_append_uint8()

apr_status_t ajp_msg_append_uint8 ( ajp_msg_t *  msg,
apr_byte_t  value 
)

Add an unsigned 8bits value to AJP Message

Parameters
msgAJP Message to get value from
valuevalue to add to AJP Message
Returns
APR_SUCCESS or error

Definition at line 308 of file ajp_msg.c.

◆ ajp_msg_check_header()

apr_status_t ajp_msg_check_header ( ajp_msg_t *  msg,
apr_size_t *  len 
)

Check a new AJP Message by looking at signature and return its size

Parameters
msgAJP Message to check
lenPointer to returned len
Returns
APR_SUCCESS or error

Definition at line 151 of file ajp_msg.c.

◆ ajp_msg_copy()

apr_status_t ajp_msg_copy ( ajp_msg_t *  smsg,
ajp_msg_t *  dmsg 
)

Recopy an AJP Message to another

Parameters
smsgsource AJP message
dmsgdestination AJP message
Returns
APR_SUCCESS or error

Definition at line 583 of file ajp_msg.c.

◆ ajp_msg_create()

apr_status_t ajp_msg_create ( apr_pool_t *  pool,
apr_size_t  size,
ajp_msg_t **  rmsg 
)

Create an AJP Message from pool

Parameters
poolmemory pool to allocate AJP message from
sizesize of the buffer to create
rmsgPointer to newly created AJP message
Returns
APR_SUCCESS or error

Definition at line 561 of file ajp_msg.c.

◆ ajp_msg_dump()

apr_status_t ajp_msg_dump ( apr_pool_t *  pool,
ajp_msg_t *  msg,
char *  err,
apr_size_t  count,
char **  buf 
)

Dump up to the first 1024 bytes on an AJP Message

Parameters
poolpool to allocate from
msgAJP Message to dump
errerror string to display
countthe number of bytes to dump
bufbuffer pointer for dump message
Returns
APR_SUCCESS or error

Dump the given number of bytes on an AJP Message

Parameters
poolpool to allocate from
msgAJP Message to dump
errerror string to display
countthe number of bytes to dump
bufbuffer pointer for dump message
Returns
APR_SUCCESS or error

Definition at line 42 of file ajp_msg.c.

◆ ajp_msg_end()

apr_status_t ajp_msg_end ( ajp_msg_t *  msg)

Mark the end of an AJP Message

Parameters
msgAJP Message to end
Returns
APR_SUCCESS or error

Definition at line 225 of file ajp_msg.c.

◆ ajp_msg_get_bytes()

apr_status_t ajp_msg_get_bytes ( ajp_msg_t *  msg,
apr_byte_t **  rvalue,
apr_size_t *  rvalue_len 
)

Get a Byte array from AJP Message

Parameters
msgAJP Message to get value from
rvaluePointer where value will be returned
rvalue_lenPointer where Byte array len will be returned
Returns
APR_SUCCESS or error

Get a Byte array from AJP Message

Parameters
msgAJP Message to get value from
rvaluePointer where value will be returned
rvalueLenPointer where Byte array len will be returned
Returns
APR_SUCCESS or error

Definition at line 530 of file ajp_msg.c.

◆ ajp_msg_get_string()

apr_status_t ajp_msg_get_string ( ajp_msg_t *  msg,
const char **  rvalue 
)

Get a String value from AJP Message

Parameters
msgAJP Message to get value from
rvaluePointer where value will be returned
Returns
APR_SUCCESS or error

Definition at line 501 of file ajp_msg.c.

◆ ajp_msg_get_uint16()

apr_status_t ajp_msg_get_uint16 ( ajp_msg_t *  msg,
apr_uint16_t *  rvalue 
)

Get a 16bits unsigned value from AJP Message

Parameters
msgAJP Message to get value from
rvaluePointer where value will be returned
Returns
APR_SUCCESS or error

Definition at line 419 of file ajp_msg.c.

◆ ajp_msg_get_uint32()

apr_status_t ajp_msg_get_uint32 ( ajp_msg_t *  msg,
apr_uint32_t *  rvalue 
)

Get a 32bits unsigned value from AJP Message

Parameters
msgAJP Message to get value from
rvaluePointer where value will be returned
Returns
APR_SUCCESS or error

Definition at line 394 of file ajp_msg.c.

◆ ajp_msg_get_uint8()

apr_status_t ajp_msg_get_uint8 ( ajp_msg_t *  msg,
apr_byte_t *  rvalue 
)

Get a 8bits unsigned value from AJP Message

Parameters
msgAJP Message to get value from
rvaluePointer where value will be returned
Returns
APR_SUCCESS or error

Definition at line 482 of file ajp_msg.c.

◆ ajp_msg_log()

apr_status_t ajp_msg_log ( request_rec *  r,
ajp_msg_t *  msg,
char *  err 
)

Log an AJP message

Parameters
rThe current request
msgAJP Message to dump
errerror string to display
Returns
APR_SUCCESS or error

Log an AJP message

Parameters
requestThe current request
msgAJP Message to dump
errerror string to display
Returns
APR_SUCCESS or error

Definition at line 115 of file ajp_msg.c.

◆ ajp_msg_peek_uint16()

apr_status_t ajp_msg_peek_uint16 ( ajp_msg_t *  msg,
apr_uint16_t *  rvalue 
)

Peek a 16bits unsigned value from AJP Message, position in message is not updated

Parameters
msgAJP Message to get value from
rvaluePointer where value will be returned
Returns
APR_SUCCESS or error

Definition at line 442 of file ajp_msg.c.

◆ ajp_msg_peek_uint8()

apr_status_t ajp_msg_peek_uint8 ( ajp_msg_t *  msg,
apr_byte_t *  rvalue 
)

Peek a 8bits unsigned value from AJP Message, position in message is not updated

Parameters
msgAJP Message to get value from
rvaluePointer where value will be returned
Returns
APR_SUCCESS or error

Definition at line 465 of file ajp_msg.c.

◆ ajp_msg_reset()

apr_status_t ajp_msg_reset ( ajp_msg_t *  msg)

Reset an AJP Message

Parameters
msgAJP Message to reset
Returns
APR_SUCCESS or error

Definition at line 190 of file ajp_msg.c.

◆ ajp_msg_reuse()

apr_status_t ajp_msg_reuse ( ajp_msg_t *  msg)

Reuse an AJP Message

Parameters
msgAJP Message to reuse
Returns
APR_SUCCESS or error

Definition at line 204 of file ajp_msg.c.

◆ ajp_msg_serialize_cping()

apr_status_t ajp_msg_serialize_cping ( ajp_msg_t *  msg)

Serialize in an AJP Message a CPING command

+--------------------—+ | CPING CMD (1 byte) | +--------------------—+

Parameters
msgAJP message to put serialized message
Returns
APR_SUCCESS or error

Serialize in an AJP Message a CPING command

+--------------------—+ | CPING CMD (1 byte) | +--------------------—+

Parameters
smsgAJP message to put serialized message
Returns
APR_SUCCESS or error

Definition at line 632 of file ajp_msg.c.

◆ ajp_msg_serialize_ping()

apr_status_t ajp_msg_serialize_ping ( ajp_msg_t *  msg)

Serialize in an AJP Message a PING command

+--------------------—+ | PING CMD (1 byte) | +--------------------—+

Parameters
msgAJP message to put serialized message
Returns
APR_SUCCESS or error

Serialize in an AJP Message a PING command

+--------------------—+ | PING CMD (1 byte) | +--------------------—+

Parameters
smsgAJP message to put serialized message
Returns
APR_SUCCESS or error

Definition at line 611 of file ajp_msg.c.

◆ ajp_parse_data()

apr_status_t ajp_parse_data ( request_rec *  r,
ajp_msg_t *  msg,
apr_uint16_t *  len,
char **  ptr 
)

Parse the message body and return data address and length

Parameters
rcurrent request
msgAJP message
lenreturned AJP message length
ptrreturned data
Returns
APR_SUCCESS or error

Definition at line 804 of file ajp_header.c.

◆ ajp_parse_header()

apr_status_t ajp_parse_header ( request_rec *  r,
proxy_dir_conf *  conf,
ajp_msg_t *  msg 
)

Parse the header message from container

Parameters
rcurrent request
confproxy config
msgAJP message
Returns
APR_SUCCESS or error

Definition at line 781 of file ajp_header.c.

◆ ajp_parse_reuse()

apr_status_t ajp_parse_reuse ( request_rec *  r,
ajp_msg_t *  msg,
apr_byte_t *  reuse 
)

Check the reuse flag in CMD_AJP13_END_RESPONSE

Parameters
rcurrent request
msgAJP message
reusereturned reuse flag
Returns
APR_SUCCESS or error

Definition at line 850 of file ajp_header.c.

◆ ajp_parse_type()

int ajp_parse_type ( request_rec *  r,
ajp_msg_t *  msg 
)

Parse the message type

Parameters
rcurrent request
msgAJP message
Returns
AJP message type.

Definition at line 770 of file ajp_header.c.

◆ ajp_read_header()

apr_status_t ajp_read_header ( apr_socket_t *  sock,
request_rec *  r,
apr_size_t  buffsize,
ajp_msg_t **  msg 
)

Read the ajp message and return the type of the message.

Parameters
sockbackend socket
rcurrent request
buffsizesize of the buffer.
msgreturned AJP message
Returns
APR_SUCCESS or error

Definition at line 725 of file ajp_header.c.

◆ ajp_send_data_msg()

apr_status_t ajp_send_data_msg ( apr_socket_t *  sock,
ajp_msg_t *  msg,
apr_size_t  len 
)

Send the data message

Parameters
sockbackend socket
msgAJP message to send
lenAJP message length
Returns
APR_SUCCESS or error

Definition at line 892 of file ajp_header.c.

◆ ajp_send_header()

apr_status_t ajp_send_header ( apr_socket_t *  sock,
request_rec *  r,
apr_size_t  buffsize,
apr_uri_t *  uri,
const char *  secret 
)

Build the ajp header message and send it

Parameters
sockbackend socket
rcurrent request
buffsizemax size of the AJP packet.
urirequested uri
secretauthentication secret
Returns
APR_SUCCESS or error

Definition at line 688 of file ajp_header.c.

◆ ajp_type_str()

const char * ajp_type_str ( int  type)

Convert numeric message type into string

Parameters
typeAJP message type
Returns
AJP message type as a string

Definition at line 121 of file ajp_utils.c.