DragonFly On-Line Manual Pages

Search: Section:  


ph_www_resolve(3)               C Library Calls              ph_www_resolve(3)

NAME

ph_www_resolve, ph_advertised_www - determine PH-redirected www addresses

SYNOPSIS

#include <phclient.h> int ph_www_resolve(PH *ph, char *user, char **real_url); int ph_advertised_www(PH *ph, char *alias, int confirm_alias, char **advertised_url);

VERSION

This man page documents version 1.2 of libphclient.

DESCRIPTION

The ph_www_resolve() function resolves the URL for the user user. The real_www argument is set to point to a dynamically-allocated string containing the resolved URL. This memory must be later freed by the calling application. The ph_advertised_www() function determines the advertised URL for the user whose alias is alias. If confirm_alias is set, the entry for alias is looked up to make sure it exists. The advertised_www argument is set to point to a dynamically-allocated string containing the advertised URL. This memory must later be freed by the calling application. If the server does not support the wwwredirect siteinfo field, the ph_advertised_www() function will return the same URL as the ph_www_resolve() function.

RETURN VALUE

These functions return 0 on success, PH_ERR_NOMATCH if a single matching entry cannot be found, and PH_ERR_DATAERR if the query is invalid or if a single matching entry is found but does not contain a www field. On error, they return -1 and set errno.

ERRORS

These functions will fail with EINVAL if they receive an unexpected response code from the server. In addition, they may fail with any error from the functions read() or write().

SEE ALSO

read(2), write(2), ph_open(3), ph_siteinfo(3) University of Illinois Oct 2002 ph_www_resolve(3)

Search: Section: