Main Page | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

vipnsgethostbyaddr.c File Reference

#include <string.h>
#include "vipl_priv.h"

Go to the source code of this file.

Functions

VIP_ENTRY_POINT VIP_RETURN VipNSGetHostByAddr (VIP_NIC_HANDLE NicHandle, VIP_NET_ADDRESS *Address, VIP_CHAR *Name, VIP_ULONG *NameLen)


Detailed Description

The VI-GM function VipNSGetHostByAddr implementation.

Definition in file vipnsgethostbyaddr.c.


Function Documentation

VIP_ENTRY_POINT VIP_RETURN VipNSGetHostByAddr VIP_NIC_HANDLE  NicHandle,
VIP_NET_ADDRESS Address,
VIP_CHAR Name,
VIP_ULONG NameLen
 

VipNSGetHostByAddr() maps the Address to a host name by querying the name service in the context of the specified NicHandle. The name associated with the Address is returned to the caller in the Name parameter. If the size specified by NameLen is not sufficient to hold the entire name, a VIP_INVALID_PARAMETER is returned.

VipNSGetHostByAddr() returns the size of the array required to hold the entire string in NameLen so the caller can increase the size of the array and call VipNSGetHostByName() again with the larger array to retrieve the name.

Return values:
VIP_SUCCESS Operation completed successfully.
VIP_ERROR_NAMESERVICE The address specified was not found by the name service or the name service was not initialized for the specified NIC context.
VIP_INVALID_PARAMETER One of the parameters was invalid. If the NameLen size set by the caller is too small to hold the entire name, the value returned in the NameLen field is the size of the array required to hold the name.
VIP_ERROR_RESOURCE The operation failed due to insufficient resources.
Parameters:
NicHandle (IN) A NicHandle for which the Address parameter is valid.
Address (IN) The network address used to query the name service.
Name (OUT) A pointer to the array where the name associated with the specified Address returned by the name service will be stored. The array must be allocated by the caller of this routine.
NameLen (IN/OUT) The size of the Name array. The caller of the routine sets this parameter to the size of the array allocated. The array allocated must have enough storage to include the NULL termination. It is updated by the routine to contain the actual length of the host name string (does not include the NULL termination character).
See also:
VipNSInit VipNSShutdown VipNSGetHostByName
Author:
Patrick Geoffray
Version:
1.0

Definition at line 61 of file vipnsgethostbyaddr.c.

References VIP_NET_ADDRESS::HostAddress, VIP_NET_ADDRESS::HostAddressLen, VI_GM_MAC_ADDRESS_LEN, VIP_DEBUG, VIP_DEBUG_GM, VIP_DEBUG_LABEL, VIP_ENTER_IOCTL, VIP_ERROR_NAMESERVICE, VIP_EXIT_IOCTL, VIP_FALSE, vip_gm_host_name_lock, VIP_INVALID_NIC_HANDLE, VIP_INVALID_PARAMETER, VIP_MUTEX_LOCK, VIP_MUTEX_UNLOCK, VIP_PROGRESSION, and VIP_SUCCESS.

VI-GM-1.3 by Myricom © 1997-2006. Documentation generated on 20 May 2006 by doxygen 1.4.4.