Home
last modified time | relevance | path

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

12345678910>>...15

/external/libvncserver/libvncclient/
Dsockets.c45 #define read(sock,buf,len) recv(sock,buf,len,0) argument
46 #define write(sock,buf,len) send(sock,buf,len,0) argument
160 i = read(client->sock, client->buf + client->buffered, RFB_BUF_SIZE - client->buffered); in ReadFromRFBServer()
198 i = read(client->sock, out, n); in ReadFromRFBServer()
264 j = write(client->sock, buf + i, (n - i)); in WriteToRFBServer()
276 FD_SET(client->sock,&fds); in WriteToRFBServer()
278 if (select(client->sock+1, NULL, &fds, NULL, NULL) <= 0) { in WriteToRFBServer()
322 int sock; in ConnectClientToTcpAddr() local
333 sock = socket(AF_INET, SOCK_STREAM, 0); in ConnectClientToTcpAddr()
334 if (sock < 0) { in ConnectClientToTcpAddr()
[all …]
/external/deqp/framework/delibs/deutil/
DdeSocket.c412 deSocket* sock = (deSocket*)deCalloc(sizeof(deSocket)); in deSocket_create() local
413 if (!sock) in deSocket_create()
414 return sock; in deSocket_create()
422 sock->stateLock = deMutex_create(0); in deSocket_create()
423 sock->handle = DE_INVALID_SOCKET_HANDLE; in deSocket_create()
424 sock->state = DE_SOCKETSTATE_CLOSED; in deSocket_create()
426 return sock; in deSocket_create()
429 void deSocket_destroy (deSocket* sock) in deSocket_destroy() argument
431 if (sock->state != DE_SOCKETSTATE_CLOSED) in deSocket_destroy()
432 deSocket_close(sock); in deSocket_destroy()
[all …]
/external/libvncserver/libvncserver/
Dsockets.c107 #define read(sock,buf,len) recv(sock,buf,len,0) argument
110 #define write(sock,buf,len) send(sock,buf,len,0) argument
311 if (FD_ISSET(cl->sock, &(rfbScreen->allFds))) in rfbCheckFds()
391 if (FD_ISSET(cl->sock, &(rfbScreen->allFds))) in rfbCheckFds()
393 if (FD_ISSET(cl->sock, &fds)) in rfbCheckFds()
408 int sock = -1; in rfbProcessNewConnection() local
435 if ((sock = accept(chosen_listen_sock, in rfbProcessNewConnection()
441 if(!rfbSetNonBlocking(sock)) { in rfbProcessNewConnection()
442 closesocket(sock); in rfbProcessNewConnection()
446 if (setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, in rfbProcessNewConnection()
[all …]
/external/autotest/client/profilers/powertop/src/
Dethernet.c54 int sock; in activate_WOL_suggestion() local
61 sock = socket(AF_INET, SOCK_DGRAM, 0); in activate_WOL_suggestion()
62 if (sock<0) in activate_WOL_suggestion()
68 ret = ioctl(sock, SIOCGIFFLAGS, &ifr); in activate_WOL_suggestion()
70 close(sock); in activate_WOL_suggestion()
75 close(sock); in activate_WOL_suggestion()
83 ioctl(sock, SIOCETHTOOL, &ifr); in activate_WOL_suggestion()
86 ioctl(sock, SIOCETHTOOL, &ifr); in activate_WOL_suggestion()
88 close(sock); in activate_WOL_suggestion()
95 int sock; in suggest_WOL_off() local
[all …]
/external/wpa_supplicant_8/wpa_supplicant/
Dctrl_iface_unix.c36 int sock; member
46 int sock; member
64 const char *ifname, int sock,
76 static void wpas_ctrl_sock_debug(const char *title, int sock, const char *buf, in wpas_ctrl_sock_debug() argument
89 if (getsockopt(sock, SOL_SOCKET, SO_SNDBUF, &sndbuf, &optlen) < 0) in wpas_ctrl_sock_debug()
92 if (ioctl(sock, TIOCOUTQ, &outq) < 0) in wpas_ctrl_sock_debug()
97 title, sock, sndbuf, outq, (int) len); in wpas_ctrl_sock_debug()
129 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, in wpa_supplicant_ctrl_iface_receive() argument
142 res = recvfrom(sock, buf, sizeof(buf) - 1, 0, in wpa_supplicant_ctrl_iface_receive()
193 wpas_ctrl_sock_debug("ctrl_sock-sendto", sock, reply, in wpa_supplicant_ctrl_iface_receive()
[all …]
Dctrl_iface_udp.c46 int sock; member
52 int sock; member
59 const char *ifname, int sock,
217 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, argument
238 res = recvfrom(sock, buf, sizeof(buf) - 1, 0,
331 sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from,
335 sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from,
338 sendto(sock, "OK\n", 3, 0, (struct sockaddr *) &from,
364 priv->sock, &priv->ctrl_dst, level, txt, len);
371 wpa_supplicant_ctrl_iface_send(wpa_s, NULL, wpa_s->ctrl_iface->sock,
[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/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/autotest/client/site_tests/platform_TLSDateActual/
Dplatform_TLSDateActual.py75 def recvbytes(sock, n): argument
76 bs = sock.recv(n)
79 def recvshort(sock): argument
80 x = recvbytes(sock, 2)
104 sock = transformer.accept()[0]
105 sock.settimeout(SOCKTIMEOUT)
107 (_, nmethods) = recvbytes(sock, 2)
108 _ = recvbytes(sock, nmethods)
109 sock.sendall(SOCKS5_VER + AUTH_NONE)
110 (_, cmd, _, atyp) = recvbytes(sock, 4)
[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,
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 …]
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 …]
/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()
195 bool SocketSetNonBlocking(int sock, bool is_non_blocking) { in SocketSetNonBlocking() argument
200 ok = 0 == ioctlsocket(sock, FIONBIO, &arg); in SocketSetNonBlocking()
202 int flags = fcntl(sock, F_GETFL, 0); in SocketSetNonBlocking()
211 ok = 0 == fcntl(sock, F_SETFL, flags); in SocketSetNonBlocking()
226 bool TransferData(SSL *ssl, int sock) { in TransferData() argument
232 if (!SocketSetNonBlocking(sock, true)) { in TransferData()
240 FD_SET(sock, &read_fds); in TransferData()
242 int ret = select(sock + 1, &read_fds, NULL, NULL, NULL); in TransferData()
[all …]
/external/wpa_supplicant_8/src/utils/
Deloop.c43 int sock; member
194 static int eloop_sock_queue(int sock, eloop_event_type type) in eloop_sock_queue() argument
215 ev.data.fd = sock; in eloop_sock_queue()
216 if (epoll_ctl(eloop.epollfd, EPOLL_CTL_ADD, sock, &ev) < 0) { in eloop_sock_queue()
218 __func__, sock, strerror(errno)); in eloop_sock_queue()
227 static int eloop_sock_queue(int sock, eloop_event_type type) in eloop_sock_queue() argument
242 EV_SET(&ke, sock, filter, EV_ADD, 0, 0, 0); in eloop_sock_queue()
245 __func__, sock, strerror(errno)); in eloop_sock_queue()
254 int sock, eloop_sock_handler handler, in eloop_sock_table_add_sock() argument
270 if (sock > eloop.max_sock) in eloop_sock_table_add_sock()
[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/curl/lib/
Dsocks.c121 curl_socket_t sock = conn->sock[sockindex]; in Curl_SOCKS4() local
130 (void)curlx_nonblock(sock, FALSE); in Curl_SOCKS4()
238 code = Curl_write_plain(conn, sock, (char *)socksreq, in Curl_SOCKS4()
248 code = Curl_write_plain(conn, sock, (char *)hostname, hostnamelen, in Curl_SOCKS4()
259 result = Curl_blockread_all(conn, sock, (char *)socksreq, packetsize, in Curl_SOCKS4()
338 (void)curlx_nonblock(sock, TRUE); in Curl_SOCKS4()
376 curl_socket_t sock = conn->sock[sockindex]; local
399 (void)curlx_nonblock(sock, TRUE);
402 result = Curl_socket_ready(CURL_SOCKET_BAD, sock, timeout);
430 (void)curlx_nonblock(sock, FALSE);
[all …]
/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>>...15