diff options
author | ajs <ajs> | 2005-02-16 00:45:37 +0000 |
---|---|---|
committer | ajs <ajs> | 2005-02-16 00:45:37 +0000 |
commit | beedd03aaf4a0b2bd9cc0ea73bb99cc9ce2b7b78 (patch) | |
tree | cd9ac7917a102ea4c9c1f662b43019c1416245da /lib/network.h | |
parent | b72d185dc7d3764a42c030ea2196180a629eb82d (diff) | |
download | quagga-beedd03aaf4a0b2bd9cc0ea73bb99cc9ce2b7b78.tar.bz2 quagga-beedd03aaf4a0b2bd9cc0ea73bb99cc9ce2b7b78.tar.xz |
2005-02-15 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* network.h: Declare new function set_nonblocking. Indicate that
readn and writen are deprecated.
* network.c: (set_nonblocking) New function to make a file descriptor
non-blocking, since it seems silly to have fcntl calls sprinkled
throughout the code.
Diffstat (limited to 'lib/network.h')
-rw-r--r-- | lib/network.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/network.h b/lib/network.h index f0a7d4df..589b80e9 100644 --- a/lib/network.h +++ b/lib/network.h @@ -23,7 +23,14 @@ #ifndef _ZEBRA_NETWORK_H #define _ZEBRA_NETWORK_H +/* Both readn and writen are deprecated and will be removed. They are not + suitable for use with non-blocking file descriptors. + */ int readn (int, u_char *, int); int writen (int, const u_char *, int); +/* Set the file descriptor to use non-blocking I/O. Returns 0 for success, + -1 on error. */ +extern int set_nonblocking(int fd); + #endif /* _ZEBRA_NETWORK_H */ |