00001 /* Do not modify this file -- it was generated automatically. */ 00002 /** 00003 \par Description: 00004 Clear fd_set bit 00005 (Std. UNIX; see AUP2 Sec. 4.2.3) 00006 \par Headers: 00007 sys/select.h 00008 */ 00009 void FD_CLR( 00010 int fd, /**< file descriptor to clear*/ 00011 fd_set *fdset /**< fd_set*/ 00012 ); 00013 /** 00014 \par Description: 00015 Test fd_set bit 00016 (Std. UNIX; see AUP2 Sec. 4.2.3) 00017 \par Headers: 00018 sys/select.h 00019 \return 1 if set or 0 if clear (no error return) 00020 */ 00021 int FD_ISSET( 00022 int fd, /**< file descriptor to test*/ 00023 fd_set *fdset /**< fd_set*/ 00024 ); 00025 /** 00026 \par Description: 00027 Set fd_set bit 00028 (Std. UNIX; see AUP2 Sec. 4.2.3) 00029 \par Headers: 00030 sys/select.h 00031 */ 00032 void FD_SET( 00033 int fd, /**< file descriptor to set*/ 00034 fd_set *fdset /**< fd_set*/ 00035 ); 00036 /** 00037 \par Description: 00038 Clear entire fd_set 00039 (Std. UNIX; see AUP2 Sec. 4.2.3) 00040 \par Headers: 00041 sys/select.h 00042 */ 00043 void FD_ZERO( 00044 fd_set *fdset /**< fd_set to clear*/ 00045 ); 00046 /** 00047 \par Description: 00048 Terminate process without clean-up 00049 (Std. UNIX; see AUP2 Sec. 5.7) 00050 \par Headers: 00051 stdlib.h 00052 \return Does not return 00053 */ 00054 void _Exit( 00055 int status /**< exit status*/ 00056 ); 00057 /** 00058 \par Description: 00059 Terminate process without clean-up 00060 (Std. UNIX; see AUP2 Sec. 5.7) 00061 \par Headers: 00062 unistd.h 00063 \return Does not return 00064 */ 00065 void _exit( 00066 int status /**< exit status*/ 00067 ); 00068 /** 00069 \par Description: 00070 Jump to jump point without restoring signal mask 00071 (Std. UNIX; see AUP2 Sec. 9.6) 00072 \par Headers: 00073 setjmp.h 00074 */ 00075 void _longjmp( 00076 jmp_buf loc_info, /**< saved location information*/ 00077 int val /**< value for setjmp to return*/ 00078 ); 00079 /** 00080 \par Description: 00081 Set jump point 00082 (Std. UNIX; see AUP2 Sec. 9.6) 00083 \par Headers: 00084 setjmp.h 00085 \return 0 if called directly, non-zero if from longjmp (no error return) 00086 */ 00087 int _setjmp( 00088 jmp_buf loc_info /**< saved location information*/ 00089 ); 00090 /** 00091 \par Description: 00092 Generate SIGABRT 00093 (Std. UNIX; see AUP2 Sec. 9.1.9) 00094 \par Headers: 00095 stdlib.h 00096 \return Does not return 00097 */ 00098 void abort(void); 00099 /** 00100 \par Description: 00101 Accept new connection on socket and create new socket 00102 (Std. UNIX; see AUP2 Sec. 8.1.2) 00103 \par Headers: 00104 sys/socket.h 00105 \return file descriptor or -1 on error (sets errno) 00106 */ 00107 int accept( 00108 int socket_fd, /**< socket file descriptor*/ 00109 struct sockaddr *sa, /**< socket address or NULL*/ 00110 socklen_t *sa_len /**< address length*/ 00111 ); 00112 /** 00113 \par Description: 00114 Determine accessibility of file 00115 (Std. UNIX; see AUP2 Sec. 3.8.1) 00116 <p>R_OK read permission 00117 <br>W_OK write permission 00118 <br>X_OK execute (search) permission 00119 <br>F_OK test for existence 00120 \par Headers: 00121 unistd.h 00122 \return 0 if allowed or -1 if not or on error (sets errno) 00123 */ 00124 int access( 00125 const char *path, /**< pathname*/ 00126 int what /**< permission to be tested*/ 00127 ); 00128 /** 00129 \par Description: 00130 Cancel asynchronous I/O request 00131 (Std. UNIX; see AUP2 Sec. 3.9.5) 00132 \par Headers: 00133 aio.h 00134 \return result code or -1 on error (sets errno) 00135 */ 00136 int aio_cancel( 00137 int fd, /**< file descriptor*/ 00138 struct aiocb *aiocbp /**< control block*/ 00139 ); 00140 /** 00141 \par Description: 00142 Retrieve error status for asynchronous I/O operation 00143 (Std. UNIX; see AUP2 Sec. 3.9.4) 00144 \par Headers: 00145 aio.h 00146 \return 0, errno value, or EINPROGRESS (does not set errno) 00147 */ 00148 int aio_error( 00149 const struct aiocb *aiocbp /**< control block*/ 00150 ); 00151 /** 00152 \par Description: 00153 Initiate buffer-cache flushing for one file 00154 (Std. UNIX; see AUP2 Sec. 3.9.6) 00155 \par Headers: 00156 aio.h 00157 \return 0 on success or -1 on error (sets errno) 00158 */ 00159 int aio_fsync( 00160 int op, /**< O_SYNC or O_DSYNC*/ 00161 struct aiocb *aiocbp /**< control block*/ 00162 ); 00163 /** 00164 \par Description: 00165 Asynchronous read from file 00166 (Std. UNIX; see AUP2 Sec. 3.9.3) 00167 \par Headers: 00168 aio.h 00169 \return 0 on success or -1 on error (sets errno) 00170 */ 00171 int aio_read( 00172 struct aiocb *aiocbp /**< control block*/ 00173 ); 00174 /** 00175 \par Description: 00176 Retrieve return status of asynchronous I/O operation 00177 (Std. UNIX; see AUP2 Sec. 3.9.4) 00178 \par Headers: 00179 aio.h 00180 \return operation return value or -1 on error (sets errno) 00181 */ 00182 ssize_t aio_return( 00183 struct aiocb *aiocbp /**< control block*/ 00184 ); 00185 /** 00186 \par Description: 00187 Wait for asynchronous I/O request 00188 (Std. UNIX; see AUP2 Sec. 3.9.7) 00189 \par Headers: 00190 aio.h 00191 \return 0 on success or -1 on error (sets errno) 00192 */ 00193 int aio_suspend( 00194 const struct aiocb *const list[], /**< array of control blocks*/ 00195 int cbcnt, /**< number of elements in array*/ 00196 const struct timespec *timeout /**< max time to wait*/ 00197 ); 00198 /** 00199 \par Description: 00200 Asynchronous write to file 00201 (Std. UNIX; see AUP2 Sec. 3.9.3) 00202 \par Headers: 00203 aio.h 00204 \return 0 on success or -1 on error (sets errno) 00205 */ 00206 int aio_write( 00207 struct aiocb *aiocbp /**< control block*/ 00208 ); 00209 /** 00210 \par Description: 00211 Schedule an alarm signal 00212 (Std. UNIX; see AUP2 Sec. 9.7.1) 00213 \par Headers: 00214 unistd.h 00215 \return seconds left on previous alarm or zero if none (no error return) 00216 */ 00217 unsigned alarm( 00218 unsigned secs /**< seconds until signal*/ 00219 ); 00220 /** 00221 \par Description: 00222 Convert broken-down time to local-time string 00223 (Std. UNIX; see AUP2 Sec. 1.7.1) 00224 \par Headers: 00225 time.h 00226 \return string or NULL on error (errno not set) 00227 */ 00228 char *asctime( 00229 const struct tm * tmbuf /**< broken-down time*/ 00230 ); 00231 /** 00232 \par Description: 00233 Register function to be called when process exits 00234 (Std. UNIX; see AUP2 Sec. 1.3.4) 00235 \par Headers: 00236 stdlib.h 00237 \return 0 on success, non-zero on error (errno not set) 00238 */ 00239 int atexit( 00240 void (*fcn)(void) /**< function to be called*/ 00241 ); 00242 /** 00243 \par Description: 00244 Bind name to socket 00245 (Std. UNIX; see AUP2 Sec. 8.1.2) 00246 \par Headers: 00247 sys/socket.h 00248 \return 0 on success or -1 on error (sets errno) 00249 */ 00250 int bind( 00251 int socket_fd, /**< socket file descriptor*/ 00252 const struct sockaddr *sa, /**< socket address*/ 00253 socklen_t sa_len /**< address length*/ 00254 ); 00255 /** 00256 \par Description: 00257 Get input speed from termios structure 00258 (Std. UNIX; see AUP2 Sec. 4.5.3) 00259 \par Headers: 00260 termios.h 00261 \return speed (no error return) 00262 */ 00263 speed_t cfgetispeed( 00264 const struct termios *tp /**< attributes*/ 00265 ); 00266 /** 00267 \par Description: 00268 Get output speed from termios structure 00269 (Std. UNIX; see AUP2 Sec. 4.5.3) 00270 \par Headers: 00271 termios.h 00272 \return speed (no error return) 00273 */ 00274 speed_t cfgetospeed( 00275 const struct termios *tp /**< attributes*/ 00276 ); 00277 /** 00278 \par Description: 00279 Set input speed in termios structure 00280 (Std. UNIX; see AUP2 Sec. 4.5.3) 00281 \par Headers: 00282 termios.h 00283 \return 0 on success or -1 on error (may set errno) 00284 */ 00285 int cfsetispeed( 00286 struct termios *tp, /**< attributes*/ 00287 speed_t speed /**< speed*/ 00288 ); 00289 /** 00290 \par Description: 00291 Set output speed in termios structure 00292 (Std. UNIX; see AUP2 Sec. 4.5.3) 00293 \par Headers: 00294 termios.h 00295 \return 0 on success or -1 on error (may set errno) 00296 */ 00297 int cfsetospeed( 00298 struct termios *tp, /**< attributes*/ 00299 speed_t speed /**< speed*/ 00300 ); 00301 /** 00302 \par Description: 00303 Change current directory by path 00304 (Std. UNIX; see AUP2 Sec. 3.6.2) 00305 \par Headers: 00306 unistd.h 00307 \return 0 on success or -1 on error (sets errno) 00308 */ 00309 int chdir( 00310 const char *path /**< pathname*/ 00311 ); 00312 /** 00313 \par Description: 00314 Change mode of file by path 00315 (Std. UNIX; see AUP2 Sec. 3.7.1) 00316 \par Headers: 00317 sys/stat.h 00318 \return 0 on success or -1 on error (sets errno) 00319 */ 00320 int chmod( 00321 const char *path, /**< pathname*/ 00322 mode_t mode /**< new mode*/ 00323 ); 00324 /** 00325 \par Description: 00326 Change owner and group of file by path 00327 (Std. UNIX; see AUP2 Sec. 3.7.2) 00328 \par Headers: 00329 unistd.h 00330 \return 0 on success or -1 on error (sets errno) 00331 */ 00332 int chown( 00333 const char *path, /**< pathname*/ 00334 uid_t uid, /**< new user ID*/ 00335 gid_t gid /**< new group ID*/ 00336 ); 00337 /** 00338 \par Description: 00339 Change root directory 00340 (Std. UNIX; see AUP2 Sec. 5.14) 00341 \par Headers: 00342 unistd.h 00343 \return 0 on success or -1 on error (sets errno) 00344 */ 00345 int chroot( 00346 const char *path /**< path name*/ 00347 ); 00348 /** 00349 \par Description: 00350 Get execution time 00351 (Std. UNIX; see AUP2 Sec. 1.7.2) 00352 \par Headers: 00353 time.h 00354 \return time in CLOCKS_PER_SEC or -1 on error (errno not set) 00355 */ 00356 clock_t clock(void); 00357 /** 00358 \par Description: 00359 Get process CPU-time clock 00360 (Std. UNIX; see AUP2 Sec. 9.7.5) 00361 \par Headers: 00362 time.h 00363 \return 0 on success or error number on error 00364 */ 00365 int clock_getcpuclockid( 00366 pid_t pid, /**< process ID*/ 00367 clockid_t *clock_id /**< returned clock ID*/ 00368 ); 00369 /** 00370 \par Description: 00371 Get clock resolution 00372 (Std. UNIX; see AUP2 Sec. 9.7.5) 00373 \par Headers: 00374 time.h 00375 \return 0 on success or -1 on error (sets errno) 00376 */ 00377 int clock_getres( 00378 clockid_t clock_id, /**< clock ID*/ 00379 struct timespec *res /**< resolution*/ 00380 ); 00381 /** 00382 \par Description: 00383 Get time from clock 00384 (Std. UNIX; see AUP2 Sec. 9.7.5) 00385 \par Headers: 00386 time.h 00387 \return 0 on success or -1 on error (sets errno) 00388 */ 00389 int clock_gettime( 00390 clockid_t clock_id, /**< clock ID (CLOCK_REALTIME, etc.)*/ 00391 struct timespec *tp /**< time*/ 00392 ); 00393 /** 00394 \par Description: 00395 Suspend execution for nanoseconds or until signal 00396 (Std. UNIX; see AUP2 Sec. 9.7.5) 00397 \par Headers: 00398 time.h 00399 \return 0 on success or error number on error 00400 */ 00401 int clock_nanosleep( 00402 clockid_t clock_id, /**< clock ID*/ 00403 int flags, /**< TIMER_ABSTIME or zero*/ 00404 const struct timespec *nsecs, /**< nanoseconds to sleep*/ 00405 struct timespec *remain /**< remaining time*/ 00406 ); 00407 /** 00408 \par Description: 00409 Set clock 00410 (Std. UNIX; see AUP2 Sec. 9.7.5) 00411 \par Headers: 00412 time.h 00413 \return 0 on success or -1 on error (sets errno) 00414 */ 00415 int clock_settime( 00416 clockid_t clock_id, /**< clock ID*/ 00417 const struct timespec *tp /**< time*/ 00418 ); 00419 /** 00420 \par Description: 00421 Close file descriptor 00422 (Std. UNIX; see AUP2 Sec. 2.11) 00423 \par Headers: 00424 unistd.h 00425 \return 0 on success or -1 on error (sets errno) 00426 */ 00427 int close( 00428 int fd /**< file descriptor*/ 00429 ); 00430 /** 00431 \par Description: 00432 Close directory 00433 (Std. UNIX; see AUP2 Sec. 3.6.1) 00434 \par Headers: 00435 dirent.h 00436 \return 0 on success or -1 on error (sets errno) 00437 */ 00438 int closedir( 00439 DIR *dirp /**< DIR pointer from opendir*/ 00440 ); 00441 /** 00442 \par Description: 00443 Get configuration string 00444 (Std. UNIX; see AUP2 Sec. 1.5.7) 00445 \par Headers: 00446 unistd.h 00447 \return size of value or 0 on error (sets errno on error) 00448 */ 00449 size_t confstr( 00450 int name, /**< option or limit name*/ 00451 char *buf, /**< returned string value*/ 00452 size_t len /**< size of buf*/ 00453 ); 00454 /** 00455 \par Description: 00456 Connect socket 00457 (Std. UNIX; see AUP2 Sec. 8.1.2) 00458 \par Headers: 00459 sys/socket.h 00460 \return 0 on success or -1 on error (sets errno) 00461 */ 00462 int connect( 00463 int socket_fd, /**< socket file descriptor*/ 00464 const struct sockaddr *sa, /**< socket address*/ 00465 socklen_t sa_len /**< address length*/ 00466 ); 00467 /** 00468 \par Description: 00469 Create or truncate a file for writing 00470 (Std. UNIX; see AUP2 Sec. 2.4.2) 00471 \par Headers: 00472 sys/stat.h 00473 , fcntl.h 00474 \return file descriptor or -1 on error (sets errno) 00475 */ 00476 int creat( 00477 const char *path, /**< pathname*/ 00478 mode_t perms /**< permissions*/ 00479 ); 00480 /** 00481 \par Description: 00482 Get pathname for controlling terminal 00483 (Std. UNIX; see AUP2 Sec. 4.7) 00484 \par Headers: 00485 stdio.h 00486 \return pathname or empty string on error (errno not set) 00487 */ 00488 char *ctermid( 00489 char *buf /**< buffer of size L_ctermid or NULL*/ 00490 ); 00491 /** 00492 \par Description: 00493 Convert time_t to local-time string 00494 (Std. UNIX; see AUP2 Sec. 1.7.1) 00495 \par Headers: 00496 time.h 00497 \return string or NULL on error (errno not set) 00498 */ 00499 char *ctime( 00500 const time_t *t /**< time*/ 00501 ); 00502 /** 00503 \par Description: 00504 Subtract two time_t values 00505 (Std. UNIX; see AUP2 Sec. 1.7.1) 00506 \par Headers: 00507 time.h 00508 \return time1 - time0 in seconds (no error return) 00509 */ 00510 double difftime( 00511 time_t time1, /**< time*/ 00512 time_t time0 /**< time*/ 00513 ); 00514 /** 00515 \par Description: 00516 Duplicate file descriptor 00517 (Std. UNIX; see AUP2 Sec. 6.3) 00518 \par Headers: 00519 unistd.h 00520 \return new file descriptor or -1 on error (sets errno) 00521 */ 00522 int dup( 00523 int fd /**< file descriptor to duplicate*/ 00524 ); 00525 /** 00526 \par Description: 00527 Duplicate file descriptor 00528 (Std. UNIX; see AUP2 Sec. 6.3) 00529 \par Headers: 00530 unistd.h 00531 \return new file descriptor or -1 on error (sets errno) 00532 */ 00533 int dup2( 00534 int fd, /**< file descriptor to duplicate*/ 00535 int fd2 /**< file descriptor to use*/ 00536 ); 00537 /** 00538 \par Description: 00539 End host-database scan 00540 (Std. UNIX; see AUP2 Sec. 8.8.1) 00541 \par Headers: 00542 netdb.h 00543 */ 00544 void endhostent(void); 00545 /** 00546 \par Description: 00547 End network-database scan 00548 (Std. UNIX; see AUP2 Sec. 8.8.2) 00549 \par Headers: 00550 netdb.h 00551 */ 00552 void endnetent(void); 00553 /** 00554 \par Description: 00555 End protocol-database scan 00556 (Std. UNIX; see AUP2 Sec. 8.8.3) 00557 \par Headers: 00558 netdb.h 00559 */ 00560 void endprotoent(void); 00561 /** 00562 \par Description: 00563 End service-database scan 00564 (Std. UNIX; see AUP2 Sec. 8.8.4) 00565 \par Headers: 00566 netdb.h 00567 */ 00568 void endservent(void); 00569 /** 00570 \par Description: 00571 Execute file with argument list 00572 (Std. UNIX; see AUP2 Sec. 5.3) 00573 \par Headers: 00574 unistd.h 00575 \return -1 on error (sets errno) 00576 */ 00577 int execl( 00578 const char *path, /**< program pathname*/ 00579 const char *arg0, /**< first arg (file name)*/ 00580 const char *arg1, /**< second arg*/ 00581 ..., /**< remaining args*/ 00582 NULL /**< arg list terminator*/ 00583 ); 00584 /** 00585 \par Description: 00586 Execute file with argument list and environment 00587 (Std. UNIX; see AUP2 Sec. 5.3) 00588 \par Headers: 00589 unistd.h 00590 \return -1 on error (sets errno) 00591 */ 00592 int execle( 00593 const char *path, /**< program pathname*/ 00594 const char *arg0, /**< first arg (file name)*/ 00595 const char *arg1, /**< second arg*/ 00596 ..., /**< remaining args*/ 00597 NULL /**< arg list terminator*/ 00598 char *const envv[]*/ /**< environment vector*/ 00599 ); 00600 /** 00601 \par Description: 00602 Execute file with argument list and PATH search 00603 (Std. UNIX; see AUP2 Sec. 5.3) 00604 \par Headers: 00605 unistd.h 00606 \return -1 on error (sets errno) 00607 */ 00608 int execlp( 00609 const char *file, /**< program file name*/ 00610 const char *arg0, /**< first arg (file name)*/ 00611 const char *arg1, /**< second arg*/ 00612 ..., /**< remaining args*/ 00613 NULL /**< arg list terminator*/ 00614 ); 00615 /** 00616 \par Description: 00617 Execute file with argument vector 00618 (Std. UNIX; see AUP2 Sec. 5.3) 00619 \par Headers: 00620 unistd.h 00621 \return -1 on error (sets errno) 00622 */ 00623 int execv( 00624 const char *path, /**< program pathname*/ 00625 char *const argv[] /**< argument vector*/ 00626 ); 00627 /** 00628 \par Description: 00629 Execute file with argument vector and environment 00630 (Std. UNIX; see AUP2 Sec. 5.3) 00631 \par Headers: 00632 unistd.h 00633 \return -1 on error (sets errno) 00634 */ 00635 int execve( 00636 const char *path, /**< program pathname*/ 00637 char *const argv[], /**< argument vector*/ 00638 char *const envv[] /**< environment vector*/ 00639 ); 00640 /** 00641 \par Description: 00642 Execute file with argument vector and PATH search 00643 (Std. UNIX; see AUP2 Sec. 5.3) 00644 \par Headers: 00645 unistd.h 00646 \return -1 on error (sets errno) 00647 */ 00648 int execvp( 00649 const char *file, /**< program file name*/ 00650 char *const argv[] /**< argument vector*/ 00651 ); 00652 /** 00653 \par Description: 00654 Terminate process with clean-up 00655 (Std. UNIX; see AUP2 Sec. 5.7) 00656 \par Headers: 00657 stdlib.h 00658 \return Does not return 00659 */ 00660 void exit( 00661 int status /**< exit status*/ 00662 ); 00663 /** 00664 \par Description: 00665 Change current directory by file descriptor 00666 (Std. UNIX; see AUP2 Sec. 3.6.2) 00667 \par Headers: 00668 unistd.h 00669 \return 0 on success or -1 on error (sets errno) 00670 */ 00671 int fchdir( 00672 int fd /**< file descriptor*/ 00673 ); 00674 /** 00675 \par Description: 00676 Change mode of file by file descriptor 00677 (Std. UNIX; see AUP2 Sec. 3.7.1) 00678 \par Headers: 00679 sys/stat.h 00680 \return 0 on success or -1 on error (sets errno) 00681 */ 00682 int fchmod( 00683 int fd, /**< file descriptor*/ 00684 mode_t mode /**< new mode*/ 00685 ); 00686 /** 00687 \par Description: 00688 Change owner and group of file by file descriptor 00689 (Std. UNIX; see AUP2 Sec. 3.7.2) 00690 \par Headers: 00691 unistd.h 00692 \return 0 on success or -1 on error (sets errno) 00693 */ 00694 int fchown( 00695 int fd, /**< file descriptor*/ 00696 uid_t uid, /**< new user ID*/ 00697 gid_t gid /**< new group ID*/ 00698 ); 00699 /** 00700 \par Description: 00701 Control open file 00702 (Std. UNIX; see AUP2 Sec. 3.8.3) 00703 \par Headers: 00704 unistd.h 00705 , fcntl.h 00706 \return result depending on op or -1 on error (sets errno) 00707 */ 00708 int fcntl( 00709 int fd, /**< file descriptor*/ 00710 int op, /**< operation*/ 00711 ... /**< optional argument depending on op*/ 00712 ); 00713 /** 00714 \par Description: 00715 Force buffer-cache flushing for one file’s data 00716 (Std. UNIX; see AUP2 Sec. 2.16.2) 00717 \par Headers: 00718 unistd.h 00719 \return 0 or -1 on error (sets errno) 00720 */ 00721 int fdatasync( 00722 int fd /**< file descriptor*/ 00723 ); 00724 /** 00725 \par Description: 00726 Create new process 00727 (Std. UNIX; see AUP2 Sec. 5.5) 00728 \par Headers: 00729 unistd.h 00730 \return child’s process-ID and 0 on success or -1 on error (sets errno) 00731 */ 00732 pid_t fork(void); 00733 /** 00734 \par Description: 00735 Get system option or limit by file descriptor 00736 (Std. UNIX; see AUP2 Sec. 1.5.6) 00737 \par Headers: 00738 unistd.h 00739 \return option/limit value or -1 (sets errno on error) 00740 */ 00741 long fpathconf( 00742 int fd, /**< file descriptor*/ 00743 int name /**< option or limit name*/ 00744 ); 00745 /** 00746 \par Description: 00747 Free socket-address information 00748 (Std. UNIX; see AUP2 Sec. 8.2.6) 00749 \par Headers: 00750 sys/socket.h 00751 , netdb.h 00752 */ 00753 void freeaddrinfo( 00754 struct addrinfo *infop /**< list to free*/ 00755 ); 00756 /** 00757 \par Description: 00758 Get file info by file descriptor 00759 (Std. UNIX; see AUP2 Sec. 3.5.1) 00760 \par Headers: 00761 sys/stat.h 00762 \return 0 on success or -1 on error (sets errno) 00763 */ 00764 int fstat( 00765 int fd, /**< file descriptor*/ 00766 struct stat *buf /**< returned information*/ 00767 ); 00768 /** 00769 \par Description: 00770 Get file system information by file descriptor 00771 (Std. UNIX; see AUP2 Sec. 3.2.3) 00772 \par Headers: 00773 sys/statvfs.h 00774 \return 0 on success or -1 on error (sets errno) 00775 */ 00776 int fstatvfs( 00777 int fd, /**< file descriptor*/ 00778 struct statvfs *buf /**< returned info*/ 00779 ); 00780 /** 00781 \par Description: 00782 Schedule or force buffer-cache flushing for one file 00783 (Std. UNIX; see AUP2 Sec. 2.16.2) 00784 \par Headers: 00785 unistd.h 00786 \return 0 on success or -1 on error (sets errno) 00787 */ 00788 int fsync( 00789 int fd /**< file descriptor*/ 00790 ); 00791 /** 00792 \par Description: 00793 Generate System V IPC key 00794 (Std. UNIX; see AUP2 Sec. 7.4.2) 00795 \par Headers: 00796 sys/ipc.h 00797 \return key on success or -1 on error (sets errno) 00798 */ 00799 key_t ftok( 00800 const char *path, /**< pathname of existing file*/ 00801 int id /**< desired key number*/ 00802 ); 00803 /** 00804 \par Description: 00805 Truncate or stretch file by file descriptor 00806 (Std. UNIX; see AUP2 Sec. 2.17) 00807 \par Headers: 00808 unistd.h 00809 \return 0 on success or -1 on error (sets errno) 00810 */ 00811 int ftruncate( 00812 int fd, /**< file descriptor*/ 00813 off_t length /**< new length*/ 00814 ); 00815 /** 00816 \par Description: 00817 Get error-code description 00818 (Std. UNIX; see AUP2 Sec. 8.2.6) 00819 \par Headers: 00820 netdb.h 00821 \return string (no error return) 00822 */ 00823 const char *gai_strerror( 00824 int code /**< error code*/ 00825 ); 00826 /** 00827 \par Description: 00828 Get socket-address information 00829 (Std. UNIX; see AUP2 Sec. 8.2.6) 00830 \par Headers: 00831 sys/socket.h 00832 , netdb.h 00833 \return 0 on success or error number on error (errno not set) 00834 */ 00835 int getaddrinfo( 00836 const char *nodename, /**< node name*/ 00837 const char *servname, /**< service name*/ 00838 const struct addrinfo *hint, /**< hint*/ 00839 struct addrinfo **infop /**< returned info as linked list*/ 00840 ); 00841 /** 00842 \par Description: 00843 Get current directory pathname 00844 (Std. UNIX; see AUP2 Sec. 3.4.2) 00845 \par Headers: 00846 unistd.h 00847 \return pathname or NULL on error (sets errno) 00848 */ 00849 char *getcwd( 00850 char *buf, /**< returned pathname*/ 00851 size_t bufsize /**< size of buf*/ 00852 ); 00853 /** 00854 \par Description: 00855 Convert string to broken-down time with rules 00856 (Std. UNIX; see AUP2 Sec. 1.7.1) 00857 \par Headers: 00858 time.h 00859 \return broken-down time or NULL on error (sets getdate_err) 00860 */ 00861 struct tm *getdate( 00862 const char *s /**< string to convert*/ 00863 ); 00864 /** 00865 \par Description: 00866 Get effective group ID 00867 (Std. UNIX; see AUP2 Sec. 5.11) 00868 \par Headers: 00869 unistd.h 00870 \return group ID (no error return) 00871 */ 00872 gid_t getegid(void); 00873 /** 00874 \par Description: 00875 Get value of environment variable 00876 (Std. UNIX; see AUP2 Sec. 5.2) 00877 \par Headers: 00878 stdlib.h 00879 \return value or NULL if not found (errno not set) 00880 */ 00881 char *getenv( 00882 const char *var /**< variable to find*/ 00883 ); 00884 /** 00885 \par Description: 00886 Get effective user ID 00887 (Std. UNIX; see AUP2 Sec. 5.11) 00888 \par Headers: 00889 unistd.h 00890 \return user ID (no error return) 00891 */ 00892 uid_t geteuid(void); 00893 /** 00894 \par Description: 00895 Get real group ID 00896 (Std. UNIX; see AUP2 Sec. 5.11) 00897 \par Headers: 00898 unistd.h 00899 \return group ID (no error return) 00900 */ 00901 gid_t getgid(void); 00902 /** 00903 \par Description: 00904 Get group-file entry 00905 (Std. UNIX; see AUP2 Sec. 3.5.2) 00906 \par Headers: 00907 grp.h 00908 \return pointer to structure or NULL on error (sets errno) 00909 */ 00910 struct group *getgrgid( 00911 gid_t gid /**< group ID*/ 00912 ); 00913 /** 00914 \par Description: 00915 Lookup host by address 00916 (Std. UNIX; see AUP2 Sec. 8.8.1) 00917 \par Headers: 00918 netdb.h 00919 \return pointer to hostent or NULL on error (sets h_errno) 00920 */ 00921 struct hostent *gethostbyaddr( 00922 const void *addr, /**< IP address*/ 00923 socklen_t len, /**< length of address*/ 00924 int family /**< family (called “type” in SUS)*/ 00925 ); 00926 /** 00927 \par Description: 00928 Lookup host by name 00929 (Std. UNIX; see AUP2 Sec. 8.8.1) 00930 \par Headers: 00931 netdb.h 00932 \return pointer to hostent or NULL on error (sets h_errno) 00933 */ 00934 struct hostent *gethostbyname( 00935 const char *nodename, /**< node name*/ 00936 ); 00937 /** 00938 \par Description: 00939 Get next host-database entry 00940 (Std. UNIX; see AUP2 Sec. 8.8.1) 00941 \par Headers: 00942 netdb.h 00943 \return next entry or NULL on end of database (errno not set) 00944 */ 00945 struct hostent *gethostent(void); 00946 /** 00947 \par Description: 00948 Get identifier for local host 00949 (Std. UNIX; see AUP2 Sec. 8.8.1) 00950 \par Headers: 00951 unistd.h 00952 \return identifier (no error return) 00953 */ 00954 long gethostid(void); 00955 /** 00956 \par Description: 00957 Get name of host 00958 (Std. UNIX; see AUP2 Sec. 8.2.7) 00959 \par Headers: 00960 unistd.h 00961 \return 0 on success or -1 on error (errno not set) 00962 */ 00963 int gethostname( 00964 char *name, /**< returned name*/ 00965 size_t namelen /**< size of name buffer*/ 00966 ); 00967 /** 00968 \par Description: 00969 Get value of interval timer 00970 (Std. UNIX; see AUP2 Sec. 9.7.4) 00971 \par Headers: 00972 sys/time.h 00973 \return 0 on success or -1 on error (sets errno) 00974 */ 00975 int getitimer( 00976 int which, /**< timer to get*/ 00977 struct itimerval *val /**< returned value*/ 00978 ); 00979 /** 00980 \par Description: 00981 Get login name 00982 (Std. UNIX; see AUP2 Sec. 3.5.2) 00983 \par Headers: 00984 unistd.h 00985 \return name or NULL on error (sets errno) 00986 */ 00987 char *getlogin(void); 00988 /** 00989 \par Description: 00990 Get name information 00991 (Std. UNIX; see AUP2 Sec. 8.8.1) 00992 \par Headers: 00993 sys/socket.h 00994 , netdb.h 00995 \return 0 on success or error number on error 00996 */ 00997 int getnameinfo( 00998 const struct sockaddr *sa, /**< socket address*/ 00999 socklen_t sa_len, /**< socket-address length*/ 01000 char *nodename, /**< node name*/ 01001 socklen_t nodelen, /**< node-name buffer length*/ 01002 char *servname, /**< service name*/ 01003 socklen_t servlen, /**< service-name buffer length*/ 01004 unsigned flags /**< flags*/ 01005 ); 01006 /** 01007 \par Description: 01008 Lookup network by number 01009 (Std. UNIX; see AUP2 Sec. 8.8.2) 01010 \par Headers: 01011 netdb.h 01012 \return pointer to netent or NULL if not found (errno not set) 01013 */ 01014 struct netent *getnetbyaddr( 01015 uint32_t net, /**< network number (to match n_net member)*/ 01016 int type /**< family (to match n_addrtype member)*/ 01017 ); 01018 /** 01019 \par Description: 01020 Lookup network by name 01021 (Std. UNIX; see AUP2 Sec. 8.8.2) 01022 \par Headers: 01023 netdb.h 01024 \return pointer to netent or NULL if not found (errno not set) 01025 */ 01026 struct netent *getnetbyname( 01027 const char *name /**< network name (to match n_name member)*/ 01028 ); 01029 /** 01030 \par Description: 01031 Get network-database entry 01032 (Std. UNIX; see AUP2 Sec. 8.8.2) 01033 \par Headers: 01034 netdb.h 01035 \return pointer to netent or NULL end of database (errno not set) 01036 */ 01037 struct netent *getnetent(void); 01038 /** 01039 \par Description: 01040 Get socket address of connected socket 01041 (Std. UNIX; see AUP2 Sec. 8.9.2) 01042 \par Headers: 01043 sys/socket.h 01044 \return 0 on success or -1 on error (sets errno) 01045 */ 01046 int getpeername( 01047 int socket_fd, /**< socket file descriptor*/ 01048 struct sockaddr *sa, /**< socket address*/ 01049 socklen_t *sa_len /**< address length*/ 01050 ); 01051 /** 01052 \par Description: 01053 Get process-group ID 01054 (Std. UNIX; see AUP2 Sec. 4.3.3) 01055 \par Headers: 01056 unistd.h 01057 \return process-group ID or -1 on error (sets errno) 01058 */ 01059 pid_t getpgid( 01060 pid_t pid /**< process ID or 0 for calling process*/ 01061 ); 01062 /** 01063 \par Description: 01064 Get process ID 01065 (Std. UNIX; see AUP2 Sec. 5.13) 01066 \par Headers: 01067 unistd.h 01068 \return process ID (no error return) 01069 */ 01070 pid_t getpid(void); 01071 /** 01072 \par Description: 01073 Get parent process ID 01074 (Std. UNIX; see AUP2 Sec. 5.13) 01075 \par Headers: 01076 unistd.h 01077 \return parent process ID (no error return) 01078 */ 01079 pid_t getppid(void); 01080 /** 01081 \par Description: 01082 Lookup protocol by name 01083 (Std. UNIX; see AUP2 Sec. 8.8.3) 01084 \par Headers: 01085 netdb.h 01086 \return pointer to protoent or NULL if not found (errno not set) 01087 */ 01088 struct protoent *getprotobyname( 01089 const char *name /**< protocol name*/ 01090 ); 01091 /** 01092 \par Description: 01093 Lookup protocol by number 01094 (Std. UNIX; see AUP2 Sec. 8.8.3) 01095 \par Headers: 01096 netdb.h 01097 \return pointer to protoent or NULL if not found (errno not set) 01098 */ 01099 struct protoent *getprotobynumber( 01100 int proto /**< protocol number*/ 01101 ); 01102 /** 01103 \par Description: 01104 Get protocol-database entry 01105 (Std. UNIX; see AUP2 Sec. 8.8.3) 01106 \par Headers: 01107 netdb.h 01108 \return pointer to protoent or NULL end of database (errno not set) 01109 */ 01110 struct protoent *getprotoent(void); 01111 /** 01112 \par Description: 01113 Get password-file entry 01114 (Std. UNIX; see AUP2 Sec. 3.5.2) 01115 \par Headers: 01116 pwd.h 01117 \return pointer to structure or NULL on error (sets errno) 01118 */ 01119 struct passwd *getpwuid( 01120 uid_t uid /**< user ID*/ 01121 ); 01122 /** 01123 \par Description: 01124 Get resource limits 01125 (Std. UNIX; see AUP2 Sec. 5.16) 01126 \par Headers: 01127 sys/resource.h 01128 \return 0 on success or -1 on error (sets errno) 01129 */ 01130 int getrlimit( 01131 int resource, /**< resource*/ 01132 struct rlimit *rlp /**< returned limits*/ 01133 ); 01134 /** 01135 \par Description: 01136 Get resource usage 01137 (Std. UNIX; see AUP2 Sec. 5.16) 01138 \par Headers: 01139 sys/resource.h 01140 \return 0 on success or -1 on error (sets errno) 01141 */ 01142 int getrusage( 01143 int who, /**< RUSAGE_SELF or RUSAGE_CHILDREN*/ 01144 struct rusage *r_usage /**< returned usage information*/ 01145 ); 01146 /** 01147 \par Description: 01148 Lookup service by name 01149 (Std. UNIX; see AUP2 Sec. 8.8.4) 01150 \par Headers: 01151 netdb.h 01152 \return pointer to protoent or NULL if not found (errno not set) 01153 */ 01154 struct servent *getservbyname( 01155 const char *name, /**< */ 01156 const char *proto /**< */ 01157 ); 01158 /** 01159 \par Description: 01160 Lookup service by port 01161 (Std. UNIX; see AUP2 Sec. 8.8.4) 01162 \par Headers: 01163 netdb.h 01164 \return pointer to protoent or NULL if not found (errno not set) 01165 */ 01166 struct servent *getservbyport( 01167 int port, /**< */ 01168 const char *proto /**< */ 01169 ); 01170 /** 01171 \par Description: 01172 Get service-database entry 01173 (Std. UNIX; see AUP2 Sec. 8.8.4) 01174 \par Headers: 01175 netdb.h 01176 \return pointer to servent or NULL end of database (errno not set) 01177 */ 01178 struct servent *getservent(void); 01179 /** 01180 \par Description: 01181 Get session ID 01182 (Std. UNIX; see AUP2 Sec. 4.3.2) 01183 \par Headers: 01184 unistd.h 01185 \return session ID or -1 on error (sets errno) 01186 */ 01187 pid_t getsid( 01188 pid_t pid /**< process ID or 0 for calling process*/ 01189 ); 01190 /** 01191 \par Description: 01192 Get socket address 01193 (Std. UNIX; see AUP2 Sec. 8.9.2) 01194 \par Headers: 01195 sys/socket.h 01196 \return 0 on success or -1 on error (sets errno) 01197 */ 01198 int getsockname( 01199 int socket_fd, /**< socket file descriptor*/ 01200 struct sockaddr *sa, /**< socket address*/ 01201 socklen_t *sa_len /**< address length*/ 01202 ); 01203 /** 01204 \par Description: 01205 Get the socket options 01206 (Std. UNIX; see AUP2 Sec. 8.3) 01207 \par Headers: 01208 sys/socket.h 01209 \return 0 on success or -1 on error (sets errno) 01210 */ 01211 int getsockopt( 01212 int socket, /**< socket*/ 01213 int level, /**< level to be accessed*/ 01214 int option, /**< option to set*/ 01215 const void *value, /**< value to set*/ 01216 socklen_t *value_len /**< length of value*/ 01217 ); 01218 /** 01219 \par Description: 01220 Get current date and time as timeval 01221 (Std. UNIX; see AUP2 Sec. 1.7.1) 01222 \par Headers: 01223 sys/time.h 01224 \return 0 on success or -1 (maybe) on error (may set errno) 01225 */ 01226 int gettimeofday( 01227 struct timeval *tvalbuf, /**< returned time*/ 01228 void *dummy /**< always NULL*/ 01229 ); 01230 /** 01231 \par Description: 01232 Get real user ID 01233 (Std. UNIX; see AUP2 Sec. 5.11) 01234 \par Headers: 01235 unistd.h 01236 \return user ID (no error return) 01237 */ 01238 uid_t getuid(void); 01239 /** 01240 \par Description: 01241 Convert time_t to UTC broken-down time 01242 (Std. UNIX; see AUP2 Sec. 1.7.1) 01243 \par Headers: 01244 time.h 01245 \return broken-down time (no error return) 01246 */ 01247 struct tm *gmtime( 01248 const time_t *t /**< time*/ 01249 ); 01250 /** 01251 \par Description: 01252 Get access to slave side of pty 01253 (Std. UNIX; see AUP2 Sec. 4.10.1) 01254 \par Headers: 01255 stdlib.h 01256 \return 0 on success or -1 on error (sets errno) 01257 */ 01258 int grantpt( 01259 int fd /**< file descriptor*/ 01260 ); 01261 /** 01262 \par Description: 01263 Convert 32-bit value from host to network byte order 01264 (Std. UNIX; see AUP2 Sec. 8.1.4) 01265 \par Headers: 01266 arpa/inet.h 01267 \return number in network byte order (no error return) 01268 */ 01269 uint32_t htonl( 01270 uint32_t hostnum /**< 32-bit number in host byte order*/ 01271 ); 01272 /** 01273 \par Description: 01274 Convert 16-bit value from host to network byte order 01275 (Std. UNIX; see AUP2 Sec. 8.1.4) 01276 \par Headers: 01277 arpa/inet.h 01278 \return number in network byte order (no error return) 01279 */ 01280 uint16_t htons( 01281 uint16_t hostnum /**< 16-bit number in host byte order*/ 01282 ); 01283 /** 01284 \par Description: 01285 Free array allocated by if_nameindex 01286 (Std. UNIX; see AUP2 Sec. 8.8.5) 01287 \par Headers: 01288 net/if.h 01289 */ 01290 void if_freenameindex( 01291 struct if_nameindex *ptr /**< pointer to array*/ 01292 ); 01293 /** 01294 \par Description: 01295 Map network interface index to name 01296 (Std. UNIX; see AUP2 Sec. 8.8.5) 01297 \par Headers: 01298 net/if.h 01299 \return name or NULL on error (sets errno) 01300 */ 01301 char *if_indextoname( 01302 unsigned ifindex, /**< interface index*/ 01303 char *ifname /**< interface name*/ 01304 ); 01305 /** 01306 \par Description: 01307 Get all network interface names and indexes 01308 (Std. UNIX; see AUP2 Sec. 8.8.5) 01309 \par Headers: 01310 net/if.h 01311 \return array or NULL on error (sets errno) 01312 */ 01313 struct if_nameindex *if_nameindex(void); 01314 /** 01315 \par Description: 01316 Map network interface name to index 01317 (Std. UNIX; see AUP2 Sec. 8.8.5) 01318 \par Headers: 01319 net/if.h 01320 \return index or 0 on error (errno not set) 01321 */ 01322 unsigned if_nametoindex( 01323 const char *ifname /**< interface name*/ 01324 ); 01325 /** 01326 \par Description: 01327 Convert dotted IPv4 address string to integer 01328 (Std. UNIX; see AUP2 Sec. 8.2.3) 01329 \par Headers: 01330 arpa/inet.h 01331 \return IP address or (in_addr_t)-1 on error (errno not set) 01332 */ 01333 in_addr_t inet_addr( 01334 const char *cp /**< dotted IP address*/ 01335 ); 01336 /** 01337 \par Description: 01338 Convert integer IPv4 address to dotted string 01339 (Std. UNIX; see AUP2 Sec. 8.2.3) 01340 \par Headers: 01341 arpa/inet.h 01342 \return string (no error return) 01343 */ 01344 char *inet_ntoa( 01345 struct in_addr in /**< integer address*/ 01346 ); 01347 /** 01348 \par Description: 01349 Convert IPv4 or IPv6 binary addresses to string 01350 (Std. UNIX; see AUP2 Sec. 8.9.5) 01351 \par Headers: 01352 arpa/inet.h 01353 \return string or NULL on error (sets errno) 01354 */ 01355 const char *inet_ntop( 01356 int domain, /**< AF_INET or AF_INET6*/ 01357 const void *src, /**< pointer to binary address (input)*/ 01358 char *dst, /**< string (output)*/ 01359 socklen_t dst_len /**< length of dst buffer*/ 01360 ); 01361 /** 01362 \par Description: 01363 Convert IPv4 or IPv6 string addresses to binary 01364 (Std. UNIX; see AUP2 Sec. 8.9.5) 01365 \par Headers: 01366 arpa/inet.h 01367 \return 1 on success, 0 on invalid string, or -1 on error (sets errno) 01368 */ 01369 int inet_pton( 01370 int domain, /**< AF_INET or AF_INET6*/ 01371 const char *src, /**< string (input)*/ 01372 void *dst /**< buffer for binary address (output)*/ 01373 ); 01374 /** 01375 \par Description: 01376 Control a character device 01377 (Std. UNIX; see AUP2 Sec. 4.4) 01378 \par Headers: 01379 ... 01380 \return -1 on error (sets errno); some other value on success 01381 */ 01382 int ioctl( 01383 int fd, /**< file descriptor*/ 01384 int req, /**< request*/ 01385 ... /**< arguments that depend on request*/ 01386 ); 01387 /** 01388 \par Description: 01389 Test for a terminal 01390 (Std. UNIX; see AUP2 Sec. 4.7) 01391 \par Headers: 01392 unistd.h 01393 \return 1 if a terminal and 0 if not (may set errno on 0 return) 01394 */ 01395 int isatty( 01396 int fd /**< file descriptor*/ 01397 ); 01398 /** 01399 \par Description: 01400 Generate signal for processes 01401 (Std. UNIX; see AUP2 Sec. 9.1.9) 01402 \par Headers: 01403 signal.h 01404 \return 0 on success or -1 on error (sets errno) 01405 */ 01406 int kill( 01407 pid_t pid, /**< process ID or other specification*/ 01408 int signum /**< signal*/ 01409 ); 01410 /** 01411 \par Description: 01412 Generate signal for process group 01413 (Std. UNIX; see AUP2 Sec. 9.1.9) 01414 \par Headers: 01415 signal.h 01416 \return 0 on success or -1 on error (sets errno) 01417 */ 01418 int killpg( 01419 pid_t pgrp, /**< process-group ID*/ 01420 int signum /**< signal*/ 01421 ); 01422 /** 01423 \par Description: 01424 Change owner and group of symbolic link by path 01425 (Std. UNIX; see AUP2 Sec. 3.7.2) 01426 \par Headers: 01427 unistd.h 01428 \return 0 on success or -1 on error (sets errno) 01429 */ 01430 int lchown( 01431 const char *path, /**< pathname*/ 01432 uid_t uid, /**< user ID*/ 01433 gid_t gid /**< group ID*/ 01434 ); 01435 /** 01436 \par Description: 01437 Create hard link 01438 (Std. UNIX; see AUP2 Sec. 3.3.1) 01439 \par Headers: 01440 unistd.h 01441 \return 0 on success or -1 on error (sets errno) 01442 */ 01443 int link( 01444 const char *oldpath, /**< old pathname*/ 01445 const char *newpath /**< new pathname*/ 01446 ); 01447 /** 01448 \par Description: 01449 List-directed I/O 01450 (Std. UNIX; see AUP2 Sec. 3.9.9) 01451 \par Headers: 01452 aio.h 01453 \return 0 on success or -1 on error (sets errno) 01454 */ 01455 int lio_listio( 01456 int mode, /**< LIO_WAIT or LIO_NOWAIT*/ 01457 struct aiocb *const list[], /**< array of control blocks*/ 01458 int cbcnt, /**< number of elements in array*/ 01459 struct sigevent *sig /**< NULL or signal to generate*/ 01460 ); 01461 /** 01462 \par Description: 01463 Mark socket for accepting and set queue limit 01464 (Std. UNIX; see AUP2 Sec. 8.1.2) 01465 \par Headers: 01466 sys/socket.h 01467 \return 0 on success or -1 on error (sets errno) 01468 */ 01469 int listen( 01470 int socket_fd, /**< socket file descriptor*/ 01471 int backlog /**< maximum connection queue length*/ 01472 ); 01473 /** 01474 \par Description: 01475 Convert time_t to local broken-down time 01476 (Std. UNIX; see AUP2 Sec. 1.7.1) 01477 \par Headers: 01478 time.h 01479 \return broken-down time (no error return) 01480 */ 01481 struct tm *localtime( 01482 const time_t *t /**< time*/ 01483 ); 01484 /** 01485 \par Description: 01486 Lock section of file 01487 (Std. UNIX; see AUP2 Sec. 7.11.3) 01488 \par Headers: 01489 unistd.h 01490 \return 0 on success or -1 on error (sets errno) 01491 */ 01492 int lockf( 01493 int fd, /**< file descriptor*/ 01494 int op, /**< operation*/ 01495 off_t len /**< length of section*/ 01496 ); 01497 /** 01498 \par Description: 01499 Jump to jump point 01500 (Std. UNIX; see AUP2 Sec. 9.6) 01501 \par Headers: 01502 setjmp.h 01503 */ 01504 void longjmp( 01505 jmp_buf loc_info, /**< saved location information*/ 01506 int val /**< value for setjmp to return*/ 01507 ); 01508 /** 01509 \par Description: 01510 Set and get file offset 01511 (Std. UNIX; see AUP2 Sec. 2.13) 01512 \par Headers: 01513 unistd.h 01514 \return new file offset or -1 on error (sets errno) 01515 */ 01516 off_t lseek( 01517 int fd, /**< file descriptor*/ 01518 off_t pos, /**< position*/ 01519 int whence /**< interpretation*/ 01520 ); 01521 /** 01522 \par Description: 01523 Get file info by path without following symbolic link 01524 (Std. UNIX; see AUP2 Sec. 3.5.1) 01525 \par Headers: 01526 sys/stat.h 01527 \return 0 on success or -1 on error (sets errno) 01528 */ 01529 int lstat( 01530 const char *path, /**< pathname*/ 01531 struct stat *buf /**< returned information*/ 01532 ); 01533 /** 01534 \par Description: 01535 Make directory 01536 (Std. UNIX; see AUP2 Sec. 3.6.3) 01537 \par Headers: 01538 sys/stat.h 01539 \return 0 on success or -1 on error (sets errno) 01540 */ 01541 int mkdir( 01542 const char *path, /**< pathname*/ 01543 mode_t perms /**< permissions*/ 01544 ); 01545 /** 01546 \par Description: 01547 Make a FIFO 01548 (Std. UNIX; see AUP2 Sec. 7.2.1) 01549 \par Headers: 01550 sys/stat.h 01551 \return 0 on success or -1 on error (sets errno) 01552 */ 01553 int mkfifo( 01554 const char *path, /**< pathname*/ 01555 mode_t perms /**< permissions*/ 01556 ); 01557 /** 01558 \par Description: 01559 Make file 01560 (Std. UNIX; see AUP2 Sec. 3.8.2) 01561 \par Headers: 01562 sys/stat.h 01563 \return 0 on success or -1 on error (sets errno) 01564 */ 01565 int mknod( 01566 const char *path, /**< pathname*/ 01567 mode_t perms, /**< mode*/ 01568 dev_t dev /**< device-ID*/ 01569 ); 01570 /** 01571 \par Description: 01572 Create and open file with unique name 01573 (Std. UNIX; see AUP2 Sec. 2.7) 01574 \par Headers: 01575 stdlib.h 01576 \return open file descriptor or -1 on error (may not set errno) 01577 */ 01578 int mkstemp( 01579 char *template /**< template for file name*/ 01580 ); 01581 /** 01582 \par Description: 01583 Convert local broken-down time to time_t 01584 (Std. UNIX; see AUP2 Sec. 1.7.1) 01585 \par Headers: 01586 time.h 01587 \return time or -1 on error (errno not set) 01588 */ 01589 time_t mktime( 01590 struct tm *tmbuf /**< broken-down time*/ 01591 ); 01592 /** 01593 \par Description: 01594 Map pages of memory 01595 (Std. UNIX; see AUP2 Sec. 7.14.1) 01596 \par Headers: 01597 sys/mman.h 01598 \return pointer to segment or MAP_FAILED on error (sets errno) 01599 */ 01600 void *mmap( 01601 void *addr, /**< desired address or NULL*/ 01602 size_t len, /**< length of segment*/ 01603 int prot, /**< protection (see below)*/ 01604 int flags, /**< flags*/ 01605 int fd, /**< file descriptor*/ 01606 off_t off /**< offset in file or shared-memory object*/ 01607 ); 01608 /** 01609 \par Description: 01610 Mount file system (non-standard) 01611 (Std. UNIX; see AUP2 Sec. 3.2.4) 01612 \par Headers: 01613 sys/mount.h 01614 \return 0 on success or -1 on error (sets errno) 01615 */ 01616 int mount( 01617 const char *source, /**< device*/ 01618 const char *target, /**< directory*/ 01619 const char *type, /**< type (e.g., ext2)*/ 01620 unsigned long flags, /**< mount flags (e.g., MS_RDONLY)*/ 01621 const void *data /**< file-system-dependent data*/ 01622 ); 01623 /** 01624 \par Description: 01625 Close message queue 01626 (Std. UNIX; see AUP2 Sec. 7.7.1) 01627 \par Headers: 01628 mqueue.h 01629 \return zero on success or -1 on error (sets errno) 01630 */ 01631 int mq_close( 01632 mqd_t mqd /**< message-queue descriptor*/ 01633 ); 01634 /** 01635 \par Description: 01636 Get message-queue attributes 01637 (Std. UNIX; see AUP2 Sec. 7.7.1) 01638 \par Headers: 01639 mqueue.h 01640 \return 0 on success or -1 on error (sets errno) 01641 */ 01642 int mq_getattr( 01643 mqd_t mqd, /**< message-queue descriptor*/ 01644 struct mq_attr *attr /**< attributes*/ 01645 ); 01646 /** 01647 \par Description: 01648 Register or unregister for message notification 01649 (Std. UNIX; see AUP2 Sec. 7.7.1) 01650 \par Headers: 01651 mqueue.h 01652 \return 0 on success or -1 on error (sets errno) 01653 */ 01654 int mq_notify( 01655 mqd_t mqd, /**< message-queue descriptor*/ 01656 const struct sigevent *ep /**< notification*/ 01657 ); 01658 /** 01659 \par Description: 01660 Open message-queue 01661 (Std. UNIX; see AUP2 Sec. 7.7.1) 01662 <p>mqd_t mq_open( 01663 <br>const char *name, POSIX IPC name 01664 <br>int flags, flags (including O_CREAT) 01665 <br>mode_t perms, permissions 01666 <br>struct mq_attr *attr attributes (or NULL) 01667 <br>); 01668 \par Headers: 01669 mqueue.h 01670 \return message-queue descriptor or -1 on error (sets errno) 01671 */ 01672 mqd_t mq_open( 01673 const char *name, /**< POSIX IPC name*/ 01674 int flags /**< flags (excluding O_CREAT)*/ 01675 ); 01676 /** 01677 \par Description: 01678 Receive message 01679 (Std. UNIX; see AUP2 Sec. 7.7.1) 01680 \par Headers: 01681 mqueue.h 01682 \return size of message or -1 on error (sets errno) 01683 */ 01684 ssize_t mq_receive( 01685 mqd_t mqd, /**< message-queue descriptor*/ 01686 char *msg, /**< message buffer*/ 01687 size_t msgsize, /**< size of message buffer*/ 01688 unsigned *priorityp /**< returned priority or NULL*/ 01689 ); 01690 /** 01691 \par Description: 01692 Send message 01693 (Std. UNIX; see AUP2 Sec. 7.7.1) 01694 \par Headers: 01695 mqueue.h 01696 \return 0 on success or -1 on error (sets errno) 01697 */ 01698 int mq_send( 01699 mqd_t mqd, /**< message-queue descriptor*/ 01700 const char *msg, /**< message*/ 01701 size_t msgsize, /**< size of message*/ 01702 unsigned priority /**< priority*/ 01703 ); 01704 /** 01705 \par Description: 01706 Set message queue attributes (<b>REALTIME</b>) 01707 (Std. UNIX; see AUP2 Sec. 7.7.1) 01708 \par Headers: 01709 mqueue.h 01710 \return 0 on success or -1 on error (sets errno) 01711 */ 01712 int mq_setattr( 01713 mqd_t mqd, /**< message-queue descriptor*/ 01714 const struct mq_attr *attr, /**< new attributes*/ 01715 struct mq_attr *oldattr /**< old attributes*/ 01716 ); 01717 /** 01718 \par Description: 01719 Receive message with timeout 01720 (Std. UNIX; see AUP2 Sec. 7.7.1) 01721 \par Headers: 01722 mqueue.h 01723 , mqueue.h 01724 , time.h 01725 \return size of message or -1 on error (sets errno) 01726 */ 01727 ssize_t mq_timedreceive( 01728 mqd_t mqd, /**< message-queue descriptor*/ 01729 char *msg, /**< message buffer*/ 01730 size_t msgsize, /**< size of message buffer*/ 01731 unsigned *priorityp /**< returned priority or NULL*/ 01732 const struct timespec *tmout /**< timeout*/ 01733 ); 01734 /** 01735 \par Description: 01736 Send message with timeout 01737 (Std. UNIX; see AUP2 Sec. 7.7.1) 01738 \par Headers: 01739 mqueue.h 01740 , mqueue.h 01741 , time.h 01742 \return 0 on success or -1 on error (sets errno) 01743 */ 01744 int mq_timedsend( 01745 mqd_t mqd, /**< message-queue descriptor*/ 01746 const char *msg, /**< message*/ 01747 size_t msgsize, /**< size of message*/ 01748 unsigned priority /**< priority*/ 01749 const struct timespec *tmout /**< timeout*/ 01750 ); 01751 /** 01752 \par Description: 01753 Remove message queue 01754 (Std. UNIX; see AUP2 Sec. 7.7.1) 01755 \par Headers: 01756 mqueue.h 01757 \return 0 on success or -1 on error (sets errno) 01758 */ 01759 int mq_unlink( 01760 const char *name /**< POSIX IPC name*/ 01761 ); 01762 /** 01763 \par Description: 01764 Control message queue 01765 (Std. UNIX; see AUP2 Sec. 7.5.1) 01766 \par Headers: 01767 sys/msg.h 01768 \return 0 on success or -1 on error (sets errno) 01769 */ 01770 int msgctl( 01771 int msqid, /**< identifier*/ 01772 int cmd, /**< command*/ 01773 struct msqid_ds *data /**< data for command*/ 01774 ); 01775 /** 01776 \par Description: 01777 Get message-queue identifier 01778 (Std. UNIX; see AUP2 Sec. 7.5.1) 01779 \par Headers: 01780 sys/msg.h 01781 \return identifier or -1 on error (sets errno) 01782 */ 01783 int msgget( 01784 key_t key, /**< key*/ 01785 int flags /**< creation flags*/ 01786 ); 01787 /** 01788 \par Description: 01789 Receive message 01790 (Std. UNIX; see AUP2 Sec. 7.5.1) 01791 \par Headers: 01792 sys/msg.h 01793 \return number of bytes placed in mtext or -1 on error (sets errno) 01794 */ 01795 ssize_t msgrcv( 01796 int msqid, /**< identifier*/ 01797 const void *msgp, /**< message*/ 01798 size_t mtextsize, /**< size of mtext buffer*/ 01799 long msgtype, /**< message type requested*/ 01800 int flags /**< flags*/ 01801 ); 01802 /** 01803 \par Description: 01804 Send message 01805 (Std. UNIX; see AUP2 Sec. 7.5.1) 01806 \par Headers: 01807 sys/msg.h 01808 \return 0 on success or -1 on error (sets errno) 01809 */ 01810 int msgsnd( 01811 int msqid, /**< identifier*/ 01812 const void *msgp, /**< message*/ 01813 size_t msgsize, /**< size of message*/ 01814 int flags /**< flags*/ 01815 ); 01816 /** 01817 \par Description: 01818 Unmap pages of memory 01819 (Std. UNIX; see AUP2 Sec. 7.14.1) 01820 \par Headers: 01821 sys/mman.h 01822 \return 0 on success or -1 on error (sets errno) 01823 */ 01824 int munmap( 01825 void *addr, /**< pointer to segment*/ 01826 size_t len /**< length of segment*/ 01827 ); 01828 /** 01829 \par Description: 01830 Suspend execution for nanoseconds or until signal 01831 (Std. UNIX; see AUP2 Sec. 9.7.3) 01832 \par Headers: 01833 time.h 01834 \return 0 on success or -1 on error (sets errno) 01835 */ 01836 int nanosleep( 01837 const struct timespec *nsecs, /**< nanoseconds to sleep*/ 01838 struct timespec *remain /**< remaining time*/ 01839 ); 01840 /** 01841 \par Description: 01842 Change nice value 01843 (Std. UNIX; see AUP2 Sec. 5.15) 01844 \par Headers: 01845 unistd.h 01846 \return old nice value - NZERO or -1 on error (sets errno) 01847 */ 01848 int nice( 01849 int incr /**< increment*/ 01850 ); 01851 /** 01852 \par Description: 01853 Convert 32-bit value from network to host byte order 01854 (Std. UNIX; see AUP2 Sec. 8.1.4) 01855 \par Headers: 01856 arpa/inet.h 01857 \return number in host byte order (no error return) 01858 */ 01859 uint32_t ntohl( 01860 uint32_t netnum /**< 32-bit number in network byte order*/ 01861 ); 01862 /** 01863 \par Description: 01864 Convert 16-bit value from network to host byte order 01865 (Std. UNIX; see AUP2 Sec. 8.1.4) 01866 \par Headers: 01867 arpa/inet.h 01868 \return number in host byte order (no error return) 01869 */ 01870 uint16_t ntohs( 01871 uint16_t netnum /**< 16-bit number in network byte order*/ 01872 ); 01873 /** 01874 \par Description: 01875 Open or create a file 01876 (Std. UNIX; see AUP2 Sec. 2.4) 01877 \par Headers: 01878 sys/stat.h 01879 , fcntl.h 01880 \return file descriptor or -1 on error (sets errno) 01881 */ 01882 int open( 01883 const char *path, /**< pathname*/ 01884 int flags, /**< flags*/ 01885 mode_t perms /**< permissions (when creating)*/ 01886 ); 01887 /** 01888 \par Description: 01889 Open directory 01890 (Std. UNIX; see AUP2 Sec. 3.6.1) 01891 \par Headers: 01892 dirent.h 01893 \return DIR pointer or NULL on error (sets errno) 01894 */ 01895 DIR *opendir( 01896 const char *path /**< directory pathname*/ 01897 ); 01898 /** 01899 \par Description: 01900 Get system option or limit by path 01901 (Std. UNIX; see AUP2 Sec. 1.5.6) 01902 \par Headers: 01903 unistd.h 01904 \return option/limit value or -1 (sets errno on error) 01905 <