# 22. Virtuoso Functions Guide - client_attr

Chapter Contents | Prev | Next
Keyword Search:
www.openlinksw.com
docs.openlinksw.com
Book Home
Contents
Preface
Virtuoso Functions Guide
Administration
Aggregate Functions
Array Manipulation
BPEL APIs
Backup
Compression
Cursor
Date & Time Manipulation
Debug
Dictionary Manipulation
Encoding & Decoding
File Manipulation
Free Text
Hashing / Cryptographic
LDAP
Locale
Mail
Miscellaneous
Number
Remote SQL Data Source
Replication
SOAP
SQL
String
Transaction
Type Mapping
UDDI
User Defined Types & The CLR
Virtuoso Java PL API
Virtuoso Server Extension Interface (VSEI)
Web Server & Internet
dav add & update fun...
dav manipulation fun...
dav search functions
dav_exp
lfs_exp
serv_queue_top
vhost_define
vhost_remove
webdav users & group...
client_attr
connection_get
connection_id
connection_is_dirty
connection_set
connection_vars
connection_vars_set
dbname
ftp_get
ftp_ls
ftp_put
get_certificate_info
get_keyword
get_keyword_ucase
http
http_acl_get
http_body_read
http_client
http_client_ip
http_debug_log
http_enable_gz
http_file
http_flush
http_get
http_header
http_header_get
http_kill
http_listen_host
http_map_get
http_map_table
http_param
http_path
http_pending_req
http_physical_path
http_proxy
http_request_get
http_request_header
http_request_status
http_rewrite
http_root
http_url
http_value
http_xslt
ses_connect
ses_disconnect
ses_read_line
ses_write
tcpip_gethostbyaddr
tcpip_gethostbyname
vsp_calculate_digest
wsdl_import_udt
XML
XPATH & XQUERY
Functions Index

## client_attr

returns a varchar containing the requested information from the connection
varchar client_attr (in attr varchar);
Parameters
attr – can by one of the following:

- client_protocol - returns connection protocol (HTTP/1.0, HTTP/1.1, SQL -- SQL coresponds to ODBC, JDBC, .net, OLEDB).
- client_ip - returns the IP where the invoking connection originates. 127.0.0.1 for unix domain socket or internal scheduled task, otherwise the ip of the http or sql client.
- accepting_ip - returns the local listener through which the call came. If unix domain socket or internal scheduled operation, this is 127.0.0.1
- client_application - returns the application name as sent by the driver. Empty string if unknown or internal.
- client_ssl - returns one if SSL encrypted connection either for SQL or HTTPS. False if internal or unix domain socket.
- client_certificate - If certificate based login, returns the certificate, null otherwise.
- transaction_log - 0 if the transaction log is off (turned on/off by log_enable ()); 1 if on (default) .

Errors

SQLState | Error Code | Error Text
--- | --- | ---
22005 | SR401 | Server address not known.
22005 | SR402 | Cannot allocate temp space. SSL error : xxx
22005 | SR403 | xxx is not valid client_attr option.