JagGetPassword  JagGetSharedData

Chapter 5: C Routines Reference

JagGetPeerAddress

Description

Retrieve the client host IP address for the client connection that is associated with a C or C++ component instance.

Syntax

JagStatus JAG_PUBLIC JagGetPeerAddress(
          SQLPOINTER peerAddress, 
          SQLINTEGER bufLen,
          SQLINTEGER *returnLen)

Parameters

peerAddress

The address of a character array to receive the client IP address. The output value is “0.0.0.0” if the client’s IP address is unavailable.

bufLen

The length, in bytes, of the peerAddress array. The length must include space for a null-terminator.

returnLen

NULL or the address of a SQLINTEGER variable.

returnLen is an optional output parameter that receives the length, in bytes, of the peerAddress value. The host name is null-terminated and the length includes the null-terminator.

Returns

Return value

To indicate

JAG_SUCCEED

Success

JAG_FAIL

Failure

JagGetPeerAddress fails for the following reasons:

Check the server’s log file for more information when JagGetPeerAddress fails.

See also

JagGetHostName





Copyright © 2005. Sybase Inc. All rights reserved. JagGetSharedData