HomeSort by: relevance | last modified time | path
    Searched refs:socket (Results 1 - 25 of 1360) sorted by relevancy

1 2 3 4 5 6 7 8 91011>>

  /src/share/doc/psd/20.ipctut/
udgramread.c 33 #include <sys/socket.h>
46 #define NAME "socket"
49 * This program creates a UNIX domain datagram socket, binds a name to it,
50 * then reads from the socket.
58 /* Create socket from which to read. */
59 sock = socket(AF_UNIX, SOCK_DGRAM, 0);
61 perror("opening datagram socket");
68 perror("binding name to datagram socket");
71 printf("socket -->%s\en", NAME);
72 /* Read from the socket */
    [all...]
ustreamwrite.c 33 #include <sys/socket.h>
40 * This program connects to the socket named in the command line and sends a
41 * one line message to that socket. The form of the command line is
52 /* Create socket */
53 sock = socket(AF_UNIX, SOCK_STREAM, 0);
55 perror("opening stream socket");
58 /* Connect socket using name specified by command line. */
64 perror("connecting stream socket");
68 perror("writing on stream socket");
dgramread.c 33 #include <sys/socket.h>
46 * This program creates a datagram socket, binds a name to it, then reads
47 * from the socket.
55 /* Create socket from which to read. */
56 sock = socket(AF_INET, SOCK_DGRAM, 0);
58 perror("opening datagram socket");
66 perror("binding datagram socket");
72 perror("getting socket name");
75 printf("Socket has port #%d\en", ntohs(name.sin_port));
76 /* Read from the socket */
    [all...]
streamwrite.c 33 #include <sys/socket.h>
41 * This program creates a socket and initiates a connection with the socket
43 * then the socket is closed, ending the connection. The form of the command
56 /* Create socket */
57 sock = socket(AF_INET, SOCK_STREAM, 0);
59 perror("opening stream socket");
62 /* Connect socket using name specified by command line. */
73 perror("connecting stream socket");
77 perror("writing on stream socket");
    [all...]
strchkread.c 33 #include <sys/socket.h>
55 /* Create socket */
56 sock = socket(AF_INET, SOCK_STREAM, 0);
58 perror("opening stream socket");
61 /* Name socket using wildcards */
66 perror("binding stream socket");
72 perror("getting socket name");
75 printf("Socket has port #%d\en", ntohs(server.sin_port));
streamread.c 33 #include <sys/socket.h>
40 * This program creates a socket and then begins an infinite loop. Each time
55 /* Create socket */
56 sock = socket(AF_INET, SOCK_STREAM, 0);
58 perror("opening stream socket");
61 /* Name socket using wildcards */
66 perror("binding stream socket");
72 perror("getting socket name");
75 printf("Socket has port #%d\en", ntohs(server.sin_port));
96 * Since this program has an infinite loop, the socket "sock" i
    [all...]
ustreamread.c 33 #include <sys/socket.h>
37 #define NAME "socket"
40 * This program creates a socket in the UNIX domain and binds a name to it.
41 * After printing the socket's name it begins a loop. Each time through the
52 /* Create socket */
53 sock = socket(AF_UNIX, SOCK_STREAM, 0);
55 perror("opening stream socket");
58 /* Name socket using file system name */
62 perror("binding stream socket");
65 printf("Socket has name %s\en", server.sun_path)
    [all...]
udgramsend.c 33 #include <sys/socket.h>
51 /* Create socket on which to send. */
52 sock = socket(AF_UNIX, SOCK_DGRAM, 0);
54 perror("opening datagram socket");
57 /* Construct name of socket to send to. */
dgramsend.c 33 #include <sys/socket.h>
54 /* Create socket on which to send. */
55 sock = socket(AF_INET, SOCK_DGRAM, 0);
57 perror("opening datagram socket");
61 * Construct name, with no wildcards, of the socket to send to.
pipe.c 39 * device. I can write to the output socket (sockets[1], the second socket
40 * of the array returned by pipe()) and read from the input socket
50 perror("opening stream socket pair");
  /src/sys/netinet/
sctp_peeloff.h 38 #include <sys/socket.h>
42 int sctp_can_peel_off(struct socket *, u_int32_t);
44 int sctp_do_peeloff(struct socket *, struct socket *, u_int32_t);
46 struct socket *sctp_get_peeloff(struct socket *, u_int32_t, int *);
sctp_var.h 88 int sctp_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
146 int sctp_ctloutput(int, struct socket *, struct sockopt *);
150 int sctp_shutdown(struct socket *);
154 int sctp_rcvd(struct socket *, int, struct lwp *);
155 int sctp_send(struct socket *, struct mbuf *, struct sockaddr *,
162 int sctp_bindx(struct socket *, int, struct sockaddr_storage *,
164 int sctp_do_connect_x(struct socket *, struct sctp_connectx_addrs *,
168 int sctp_peeloff(struct socket *, struct socket *, int, vaddr_t, int *);
172 int sctp_sockaddr(struct socket *, struct sockaddr *)
    [all...]
  /src/sys/netinet6/
dccp6_var.h 44 int dccp6_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
46 int dccp6_bind(struct socket *, struct sockaddr *, struct lwp *);
47 int dccp6_listen(struct socket *, struct lwp *);
48 int dccp6_connect(struct socket *, struct sockaddr *, struct lwp *);
49 int dccp6_accept(struct socket *, struct sockaddr *);
sctp6_var.h 42 int sctp6_ctloutput(int, struct socket *, int, int, struct mbuf **);
43 int sctp6_usrreq(struct socket *, int, struct mbuf *, struct mbuf *,
  /src/lib/libc/compat/sys/
compat_socket.c 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")
19 socket(int domain, int type, int protocol)
  /src/sys/sys/
socketvar.h 81 TAILQ_HEAD(soqhead, socket);
84 * Variables for socket buffering.
89 struct socket *sb_so; /* back pointer to socket */
101 socket buffer */
117 #define SB_AUTOSIZE 0x800 /* automatically size socket buffer */
120 * Kernel structure per socket.
133 struct socket { struct
136 short so_type; /* generic type, see socket.h */
137 short so_options; /* from socket call, see socket.h *
    [all...]
protosw.h 63 struct socket;
72 int pr_type; /* socket type used for */
83 (int, struct socket *, struct sockopt *);
116 socket */
126 * where up is a (struct socket *), req is one of these requests,
129 * opt is an optional mbuf containing socket options,
138 #define PRU_BIND 2 /* bind socket to address */
151 #define PRU_SOCKADDR 15 /* fetch socket's address */
220 * req is one of the actions listed below, so is a (struct socket *),
239 int (*pr_attach)(struct socket *, int)
    [all...]
un.h 64 * Socket options for UNIX IPC domain.
86 struct socket;
92 int uipc_ctloutput(int, struct socket *, struct sockopt *);
98 int unp_connect(struct socket *, struct sockaddr *, struct lwp *);
99 int unp_connect2(struct socket *, struct socket *);
  /src/sys/net/
raw_cb.h 41 * to tie a socket to the generic raw interface.
45 struct socket *rcb_socket; /* back pointer to socket */
47 struct sockaddr *rcb_laddr; /* socket's address */
57 * Nominal space allocated to a raw socket.
64 int raw_attach(struct socket *, int, struct rawcbhead *);
66 void raw_detach(struct socket *);
70 int raw_usrreq(struct socket *,
74 int raw_send(struct socket *,
76 int (*)(struct mbuf *, struct socket *));
    [all...]
  /src/sbin/mount_nfs/
iodesc.h 43 int socket; member in struct:iodesc
udp_xfer.c 37 #include <sys/socket.h>
60 errx(1, "Unsupported socket family %d",
71 if (d->socket >= 0) {
72 close(d->socket);
73 d->socket = -1;
76 sock = socket(d->ai->ai_family, SOCK_DGRAM, IPPROTO_UDP);
79 d->socket = sock;
93 struct pollfd pfd = {d->socket, POLLIN, 0};
98 return recv(d->socket, pkt, len, 0);
  /src/sbin/ifconfig/
ifconfig_hostops.c 35 #include <sys/socket.h>
43 .op_socket = socket,
  /src/sys/arch/arm/ep93xx/
eppcicvar.h 43 int (*socket_type)(void *, int socket);
44 int (*power_capability)(void *, int socket);
45 int (*power_ctl)(void *, int socket, int onoff);
  /src/sbin/ping/
ping_hostops.c 35 #include <sys/socket.h>
44 .op_socket = socket,
  /src/usr.sbin/arp/
arp_hostops.c 36 #include <sys/socket.h>
45 .op_socket = socket,

Completed in 28 milliseconds

1 2 3 4 5 6 7 8 91011>>