100+ results for 'socket source:Minix3'
Not the results you expected?
hostaddr.c (git://git.minix3.org/minix) C · 0 lines
proto.h (git://git.minix3.org/minix) C Header · 0 lines
75 _PROTOTYPE( int do_connect, (message *dev_m_in, message *dev_m_out) );
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) );
79 _PROTOTYPE( int do_getsockname, (message *dev_m_in, message *dev_m_out) );
80 _PROTOTYPE( int do_getpeername, (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) );
MAKEDEV.sh (git://git.minix3.org/minix) Shell · 294 lines
udp.c (git://git.minix3.org/minix) C · 0 lines
t40f.c (git://git.minix3.org/minix) C · 185 lines
t40c.c (git://git.minix3.org/minix) C · 161 lines
bind.c (git://git.minix3.org/minix) C · 218 lines
MAKEDEV.sh (git://git.minix3.org/minix) Shell · 0 lines
pmap_getmaps.c (git://git.minix3.org/minix) C · 0 lines
nsap_addr.c (git://git.minix3.org/minix) C · 0 lines
run_t2 (git://git.minix3.org/minix) Shell · 147 lines
netdb.h (git://git.minix3.org/minix) C Header · 0 lines
32 #include "lwip/opt.h"
34 #if LWIP_DNS && LWIP_SOCKET
36 #include <stddef.h> /* for size_t */
38 #include "lwip/inet.h"
39 #include "lwip/sockets.h"
41 /* some rarely used options */
79 struct addrinfo {
80 int ai_flags; /* Input flags. */
81 int ai_family; /* Address family of socket. */
82 int ai_socktype; /* Socket type. */
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. */
87 struct addrinfo *ai_next; /* Pointer to next in list. */
stat.h (git://git.minix3.org/minix) C Header · 0 lines
104 #define _S_IFREG 0100000 /* regular */
105 #define _S_IFLNK 0120000 /* symbolic link */
106 #define _S_IFSOCK 0140000 /* socket */
107 #define _S_ISVTX 0001000 /* save swapped text even after use */
132 #if ((_POSIX_C_SOURCE - 0) >= 200112L) || ((_XOPEN_SOURCE - 0) >= 600) || \
133 defined(_NETBSD_SOURCE)
134 #define S_ISSOCK(m) (((m) & _S_IFMT) == _S_IFSOCK) /* socket */
135 #endif
if_nameindex.c (git://git.minix3.org/minix) C · 0 lines
linkaddr.c (git://git.minix3.org/minix) C · 0 lines
inet_config.c (git://git.minix3.org/minix) C · 0 lines
getpeereid.c (git://git.minix3.org/minix) C · 0 lines
2 #include <string.h>
3 #include <unistd.h>
4 #include <sys/socket.h>
6 /*
7 * get the effective user ID and effective group ID of a peer
8 * connected through a Unix domain socket.
9 */
10 int getpeereid(int sd, uid_t *euid, gid_t *egid) {
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) {
28 /* Success - return the results */
getsockopt.c (git://git.minix3.org/minix) C · 258 lines
7 #include <string.h>
8 #include <sys/ioctl.h>
9 #include <sys/socket.h>
10 #include <sys/types.h>
11 #include <sys/ucred.h>
101 int i, r, err;
103 if (level == SOL_SOCKET && option_name == SO_REUSEADDR)
104 {
105 i = 1; /* Binds to TIME_WAIT sockets never cause errors */
107 return 0;
108 }
109 if (level == SOL_SOCKET && option_name == SO_KEEPALIVE)
110 {
111 i = 1; /* Keepalive is always on */
driver.h (git://git.minix3.org/minix) C Header · 0 lines
udp_var.h (git://git.minix3.org/minix) C Header · 0 lines
60 #define UDP_STAT_BADSUM 2 /* checksum error */
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 */
64 #define UDP_STAT_FULLSOCK 6 /* not delivered, input socket full */
94 void *udp_ctlinput(int, const struct sockaddr *, void *);
95 int udp_ctloutput(int, struct socket *, struct sockopt *);
96 void udp_init(void);
97 void udp_input(struct mbuf *, ...);
98 int udp_output(struct mbuf *, ...);
99 int udp_sysctl(int *, u_int, void *, size_t *, void *, size_t);
100 int udp_usrreq(struct socket *,
101 int, struct mbuf *, struct mbuf *, struct mbuf *, struct lwp *);
blacklistd (git://git.minix3.org/minix) Shell · 58 lines
18 extra_commands="reload"
20 _sockfile="/var/run/${name}.sockets"
21 _sockname="blsock"
23 blacklistd_precmd()
24 {
25 # Create default list of blacklistd sockets to watch
26 #
27 ( umask 022 ; > $_sockfile )
29 # Find /etc/rc.d scripts with "chrootdir" rcorder(8) keyword,
30 # and if $${app}_chrootdir is a directory, add appropriate
31 # blacklistd socket to list of sockets to watch.
32 #
33 for _lr in $(rcorder -k chrootdir /etc/rc.d/*); do
inc.h (git://git.minix3.org/minix) C Header · 41 lines
main.c (git://git.minix3.org/minix) C · 160 lines
t40b.c (git://git.minix3.org/minix) C · 0 lines
4 *
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
8 * always select true for ready to read, ready to write, and error conditions"
sendto.c (git://git.minix3.org/minix) C · 0 lines
rand-egd.c (git://git.minix3.org/minix) C · 263 lines
accept.c (git://git.minix3.org/minix) C · 134 lines
9 #include <string.h>
10 #include <sys/ioctl.h>
11 #include <sys/socket.h>
12 #include <sys/un.h>
41 return r;
43 /* Unfortunately, we have to return EOPNOTSUPP for a socket that
44 * does not support accept (such as a UDP socket) and ENOTSOCK for
45 * filedescriptors that do not refer to a socket.
46 */
47 r= ioctl(sock, NWIOGUDPOPT, &udpopt);
48 if (r == 0)
49 {
50 /* UDP socket */
51 errno= EOPNOTSUPP;
52 return -1;
utmpx.h (git://git.minix3.org/minix) C Header · 0 lines
recvfrom.c (git://git.minix3.org/minix) C · 296 lines
11 #include <unistd.h>
12 #include <sys/ioctl.h>
13 #include <sys/socket.h>
14 #include <netinet/in.h>
156 #if DEBUG
157 fprintf(stderr,
158 "recvfrom(udp): RWDATONLY on unconnected socket\n");
159 #endif
160 errno= ENOTCONN;
234 size_t len;
236 /* for connection oriented unix domain sockets (SOCK_STREAM /
237 * SOCK_SEQPACKET)
238 */
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 $ */
3 #include <sys/cdefs.h>
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 */
10 #include <errno.h>
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")
18 int
listen.c (git://git.minix3.org/minix) C · 0 lines
getifaddrs.c (git://git.minix3.org/minix) C · 0 lines
setsockopt.c (git://git.minix3.org/minix) C · 274 lines
6 #include <stdio.h>
7 #include <sys/ioctl.h>
8 #include <sys/socket.h>
9 #include <sys/types.h>
10 #include <netinet/tcp.h>
84 int i;
86 if (level == SOL_SOCKET && option_name == SO_REUSEADDR)
87 {
88 if (option_len != sizeof(i))
102 return 0;
103 }
104 if (level == SOL_SOCKET && option_name == SO_KEEPALIVE)
105 {
106 if (option_len != sizeof(i))
send.c (git://git.minix3.org/minix) C · 0 lines
if_nametoindex.c (git://git.minix3.org/minix) C · 0 lines
inet_ntoa.c (git://git.minix3.org/minix) C · 0 lines
recvmsg.c (git://git.minix3.org/minix) C · 0 lines
socketpair.c (git://git.minix3.org/minix) C · 0 lines
ioc_net.h (git://git.minix3.org/minix) C++ Header · 102 lines
73 #define NWIOGUDSADDR _IOR ('n', 70, struct sockaddr_un) /* getsockname() */
74 #define NWIOGUDSPADDR _IOR ('n', 71, struct sockaddr_un) /* getpeername() */
75 #define NWIOSUDSTYPE _IOW ('n', 72, int) /* socket() */
76 #define NWIOSUDSBLOG _IOW ('n', 73, int) /* listen() */
77 #define NWIOSUDSCONN _IOW ('n', 74, struct sockaddr_un) /* connect() */
78 #define NWIOSUDSSHUT _IOW ('n', 75, int) /* shutdown() */
79 #define NWIOSUDSPAIR _IOW ('n', 76, dev_t) /* socketpair() */
80 #define NWIOSUDSPAIROLD _IOW ('n', 76, short) /* socketpair() */
86 #define NWIOGPSIPOPT _IOR('n', 81, struct nwio_psipopt)
88 /* setsockopt/setsockopt for unix domain sockets */
89 #define NWIOGUDSSOTYPE _IOR('n', 90, int) /* SO_TYPE */
90 #define NWIOGUDSPEERCRED _IOR('n', 91, struct ucred) /* SO_PEERCRED */
Makefile (git://git.minix3.org/minix) Makefile · 23 lines
DESCRIBE.sh (git://git.minix3.org/minix) Shell · 223 lines
__cmsg_alignbytes.c (git://git.minix3.org/minix) C · 0 lines
getrpcport.c (git://git.minix3.org/minix) C · 0 lines
proto.h (git://git.minix3.org/minix) C Header · 99 lines
75 int do_connect(message *dev_m_in, message *dev_m_out);
76 int do_listen(message *dev_m_in, message *dev_m_out);
77 int do_socket(message *dev_m_in, message *dev_m_out);
78 int do_bind(message *dev_m_in, message *dev_m_out);
79 int do_getsockname(message *dev_m_in, message *dev_m_out);
80 int do_getpeername(message *dev_m_in, message *dev_m_out);
81 int do_shutdown(message *dev_m_in, message *dev_m_out);
82 int do_socketpair(message *dev_m_in, message *dev_m_out);
83 int do_socketpair_old(message *dev_m_in, message *dev_m_out);
if_indextoname.c (git://git.minix3.org/minix) C · 0 lines
socket.c (git://git.minix3.org/minix) C · 0 lines
4 #ifdef __weak_alias
5 __weak_alias(socket, _socket)
6 #endif
11 #include <stdio.h>
12 #include <unistd.h>
13 #include <sys/socket.h>
14 #include <sys/ioc_net.h>
19 #define DEBUG 0
21 static int _tcp_socket(int protocol);
22 static int _udp_socket(int protocol);
23 static int _uds_socket(int type, int protocol);
25 int socket(int domain, int type, int protocol)
Makefile (git://git.minix3.org/minix) Makefile · 0 lines
const.h (git://git.minix3.org/minix) C++ Header · 43 lines
setup.c (git://git.minix3.org/minix) C · 0 lines
ether.c (git://git.minix3.org/minix) C · 0 lines
test58.c (git://git.minix3.org/minix) C · 182 lines
strmode.c (git://git.minix3.org/minix) C · 0 lines
socket.h (git://git.minix3.org/minix) C Header · 0 lines
40 #define SOCK_FLG_OP_READING 0x400 /* reading operation in progress */
41 #define SOCK_FLG_OP_WRITING 0x800 /* writing operation in progress */
42 #define SOCK_FLG_CLOSED 0x1000 /* tcp socket has been closed do not
43 expect any more data */
44 /* select() flags - they say what action do we monitor */
87 #define get_sock(x) &socket[x]
89 #define MAX_SOCKETS 255 /* FIXME as log as the sockets are identified by the
90 minor device number 255 is ok */
91 #define MAX_DEVS 5
92 #define RESERVED (SOCK_TYPES + MAX_DEVS) /* rounded to 8 */
94 extern struct socket socket[MAX_SOCKETS];
96 void socket_request(message * m);
ansi.h (git://git.minix3.org/minix) C++ Header · 70 lines
getpeereid.c (git://git.minix3.org/minix) C · 0 lines
ip_cksum.c (git://git.minix3.org/minix) C · 0 lines
compat_lastlogx.c (git://git.minix3.org/minix) C · 0 lines
pmap_prot.h (git://git.minix3.org/minix) C Header · 0 lines
configure.ac (git://git.minix3.org/minix) m4 · 92 lines
23 AC_HEADER_SYS_WAIT
24 AC_CHECK_HEADERS(stdint.h fcntl.h stdint.h inttypes.h unistd.h)
25 AC_CHECK_HEADERS(sys/un.h sys/socket.h limits.h)
26 AC_CHECK_HEADERS(arpa/inet.h getopt.h err.h)
27 AC_CHECK_HEADERS(sys/types.h util.h sys/time.h time.h)
43 AC_TYPE_SIZE_T
44 AC_SYS_LARGEFILE
45 AC_CHECK_MEMBERS([struct sockaddr.sa_len], [], [], [#include <sys/socket.h>])
47 AC_TYPE_PID_T
select.h (git://git.minix3.org/minix) C Header · 0 lines
netif_small.c (git://git.minix3.org/minix) C · 0 lines
34 #include <sys/types.h>
35 #include <sys/socket.h>
36 #ifdef _STANDALONE
37 #include <lib/libkern/libkern.h>
56 #endif
58 /* we allow for one socket only */
59 static struct iodesc iosocket;
65 return NULL;
66 }
67 return &iosocket;
68 }
73 struct iodesc *io;
75 io = &iosocket;
76 if (io->io_netif) {
77 #ifdef NETIF_DEBUG
sockatmark.c (git://git.minix3.org/minix) C · 0 lines
memp_std.h (git://git.minix3.org/minix) C Header · 0 lines
ethers.c (git://git.minix3.org/minix) C · 0 lines
ti1225.h (git://git.minix3.org/minix) C Header · 0 lines
bindresvport.c (git://git.minix3.org/minix) C · 0 lines
recv.c (git://git.minix3.org/minix) C · 0 lines
sendmsg.c (git://git.minix3.org/minix) C · 151 lines
42 ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
43 sendmsg(rk_socket_t s, const struct msghdr *msg, int flags)
44 {
45 ssize_t ret;
118 * ::MSG_PARTIAL.
119 *
120 * @param[in] s The socket to use.
121 * @param[in] msg The message
122 * @param[in] flags Flags. A combination of ::MSG_DONTROUTE,
126 */
127 ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
128 sendmsg_w32(rk_socket_t s, const struct msghdr * msg, int flags)
129 {
130 int srv;
tcp_io.h (git://git.minix3.org/minix) C Header · 0 lines
proto.h (git://git.minix3.org/minix) C Header · 0 lines
t40a.c (git://git.minix3.org/minix) C · 0 lines
udp.h (git://git.minix3.org/minix) C Header · 0 lines
init_s.c (git://git.minix3.org/minix) C · 251 lines
58 assert(ctx->config.acl_file != NULL);
59 assert(ctx->log_context.log_file != NULL);
60 #ifndef NO_UNIX_SOCKETS
61 assert(ctx->log_context.socket_name.sun_path[0] != '\0');
62 #else
63 assert(ctx->log_context.socket_info != NULL);
64 #endif
74 ctx->log_context.log_fd = -1;
76 #ifndef NO_UNIX_SOCKETS
77 ctx->log_context.socket_fd = socket (AF_UNIX, SOCK_DGRAM, 0);
78 #else
79 ctx->log_context.socket_fd = socket (ctx->log_context.socket_info->ai_family,
80 ctx->log_context.socket_info->ai_socktype,
private.h (git://git.minix3.org/minix) C++ Header · 151 lines
net_read.c (git://git.minix3.org/minix) C · 121 lines
46 ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
47 net_read (rk_socket_t fd, void *buf, size_t nbytes)
48 {
49 char *cbuf = (char *)buf;
71 ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
72 net_read(rk_socket_t sock, void *buf, size_t nbytes)
73 {
74 char *cbuf = (char *)buf;
76 size_t rem = nbytes;
78 #ifdef SOCKET_IS_NOT_AN_FD
79 int use_read = 0;
80 #endif
getsockname.c (git://git.minix3.org/minix) C · 127 lines
shutdown.c (git://git.minix3.org/minix) C · 0 lines
hi_locl.h (git://git.minix3.org/minix) C++ Header · 86 lines
ipc_method.c (git://git.minix3.org/minix) C · 247 lines
86 ipviwin->ofd = ipvi->ofd;
87 } else {
88 int sockets[2];
89 struct msghdr mh;
90 IPCMSGHDR ch;
92 struct iovec iov;
94 socketpair(AF_LOCAL, SOCK_STREAM, 0, sockets);
96 mh.msg_namelen = 0;
103 iov.iov_base = &dummy;
105 ch.header.cmsg_level = SOL_SOCKET;
106 ch.header.cmsg_type = SCM_RIGHTS;
107 ch.header.cmsg_len = sizeof(ch);
store_fd.c (git://git.minix3.org/minix) C · 136 lines
90 KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL
91 krb5_storage_from_fd(krb5_socket_t fd_in)
92 {
93 krb5_storage *sp;
94 int fd;
96 #ifdef SOCKET_IS_NOT_AN_FD
97 #ifdef _MSC_VER
98 if (_get_osfhandle(fd_in) != -1) {
102 }
103 #else
104 #error Dont know how to deal with fd that may or may not be a socket.
105 #endif
106 #else /* SOCKET_IS_NOT_AN_FD */
crypto-rand.c (git://git.minix3.org/minix) C · 112 lines
socket.h (git://git.minix3.org/minix) C Header · 0 lines
crypto-stubs.c (git://git.minix3.org/minix) C · 105 lines
70 HEIMDAL_MUTEX_destroy(context->mutex);
71 free(context->mutex);
72 if (context->flags & KRB5_CTX_F_SOCKETS_INITIALIZED) {
73 rk_SOCK_EXIT();
74 }
95 /* This function is currently just used to get the location of the EGD
96 * socket. If we're not using an EGD, then we can just return NULL */
98 KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
netsock.h (git://git.minix3.org/minix) C Header · 151 lines
92 #define get_sock_num(x) ((long int) ((x) - socket))
93 #define is_valid_sock_num(x) (x < MAX_SOCKETS)
94 #define get_sock(x) &socket[x]
96 #define MAX_SOCKETS 255 /* FIXME as log as the sockets are identified by the
97 minor device number 255 is ok */
98 #define MAX_DEVS 5
99 #define RESERVED (SOCK_TYPES + MAX_DEVS) /* rounded to 8 */
101 extern struct socket socket[MAX_SOCKETS];
103 void socket_request(message * m);
111 void send_reply_open(message * m, int status);
112 void send_reply_close(message * m, int status);
113 void sock_reply(struct socket * sock, int status);
114 void sock_reply_close(struct socket * sock, int status);
kadm5_locl.h (git://git.minix3.org/minix) C++ Header · 86 lines
mkpc (git://git.minix3.org/minix) Shell · 49 lines
destroy_s.c (git://git.minix3.org/minix) C · 90 lines
net_write.c (git://git.minix3.org/minix) C · 110 lines
46 ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
47 net_write (rk_socket_t fd, const void *buf, size_t nbytes)
48 {
49 const char *cbuf = (const char *)buf;
69 ROKEN_LIB_FUNCTION ssize_t ROKEN_LIB_CALL
70 net_write(rk_socket_t sock, const void *buf, size_t nbytes)
71 {
72 const char *cbuf = (const char *)buf;
73 ssize_t count;
74 size_t rem = nbytes;
75 #ifdef SOCKET_IS_NOT_AN_FD
76 int use_write = 0;
77 #endif
net_write.c (git://git.minix3.org/minix) C · 121 lines
42 size_t len)
43 {
44 krb5_socket_t fd = *((krb5_socket_t *)p_fd);
45 return net_write(fd, buf, len);
46 }
53 time_t timeout)
54 {
55 krb5_socket_t fd = *((krb5_socket_t *)p_fd);
56 int ret;
57 struct timeval tv, *tvp;
74 ret = select(fd + 1, NULL, &wfds, NULL, tvp);
75 if (rk_IS_SOCKET_ERROR(ret)) {
76 if (rk_SOCK_ERRNO == EINTR)
77 continue;
Makefile.am (git://git.minix3.org/minix) Makefile · 240 lines
getaddrinfo-test.c (git://git.minix3.org/minix) C · 150 lines
93 if (inet_ntop (r->ai_family,
94 socket_get_address (r->ai_addr),
95 addrstr, sizeof(addrstr)) == NULL) {
96 if (verbose_counter)
103 r->ai_family, r->ai_socktype, r->ai_protocol,
104 addrstr,
105 ntohs(socket_get_port (r->ai_addr)));
106 if (r->ai_canonname)
107 printf (", canonname = \"%s\"", r->ai_canonname);
kafs_locl.h (git://git.minix3.org/minix) C++ Header · 161 lines
kuser_locl.h (git://git.minix3.org/minix) C++ Header · 111 lines
kpasswd_locl.h (git://git.minix3.org/minix) C++ Header · 107 lines
wait-kdc.sh (git://git.minix3.org/minix) Shell · 64 lines
48 break
49 fi
50 if tail -30 ${log} | grep "No sockets" ; then
51 echo "The ${name} failed to bind to any sockets, another ${name} running ?"
53 fi
54 if tail -30 ${log} | grep "bind" | grep "Operation not permitted" ; then
55 echo "The ${name} failed to bind to any sockets, another ${name} running ?"
56 exit 1
57 fi