Advanced Programming in the UNIX® Environment

(lily) #1
ptg10805159

Appendix A Function Prototypes 861


int getsockopt(intsockfd,intlevel,intoption,void *restrict val,
socklen_t *restrictlenp);
<sys/socket.h> p. 624
Returns: 0 if OK,−1 on error

struct
spwd *getspent(void);
<shadow.h> p. 182
Returns: pointer if OK,NULLon error
Platforms: Linux 3.2.0, Solaris 10

struct
spwd *getspnam(const char *name);
<shadow.h> p. 182
Returns: pointer if OK,NULLon error
Platforms: Linux 3.2.0, Solaris 10

int gettimeofday(struct timeval *restricttp,
void *restricttzp);
<sys/time.h> p. 190
Returns: 0 always

uid_t getuid(void);
<unistd.h> p. 228
Returns: real user ID of calling process

struct
tm *gmtime(const time_t *calptr);
<time.h> p. 192
Returns: pointer to broken-down time,NULLon error

int grantpt(intfd);
<stdlib.h> p. 723
Returns: 0 on success,−1 on error

uint32_t htonl(uint32_thostint32);
<arpa/inet.h> p. 594
Returns: 32-bit integer in network byte order

uint16_t htons(uint16_thostint16);
<arpa/inet.h> p. 594
Returns: 16-bit integer in network byte order
Free download pdf