PageRenderTime 155ms queryTime 40ms sortTime 0ms getByIdsTime 39ms findMatchingLines 16ms

100+ results results for 'socket source:Minix3' (155 ms)

Not the results you expected?
netdb.c git://git.minix3.org/minix | C | 0 lines
                    
37
                    
38#if LWIP_DNS && LWIP_SOCKET
                    
39
                    
247 * Translates the name of a service location (for example, a host name) and/or
                    
248 * a service name and returns a set of socket addresses and associated
                    
249 * information to be used in creating a socket with which to address the
                    
351
                    
352#endif /* LWIP_DNS && LWIP_SOCKET */
                    
353
                    
                
cpio.h git://git.minix3.org/minix | C Header | 0 lines
                    
51#define	C_ISLNK		0120000		/* Reserved for symbolic links */
                    
52#define	C_ISOCK		0140000		/* Reserved for sockets */
                    
53#define C_IFMT		0170000		/* type of file */
                    
                
base64.c git://git.minix3.org/minix | C | 0 lines
                    
57#include <sys/param.h>
                    
58#include <sys/socket.h>
                    
59
                    
                
tftp.c git://git.minix3.org/minix | C | 0 lines
                    
31 * Assumes:
                    
32 *  - socket descriptor (int) at open_file->f_devdata
                    
33 *  - server host IP in global servip
                    
                
select.c git://git.minix3.org/minix | C | 1167 lines
                    
195	 * "The pselect() and select() functions shall support regular files,
                    
196	 * terminal and pseudo-terminal devices, FIFOs, pipes, and sockets. The
                    
197	 * behavior of pselect() and select() on file descriptors that refer to
                    
200	 * In our case, terminal and pseudo-terminal devices are handled by the
                    
201	 * TTY major and sockets by either INET major (socket type AF_INET) or
                    
202	 * UDS major (socket type AF_UNIX). Additionally, we give other
                    
                
vfs.c git://git.minix3.org/minix | C | 2453 lines
                    
8#include <sys/resource.h>
                    
9#include <sys/socket.h>
                    
10#include <sys/un.h>
                    
                
rget.c git://git.minix3.org/minix | C | 0 lines
                    
21#include <net/gen/netdb.h>
                    
22#include <net/gen/socket.h>
                    
23#include <net/gen/tcp.h>
                    
28#else
                    
29#include <sys/socket.h>
                    
30#include <netinet/in.h>
                    
66	"Usage: %s [-lcio] [-h host] key [command [arg ...]]\n"
                    
67	"\t-l: Open TCP socket and listen (default for rput)\n"
                    
68	"\t-c: Connect to a remote TCP socket (default for rget)\n"
                    
174
                    
175	if ((s= socket(AF_INET, SOCK_STREAM, IPPROTO_TCP))<0) fatal("socket()");
                    
176
                    
176
                    
177	(void) setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (char *) &on,
                    
178								sizeof(on));
                    
                
netif.c git://git.minix3.org/minix | C | 0 lines
                    
48
                    
49struct iodesc sockets[SOPEN_MAX];
                    
50#ifdef NETIF_DEBUG
                    
274#endif
                    
275	return &sockets[sock];
                    
276}
                    
284
                    
285	/* find a free socket */
                    
286	for (fd = 0, s = sockets; fd < SOPEN_MAX; fd++, s++)
                    
317#endif
                    
318	netif_detach(sockets[sock].io_netif);
                    
319	sockets[sock].io_netif = (struct netif *)0;
                    
                
inet_pton.c git://git.minix3.org/minix | C | 0 lines
                    
33#include <sys/types.h>
                    
34#include <sys/socket.h>
                    
35#include <netinet/in.h>
                    
                
hostaddr.c git://git.minix3.org/minix | C | 0 lines
                    
31#include <net/gen/netdb.h>
                    
32#include <net/gen/socket.h>
                    
33#include <net/gen/nameser.h>
                    
                
rpc_soc.c git://git.minix3.org/minix | C | 0 lines
                    
55 * of RPC, where the only transports supported were tcp/ip and udp/ip.
                    
56 * Based on berkeley socket abstraction, now implemented on the top
                    
57 * of TLI/Streams
                    
62#include <sys/types.h>
                    
63#include <sys/socket.h>
                    
64#include <stdio.h>
                    
                
proto.h git://git.minix3.org/minix | C Header | 0 lines
                    
76_PROTOTYPE( int do_listen, (message *dev_m_in, message *dev_m_out)	);
                    
77_PROTOTYPE( int do_socket, (message *dev_m_in, message *dev_m_out)	);
                    
78_PROTOTYPE( int do_bind, (message *dev_m_in, message *dev_m_out)	);
                    
81_PROTOTYPE( int do_shutdown, (message *dev_m_in, message *dev_m_out)	);
                    
82_PROTOTYPE( int do_socketpair, (message *dev_m_in, message *dev_m_out)	);
                    
83_PROTOTYPE( int do_socketpair_old, (message *dev_m_in, message *dev_m_out)	);
                    
                
roken.h git://git.minix3.org/minix | C Header | 0 lines
                    
53#include <unistd.h>
                    
54#include <sys/socket.h>
                    
55#include <sys/uio.h>
                    
                
rthdr.c git://git.minix3.org/minix | C | 0 lines
                    
39#include <sys/types.h>
                    
40#include <sys/socket.h>
                    
41
                    
                
test48.c git://git.minix3.org/minix | C | 574 lines
                    
230	
                    
231	/* If socket type is non-zero, make sure we got what we wanted. Else
                    
232	 * any result is okay. */
                    
423		if (passhints) {
                    
424			/* Can't have conflicting socket types */
                    
425			if (services[j].socktype &&
                    
                
test56.c git://git.minix3.org/minix | C | 2648 lines
                    
6 * It also attempts to make sure all of the functions which handle
                    
7 * file/socket descriptors work correctly when given a socket
                    
8 * descriptor for a Unix domain socket. It also implicitly checks
                    
330
                    
331	rc = socketpair(PF_UNIX, SOCK_STREAM, 0, socket_vector);
                    
332	if (rc == -1) {
                    
335
                    
336	debug("Testing a simple read/write using sockets from socketpair()");
                    
337	memset(buf, '\0', sizeof(buf));
                    
368
                    
369	rc = socketpair(PF_UNIX, SOCK_STREAM, 0, socket_vector);
                    
370	if (!(rc == -1 && errno == EMFILE)) {
                    
377
                    
378	rc = socketpair(PF_UNIX, SOCK_STREAM, 4, socket_vector);
                    
379	if (!(rc == -1 && errno == EPROTONOSUPPORT)) {
                    
                
nonamed.c git://git.minix3.org/minix | C | 2309 lines
                    
39#include <net/gen/netdb.h>
                    
40#include <net/gen/socket.h>
                    
41#include <net/gen/tcp.h>
                    
                
host.c git://git.minix3.org/minix | C | 1533 lines
                    
36#include <net/gen/resolv.h>
                    
37#include <net/gen/socket.h>
                    
38#include <net/gen/tcp.h>
                    
46#include <netdb.h>
                    
47#include <sys/socket.h>
                    
48#include <netinet/in.h>
                    
                
fetch.c git://git.minix3.org/minix | C | 1146 lines
                    
41#endif
                    
42#if HAVE_SYS_SOCKET_H
                    
43#include <sys/socket.h>
                    
                
rcp.c git://git.minix3.org/minix | C | 851 lines
                    
118	 * files and seteuid root before doing rcmd so we can open
                    
119	 * the socket.
                    
120	 */
                    
                
getnameinfo.c git://git.minix3.org/minix | C | 639 lines
                    
56#include <sys/types.h>
                    
57#include <sys/socket.h>
                    
58#include <sys/un.h>
                    
                
common.c git://git.minix3.org/minix | C | 1053 lines
                    
40#include <sys/types.h>
                    
41#include <sys/socket.h>
                    
42#include <sys/time.h>
                    
248/*
                    
249 * Bind a socket to a specific local address
                    
250 */
                    
284
                    
285	/* look up host name and set up socket address structure */
                    
286	snprintf(pbuf, sizeof(pbuf), "%d", url->port);
                    
301	for (sd = -1, res = res0; res; sd = -1, res = res->ai_next) {
                    
302		if ((sd = socket(res->ai_family, res->ai_socktype,
                    
303			 res->ai_protocol)) == -1)
                    
                
tcp.c git://git.minix3.org/minix | C | 1207 lines
                    
50	int perr;
                    
51	struct socket * sock = (struct socket *) arg;
                    
52
                    
81
                    
82static int tcp_fill_new_socket(struct socket * sock, struct tcp_pcb * pcb)
                    
83{
                    
294{
                    
295	debug_tcp_print("socket num %ld", get_sock_num(sock));
                    
296
                    
326
                    
327static struct wbuf * wbuf_add(struct socket * sock, unsigned sz)
                    
328{
                    
606	int ret, enqueued = 0;
                    
607	struct socket * sock = (struct socket *) arg;
                    
608
                    
                
driver.c git://git.minix3.org/minix | C | 822 lines
                    
125		}
                    
126		devices[i].raw_socket = NULL;
                    
127	}
                    
289
                    
290int raw_socket_input(struct pbuf * pbuf, struct nic * nic)
                    
291{
                    
291{
                    
292	struct socket * sock;
                    
293	struct pbuf * pbuf_new;
                    
294
                    
295	if ((sock = nic->raw_socket) == NULL)
                    
296		return 0;
                    
297
                    
298	debug_print("socket num : %ld", get_sock_num(sock));
                    
299
                    
                
dev_uds.c git://git.minix3.org/minix | C | 1181 lines
                    
1/*
                    
2 * Unix Domain Sockets Implementation (PF_UNIX, PF_LOCAL)
                    
3 * This code handles requests generated by operations on /dev/uds
                    
21 *
                    
22 * The interface to unix domain sockets is similar to the
                    
23 * the interface to network sockets. There is a character
                    
83	/* mark this one as 'in use' so that it doesn't get assigned to
                    
84	 * another socket
                    
85	 */
                    
92
                    
93	/* set the socket owner */
                    
94	uds_fd_table[minor].owner = dev_m_in->USER_ENDPT;
                    
109
                    
110	/* the default for a new socket is to allow reading and writing.
                    
111	 * shutdown(2) will remove one or both flags.
                    
                
uds.c git://git.minix3.org/minix | C | 1604 lines
                    
11 *   do_listen:              handles the      listen(2) syscall.
                    
12 *   do_socket:              handles the      socket(2) syscall.
                    
13 *   do_bind:                handles the        bind(2) syscall.
                    
16 *   do_shutdown:            handles the    shutdown(2) syscall.
                    
17 *   do_socketpair:          handles the  socketpair(2) syscall.
                    
18 *   do_getsockopt_sotype:   handles the  getsockopt(2) syscall.
                    
55
                    
56/* check the permissions of a socket file */
                    
57static int check_perms(int minor, struct sockaddr_un *addr)
                    
265
                    
266	/* Set the address of both sockets */
                    
267	memcpy(&(uds_fd_table[minorx].addr), addr, sizeof(struct sockaddr_un));
                    
299	if (uds_fd_table[minor].type != -1) {
                    
300		/* this IOCTL must be called on a 'fresh' socket */
                    
301		return EINVAL;
                    
                
select.c git://git.minix3.org/minix | C | 1073 lines
                    
183	 * "The pselect() and select() functions shall support regular files,
                    
184	 * terminal and pseudo-terminal devices, FIFOs, pipes, and sockets. The
                    
185	 * behavior of pselect() and select() on file descriptors that refer to
                    
188	 * In our case, terminal and pseudo-terminal devices are handled by the
                    
189	 * TTY major and sockets by either INET major (socket type AF_INET) or
                    
190	 * PFS major (socket type AF_UNIX). PFS acts as an FS when it handles
                    
190	 * PFS major (socket type AF_UNIX). PFS acts as an FS when it handles
                    
191	 * pipes and as a driver when it handles sockets. Additionally, we
                    
192	 * support select on the LOG major to handle kernel logging, which is
                    
                
MAKEDEV.sh git://git.minix3.org/minix | Shell | 294 lines
                    
256    uds)
                    
257	# unix domain sockets device
                    
258	$e mknod uds c 18 0;
                    
                
netdate.c git://git.minix3.org/minix | C | 0 lines
                    
42#include <sys/time.h>
                    
43#include <sys/socket.h>
                    
44
                    
99	dest.sin_addr.s_addr = htonl(INADDR_ANY);
                    
100	s = socket(AF_INET, SOCK_DGRAM, 0);
                    
101	if (s == -1) {
                    
150		len = sizeof(error);
                    
151		if (getsockopt(s, SOL_SOCKET, SO_ERROR, &error, &len) == -1) {
                    
152			warn("getsockopt");
                    
                
ti1225.c git://git.minix3.org/minix | C | 435 lines
                    
252	int devind, vcc_5v, vcc_3v, vcc_Xv, vcc_Yv,
                    
253		socket_5v, socket_3v, socket_Xv, socket_Yv;
                    
254	spin_t spin;
                    
324	}
                    
325	socket_5v= !!(csr_present & CP_5VSOCKET);
                    
326	socket_3v= !!(csr_present & CP_3VSOCKET);
                    
327	socket_Xv= !!(csr_present & CP_XVSOCKET);
                    
328	socket_Yv= !!(csr_present & CP_YVSOCKET);
                    
329	if (debug)
                    
330	{
                    
331		printf("do_int: socket supports:%s%s%s%s\n",
                    
332			socket_5v ? " 5V" : "", socket_3v ? " 3V" : "",
                    
332			socket_5v ? " 5V" : "", socket_3v ? " 3V" : "",
                    
333			socket_Xv ? " X.X V" : "", socket_Yv ? " Y.Y V" : "");
                    
334	}
                    
                
arch.h git://git.minix3.org/minix | C Header | 0 lines
                    
167#define  EUSERS       87  /* Too many users */
                    
168#define  ENOTSOCK     88  /* Socket operation on non-socket */
                    
169#define  EDESTADDRREQ 89  /* Destination address required */
                    
170#define  EMSGSIZE     90  /* Message too long */
                    
171#define  EPROTOTYPE   91  /* Protocol wrong type for socket */
                    
172#define  ENOPROTOOPT  92  /* Protocol not available */
                    
173#define  EPROTONOSUPPORT 93  /* Protocol not supported */
                    
174#define  ESOCKTNOSUPPORT 94  /* Socket type not supported */
                    
175#define  EOPNOTSUPP      95  /* Operation not supported on transport endpoint */
                    
                
sockets.h git://git.minix3.org/minix | C Header | 0 lines
                    
115 */
                    
116#define  SOL_SOCKET  0xfff    /* options for socket level */
                    
117
                    
255
                    
256/* Socket I/O Controls: unimplemented */
                    
257#ifndef SIOCSHIWAT
                    
290  #undef  FD_SETSIZE
                    
291  /* Make FD_SETSIZE match NUM_SOCKETS in socket.c */
                    
292  #define FD_SETSIZE    MEMP_NUM_NETCONN
                    
316
                    
317void lwip_socket_init(void);
                    
318
                    
357#define sendto(a,b,c,d,e,f)   lwip_sendto(a,b,c,d,e,f)
                    
358#define socket(a,b,c)         lwip_socket(a,b,c)
                    
359#define select(a,b,c,d,e)     lwip_select(a,b,c,d,e)
                    
                
udpstat.c git://git.minix3.org/minix | C | 0 lines
                    
25#include <net/gen/netdb.h>
                    
26#include <net/gen/socket.h>
                    
27#include <minix/queryparam.h>
                    
                
named.diff git://git.minix3.org/minix | diff | 217 lines
                    
28+{
                    
29+	isc_socket_t *socket;
                    
30+
                    
33+	if (TCP_CLIENT(client))
                    
34+		socket = client->tcpsocket;
                    
35+	else {
                    
35+	else {
                    
36+		socket = client->udpsocket;
                    
37+		if (!client->peeraddr_valid)
                    
39+	}
                    
40+	if (socket == NULL)
                    
41+		return;
                    
42+	blacklist_sa_r(blstate, 
                    
43+	    res != ISC_R_SUCCESS, isc_socket_getfd(socket),
                    
44+	    &client->peeraddr.type.sa, client->peeraddr.length, msg);
                    
                
tags.c git://git.minix3.org/minix | C | 0 lines
                    
19#include <net/hton.h>
                    
20#include <net/gen/socket.h>
                    
21#include <net/gen/netdb.h>
                    
                
irdpd.c git://git.minix3.org/minix | C | 0 lines
                    
31#include <net/gen/oneCsum.h>
                    
32#include <net/gen/socket.h>
                    
33#include <net/gen/udp.h>
                    
                
clnt_vc.c git://git.minix3.org/minix | C | 0 lines
                    
65#include <sys/poll.h>
                    
66#include <sys/socket.h>
                    
67
                    
153 *
                    
154 * fd should be an open socket
                    
155 */
                    
                
rpc_generic.c git://git.minix3.org/minix | C | 0 lines
                    
50#include <sys/param.h>
                    
51#include <sys/socket.h>
                    
52#include <sys/un.h>
                    
528	len = sizeof type;
                    
529	if (getsockopt(fd, SOL_SOCKET, SO_TYPE, &type, &len) < 0)
                    
530		return 0;
                    
585
                    
586	return socket(si.si_af, si.si_socktype, si.si_proto);
                    
587}
                    
                
clnt_dg.c git://git.minix3.org/minix | C | 0 lines
                    
54#include <sys/time.h>
                    
55#include <sys/socket.h>
                    
56#include <sys/ioctl.h>
                    
                
svc_vc.c git://git.minix3.org/minix | C | 0 lines
                    
54#include <sys/poll.h>
                    
55#include <sys/socket.h>
                    
56#include <sys/un.h>
                    
127 * The filedescriptor passed in is expected to refer to a bound, but
                    
128 * not yet connected socket.
                    
129 *
                    
178	/*
                    
179	 * We want to be able to check credentials on local sockets.
                    
180	 */
                    
419	if (xprt->xp_port != 0) {
                    
420		/* a rendezvouser socket */
                    
421		r = (struct cf_rendezvous *)xprt->xp_p1;
                    
424	} else {
                    
425		/* an actual connection socket */
                    
426		XDR_DESTROY(&(cd->xdrs));
                    
                
svc_dg.c git://git.minix3.org/minix | C | 0 lines
                    
52#include <sys/types.h>
                    
53#include <sys/socket.h>
                    
54#include <rpc/rpc.h>
                    
                
clnt_bcast.c git://git.minix3.org/minix | C | 0 lines
                    
57#include <sys/types.h>
                    
58#include <sys/socket.h>
                    
59#include <sys/queue.h>
                    
236#endif
                    
237		if (setsockopt(s, SOL_SOCKET, SO_BROADCAST, &o, sizeof o) < 0)
                    
238			return -1;
                    
336
                    
337		fd = socket(si.si_af, si.si_socktype, si.si_proto);
                    
338		if (fd < 0) {
                    
                
rpcb_clnt.c git://git.minix3.org/minix | C | 0 lines
                    
55#include <sys/types.h>
                    
56#include <sys/socket.h>
                    
57#include <sys/un.h>
                    
458	/*
                    
459	 * Try connecting to the local rpcbind through a local socket
                    
460	 * first. If this doesn't work, try all transports defined in
                    
463	memset(&sun, 0, sizeof sun);
                    
464	sock = socket(AF_LOCAL, SOCK_STREAM, 0);
                    
465	if (sock < 0)
                    
477	if (client != NULL) {
                    
478		/* XXX - mark the socket to be closed in destructor */
                    
479		(void) CLNT_CONTROL(client, CLSET_FD_CLOSE, NULL);
                    
482
                    
483	/* XXX - nobody needs this socket anymore, free the descriptor */
                    
484	close(sock);
                    
                
res_send.c git://git.minix3.org/minix | C | 0 lines
                    
111#include <sys/time.h>
                    
112#include <sys/socket.h>
                    
113#include <sys/uio.h>
                    
                
res_init.c git://git.minix3.org/minix | C | 0 lines
                    
87#include <sys/param.h>
                    
88#include <sys/socket.h>
                    
89#include <sys/stat.h>
                    
                
getaddrinfo.c git://git.minix3.org/minix | C | 0 lines
                    
63#include <sys/param.h>
                    
64#include <sys/socket.h>
                    
65#include <net/if.h>
                    
414	 * socktype/protocol are left unspecified. (2) servname is disallowed
                    
415	 * for raw and other inet{,6} sockets.
                    
416	 */
                    
                
gethnamaddr.c git://git.minix3.org/minix | C | 0 lines
                    
67#include <sys/param.h>
                    
68#include <sys/socket.h>
                    
69#include <netinet/in.h>
                    
                
getnameinfo.c git://git.minix3.org/minix | C | 0 lines
                    
54#include <sys/types.h>
                    
55#include <sys/socket.h>
                    
56#include <net/if.h>
                    
                
rcmd.c git://git.minix3.org/minix | C | 0 lines
                    
44#include <sys/param.h>
                    
45#include <sys/socket.h>
                    
46#include <sys/stat.h>
                    
250			if (errno == EAGAIN)
                    
251				warnx("rcmd: socket: All ports in use");
                    
252			else
                    
252			else
                    
253				warn("rcmd: socket");
                    
254			if (r->ai_next) {
                    
433
                    
434	/* get a socketpair we'll use for stdin and stdout. */
                    
435	if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sp) < 0) {
                    
435	if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sp) < 0) {
                    
436		warn("rshrcmd: socketpair");
                    
437		return (-1);
                    
                
sockets.c git://git.minix3.org/minix | C | 0 lines
                    
123/** The global array of available sockets */
                    
124static struct lwip_sock sockets[NUM_SOCKETS];
                    
125/** The global list of tasks waiting for select */
                    
236 * @param accepted 1 if socket has been created by accept(),
                    
237 *                 0 if socket has been created by socket()
                    
238 * @return the index of the new socket; -1 on error
                    
270
                    
271/** Free a socket. The socket's netconn must have been
                    
272 * delete before!
                    
375  }
                    
376  LWIP_ASSERT("invalid socket index", (newsock >= 0) && (newsock < NUM_SOCKETS));
                    
377  LWIP_ASSERT("newconn->callback == event_callback", newconn->callback == event_callback);
                    
381   * though the server task might not have created a new socket yet.
                    
382   * In that case, newconn->socket is counted down (newconn->socket--),
                    
383   * so nsock->rcvevent is >= 1 here!
                    
                
tcp.c git://git.minix3.org/minix | C | 0 lines
                    
50	int perr;
                    
51	struct socket * sock = (struct socket *) arg;
                    
52
                    
81
                    
82static int tcp_fill_new_socket(struct socket * sock, struct tcp_pcb * pcb)
                    
83{
                    
292
                    
293static void tcp_op_read(struct socket * sock, message * m)
                    
294{
                    
309		if (sock->flags & SOCK_FLG_CLOSED) {
                    
310			printf("socket %ld already closed!!! call from %d\n",
                    
311					get_sock_num(sock), m->USER_ENDPT);
                    
602	int ret, enqueued = 0;
                    
603	struct socket * sock = (struct socket *) arg;
                    
604
                    
                
driver.c git://git.minix3.org/minix | C | 0 lines
                    
24#include "proto.h"
                    
25#include "socket.h"
                    
26#include "driver.h"
                    
125		}
                    
126		devices[i].raw_socket = NULL;
                    
127	}
                    
289
                    
290int raw_socket_input(struct pbuf * pbuf, struct nic * nic)
                    
291{
                    
291{
                    
292	struct socket * sock;
                    
293	struct pbuf * pbuf_new;
                    
294
                    
295	if ((sock = nic->raw_socket) == NULL)
                    
296		return 0;
                    
                
uds.c git://git.minix3.org/minix | C | 0 lines
                    
11 *   do_listen:              handles the      listen(2) syscall.
                    
12 *   do_socket:              handles the      socket(2) syscall.
                    
13 *   do_bind:                handles the        bind(2) syscall.
                    
16 *   do_shutdown:            handles the    shutdown(2) syscall.
                    
17 *   do_socketpair:          handles the  socketpair(2) syscall.
                    
18 *   do_getsockopt_sotype:   handles the  getsockopt(2) syscall.
                    
55
                    
56/* check the permissions of a socket file */
                    
57PRIVATE int check_perms(int minor, struct sockaddr_un *addr)
                    
265
                    
266	/* Set the address of both sockets */
                    
267	memcpy(&(uds_fd_table[minorx].addr), addr, sizeof(struct sockaddr_un));
                    
299	if (uds_fd_table[minor].type != -1) {
                    
300		/* this IOCTL must be called on a 'fresh' socket */
                    
301		return EINVAL;
                    
                
route.h git://git.minix3.org/minix | C Header | 0 lines
                    
37#include <sys/queue.h>
                    
38#include <sys/socket.h>
                    
39#include <sys/types.h>
                    
344/*
                    
345 * Global data specific to the routing socket.
                    
346 */
                    
358
                    
359struct socket;
                    
360struct dom_rtlist;
                    
                
in6.h git://git.minix3.org/minix | C Header | 0 lines
                    
70
                    
71#include <sys/socket.h>
                    
72
                    
137/*
                    
138 * Socket address for IPv6
                    
139 */
                    
404#endif
                    
405#define IPV6_CHECKSUM		26 /* int; checksum offset for raw socket */
                    
406#define IPV6_V6ONLY		27 /* bool; make AF_INET6 sockets v6 only */
                    
                
resolv.h git://git.minix3.org/minix | C Header | 0 lines
                    
63#include <sys/cdefs.h>
                    
64#include <sys/socket.h>
                    
65#include <stdio.h>
                    
214 */
                    
215#define	RES_F_VC	0x00000001	/*%< socket is TCP */
                    
216#define	RES_F_CONN	0x00000002	/*%< socket is connected */
                    
238#define RES_DEFNAMES	0x00000080	/*%< use default domain name */
                    
239#define RES_STAYOPEN	0x00000100	/*%< Keep TCP socket open */
                    
240#define RES_DNSRCH	0x00000200	/*%< search up local domain tree */
                    
                
udp.c git://git.minix3.org/minix | C | 420 lines
                    
62{
                    
63	debug_udp_print("socket num %ld", get_sock_num(sock));
                    
64
                    
77
                    
78static int udp_do_receive(struct socket * sock,
                    
79			message * m,
                    
139{
                    
140	struct socket * sock = (struct socket *) arg;
                    
141	struct udp_recv_data * data;
                    
195
                    
196static void udp_op_read(struct socket * sock, message * m, int blk)
                    
197{
                    
197{
                    
198	debug_udp_print("socket num %ld", get_sock_num(sock));
                    
199
                    
                
ip.c git://git.minix3.org/minix | C | 0 lines
                    
42#include <sys/param.h>
                    
43#include <sys/socket.h>
                    
44#include <net/if.h>
                    
                
tcpd.c git://git.minix3.org/minix | C | 0 lines
                    
148
                    
149    /* Open a socket to the service I'm to serve. */
                    
150    if ((servent= getservbyname(service, "tcp")) == NULL) {
                    
                
bootparam.c git://git.minix3.org/minix | C | 0 lines
                    
32#include <sys/param.h>
                    
33#include <sys/socket.h>
                    
34
                    
137	if (!(d = socktodesc(sockfd))) {
                    
138		RPC_PRINTF(("bp_whoami: bad socket. %d\n", sockfd));
                    
139		return -1;
                    
250	if (!(d = socktodesc(sockfd))) {
                    
251		RPC_PRINTF(("bp_getfile: bad socket. %d\n", sockfd));
                    
252		return -1;
                    
                
servxcheck.c git://git.minix3.org/minix | C | 0 lines
                    
23#include <net/gen/inet.h>
                    
24#include <net/gen/socket.h>
                    
25#include <net/gen/netdb.h>
                    
                
protos.h git://git.minix3.org/minix | C++ Header | 278 lines
                    
67/* To get struct sockaddr, struct in_addr and struct hostent */
                    
68#include <sys/socket.h>
                    
69#include <netinet/in.h>
                    
109
                    
110int socket(int, int, int);
                    
111int setsockopt(int, int, int, void *, int);
                    
                
ssh.diff git://git.minix3.org/minix | diff | 178 lines
                    
27+	// XXX: 3?
                    
28+ 	fd = packet_connection_is_on_socket() ? packet_get_connection_in() : 3;
                    
29+	(void)blacklist_r(blstate, a, fd, "ssh");
                    
                
raw_ip.c git://git.minix3.org/minix | C | 0 lines
                    
44
                    
45static void raw_ip_close(struct socket * sock)
                    
46{
                    
58
                    
59static void raw_ip_op_close(struct socket * sock, __unused message * m)
                    
60{
                    
101{
                    
102	struct socket * sock = (struct socket *) arg;
                    
103	struct raw_ip_recv_data * data;
                    
105
                    
106	debug_print("socket num : %ld addr : %x\n",
                    
107			get_sock_num(sock), (unsigned int) addr->addr);
                    
172
                    
173static void raw_ip_op_read(struct socket * sock, message * m)
                    
174{
                    
                
getifaddrs.c git://git.minix3.org/minix | C | 0 lines
                    
37#include <sys/ioctl.h>
                    
38#include <sys/socket.h>
                    
39#include <net/if.h>
                    
                
t40f.c git://git.minix3.org/minix | C | 185 lines
                    
5 * Select works on regular files, (pseudo) terminal devices, streams-based
                    
6 * files, FIFOs, pipes, and sockets. This test verifies selecting with a time
                    
7 * out set. 
                    
                
run_t2 git://git.minix3.org/minix | Shell | 147 lines
                    
36		then
                    
37			if ./socket -t 10 $DAYTIME_HOST daytime < /dev/null
                    
38			then
                    
                
compat_ns_addr.c git://git.minix3.org/minix | C | 0 lines
                    
59	char separator;
                    
60	char *hostname, *socketname, *cp;
                    
61	char buf[50];
                    
92
                    
93	socketname = strchr(hostname, separator);
                    
94	if (socketname) {
                    
94	if (socketname) {
                    
95		*socketname++ = 0;
                    
96		Field(socketname, (u_int8_t *)(void *)&addr.x_port, 2);
                    
117	/*
                    
118	 * first try 2-273#2-852-151-014#socket
                    
119	 */
                    
126	/*
                    
127	 * try form 8E1#0.0.AA.0.5E.E6#socket
                    
128	 */
                    
                
MAKEDEV.sh git://git.minix3.org/minix | Shell | 0 lines
                    
255    uds)
                    
256	# unix domain sockets device
                    
257	$e mknod uds c 18 0;	$e chmod 644 random
                    
                
pmap_getmaps.c git://git.minix3.org/minix | C | 0 lines
                    
53#include <sys/ioctl.h>
                    
54#include <sys/socket.h>
                    
55
                    
                
t40c.c git://git.minix3.org/minix | C | 161 lines
                    
5 * Select works on regular files, (pseudo) terminal devices, streams-based
                    
6 * files, FIFOs, pipes, and sockets. This test verifies selecting for (pseudo)
                    
7 * terminal devices.
                    
                
udp.c git://git.minix3.org/minix | C | 0 lines
                    
62{
                    
63	debug_udp_print("socket num %ld", get_sock_num(sock));
                    
64
                    
77
                    
78static int udp_do_receive(struct socket * sock,
                    
79			message * m,
                    
139{
                    
140	struct socket * sock = (struct socket *) arg;
                    
141	struct udp_recv_data * data;
                    
195
                    
196static void udp_op_read(struct socket * sock, message * m)
                    
197{
                    
197{
                    
198	debug_udp_print("socket num %ld", get_sock_num(sock));
                    
199
                    
                
uds.h git://git.minix3.org/minix | C Header | 0 lines
                    
4/*
                    
5 * Unix Domain Sockets Implementation (PF_UNIX, PF_LOCAL)
                    
6 *
                    
32/*
                    
33 * Internal State Information for a socket descriptor.
                    
34 */
                    
53
                    
54	/* Socket Owner */
                    
55	endpoint_t owner;
                    
82
                    
83/* Socket Info */
                    
84
                    
85
                    
86	/* socket type - SOCK_STREAM, SOCK_DGRAM, or SOCK_SEQPACKET
                    
87	 * Set by uds_ioctl(NWIOSUDSTYPE). It defaults to -1 in
                    
                
bind.c git://git.minix3.org/minix | C | 218 lines
                    
15#include <sys/ioctl.h>
                    
16#include <sys/socket.h>
                    
17#include <sys/types.h>
                    
                
t40e.c git://git.minix3.org/minix | C | 433 lines
                    
5 * Select works on regular files, (pseudo) terminal devices, streams-based
                    
6 * files, FIFOs, pipes, and sockets. This test verifies selecting for sockets.
                    
7 *
                    
11 * Specific rules for sockets:
                    
12 * If a socket has a pending error, it shall be considered to have an
                    
13 * exceptional condition pending. Otherwise, what constitutes an exceptional
                    
188       blocking. (It is protocol-specific whether the MSG_OOB flag would be used
                    
189       to read out-of-band data.) A socket shall also be considered to have an
                    
190       exceptional condition pending if an out-of-band data mark is present in
                    
190       exceptional condition pending if an out-of-band data mark is present in
                    
191       the receive queue. Other circumstances under which a socket may be
                    
192       considered to have an exceptional condition pending are protocol-specific
                    
391
                    
392  /* Close listening socket */
                    
393  if(close(fd_sock) < 0) {
                    
                
ip_var.h git://git.minix3.org/minix | C Header | 0 lines
                    
103	u_int8_t  imo_multicast_loop;	/* 1 => hear sends if a member */
                    
104	u_int16_t imo_num_memberships;	/* no. memberships this socket */
                    
105	struct	  in_multi *imo_membership[IP_MAX_MEMBERSHIPS];
                    
184
                    
185int	 ip_ctloutput(int, struct socket *, struct sockopt *);
                    
186int	 ip_dooptions(struct mbuf *);
                    
216void *	 rip_ctlinput(int, const struct sockaddr *, void *);
                    
217int	 rip_ctloutput(int, struct socket *, struct sockopt *);
                    
218void	 rip_init(void);
                    
220int	 rip_output(struct mbuf *, ...);
                    
221int	 rip_usrreq(struct socket *,
                    
222	    int, struct mbuf *, struct mbuf *, struct mbuf *, struct lwp *);
                    
                
netdb.h git://git.minix3.org/minix | C Header | 0 lines
                    
33
                    
34#if LWIP_DNS && LWIP_SOCKET
                    
35
                    
38#include "lwip/inet.h"
                    
39#include "lwip/sockets.h"
                    
40
                    
80    int               ai_flags;      /* Input flags. */
                    
81    int               ai_family;     /* Address family of socket. */
                    
82    int               ai_socktype;   /* Socket type. */
                    
82    int               ai_socktype;   /* Socket type. */
                    
83    int               ai_protocol;   /* Protocol of socket. */
                    
84    socklen_t         ai_addrlen;    /* Length of socket address. */
                    
84    socklen_t         ai_addrlen;    /* Length of socket address. */
                    
85    struct sockaddr  *ai_addr;       /* Socket address of socket. */
                    
86    char             *ai_canonname;  /* Canonical name of service location. */
                    
                
file.h git://git.minix3.org/minix | C Header | 0 lines
                    
83 * Kernel file descriptor.  One entry for each open kernel vnode and
                    
84 * socket.
                    
85 *
                    
106	} *f_ops;
                    
107	void		*f_data;	/* descriptor data, e.g. vnode/socket */
                    
108	LIST_ENTRY(file) f_list;	/* list of active files */
                    
112#define	DTYPE_VNODE	1		/* file */
                    
113#define	DTYPE_SOCKET	2		/* communications endpoint */
                    
114#define	DTYPE_PIPE	3		/* pipe */
                    
119#define DTYPE_NAMES \
                    
120    "0", "file", "socket", "pipe", "kqueue", "misc", "crypto", "mqueue"
                    
121	u_int		f_type;		/* descriptor type */
                    
                
stat.h git://git.minix3.org/minix | C Header | 0 lines
                    
105#define	_S_IFLNK  0120000		/* symbolic link */
                    
106#define	_S_IFSOCK 0140000		/* socket */
                    
107#define	_S_ISVTX  0001000		/* save swapped text even after use */
                    
133    defined(_NETBSD_SOURCE)
                    
134#define	S_ISSOCK(m)	(((m) & _S_IFMT) == _S_IFSOCK)	/* socket */
                    
135#endif
                    
                
lwipopts.h git://git.minix3.org/minix | C Header | 0 lines
                    
425   ------------------------------------
                    
426   ---------- Socket options ----------
                    
427   ------------------------------------
                    
429/**
                    
430 * LWIP_SOCKET==1: Enable Socket API (require to use sockets.c)
                    
431 */
                    
431 */
                    
432#define LWIP_SOCKET                     0
                    
433
                    
433
                    
434#define LWIP_COMPAT_SOCKETS             0
                    
435
                    
                
if_nameindex.c git://git.minix3.org/minix | C | 0 lines
                    
35#include <sys/types.h>
                    
36#include <sys/socket.h>
                    
37#include <net/if_dl.h>
                    
                
inet_config.c git://git.minix3.org/minix | C | 0 lines
                    
27#include "proto.h"
                    
28#include "socket.h"
                    
29
                    
                
unistd.h git://git.minix3.org/minix | C++ Header | 209 lines
                    
116#define	_POSIX_PRIORITY_SCHEDULING	200112L
                    
117					/* raw sockets */
                    
118#define	_POSIX_RAW_SOCKETS		200112L
                    
                
getpeereid.c git://git.minix3.org/minix | C | 0 lines
                    
3#include <unistd.h>
                    
4#include <sys/socket.h>
                    
5
                    
7 * get the effective user ID and effective group ID of a peer
                    
8 * connected through a Unix domain socket.
                    
9 */
                    
25	/* Get the credentials of the peer at the other end of 'sd' */
                    
26	rc = getsockopt(sd, SOL_SOCKET, SO_PEERCRED, &cred, &ucred_length);
                    
27	if (rc == 0) {
                    
                
socket.h git://git.minix3.org/minix | C++ Header | 310 lines
                    
1#ifndef _SYS_SOCKET_H_
                    
2#define	_SYS_SOCKET_H_
                    
3
                    
39/*
                    
40 * Socket types.
                    
41 */
                    
41 */
                    
42#define	SOCK_STREAM	1		/* stream socket */
                    
43#define	SOCK_DGRAM	2		/* datagram socket */
                    
64/*
                    
65 * Level number for (get/set)sockopt() to apply to socket itself.
                    
66 */
                    
66 */
                    
67#define	SOL_SOCKET	0xffff		/* options for socket level */
                    
68
                    
                
sendto.c git://git.minix3.org/minix | C | 237 lines
                    
12#include <sys/ioctl.h>
                    
13#include <sys/socket.h>
                    
14#include <netinet/in.h>
                    
190
                    
191	/* for connection oriented unix domain sockets (SOCK_STREAM / 
                    
192	 * SOCK_SEQPACKET)
                    
212
                    
213	/* for connectionless unix domain sockets (SOCK_DGRAM) */
                    
214
                    
                
driver.h git://git.minix3.org/minix | C Header | 0 lines
                    
41	unsigned		min_pkt_sz;
                    
42	struct socket		* raw_socket;
                    
43};
                    
53int driver_tx(struct nic * nic);
                    
54int raw_socket_input(struct pbuf * pbuf, struct nic * nic);
                    
55
                    
                
blacklistd git://git.minix3.org/minix | Shell | 58 lines
                    
19
                    
20_sockfile="/var/run/${name}.sockets"
                    
21_sockname="blsock"
                    
24{
                    
25	#	Create default list of blacklistd sockets to watch
                    
26	#
                    
30	#	and if $${app}_chrootdir is a directory, add appropriate
                    
31	#	blacklistd socket to list of sockets to watch.
                    
32	#
                    
43
                    
44	#	If other sockets have been provided, change run_rc_command()'s
                    
45	#	internal copy of $blacklistd_flags to force use of specific
                    
45	#	internal copy of $blacklistd_flags to force use of specific
                    
46	#	blacklistd sockets.
                    
47	#
                    
                
mini_inetd.c git://git.minix3.org/minix | C | 200 lines
                    
45static void
                    
46accept_it (rk_socket_t s, rk_socket_t *ret_socket)
                    
47{
                    
76 * the \a ret_socket parameter is \a NULL, on return STDIN and STDOUT
                    
77 * will be connected to an accepted socket.  If the \a ret_socket
                    
78 * parameter is non-NULL, the accepted socket will be returned in
                    
165 * connected to an accepted socket.  If the \a ret_socket parameter is
                    
166 * non-NULL, the accepted socket will be returned in *ret_socket.  In
                    
167 * the latter case, STDIN and STDOUT will be left unmodified.
                    
172 * @param[in] port Port to listen on
                    
173 * @param[out] ret_socket If non-NULL receives the accepted socket.
                    
174 *
                    
177ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
                    
178mini_inetd(int port, rk_socket_t * ret_socket)
                    
179{
                    
                
archive_read_open_fd.c git://git.minix3.org/minix | C | 0 lines
                    
158			 * Failure to lseek() can be caused by the file
                    
159			 * descriptor pointing to a pipe, socket or FIFO.
                    
160			 * Return 0 here, so the compression layer will use
                    
                
udp_var.h git://git.minix3.org/minix | C Header | 0 lines
                    
61#define	UDP_STAT_BADLEN		3	/* data length larger than packet */
                    
62#define	UDP_STAT_NOPORT		4	/* no socket on port */
                    
63#define	UDP_STAT_NOPORTBCAST	5	/* of above, arrived as broadcast */
                    
63#define	UDP_STAT_NOPORTBCAST	5	/* of above, arrived as broadcast */
                    
64#define	UDP_STAT_FULLSOCK	6	/* not delivered, input socket full */
                    
65#define	UDP_STAT_PCBHASHMISS	7	/* input packets missing PCB hash */
                    
94void	 *udp_ctlinput(int, const struct sockaddr *, void *);
                    
95int	 udp_ctloutput(int, struct socket *, struct sockopt *);
                    
96void	 udp_init(void);
                    
99int	 udp_sysctl(int *, u_int, void *, size_t *, void *, size_t);
                    
100int	 udp_usrreq(struct socket *,
                    
101	    int, struct mbuf *, struct mbuf *, struct mbuf *, struct lwp *);
                    
                
init.c git://git.minix3.org/minix | C | 0 lines
                    
47#include "lwip/netif.h"
                    
48#include "lwip/sockets.h"
                    
49#include "lwip/ip.h"
                    
119#endif
                    
120#if ((LWIP_SOCKET || LWIP_NETCONN) && (NO_SYS==1))
                    
121  #error "If you want to use Sequential API, you have to define NO_SYS=0 in your lwipopts.h"
                    
122#endif
                    
123#if ((LWIP_NETCONN || LWIP_SOCKET) && (MEMP_NUM_TCPIP_MSG_API<=0))
                    
124  #error "If you want to use Sequential API, you have to define MEMP_NUM_TCPIP_MSG_API>=1 in your lwipopts.h"
                    
125#endif
                    
126#if (!LWIP_NETCONN && LWIP_SOCKET)
                    
127  #error "If you want to use Socket API, you have to define LWIP_NETCONN=1 in your lwipopts.h"
                    
234#endif /* LWIP_TCP */
                    
235#if LWIP_SOCKET
                    
236  /* Check that the SO_* socket options and SOF_* lwIP-internal flags match */
                    
                
getsockopt.c git://git.minix3.org/minix | C | 258 lines
                    
8#include <sys/ioctl.h>
                    
9#include <sys/socket.h>
                    
10#include <sys/types.h>
                    
102
                    
103	if (level == SOL_SOCKET && option_name == SO_REUSEADDR)
                    
104	{
                    
104	{
                    
105		i = 1;	/* Binds to TIME_WAIT sockets never cause errors */
                    
106		getsockopt_copy(&i, sizeof(i), option_value, option_len);
                    
108	}
                    
109	if (level == SOL_SOCKET && option_name == SO_KEEPALIVE)
                    
110	{
                    
114	}
                    
115	if (level == SOL_SOCKET && option_name == SO_ERROR)
                    
116	{
                    
                
const.h git://git.minix3.org/minix | C Header | 181 lines
                    
113#define I_TYPE          0170000	/* this field gives inode type */
                    
114#define I_UNIX_SOCKET	0140000 /* unix domain socket */
                    
115#define I_SYMBOLIC_LINK 0120000	/* file is a symbolic link */
                    
                
socket.c git://git.minix3.org/minix | C | 645 lines
                    
29
                    
30struct socket socket[MAX_SOCKETS];
                    
31static int notified;
                    
296			/* clear it all */
                    
297			memset(&socket[i], 0, sizeof(struct socket));
                    
298			return &socket[i];
                    
432
                    
433static void socket_request_socket(struct socket * sock, message * m)
                    
434{
                    
509		sock->mess = *m;
                    
510		socket_request_socket(sock, m);
                    
511		return;
                    
579			sock->mess = mq->m;
                    
580			socket_request_socket(sock, &sock->mess);
                    
581			mq_dequeue(mq);
                    
                
res_data.c git://git.minix3.org/minix | C | 0 lines
                    
33#include <sys/param.h>
                    
34#include <sys/socket.h>
                    
35#include <sys/time.h>
                    
                
t40d.c git://git.minix3.org/minix | C | 0 lines
                    
5 * Select works on regular files, (pseudo) terminal devices, streams-based
                    
6 * files, FIFOs, pipes, and sockets. This test verifies selecting for FIFOs
                    
7 * (named pipes) and pipes (anonymous pipes). This test will not verify most
                    
9 * condition is implementation-specific (except for regular files (alway set) 
                    
10 * and sockets (protocol-specific or OOB data received), but those file types
                    
11 * are not being tested in this specific test).
                    
15 *
                    
16 * [1] If a socket has a pending error, it shall be considered to have an
                    
17 * exceptional condition pending. Otherwise, what constitutes an exceptional
                    
18 * condition is file type-specific. For a file descriptor for use with a
                    
19 * socket, it is protocol-specific except as noted below. For other file types
                    
20 * it is implementation-defined. If the operation is meaningless for a
                    
                
t40b.c git://git.minix3.org/minix | C | 0 lines
                    
5 * Select works on regular files, (pseudo) terminal devices, streams-based
                    
6 * files, FIFOs, pipes, and sockets. This test verifies selecting for regular
                    
7 * file descriptors. "File descriptors associated with regular files shall
                    
                
context_s.c git://git.minix3.org/minix | C | 193 lines
                    
57
                    
58#ifndef NO_UNIX_SOCKETS
                    
59
                    
60static void
                    
61set_socket_name(krb5_context context, struct sockaddr_un *un)
                    
62{
                    
62{
                    
63    const char *fn = kadm5_log_signal_socket(context);
                    
64
                    
132#ifndef NO_UNIX_SOCKETS
                    
133    set_socket_name(context, &ctx->log_context.socket_name);
                    
134#else
                    
134#else
                    
135    set_socket_info(context, &ctx->log_context.socket_info);
                    
136#endif
                    
                
inc.h git://git.minix3.org/minix | C Header | 41 lines
                    
15#include <sys/select.h>
                    
16#include <sys/socket.h>
                    
17#include <sys/stat.h>
                    
                
utmpx.h git://git.minix3.org/minix | C Header | 0 lines
                    
35#include <sys/featuretest.h>
                    
36#include <sys/socket.h>
                    
37#include <sys/time.h>
                    
                
rarp.c git://git.minix3.org/minix | C | 0 lines
                    
41#include <sys/param.h>
                    
42#include <sys/socket.h>
                    
43#include <net/if.h>
                    
106 	if (debug)
                    
107		printf("rarp: socket=%d\n", sock);
                    
108#endif
                    
109	if (!(d = socktodesc(sock))) {
                    
110		printf("rarp: bad socket. %d\n", sock);
                    
111		return -1;
                    
                
main.c git://git.minix3.org/minix | C | 160 lines
                    
34#include <net/gen/tcp_io.h>
                    
35#include <net/gen/socket.h>
                    
36#include <net/gen/netdb.h>
                    
                
accept.c git://git.minix3.org/minix | C | 134 lines
                    
10#include <sys/ioctl.h>
                    
11#include <sys/socket.h>
                    
12#include <sys/un.h>
                    
42
                    
43	/* Unfortunately, we have to return EOPNOTSUPP for a socket that
                    
44	 * does not support accept (such as a UDP socket) and ENOTSOCK for
                    
44	 * does not support accept (such as a UDP socket) and ENOTSOCK for
                    
45	 * filedescriptors that do not refer to a socket.
                    
46	 */
                    
49	{
                    
50		/* UDP socket */
                    
51		errno= EOPNOTSUPP;
                    
                
rand-egd.c git://git.minix3.org/minix | C | 263 lines
                    
72
                    
73    fd = socket(AF_UNIX, SOCK_STREAM, 0);
                    
74    if (fd < 0)
                    
                
compat_socket.c git://git.minix3.org/minix | C | 0 lines
                    
1/* $NetBSD: compat_socket.c,v 1.1 2006/06/26 21:23:56 mrg Exp $ */
                    
2
                    
4#if defined(LIBC_SCCS) && !defined(lint)
                    
5__RCSID("$NetBSD: compat_socket.c,v 1.1 2006/06/26 21:23:56 mrg Exp $");
                    
6#endif /* LIBC_SCCS and not lint */
                    
11#include <sys/types.h>
                    
12#include <sys/socket.h>
                    
13#include <compat/sys/socket.h>
                    
15__warn_references(socket,
                    
16    "warning: reference to compatibility socket(); include <sys/socket.h> for correct reference")
                    
17
                    
18int
                    
19socket(int domain, int type, int protocol)
                    
20{
                    
22
                    
23	res = __socket30(domain, type, protocol);
                    
24	if (errno == EAFNOSUPPORT)
                    
                
listen.c git://git.minix3.org/minix | C | 0 lines
                    
7#include <sys/ioctl.h>
                    
8#include <sys/socket.h>
                    
9#include <netinet/in.h>
                    
                
svc_generic.c git://git.minix3.org/minix | C | 0 lines
                    
54#include <sys/types.h>
                    
55#include <sys/socket.h>
                    
56#include <netinet/in.h>
                    
274			    == 0) {
                    
275				/* accepted socket */
                    
276				xprt = svc_fd_create(fd, sendsz, recvsz);
                    
                
recvfrom.c git://git.minix3.org/minix | C | 296 lines
                    
12#include <sys/ioctl.h>
                    
13#include <sys/socket.h>
                    
14#include <netinet/in.h>
                    
157			fprintf(stderr,
                    
158			"recvfrom(udp): RWDATONLY on unconnected socket\n");
                    
159#endif
                    
235
                    
236	/* for connection oriented unix domain sockets (SOCK_STREAM / 
                    
237	 * SOCK_SEQPACKET)
                    
270
                    
271	/* for connectionless unix domain sockets (SOCK_DGRAM) */
                    
272
                    
                
 

Source

Language