Diomidis Spinellis
55e24f6e77
Document an additional error return value. The connect(2) call can also
return EACCES on non-Unix domain sockets as demonstrated by the
following program:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
int
main(int argc, char *argv[])
{
struct sockaddr_in rem_addr;
int sock;
if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
perror("socket");
exit(1);
}
bzero((char *)&rem_addr, sizeof(rem_addr));
rem_addr.sin_family = AF_INET;
rem_addr.sin_addr.s_addr = INADDR_NONE;
rem_addr.sin_port = htons(10000);
if (connect(sock, (struct sockaddr *)&rem_addr,
sizeof(rem_addr)) < 0) {
perror("connect");
exit(1);
}
}
The call chain returning this value is probably:
kern/uipc_syscalls.c:connect
kern/uipc_socket.c:soconnect
netinet/tcp_usrreq.c:tcp_usr_connect
netinet/tcp_output.c:tcp_output
netinet/ip_output.c:ip_output
Reviewed by: schweikh (mentor)
MFC after: 2 weeks
2003-07-23 22:00:08 +00:00
..
2002-03-22 21:53:29 +00:00
2002-12-18 13:33:04 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2003-01-13 10:37:11 +00:00
2003-01-13 10:37:11 +00:00
2003-01-14 02:37:06 +00:00
2003-01-13 10:37:11 +00:00
2003-01-13 10:37:11 +00:00
2002-12-18 09:22:32 +00:00
2003-01-13 10:37:11 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2003-01-31 21:19:22 +00:00
2003-02-23 10:20:23 +00:00
2003-06-13 22:41:12 +00:00
2003-07-23 22:00:08 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2003-06-04 04:00:26 +00:00
2003-02-05 13:36:13 +00:00
2002-12-27 12:15:40 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-03-22 21:53:29 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2003-06-08 10:01:52 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2003-06-08 10:01:52 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2003-02-18 22:54:42 +00:00
2003-07-15 12:23:12 +00:00
2002-12-18 09:22:32 +00:00
2003-05-22 13:02:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2002-12-18 09:22:32 +00:00
2003-06-03 12:29:34 +00:00
2002-12-18 09:22:32 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2003-06-17 09:36:47 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2003-06-01 19:19:59 +00:00
2003-01-17 19:25:27 +00:00
2002-12-19 09:40:28 +00:00
2002-03-22 21:53:29 +00:00
2003-03-31 21:09:57 +00:00
2003-04-17 18:39:30 +00:00
2003-02-23 01:47:49 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-24 16:52:31 +00:00
2002-12-22 03:20:16 +00:00
2002-12-18 09:22:32 +00:00
2002-12-18 09:22:32 +00:00
2002-12-18 09:22:32 +00:00
2003-07-01 17:40:23 +00:00
2003-02-23 01:47:49 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 21:48:43 +00:00
2003-02-05 13:36:13 +00:00
2003-06-20 21:14:59 +00:00
2003-06-21 20:27:54 +00:00
2003-03-24 16:07:19 +00:00
2003-01-07 05:06:27 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-03-22 21:53:29 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-03-22 21:53:29 +00:00
2002-12-19 09:40:28 +00:00
2003-01-12 15:18:47 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-23 16:04:51 +00:00
2002-12-19 09:40:28 +00:00
2003-04-27 21:01:34 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2003-06-08 10:11:13 +00:00
2003-06-08 10:11:13 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2003-02-16 17:29:11 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2003-01-25 21:27:37 +00:00
2002-12-19 09:40:28 +00:00
2003-05-22 13:02:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2002-12-18 09:22:32 +00:00
2002-12-18 09:22:32 +00:00
2003-01-07 05:06:27 +00:00
2001-10-01 16:09:29 +00:00
2003-01-25 21:33:05 +00:00
2002-12-19 09:33:34 +00:00
2003-01-25 21:33:05 +00:00
2002-12-18 09:22:32 +00:00
2003-03-24 16:07:19 +00:00
2002-12-18 09:22:32 +00:00
2003-06-24 15:41:19 +00:00
2003-06-24 15:41:19 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2003-06-24 15:41:19 +00:00
2003-03-24 16:05:24 +00:00
2003-03-24 16:07:19 +00:00
2002-12-18 09:22:32 +00:00
2003-05-22 13:02:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-03-22 21:53:29 +00:00
2002-12-18 09:22:32 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2002-12-19 09:40:28 +00:00
2003-06-27 13:41:29 +00:00
2003-04-27 21:01:34 +00:00
2002-12-19 09:40:28 +00:00
2003-01-12 15:18:47 +00:00