HP WBEM Services Software Developer's Kit for HP-UX Provider and Client Developer's Guide A.01

Provider Implementation
Provider Design Considerations
Chapter 466
The unique name of the instance within the scope defined by the
previous keys. In many classes, this non-propagated key will be
called Name, DeviceID, Handle or something that allows the user to
understand that it will contain a value that is unique within that
class of object.
It is entirely up to the provider to determine the value of a Name (or
analogous) key. The primary requirement is that there may be only one
instance of a class with a given key value. If this were not the case, it
would be impossible to distinguish between different instances in a given
context. Although not a requirement, the value can be chosen to be
representative of what a client would expect to see. For example, the
name of a disk partition on HP-UX, as displayed by the df command, is
often something like /dev/vg00/lvol3, so this would be an appropriate
value for the Name property of a disk partition object.
The values for SystemCreationClassName and SystemName must be
chosen with equal care, since the provider must coexist with other
providers on the same platform (indeed, in the same namespace). The
values of these properties must be chosen to ensure consistency and
avoid conflicts. When the meaning of SystemName is clearly a system's IP
hostname (as it will often be), the provider must supply a standard fully
qualified Internet hostname. This value is not reliably obtained from the
gethostname() library function, but rather from gethostbyname(). The
following code fragment illustrates a suitable means to obtain this value:
Example 4-9 Code Fragment to obtain value for SystemName
#include <sys/param.h>
#include <netdb.h>
#include <Pegasus/Common/String.h>
...
struct hostent *he;
char hn[MAXHOSTNAMELEN];
// fill in hn with what this system thinks is its name
gethostname(hn,MAXHOSTNAMELEN);
// find out what the nameservices think is its full name
if (he=gethostbyname(hn)) return String(he->h_name);
// but if that failed, return what gethostname said
else return String(hn);
...