summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1995-07-04 19:48:59 +0000
committerMiles Bader <miles@gnu.org>1995-07-04 19:48:59 +0000
commit64306845c712656ccf43a685c81b39365911d893 (patch)
tree6f19c4b54fcb5ae76aac7e11b3fe99f95552807e
parent4c64ca7411e656483799a687d50b3f79a2904c30 (diff)
Formerly socket.c.~5~
-rw-r--r--pflocal/socket.c25
1 files changed, 23 insertions, 2 deletions
diff --git a/pflocal/socket.c b/pflocal/socket.c
index 00907fbd..5dceb6fe 100644
--- a/pflocal/socket.c
+++ b/pflocal/socket.c
@@ -114,7 +114,7 @@ S_socket_connect (struct sock_user *user, struct addr *addr)
if (! user)
return EOPNOTSUPP;
- if (!addr)
+ if (! addr)
return EADDRNOTAVAIL;
err = addr_get_sock (addr, &peer);
@@ -129,7 +129,7 @@ S_socket_bind (struct sock_user *user, struct addr *addr)
{
if (! user)
return EOPNOTSUPP;
- if (!addr)
+ if (! addr)
return EADDRNOTAVAIL;
return sock_bind (user->sock, addr);
@@ -145,6 +145,27 @@ S_socket_shutdown (struct sock_user *user, int what)
| (what != 0 ? SOCK_SHUTDOWN_WRITE : 0));
return 0;
}
+
+error_t
+S_socket_name (struct sock_user *user,
+ mach_port_t *addr_port, mach_msg_type_name_t *addr_port_type)
+{
+ if (!user)
+ return EOPNOTSUPP;
+ *addr_port_type = MACH_MSG_MAKE_SEND;
+ return sock_get_addr_port (user->sock, &addr_port);
+}
+
+error_t
+S_socket_peername (struct sock_user *user,
+ mach_port_t *addr_port,
+ mach_msg_type_name_t *addr_port_type)
+{
+ if (!user)
+ return EOPNOTSUPP;
+ *addr_port_type = MACH_MSG_MAKE_SEND;
+ return sock_get_peer_addr_port (user->sock, &addr_port);
+}
/* Stubs for currently unsupported rpcs. */