Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 25 of 243) sorted by relevance

12345678910

/external/deqp/framework/delibs/deutil/
DdeSocket.c386 deSocket* sock = (deSocket*)deCalloc(sizeof(deSocket)); in deSocket_create() local
387 if (!sock) in deSocket_create()
388 return sock; in deSocket_create()
396 sock->stateLock = deMutex_create(0); in deSocket_create()
397 sock->handle = DE_INVALID_SOCKET_HANDLE; in deSocket_create()
398 sock->state = DE_SOCKETSTATE_CLOSED; in deSocket_create()
400 return sock; in deSocket_create()
403 void deSocket_destroy (deSocket* sock) in deSocket_destroy() argument
405 if (sock->state != DE_SOCKETSTATE_CLOSED) in deSocket_destroy()
406 deSocket_close(sock); in deSocket_destroy()
[all …]
/external/libvncserver/libvncclient/
Dsockets.c38 #define read(sock,buf,len) recv(sock,buf,len,0) argument
39 #define write(sock,buf,len) send(sock,buf,len,0) argument
142 i = read(client->sock, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered); in ReadFromRFBServer()
180 i = read(client->sock, out, n); in ReadFromRFBServer()
246 j = write(client->sock, buf + i, (n - i)); in WriteToRFBServer()
258 FD_SET(client->sock,&fds); in WriteToRFBServer()
260 if (select(client->sock+1, NULL, &fds, NULL, NULL) <= 0) { in WriteToRFBServer()
304 int sock; in ConnectClientToTcpAddr() local
315 sock = socket(AF_INET, SOCK_STREAM, 0); in ConnectClientToTcpAddr()
316 if (sock < 0) { in ConnectClientToTcpAddr()
[all …]
/external/libvncserver/libvncserver/
Dsockets.c95 #define read(sock,buf,len) recv(sock,buf,len,0) argument
98 #define write(sock,buf,len) send(sock,buf,len,0) argument
286 if (FD_ISSET(cl->sock, &(rfbScreen->allFds))) in rfbCheckFds()
366 if (FD_ISSET(cl->sock, &(rfbScreen->allFds))) in rfbCheckFds()
368 if (FD_ISSET(cl->sock, &fds)) in rfbCheckFds()
383 int sock = -1; in rfbProcessNewConnection() local
410 if ((sock = accept(chosen_listen_sock, in rfbProcessNewConnection()
416 if(!rfbSetNonBlocking(sock)) { in rfbProcessNewConnection()
417 closesocket(sock); in rfbProcessNewConnection()
421 if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, in rfbProcessNewConnection()
[all …]
/external/wpa_supplicant_8/wpa_supplicant/
Dctrl_iface_unix.c52 int sock; member
62 int sock; member
80 const char *ifname, int sock,
92 static void wpas_ctrl_sock_debug(const char *title, int sock, const char *buf, in wpas_ctrl_sock_debug() argument
105 if (getsockopt(sock, SOL_SOCKET, SO_SNDBUF, &sndbuf, &optlen) < 0) in wpas_ctrl_sock_debug()
108 if (ioctl(sock, SIOCOUTQ, &outq) < 0) in wpas_ctrl_sock_debug()
113 title, sock, sndbuf, outq, (int) len); in wpas_ctrl_sock_debug()
197 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, in wpa_supplicant_ctrl_iface_receive() argument
210 res = recvfrom(sock, buf, sizeof(buf) - 1, 0, in wpa_supplicant_ctrl_iface_receive()
261 wpas_ctrl_sock_debug("ctrl_sock-sendto", sock, reply, in wpa_supplicant_ctrl_iface_receive()
[all …]
Dctrl_iface_udp.c46 int sock; member
197 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, argument
218 res = recvfrom(sock, buf, sizeof(buf) - 1, 0,
309 sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from,
313 sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from,
316 sendto(sock, "OK\n", 3, 0, (struct sockaddr *) &from,
353 priv->sock = -1;
359 priv->sock = socket(domain, SOCK_DGRAM, 0);
360 if (priv->sock < 0) {
387 if (bind(priv->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
[all …]
/external/libvncserver/x11vnc/misc/
Dultravnc_repeater.pl318 my $sock = $fh->accept();
319 if (! $sock) {
330 my $n = syswrite($sock, $str, $len, 0);
333 close $sock;
343 $alarm_sock = $sock;
346 my $n = sysread($sock, $buf, $size);
355 close $sock;
357 do_new_client($sock, $buf);
359 do_new_server($sock, $buf);
365 my ($sock, $buf) = @_;
[all …]
Dconnect_switch489 my $sock = '';
561 $sock = IO::Socket::INET->new(
566 print STDERR "connect to host='$host' port='$port' failed: $!\n" if !$sock;
567 if (! $sock && $have_inet6) {
568 eval {$sock = IO::Socket::INET6->new(
573 print STDERR "connect to host='$host' port='$port' failed: $! (ipv6)\n" if !$sock;
579 if ($sock) {
590 $sock = IO::Socket::INET->new(
595 if (! $sock && $have_inet6) {
596 eval {$sock = IO::Socket::INET6->new(
[all …]
/external/wpa_supplicant_8/src/drivers/
Dlinux_ioctl.c18 int linux_set_iface_flags(int sock, const char *ifname, int dev_up) in linux_set_iface_flags() argument
23 if (sock < 0) in linux_set_iface_flags()
29 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { in linux_set_iface_flags()
46 if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) { in linux_set_iface_flags()
58 int linux_iface_up(int sock, const char *ifname) in linux_iface_up() argument
63 if (sock < 0) in linux_iface_up()
69 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { in linux_iface_up()
80 int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr) in linux_get_ifhwaddr() argument
86 if (ioctl(sock, SIOCGIFHWADDR, &ifr)) { in linux_get_ifhwaddr()
103 int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr) in linux_set_ifhwaddr() argument
[all …]
Dlinux_ioctl.h12 int linux_set_iface_flags(int sock, const char *ifname, int dev_up);
13 int linux_iface_up(int sock, const char *ifname);
14 int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr);
15 int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr);
16 int linux_br_add(int sock, const char *brname);
17 int linux_br_del(int sock, const char *brname);
18 int linux_br_add_if(int sock, const char *brname, const char *ifname);
19 int linux_br_del_if(int sock, const char *brname, const char *ifname);
/external/libvncserver/x11vnc/misc/enhanced_tightvnc_viewer/Windows/util/
Dconnect_br.tcl134 proc do_connect_http {sock hostport which} {
144 puts -nonewline $sock $con
145 flush $sock
151 set c [read $sock 1]
171 proc do_connect_socks4 {sock hostport which} {
222 puts -nonewline $sock $p1
223 puts -nonewline $sock $p2
224 puts -nonewline $sock $p3
226 puts -nonewline $sock $host
227 puts -nonewline $sock $p3
[all …]
/external/libvncserver/x11vnc/
Dinet.c49 int get_remote_port(int sock);
50 int get_local_port(int sock);
51 char *get_remote_host(int sock);
52 char *get_local_host(int sock);
65 static int get_port(int sock, int remote);
66 static char *get_host(int sock, int remote);
206 static int get_port(int sock, int remote) { in get_port() argument
215 if (!getpeername(sock, (struct sockaddr *)&saddr, &saddr_len)) { in get_port()
219 if (!getsockname(sock, (struct sockaddr *)&saddr, &saddr_len)) { in get_port()
226 int get_remote_port(int sock) { in get_remote_port() argument
[all …]
/external/apache-http/src/org/apache/http/impl/conn/
DDefaultClientConnectionOperator.java145 Socket sock = plain_sf.createSocket(); in openConnection() local
146 conn.opening(sock, target); in openConnection()
149 Socket connsock = plain_sf.connectSocket(sock, in openConnection()
153 if (sock != connsock) { in openConnection()
154 sock = connsock; in openConnection()
155 conn.opening(sock, target); in openConnection()
168 prepareSocket(sock, context, params); in openConnection()
170 Socket layeredsock = layered_sf.createSocket(sock, in openConnection()
174 if (layeredsock != sock) { in openConnection()
179 conn.openCompleted(sf.isSecure(sock), params); in openConnection()
[all …]
/external/jmonkeyengine/engine/src/networking/com/jme3/network/kernel/tcp/
DSocketConnector.java57 private Socket sock; field in SocketConnector
66 this.sock = new Socket(address, port); in SocketConnector()
67 remoteAddress = sock.getRemoteSocketAddress(); // for info purposes in SocketConnector()
71 sock.setTcpNoDelay(true); in SocketConnector()
73 in = sock.getInputStream(); in SocketConnector()
74 out = sock.getOutputStream(); in SocketConnector()
81 if( sock == null ) in checkClosed()
87 if( sock == null ) in isConnected()
89 return sock.isConnected(); in isConnected()
96 Socket temp = sock; in close()
[all …]
/external/jmonkeyengine/engine/src/networking/com/jme3/network/kernel/udp/
DUdpConnector.java52 private DatagramSocket sock = new DatagramSocket(); field in UdpConnector
70 this.sock = new DatagramSocket( localSocketAddress ); in UdpConnector()
74 sock.connect( remoteAddress ); in UdpConnector()
81 if( sock == null ) in checkClosed()
87 if( sock == null ) in isConnected()
89 return sock.isConnected(); in isConnected()
95 DatagramSocket temp = sock; in close()
96 sock = null; in close()
120 sock.receive(packet); in read()
140 sock.send(p); in write()
/external/apache-http/src/org/apache/http/conn/
DMultihomePlainSocketFactory.java105 public Socket connectSocket(Socket sock, String host, int port, in connectSocket() argument
117 if (sock == null) in connectSocket()
118 sock = createSocket(); in connectSocket()
128 sock.bind(isa); in connectSocket()
141 sock.connect(new InetSocketAddress(address, port), timeout); in connectSocket()
147 sock = new Socket(); in connectSocket()
155 return sock; in connectSocket()
170 public final boolean isSecure(Socket sock) in isSecure() argument
173 if (sock == null) { in isSecure()
179 if (sock.getClass() != Socket.class) { in isSecure()
[all …]
/external/openssh/
Dauthfd.h27 void ssh_close_authentication_socket(int sock);
29 int ssh_lock_agent(int sock, int lock, const char *password);
30 int ssh_fetch_identitylist(int sock, int version,
33 int ssh_add_identity_constrained(int sock, struct sshkey *key,
35 int ssh_remove_identity(int sock, struct sshkey *key);
36 int ssh_update_card(int sock, int add, const char *reader_id,
38 int ssh_remove_all_identities(int sock, int version);
40 int ssh_decrypt_challenge(int sock, struct sshkey* key, BIGNUM *challenge,
42 int ssh_agent_sign(int sock, struct sshkey *key,
Dcanohost.c48 get_remote_hostname(int sock, int use_dns) in get_remote_hostname() argument
58 if (getpeername(sock, (struct sockaddr *)&from, &fromlen) < 0) { in get_remote_hostname()
64 check_ip_options(sock, ntop); in get_remote_hostname()
153 check_ip_options(int sock, char *ipaddr) in check_ip_options() argument
167 if (getsockopt(sock, ipproto, IP_OPTIONS, options, in check_ip_options()
241 get_socket_address(int sock, int remote, int flags) in get_socket_address() argument
253 if (getpeername(sock, (struct sockaddr *)&addr, &addrlen) in get_socket_address()
257 if (getsockname(sock, (struct sockaddr *)&addr, &addrlen) in get_socket_address()
289 get_peer_ipaddr(int sock) in get_peer_ipaddr() argument
293 if ((p = get_socket_address(sock, 1, NI_NUMERICHOST)) != NULL) in get_peer_ipaddr()
[all …]
Dauthfd.c91 int sock, oerrno; in ssh_get_authentication_socket() local
105 if ((sock = socket(AF_UNIX, SOCK_STREAM, 0)) < 0) in ssh_get_authentication_socket()
109 if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1 || in ssh_get_authentication_socket()
110 connect(sock, (struct sockaddr *)&sunaddr, sizeof(sunaddr)) < 0) { in ssh_get_authentication_socket()
112 close(sock); in ssh_get_authentication_socket()
117 *fdp = sock; in ssh_get_authentication_socket()
119 close(sock); in ssh_get_authentication_socket()
125 ssh_request_reply(int sock, struct sshbuf *request, struct sshbuf *reply) in ssh_request_reply() argument
136 if (atomicio(vwrite, sock, buf, 4) != 4 || in ssh_request_reply()
137 atomicio(vwrite, sock, (u_char *)sshbuf_ptr(request), in ssh_request_reply()
[all …]
/external/apache-http/src/org/apache/http/conn/scheme/
DPlainSocketFactory.java89 public Socket connectSocket(Socket sock, String host, int port, in connectSocket() argument
101 if (sock == null) in connectSocket()
102 sock = createSocket(); in connectSocket()
112 sock.bind(isa); in connectSocket()
124 sock.connect(remoteAddress, timeout); in connectSocket()
128 return sock; in connectSocket()
144 public final boolean isSecure(Socket sock) in isSecure() argument
147 if (sock == null) { in isSecure()
153 if (sock.getClass() != Socket.class) { in isSecure()
159 if (sock.isClosed()) { in isSecure()
/external/boringssl/src/tool/
Dtransport_common.cc52 static int closesocket(int sock) { in closesocket() argument
53 return close(sock); in closesocket()
188 bool SocketSetNonBlocking(int sock, bool is_non_blocking) { in SocketSetNonBlocking() argument
193 ok = 0 == ioctlsocket(sock, FIONBIO, &arg); in SocketSetNonBlocking()
195 int flags = fcntl(sock, F_GETFL, 0); in SocketSetNonBlocking()
204 ok = 0 == fcntl(sock, F_SETFL, flags); in SocketSetNonBlocking()
219 bool TransferData(SSL *ssl, int sock) { in TransferData() argument
225 if (!SocketSetNonBlocking(sock, true)) { in TransferData()
233 FD_SET(sock, &read_fds); in TransferData()
235 int ret = select(sock + 1, &read_fds, NULL, NULL, NULL); in TransferData()
[all …]
/external/libnl/tests/
Dtest-genl.c5 struct nl_sock *sock; in main() local
10 sock = nlt_alloc_socket(); in main()
11 nlt_connect(sock, NETLINK_GENERIC); in main()
25 if ((err = nl_send_auto_complete(sock, msg)) < 0) in main()
28 if ((err = nl_recvmsgs_default(sock)) < 0) in main()
32 nl_close(sock); in main()
33 nl_socket_free(sock); in main()
/external/libnl/src/
Dnl-monitor.c37 struct nl_sock *sock; in main() local
63 sock = nl_cli_alloc_socket(); in main()
64 nl_socket_disable_seq_check(sock); in main()
65 nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, event_input, NULL); in main()
77 nl_cli_connect(sock, NETLINK_ROUTE); in main()
83 if ((err = nl_socket_add_membership(sock, known_groups[i].gr_id)) < 0) { in main()
95 link_cache = nl_cli_link_alloc_cache(sock); in main()
101 fd = nl_socket_get_fd(sock); in main()
110 nl_recvmsgs_default(sock); in main()
Dnl-route-get.c45 struct nl_sock *sock; in main() local
53 sock = nl_cli_alloc_socket(); in main()
54 nl_cli_connect(sock, NETLINK_ROUTE); in main()
55 link_cache = nl_cli_link_alloc_cache(sock); in main()
56 route_cache = nl_cli_route_alloc_cache(sock, 0); in main()
71 err = nl_send_auto_complete(sock, m); in main()
76 nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, cb, NULL); in main()
78 if (nl_recvmsgs_default(sock) < 0) in main()
Dnf-monitor.c39 struct nl_sock *sock; in main() local
53 sock = nl_cli_alloc_socket(); in main()
54 nl_socket_disable_seq_check(sock); in main()
55 nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, event_input, NULL); in main()
67 nl_cli_connect(sock, NETLINK_NETFILTER); in main()
74 err = nl_socket_add_membership(sock, groups[i].gr_id); in main()
91 fd = nl_socket_get_fd(sock); in main()
100 nl_recvmsgs_default(sock); in main()
/external/dnsmasq/contrib/dynamic-dnsmasq/
Ddynamic-dnsmasq.pl94 my $sock = IO::Socket::INET->new(Listen => 5,
99 while ( my $client = $sock->accept() ) {
177 my $sock = shift;
180 print $sock "HTTP/1.0 200 OK\n";
182 print $sock "Date: $tmp[0], $tmp[2] $tmp[1] $tmp[4] $tmp[3] GMT\n";
183 print $sock "Server: Peter's Fake DynDNS.org Server/1.0\n";
184 print $sock "Content-Type: text/plain; charset=ISO-8859-1\n";
185 print $sock "Connection: close\n";
186 print $sock "Transfer-Encoding: chunked\n";
187 print $sock "\n";
[all …]

12345678910