summaryrefslogtreecommitdiff
path: root/pflocal/socket.c
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-07-03 18:46:53 +0000
committerMiles Bader <miles@gnu.org>1995-07-03 18:46:53 +0000
commitbac2914ea4d0fe0247ddf0bddad9d64bb930c96e (patch)
tree353530199db3cdb862910376be079da95d395bf5 /pflocal/socket.c
parentd00517a960164b76dd4e174df81157e397fcd909 (diff)
Formerly socket.c.~4~
Diffstat (limited to 'pflocal/socket.c')
-rw-r--r--pflocal/socket.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/pflocal/socket.c b/pflocal/socket.c
index 516bfbff..00907fbd 100644
--- a/pflocal/socket.c
+++ b/pflocal/socket.c
@@ -110,12 +110,29 @@ S_socket_listen (struct sock_user *user, int queue_limit)
error_t
S_socket_connect (struct sock_user *user, struct addr *addr)
{
+ struct sock *peer;
+
+ if (! user)
+ return EOPNOTSUPP;
+ if (!addr)
+ return EADDRNOTAVAIL;
+
+ err = addr_get_sock (addr, &peer);
+ if (err)
+ return err;
+
+ return sock_connect (user->sock, peer);
+}
+
+error_t
+S_socket_bind (struct sock_user *user, struct addr *addr)
+{
if (! user)
return EOPNOTSUPP;
if (!addr)
return EADDRNOTAVAIL;
-
+ return sock_bind (user->sock, addr);
}
error_t