Searched refs:socket (Results 76 - 100 of 534) sorted by relevance

1234567891011>>

/haiku/src/tests/system/network/
H A Dudp_connect.cpp9 #include <sys/socket.h>
28 int fd = socket(AF_INET, SOCK_DGRAM, 0);
H A Dunix_dgram_test.cpp13 #include <sys/socket.h>
32 int sock = socket(AF_UNIX, SOCK_DGRAM, 0);
34 REPORT_ERROR("socket() failed: %s\n", strerror(errno));
47 int sock1 = socket(AF_UNIX, SOCK_DGRAM, 0);
49 REPORT_ERROR("socket() failed: %s\n", strerror(errno));
92 // Reconnect a connected DGRAM socket
99 int sock2 = socket(AF_UNIX, SOCK_DGRAM, 0);
101 REPORT_ERROR("socket() failed: %s\n", strerror(errno));
114 // Connect to a socket that are already connected
131 // Connect to a closed socket
[all...]
H A Dfirefox_crash.cpp15 #include <sys/socket.h>
21 int fd = socket(AF_INET, SOCK_STREAM, 0);
H A Dtcp_server.c2 * a stream socket server demo
13 #include <sys/socket.h>
47 if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) {
48 perror("socket");
/haiku/src/add-ons/kernel/network/protocols/unix/
H A DUnixEndpoint.h73 static status_t Create(net_socket* socket, UnixEndpoint** _endpoint);
76 UnixEndpoint(net_socket* socket);
H A DUnixDatagramEndpoint.cpp24 UnixDatagramEndpoint::UnixDatagramEndpoint(net_socket* socket) argument
26 UnixEndpoint(socket),
192 // Required by the socket layer.
193 PeerAddress().SetTo(&fTargetEndpoint->socket->address);
223 timeout = absolute_timeout(socket->send.timeout);
250 memcpy(&sourceAddress, &socket->address, sizeof(struct sockaddr_storage));
298 gSocketModule->notify(targetEndpoint->socket, B_SELECT_READ, readable);
305 gSocketModule->notify(socket, B_SELECT_WRITE, writable);
310 // The socket module will generate SIGPIPE for us, if necessary.
335 timeout = absolute_timeout(socket
[all...]
/haiku/src/tests/kits/bluetooth/l2capClient/
H A Dl2capClient.cpp11 #include <sys/socket.h>
24 /* Create the socket. */
25 printf("Creating socket ...\n");
27 sock = socket(PF_BLUETOOTH, SOCK_STREAM, BLUETOOTH_PROTO_L2CAP);
29 perror ("socket");
33 /* Bind a name to the socket. */
34 //printf("Binding socket ...\n");
50 printf("Connecting socket for %s\n", bdaddrUtils::ToString(*bdaddr));
99 printf("Transmission done ... (press key to close socket)\n");
/haiku/src/kits/network/libnetapi/
H A DNetEndpoint.cpp15 #include <sys/socket.h>
109 BNetEndpoint::BNetEndpoint(const BNetEndpoint& endpoint, int socket, argument
117 fSocket(socket),
442 int socket local
444 if (socket < 0) {
452 if (getsockname(socket, (struct sockaddr *)&localAddress,
454 close(socket);
459 BNetEndpoint* endpoint = new (std::nothrow) BNetEndpoint(*this, socket,
462 close(socket);
627 if ((fSocket = socket(fFamil
[all...]
H A DSecureSocket.cpp177 // unexpected EOF, the remote host closed the socket without
236 BSecureSocket* socket = (BSecureSocket*)SSL_get_ex_data(ssl, sDataIndex); local
253 return socket->CertificateVerificationFailed(failedCertificate, message);
408 BSecureSocket* socket = new(std::nothrow) BSecureSocket();
409 ObjectDeleter<BSecureSocket> socketDeleter(socket);
410 if (socket == NULL || socket->InitCheck() != B_OK) {
415 socket->_SetTo(fd, fLocal, peer);
416 error = socket->_SetupAccept();
420 _socket = socket;
[all...]
H A DNetworkRoute.cpp259 FileDescriptorCloser socket(::socket(family, SOCK_DGRAM, 0));
260 if (!socket.IsSet())
265 if (ioctl(socket.Get(), SIOCGRTSIZE, &config, sizeof(struct ifconf)) < 0)
280 if (ioctl(socket.Get(), SIOCGRTTABLE, &config, sizeof(struct ifconf)) < 0)
/haiku/src/add-ons/kernel/network/stack/
H A Dlink.cpp47 LinkProtocol(net_socket* socket);
84 LinkProtocol::LinkProtocol(net_socket* socket) argument
86 LocalDatagramSocket("packet capture", socket),
183 socket->bound_to_device = boundTo->device->index;
185 memcpy(&socket->address, address, sizeof(struct sockaddr_storage));
186 socket->address.ss_len = sizeof(struct sockaddr_storage);
203 socket->bound_to_device = 0;
204 socket->address.ss_len = 0;
264 notify_socket(protocol->socket, B_SELECT_READ, B_DEVICE_NOT_FOUND);
298 link_init_protocol(net_socket* socket) argument
[all...]
H A Dstack.cpp415 uninit_domain_protocols(net_socket* socket) argument
417 net_protocol* protocol = socket->first_protocol;
425 socket->first_protocol = NULL;
426 socket->first_info = NULL;
431 get_domain_protocols(net_socket* socket) argument
438 chain = chain::Lookup(sProtocolChains, socket->family, socket->type,
439 socket->type == SOCK_RAW ? 0 : socket->protocol);
458 ((net_protocol_module_info*)chain->infos[i])->init_protocol(socket);
484 put_domain_protocols(net_socket* socket) argument
[all...]
/haiku/src/add-ons/kernel/bus_managers/firewire/
H A Dfirewire_module.cpp128 fw_get_handle(int socket, struct firewire_softc **handle) argument
132 if (socket >= 0 && socket < MAX_CARDS && gFirewire_softc[socket]) {
133 *handle = gFirewire_softc[socket];
/haiku/headers/private/net/
H A DProtocolUtilities.h50 ProtocolSocket(net_socket* socket);
85 ProtocolSocket::ProtocolSocket(net_socket* socket) argument
87 fSocket(socket),
111 net_socket* socket);
164 net_socket* socket)
166 ProtocolSocket(socket), fCurrentBytes(0)
/haiku/headers/os/net/
H A DNetEndpoint.h15 #include <sys/socket.h>
81 BNetEndpoint(const BNetEndpoint& other, int socket,
H A DNetAddress.h14 #include <sys/socket.h>
/haiku/headers/private/kernel/boot/net/
H A DUDP.h93 status_t BindSocket(UDPSocket *socket, ip_addr_t address, uint16 port);
94 void UnbindSocket(UDPSocket *socket);
H A DRemoteDisk.h39 static status_t _SendRequest(UDPSocket *socket, ip_addr_t serverAddress,
/haiku/src/tests/kits/net/service/
H A Dtestserver.py28 import socket namespace
463 server.server_port = server.socket.getsockname()[1]
468 server.socket = socket.fromfd(
470 socket.AF_INET,
471 socket.SOCK_STREAM)
493 server.socket = ssl.wrap_socket(
494 server.socket,
533 help='A socket FD to use for accept() instead of binding a new one.')
/haiku/src/tests/kits/net/netservices2/
H A Dtestserver.py28 import socket namespace
463 server.server_port = server.socket.getsockname()[1]
468 server.socket = socket.fromfd(
470 socket.AF_INET,
471 socket.SOCK_STREAM)
493 server.socket = ssl.wrap_socket(
494 server.socket,
533 help='A socket FD to use for accept() instead of binding a new one.')
/haiku/src/bin/network/traceroute/
H A Difaddrlist.c37 #include <sys/socket.h>
76 fd = socket(AF_INET, SOCK_DGRAM, 0);
78 (void)sprintf(errbuf, "socket: %s", strerror(errno));
/haiku/headers/private/system/
H A Dsyscalls.h17 #include <sys/socket.h>
357 // socket functions
359 extern status_t _kern_bind(int socket, const struct sockaddr *address,
361 extern status_t _kern_shutdown_socket(int socket, int how);
362 extern status_t _kern_connect(int socket, const struct sockaddr *address,
364 extern status_t _kern_listen(int socket, int backlog);
365 extern int _kern_accept(int socket, struct sockaddr *address,
367 extern ssize_t _kern_recv(int socket, void *data, size_t length,
369 extern ssize_t _kern_recvfrom(int socket, void *data, size_t length,
372 extern ssize_t _kern_recvmsg(int socket, struc
[all...]
/haiku/src/add-ons/kernel/network/protocols/tcp/
H A DTCPEndpoint.cpp317 // is performed on a listen()ing socket.
419 TCPEndpoint::TCPEndpoint(net_socket* socket) argument
421 ProtocolSocket(socket),
434 fSendQueue(socket->send.buffer_size),
443 fReceiveWindow(socket->receive.buffer_size),
445 fReceiveQueue(socket->receive.buffer_size),
549 if ((socket->options & SO_LINGER) != 0 && socket->linger == 0) {
559 if ((socket->options & SO_LINGER) != 0) {
560 TRACE("Close(): Lingering for %i secs", socket
[all...]
/haiku/headers/private/firewire/
H A Dfirewire_module.h58 int (*get_handle)(int socket, struct firewire_softc **handle);
/haiku/src/add-ons/kernel/drivers/bus/pcmcia/
H A Dds.c39 int32 socket = -1; local
45 socket = i;
50 if (socket < 0) {
54 if (get_handle(socket, (client_handle_t *)_cookie) != B_OK) {

Completed in 101 milliseconds

1234567891011>>