HP-UX 11i December 2003 Release Notes

Programming
Miscellaneous
Chapter 15
298
NOTE Use of the call pstat_getmpathname() is limited to uid equal to 0. Use of the calls
pstat_getfiledetails(), pstat_getsocket(), pstat_getstream(), and
pstat_getpathanme() is limited to uid equal to 0 or effective ID match. In the case of
effective ID match, access will only be granted if the target process is not and has never
run as a setuid or setgid process.
New Data Structures
The following are new data structures being added to the PSTAT module:
pstat_getpathname() Provides full pathname of an opened file (Reverse
Pathname Lookup)
pstat_getmpathname() Provides a copy of the DNLC entries for a given file
system
Table 15-1 New pstat Modules (Continued)
Table 15-2 New pstat Data Structures
pst_fileinfo2 Describes per-file information. For the specified process, there
is one instance of this context for each open file descriptor.
pst_fid Used to efficiently re-access the opened files. This value is
returned by pstat_getfile2(), pstat_getproc(), and
pstat_getprocvm() calls. This ID is then passed to
subsequent PSTAT calls such as pstat_getsocket() to
efficiently re-access the opened files.
pst_filedetails This data structure contains detailed information specific to a
particular open file. For a specified file, there is only one
instance of this structure. This information includes stat
equivalent information.
pst_socket The PSTAT socket structure contains detailed information
pertaining to an opened socket, such as type, state, protocol,
address family, and options of the socket. For a specified
socket, there is only one instance of this structure.
pst_stream The PSTAT stream structure contains detailed information
pertaining to a stream entity. This includes information about
the head, names of modules pushed, and the driver of the
stream.
pst_mpathnode This structure is returned by pstat_getmpathname() routine
that provides a copy of the DNLC entries for a given file
system. The information contained in this structure includes
id of the current file or directory, parent of the current entry,
and the name of the current entry. By traversing the DNLC
entries in the reverse order, one can obtain the pathname for
an opened file to the mount point.