summaryrefslogtreecommitdiff
path: root/include/sys
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-09-17 17:06:49 +0000
committerUlrich Drepper <drepper@redhat.com>2002-09-17 17:06:49 +0000
commit91d293772bcde2865d09f706bdd21c83ccedc365 (patch)
tree940e0ce9f0d89053b4bcfbeddde50352214dae06 /include/sys
parent2ef30b3d7f0ed0e794d1988c0c7eddda59d8886c (diff)
Update.
2002-09-17 Ulrich Drepper <drepper@redhat.com> * include/sys/socket.h: Declare __libc_send, __libc_recv, __libc_sendto, __libc_sendmsg, __libc_recvmsg, and __libc_accept. * include/unistd.h: Declare __libc_fork.
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/socket.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/sys/socket.h b/include/sys/socket.h
index 3aaaab5980..f943e9b80b 100644
--- a/include/sys/socket.h
+++ b/include/sys/socket.h
@@ -26,9 +26,15 @@ extern int __getpeername (int __fd, __SOCKADDR_ARG __addr,
socklen_t *__len) attribute_hidden;
/* Send N bytes of BUF to socket FD. Returns the number sent or -1. */
+extern ssize_t __libc_send (int __fd, __const void *__buf, size_t __n,
+ int __flags);
extern ssize_t __send (int __fd, __const void *__buf, size_t __n, int __flags);
libc_hidden_proto (__send)
+/* Read N bytes into BUF from socket FD.
+ Returns the number read or -1 for errors. */
+extern ssize_t __libc_recv (int __fd, void *__buf, size_t __n, int __flags);
+
/* Send N bytes of BUF on socket FD to peer at address ADDR (which is
ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */
extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n,
@@ -47,12 +53,17 @@ extern ssize_t __libc_recvfrom (int __fd, void *__restrict __buf, size_t __n,
For connectionless socket types, just set the default address to send to
and the only address from which to accept transmissions.
Return 0 on success, -1 for errors. */
+extern int __libc_connect (int __fd, __CONST_SOCKADDR_ARG __addr,
+ socklen_t __len);
extern int __connect (int __fd, __CONST_SOCKADDR_ARG __addr, socklen_t __len);
extern int __connect_internal (int __fd, __CONST_SOCKADDR_ARG __addr,
socklen_t __len) attribute_hidden;
/* Send N bytes of BUF on socket FD to peer at address ADDR (which is
ADDR_LEN bytes long). Returns the number sent, or -1 for errors. */
+extern ssize_t __libc_sendto (int __fd, __const void *__buf, size_t __n,
+ int __flags, __CONST_SOCKADDR_ARG __addr,
+ socklen_t __addr_len);
extern ssize_t __sendto (int __fd, __const void *__buf, size_t __n,
int __flags, __CONST_SOCKADDR_ARG __addr,
socklen_t __addr_len) attribute_hidden;
@@ -67,11 +78,15 @@ extern ssize_t __recvfrom (int __fd, void *__restrict __buf, size_t __n,
/* Send a message described MESSAGE on socket FD.
Returns the number of bytes sent, or -1 for errors. */
+extern ssize_t __libc_sendmsg (int __fd, __const struct msghdr *__message,
+ int __flags);
extern ssize_t __sendmsg (int __fd, __const struct msghdr *__message,
int __flags) attribute_hidden;
/* Receive a message as described by MESSAGE from socket FD.
Returns the number of bytes read or -1 for errors. */
+extern ssize_t __libc_recvmsg (int __fd, struct msghdr *__message,
+ int __flags);
extern ssize_t __recvmsg (int __fd, struct msghdr *__message,
int __flags) attribute_hidden;
@@ -95,6 +110,15 @@ extern int __bind (int __fd, __CONST_SOCKADDR_ARG __addr,
Returns 0 on success, -1 for errors. */
extern int __listen (int __fd, int __n) attribute_hidden;
+/* Await a connection on socket FD.
+ When a connection arrives, open a new socket to communicate with it,
+ set *ADDR (which is *ADDR_LEN bytes long) to the address of the connecting
+ peer and *ADDR_LEN to the address's actual length, and return the
+ new socket's descriptor, or -1 for errors. */
+extern int __libc_accept (int __fd, __SOCKADDR_ARG __addr,
+ socklen_t *__restrict __addr_len)
+ __THROW;
+
/* Return the length of a `sockaddr' structure. */
#ifdef _HAVE_SA_LEN
# define SA_LEN(_x) (_x)->sa_len