2.5.10. GetServerName

User supplied callback that must return the name or IP address of the Multi-ICE server workstation as a null-terminated string.

Syntax

#include “tapop.h”

extern int GetServerName(char **server);

where:

server

A pointer to a buffer containing the name of themachine running the Multi-ICE server.

Return

The function returns:

0

No error.

Nonzero

Failure (user-supplied values).

Usage

The function is called to query the name of the Multi-ICE server by the functions TAPOp_RPC_Initialise and TAPOp_GetDriverDetails. The supplied function must write through the server pointer the address of a buffer containing the name. The name is not copied into TAPOp-local storage.

The hostname is resolved using the standard library function gethostbyname(). For example it can be pc25, itlilien.acme.org, or 172.15.1.1.

Note

If you have multiple connections managed by code in the same process address space, one definition of GetServerName must supply server name information for all connections.

Example

This is an example definition of the function:

static char servername[] = “itlilien.acme.org”;
int GetServerName(char **server)
{
    *server = servername;
    return 0;
}

See also

These TAPOp API functions provide similar or related functionality:

Copyright © 1998-2002 ARM Limited. All rights reserved.ARM DUI 0154B
Non-Confidential