IP_NserveQueryNames

IP_NserveQueryNames — fills an array with nserve's names.

Syntax

#include <cogent.h>
int IP_NserveQueryNames(char**  names,
 int  maxnames);

Arguments

names

An array of pointers to be filled in.

maxnames

The number of entries in the names array.

Returns

The number of names actually received, or -1 on error and errno is set.

Description

This function queries nserve for up to maxnames names, allocates memory for each name, and adds it to the names array. It is the programmer's responsibility to call ME_Free on each pointer in the names array to clean up this memory.

See Also

The Cascade NameServer, Cascade NameServer Functions, nserve, IP_NserveQueryNameCount