| /openbsd-src/sys/sys/ |
| H A D | socketvar.h | 52 TAILQ_HEAD(soqhead, socket); 71 * Variables for socket splicing, allocated only when needed. 74 struct socket *ssp_socket; /* [mr ms] send data to drain socket */ 75 struct socket *ssp_soback; /* [ms ms] back ref to source socket */ 84 * Variables for socket buffering. 101 socket buffer */ 105 short sb_state; /* [m] socket state on sockbuf */ argument 117 * Kernel structure per socket 60 struct socket { global() struct 62 so_locksocket global() argument 63 so_refcntsocket global() argument 66 so_typesocket global() argument 67 so_optionssocket global() argument 72 so_lingersocket global() argument 80 so_headsocket global() argument 85 so_sigiosocket global() argument 93 so_errorsocket global() argument 96 sosplicesocket global() argument 122 sockbufsocket global() argument 137 so_upcallsocket global() argument 139 so_ruidsocket global() argument 141 so_cpidsocket global() argument [all...] |
| H A D | protosw.h | 61 struct socket; 68 int (*pru_attach)(struct socket *, int, int); 69 int (*pru_detach)(struct socket *); 70 int (*pru_bind)(struct socket *, struct mbuf *, struct proc *); 71 int (*pru_listen)(struct socket *); 72 int (*pru_connect)(struct socket *, struct mbuf *); 73 int (*pru_accept)(struct socket *, struct mbuf *); 74 int (*pru_disconnect)(struct socket *); 75 int (*pru_shutdown)(struct socket *); 76 void (*pru_rcvd)(struct socket *); [all...] |
| H A D | unpcb.h | 71 struct socket *unp_socket; /* [I] pointer back to socket */ 116 int uipc_attach(struct socket *, int, int); 117 int uipc_detach(struct socket *); 118 int uipc_bind(struct socket *, struct mbuf *, struct proc *); 119 int uipc_listen(struct socket *); 120 int uipc_connect(struct socket *, struct mbuf *); 121 int uipc_accept(struct socket *, struct mbuf *); 122 int uipc_disconnect(struct socket *); 123 int uipc_shutdown(struct socket *); 124 int uipc_dgram_shutdown(struct socket *); [all …]
|
| /openbsd-src/gnu/usr.bin/perl/cpan/IO-Socket-IP/t/ |
| H A D | 31nonblocking-connect-internet.t | 26 my $socket = IO::Socket::IP->new( 33 ok( defined $socket, "defined \$socket for $test_host:$test_good_port" ) or 36 ok( defined $socket->fileno, '$socket has fileno' ); 38 ok( !$socket->connected, '$socket not yet connected' ); 40 while( !$socket->connect and ( $! == EINPROGRESS || $! == EWOULDBLOCK ) ) { 42 vec( $wvec, fileno $socket, 1 ) = 1; 44 vec( $evec, fileno $socket, [all...] |
| H A D | 01local-client-v4.t | 16 socket my $sockh, PF_INET, SOCK_STREAM, 0 or die "Cannot socket(PF_INET) - $!"; 34 my $socket = IO::Socket::IP->new( 40 ok( defined $socket, "IO::Socket::IP->new constructs a $socktype socket" ) or 43 is( $socket->sockdomain, AF_INET, "\$socket->sockdomain for $socktype" ); 44 is( $socket->socktype, Socket->$socktype, "\$socket->socktype for $socktype" ); 48 do { $testserver->connect( $socket [all...] |
| H A D | 30nonblocking-connect.t | 17 socket my $sockh, PF_INET, SOCK_STREAM, 0 or die "Cannot socket(PF_INET) - $!"; 32 my $socket = IO::Socket::IP->new( 39 ok( defined $socket, 'IO::Socket::IP->new( Blocking => 0 ) constructs a socket' ) or 42 ok( defined $socket->fileno, '$socket has a fileno immediately after construction' ); 44 while( !$socket->connect and ( $! == EINPROGRESS || $! == EWOULDBLOCK ) ) { 46 vec( $wvec, fileno $socket, 1 ) = 1; 48 vec( $evec, fileno $socket, [all...] |
| H A D | 04local-client-v6.t | 17 socket my $sockh, Socket::PF_INET6(), SOCK_STREAM, 0 or die "Cannot socket(PF_INET6) - $!"; 34 $testserver->socket( $AF_INET6, Socket->$socktype, 0 ) 35 or die "Cannot socket() - $!"; 48 my $socket = IO::Socket::IP->new( 55 ok( defined $socket, "IO::Socket::IP->new constructs a $socktype socket" ) or 58 is( $socket->sockdomain, $AF_INET6, "\$socket->sockdomain for $socktype" ); 59 is( $socket [all...] |
| H A D | 03local-cross-v4.t | 18 my $socket = IO::Socket::IP->new( 26 do { $testserver->connect( $socket->sockname ); $testserver }; 28 is( $testclient->sockport, $socket->peerport, "\$testclient->sockport for $socktype" ); 29 is( $testclient->peerport, $socket->sockport, "\$testclient->peerport for $socktype" ); 31 is( $testclient->sockhost, $socket->peerhost, "\$testclient->sockhost for $socktype" ); 32 is( $testclient->peerhost, $socket->sockhost, "\$testclient->peerhost for $socktype" ); 34 $socket->write( "Request\n" ); 35 is( $testclient->getline, "Request\n", "\$socket to \$testclient for $socktype" ); 38 is( $socket->getline, "Response\n", "\$testclient to \$socket fo [all...] |
| H A D | 14fileno.t | 11 socket( my $tmph, AF_INET, SOCK_STREAM, 0 ) or die "Cannot socket() - $!"; 13 my $socket = IO::Socket::IP->new or die "Cannot create IO::Socket::IP - $IO::Socket::errstr"; 15 $socket->socket( AF_INET, SOCK_STREAM, 0 ) or die "Cannot socket() - $!"; 16 my $fileno = $socket->fileno; 18 $socket->socket( AF_INET, SOCK_STREAM, 0 ) or die "Cannot socket() [all...] |
| H A D | 06local-cross-v6.t | 21 my $socket = IO::Socket::IP->new( 29 do { $testserver->connect( $socket->sockname ); $testserver }; 31 is( $testclient->sockport, $socket->peerport, "\$testclient->sockport for $socktype" ); 32 is( $testclient->peerport, $socket->sockport, "\$testclient->peerport for $socktype" ); 34 is( $testclient->sockhost, $socket->peerhost, "\$testclient->sockhost for $socktype" ); 35 is( $testclient->peerhost, $socket->sockhost, "\$testclient->peerhost for $socktype" ); 37 $socket->write( "Request\n" ); 38 is( $testclient->getline, "Request\n", "\$socket to \$testclient for $socktype" ); 44 is( $socket->getline, "Response\n", "\$testclient to \$socket fo [all...] |
| H A D | 13addrinfo.t | 23 my $socket = IO::Socket::IP->new( 27 ok( defined $socket, 'IO::Socket::IP->new( PeerAddrInfo => ... ) constructs a new socket' ) or 30 is_deeply( [ unpack_sockaddr_in $socket->peername ], 32 '$socket->peername' ); 39 my $socket = IO::Socket::IP->new( 44 ok( defined $socket, 'IO::Socket::IP->new( LocalAddrInfo => ... ) constructs a new socket' ) or 49 PeerPort => $socket->sockport, 52 is_deeply( [ unpack_sockaddr_in $socket [all...] |
| H A D | 05local-server-v6.t | 17 socket my $sockh, Socket::PF_INET6(), SOCK_STREAM, 0 or die "Cannot socket(PF_INET6) - $!"; 41 ok( defined $testserver, "IO::Socket::IP->new constructs a $socktype socket" ) or 53 my $socket = IO::Socket->new; 54 $socket->socket( $AF_INET6, Socket->$socktype, 0 ) 55 or die "Cannot socket() - $!"; 60 $socket->connect( $ai->{addr} ) or die "Cannot connect() - $!"; 64 do { $testserver->connect( $socket->sockname ); $testserver }; 72 is_deeply( [ unpack_sockaddr_in6_addrport( $socket [all...] |
| H A D | 02local-server-v4.t | 16 socket my $sockh, PF_INET, SOCK_STREAM, 0 or die "Cannot socket(PF_INET) - $!"; 34 ok( defined $testserver, "IO::Socket::IP->new constructs a $socktype socket" ) or 50 my $socket = IO::Socket::INET->new( 59 do { $testserver->connect( $socket->sockname ); $testserver }; 67 is_deeply( [ unpack_sockaddr_in $socket->sockname ], 69 "\$socket->sockname for $socktype" ); 71 is_deeply( [ unpack_sockaddr_in $socket->peername ], 73 "\$socket->peername for $socktype" ); 75 is( $testclient->sockport, $socket [all...] |
| /openbsd-src/gnu/llvm/lldb/source/Host/common/ |
| H A D | UDPSocket.cpp | 30 UDPSocket::UDPSocket(NativeSocket socket) : Socket(ProtocolUdp, true, true) { in UDPSocket() argument 31 m_socket = socket; in UDPSocket() 50 Status UDPSocket::Accept(Socket *&socket) { in Accept() argument 56 std::unique_ptr<UDPSocket> socket; in Connect() local 95 socket.reset(new UDPSocket(send_fd)); in Connect() 96 socket->m_sockaddr = service_info_ptr; in Connect() 104 if (!socket) in Connect() 122 err = ::bind(socket->GetNativeSocket(), bind_addr, bind_addr.GetLength()); in Connect() 126 err = ::getsockname(socket->GetNativeSocket(), in Connect() 129 return std::move(socket); in Connect()
|
| /openbsd-src/sys/kern/ |
| H A D | uipc_socket2.c | 41 #include <sys/socket.h> 47 * Primitive routines for operating on sockets and socket buffers 56 * Procedures to manipulate state flags of socket 69 * From the passive side, a socket is created with 72 * As a protocol is preparing incoming connections, it creates a socket 75 * socket structure to so_q, making it available to accept(). 77 * If a socket is closed with sockets on either 86 soisconnecting(struct socket *so) in soisconnecting() 94 soisconnected(struct socket *so) in soisconnected() 96 struct socket *hea in soisconnected() [all...] |
| /openbsd-src/sys/netinet6/ |
| H A D | ip6_var.h | 289 extern struct socket *ip6_mrouter[RT_TABLEID_MAX + 1]; /* multicast routing daemon */ 309 int icmp6_ctloutput(int, struct socket *, int, int, struct mbuf *); 333 int ip6_ctloutput(int, struct socket *, int, int, struct mbuf *); 334 int ip6_raw_ctloutput(int, struct socket *, int, int, struct mbuf *); 353 int rip6_ctloutput(int, struct socket *, int, int, struct mbuf *); 354 int rip6_output(struct mbuf *, struct socket *, struct sockaddr *, 356 int rip6_attach(struct socket *, int, int); 357 int rip6_detach(struct socket *); 358 int rip6_bind(struct socket *, struct mbuf *, struct proc *); 359 int rip6_connect(struct socket *, struc [all...] |
| /openbsd-src/sys/netinet/ |
| H A D | ip_var.h | 243 int ip_ctloutput(int, struct socket *, int, int, struct mbuf *); 268 int rip_ctloutput(int, struct socket *, int, int, struct mbuf *); 271 int rip_output(struct mbuf *, struct socket *, struct sockaddr *, 275 int rip_attach(struct socket *, int, int); 276 int rip_detach(struct socket *); 277 int rip_bind(struct socket *, struct mbuf *, struct proc *); 278 int rip_connect(struct socket *, struct mbuf *); 279 int rip_disconnect(struct socket *); 280 int rip_shutdown(struct socket *); 281 int rip_send(struct socket *, struct mbuf *, struct mbuf *, [all …]
|
| H A D | udp_var.h | 146 int udp_attach(struct socket *, int, int); 147 int udp_detach(struct socket *); 148 int udp_bind(struct socket *, struct mbuf *, struct proc *); 149 int udp_connect(struct socket *, struct mbuf *); 150 int udp_disconnect(struct socket *); 151 int udp_shutdown(struct socket *); 152 int udp_send(struct socket *, struct mbuf *, struct mbuf *,
|
| H A D | ip_divert.h | 73 int divert_attach(struct socket *, int, int); 74 int divert_detach(struct socket *); 75 int divert_bind(struct socket *, struct mbuf *, struct proc *); 76 int divert_shutdown(struct socket *); 77 int divert_send(struct socket *, struct mbuf *, struct mbuf *,
|
| H A D | tcp_var.h | 281 struct inpcb *sc_inplisten; /* [S] inpcb for listening socket */ 395 u_int32_t tcps_noport; /* no socket on port */ 712 int tcp_ctloutput(int, struct socket *, int, int, struct mbuf *); 736 void tcp_pulloutofband(struct socket *, u_int, struct mbuf *, int); 754 int tcp_attach(struct socket *, int, int); 755 int tcp_detach(struct socket *); 756 int tcp_bind(struct socket *, struct mbuf *, struct proc *); 757 int tcp_listen(struct socket *); 758 int tcp_connect(struct socket *, struct mbuf *); 759 int tcp_accept(struct socket *, struc [all...] |
| /openbsd-src/gnu/usr.bin/perl/t/lib/warnings/ |
| H A D | pp_sys | 43 send() on closed socket %s [pp_send] 47 bind() on closed socket %s [pp_bind] 52 connect() on closed socket %s [pp_connect] 56 listen() on closed socket %s [pp_listen] 60 accept() on closed socket %s [pp_accept] 64 shutdown() on closed socket %s [pp_shutdown] 68 setsockopt() on closed socket %s [pp_ssockopt] 69 getsockopt() on closed socket %s [pp_ssockopt] 74 getsockname() on closed socket %s [pp_getpeername] 75 getpeername() on closed socket %s [pp_getpeername] [all …]
|
| /openbsd-src/usr.sbin/sasyncd/ |
| H A D | net.c | 112 s = socket(sa->sa_family, SOCK_STREAM, 0); in net_add_listener() 289 p->socket = -1; in net_init() 302 if (p->socket < 0) in net_enqueue() 428 if (p->socket > -1 && SIMPLEQ_FIRST(&p->msgs)) { in net_set_pending_wfds() 429 FD_SET(p->socket, fds); in net_set_pending_wfds() 430 if (p->socket > max_fd) in net_set_pending_wfds() 431 max_fd = p->socket; in net_set_pending_wfds() 447 if (p->socket > -1) in net_set_rfds() 448 FD_SET(p->socket, fds); in net_set_rfds() 449 if (p->socket > max_fd) in net_set_rfds() [all …]
|
| /openbsd-src/usr.sbin/npppd/npppd/ |
| H A D | radius_req.c | 35 #include <sys/socket.h> 56 int socket; member 202 RADIUS_REQ_ASSERT(lap->socket >= 0) in radius_request_failover() 226 if (lap->socket >= 0) in radius_prepare_socket() 227 close(lap->socket); in radius_prepare_socket() 228 lap->socket = -1; in radius_prepare_socket() 232 if ((sock = socket(sa->sa_family, SOCK_DGRAM, IPPROTO_UDP)) < 0) { in radius_prepare_socket() 233 log_printf(LOG_ERR, "socket() failed in %s: %m", __func__); in radius_prepare_socket() 242 lap->socket = sock; in radius_prepare_socket() 282 lap->socket in radius_prepare() [all...] |
| /openbsd-src/lib/libc/rpc/ |
| H A D | clnt_simple.c | 50 int socket; member 80 crp->socket = RPC_ANYSOCK; in callrpc() 87 if (crp->socket != -1) { in callrpc() 88 (void)close(crp->socket); in callrpc() 89 crp->socket = -1; in callrpc() 95 crp->socket = RPC_ANYSOCK; in callrpc() 106 (u_long)versnum, timeout, &crp->socket)) == NULL) in callrpc()
|
| /openbsd-src/sys/miscfs/fifofs/ |
| H A D | fifo_vnops.c | 42 #include <sys/socket.h> 60 struct socket *fi_readsock; 61 struct socket *fi_writesock; 150 struct socket *rso, *wso; in fifo_open() 252 struct socket *rso = ap->a_vp->v_fifoinfo->fi_readsock; in fifo_read() 281 struct socket *wso = ap->a_vp->v_fifoinfo->fi_writesock; in fifo_write() 347 struct socket *wso = fip->fi_writesock; in fifo_close() 356 struct socket *rso = fip->fi_readsock; in fifo_close() 474 struct socket *so; in fifo_kqfilter() 522 struct socket *s in filt_fifordetach() [all...] |