c-icap-doc
0.1
|
Functions and structures used for text formating. More...
Data Structures | |
struct | ci_fmt_entry |
This structure used to implement text formating directives. More... | |
Functions | |
int | ci_format_text (ci_request_t *req_data, const char *fmt, char *buffer, int len, struct ci_fmt_entry *user_table) |
Produces formated text based on template text. More... | |
Variables | |
struct ci_fmt_entry | GlobalTable [] |
Internal formating directives table. More... | |
Functions and structures used for text formating.
int ci_format_text | ( | ci_request_t * | req_data, |
const char * | fmt, | ||
char * | buffer, | ||
int | len, | ||
struct ci_fmt_entry * | user_table | ||
) |
Produces formated text based on template text.
req_data | The current request |
fmt | The format string |
buffer | The output buffer |
len | The length of the output buffer |
user_table | An array of user defined directives |
This function uses the internal formating directives table. Also the user can define his own table.
struct ci_fmt_entry GlobalTable[] |
Internal formating directives table.
This table define the following directives:
"%a": Remote IP-Address
"%la": Local IP Address
"%lp": Local port
"%>a": Http Client IP Address
"%<A": Http Server IP Address
"%ts": Seconds since epoch
"%tl": Local time
"%tg": GMT time
"%>ho": Modified Http request header
"%huo": Modified Http request url
"%<ho": Modified Http reply header
"%iu": Icap request url
"%im": Icap method
"%is": Icap status code
"%>ih": Icap request header
"%<ih": Icap response header
"%ipl": Icap preview length
"%Ih": Http bytes received
"%Oh": Http bytes sent
"%Ib": Http body bytes received
"%Ob": Http body bytes sent
"%I": Bytes received
"%O": Bytes sent
"%bph": Body data preview
"%un": Username
"%Sl": Log string set by service
"%Sa": Attribute value set by service
Not yet implemented:
"%tr": Response time
"%hu": Http request url
"%>hi": Http request header
"%<hi": Http reply header
"%Hs": Http reply status
"%Hso": Modified Http reply status