FreeBSD Manual Pages
WHOSON(3) WHOSON WHOSON(3) NAME wso_login, wso_logout, wso_query, wso_version - API functions to access whoson database SYNOPSYS #include <whoson.h> int wso_login(char *addr, char *name, char *retbuf, int buflen) int wso_logout(char *addr, char *retbuf, int buflen) int wso_query(char *addr, char *retbuf, int buflen) char *wso_version(void) DESCRIPTION wso_login() adds an entry to the whoson database (or replaces existing entry with the same key) wso_logout() deletes entry from the database wso_query() requests the database entry wso_version() returns the character string with the version number of the API and build date. addr parameter is the IP address of the remote system specified as a character string, usually in dotted quad notation (e.g. "123.45.67.89"). This is the key identifying unique entries in the WHOSON database. name parameter is the user accounting information (e.g. userid). The file /etc/whoson.conf(5) defines how the API functions should con- tact the whosond(8) server. RETURN VALUES Upon completion, wso_login() wso_logout() and wso_query() return an in- teger return code, and the buffer retbuf is filled with relevant infor- mation if appropriate. Return code -1 means that the request could not be completed, return code 0 or +1 mean that the request was success- fully completed. For wso_query() function, return code 0 means that the requested address is present in the database. In this case, retbuf may contain the data that was previously passed to a wso_login() call for the same addr as the value of the name parameter. In other cases, retbuf may or may not contain description of the situa- tion, e.g. the text "Access denied" or "Not found" or something like that. If the retbuf parameter is NULL or the buflen parameter is zero, no at- tempt is made to fill the buffer. Normally, when filling the database, you can blindly call wso_login() (and wso_logout() if appropriate) and ignore the return code. When querying the database, return code 0 means that the address is in the database, return code +1 means that the address is not in the database, and return code -1 means that the information is unavailable or inac- cessable. ENVIRONMENT WHOSON_VERBOSE Verbose debug messages are enabled if this variable is present in the environment (its value is ignored). WHOSON_CONFIG May be set to the pathname of an alternative configura- tion file. COPYRIGHT Public domain SEE ALSO whosond(8), whoson.conf(5) WHOSON 26 Nov 2006 WHOSON(3)
NAME | SYNOPSYS | DESCRIPTION | RETURN VALUES | ENVIRONMENT | COPYRIGHT | SEE ALSO
Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=wso_version&sektion=3&manpath=FreeBSD+Ports+15.0>
