SCBD_GET_NAMES(3)
SCOREBOARD LIBRARY (C)
SCBD_GET_NAMES(3)
NAME
scbd_get_names - get list of record names which have a specified attribute and value from scoreboard database

SYNOPSIS
#include <scboard.h>

int scbd_get_names( char *attr, char *value, char *list[], int *size );

DESCRIPTION
scbd_get_names() attempts to get a list of record names which have an attribute specified in the attr argument and one of its associated values is the same as that specified in the value argument. The list of record names will be stored in the list argument. Thus, list must be an array of character pointers whose size is specified in the size argument. Upon successful return from this function call, size is set to the number of records found.

All the storage area of the strings set in list are allocated using the malloc function. So it is the user's responsibility to free those memory regions.

RETURN VALUES
scbd_get_names() returns 0 on success or one of the the following errors:

ERRORS
EFAULT
attr or value is a null pointer
EINVAL
attr or value is a null string

ENVIRONMENT
SCBDSERV
Hostname (and port number) of the scoreboard(8) database process

SEE ALSO
scoreboard(8), scorehosts.db(5)

CREDIT
This document is a part of the SCore cluster system software developed at PC Cluster Consortium, Japan. Copyright (C) 2003 PC Cluster Consortium.