![]() Chapter Contents |
![]() Previous |
![]() Next |
| getclientpid |
| Portability: | SAS/C extension |
| SYNOPSIS | |
| DESCRIPTION | |
| RETURN VALUES | |
| CAUTION | |
| PORTABILITY | |
| RELATED FUNCTIONS |
| SYNOPSIS |
#include <sys/types.h> #include <sys/socket.h> pid_t getclientpid(int domain, struct clientpid *clientpid); int domain; /* the addressing domain */ struct clientpid * clientpid; /* pointer to the clientpid structure */
| DESCRIPTION |
The domain parameter
contains the communications domain in which the sockets will be given and
taken. If domain is
0
, then a default of AF_INET is used.
The clientpid parameter
is a pointer to the following structure:
struct clientpid {
int domain; /* addressing domain AF_INET */
char reserve4[4]; /* unused - set to binary zeros */
pid_t pid; /* client process id number */
char task[8]; /* unused - set to blanks (0x40) */
unsigned char flag; /* options flag */
char reserve3[3]; /* unused - set to binary zeros */
int sid; /* socket identifier */
char reserve12[12]; /* unused - set to binary zeros */
};
#define SO_CLOSE 0x01 /* used in clientpid structure */
| RETURN VALUES |
If getclientpid
succeeds, it returns the client's non-negative process ID. Otherwise, it returns
a
-1
, and sets errno to indicate the error.
clientpid structure
upon return will contain the following values:
domain |
the domain of the socket to be taken, default = AF_INET. |
pid |
the process ID number of client process. |
clientpid
structure are set to binary zeros (0x00).
getclientid macro call when the
FunctionCode=2. The purpose
is strictly to provide input to the givesocket_pid
and takesocket_pid functions.
![[cautionend]](../common/images/cautend.gif)
| CAUTION |
| PORTABILITY |
| RELATED FUNCTIONS |
getclientid, givesocket,
takesocket, givesocket_pid, takesocket_pid
![]() Chapter Contents |
![]() Previous |
![]() Next |
![]() Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.