Home
last modified time | relevance | path

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

12345678910>>...14

/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);
Dnetlink.c19 int sock; member
36 static void netlink_receive(int sock, void *eloop_ctx, void *sock_ctx) in netlink_receive() argument
48 left = recvfrom(sock, buf, sizeof(buf), MSG_DONTWAIT, in netlink_receive()
100 netlink->sock = socket(PF_NETLINK, SOCK_RAW, NETLINK_ROUTE); in netlink_init()
101 if (netlink->sock < 0) { in netlink_init()
111 if (bind(netlink->sock, (struct sockaddr *) &local, sizeof(local)) < 0) in netlink_init()
119 eloop_register_read_sock(netlink->sock, netlink_receive, netlink, in netlink_init()
132 if (netlink->sock >= 0) { in netlink_deinit()
133 eloop_unregister_read_sock(netlink->sock); in netlink_deinit()
134 close(netlink->sock); in netlink_deinit()
[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 …]
DDefaultClientConnection.java113 public void opening(Socket sock, HttpHost target) throws IOException { in opening() argument
115 this.socket = sock; in opening()
120 sock.close(); // allow this to throw... in opening()
156 Socket sock = this.socket; // copy volatile attribute in shutdown() local
157 if (sock != null) in shutdown()
158 sock.close(); in shutdown()
214 public void update(Socket sock, HttpHost target, in update() argument
228 if (sock != null) { in update()
229 this.socket = sock; in update()
230 bind(sock, params); in update()
/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/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/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/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/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/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/curl/tests/server/
Dsockfilt.c682 curl_socket_t sock; in select_ws() local
800 sock = data[idx].fd; in select_ws()
801 fds = curlx_sktosi(sock); in select_ws()
809 FD_CLR(sock, writefds); in select_ws()
810 FD_CLR(sock, exceptfds); in select_ws()
814 FD_CLR(sock, readfds); in select_ws()
815 FD_CLR(sock, exceptfds); in select_ws()
824 FD_CLR(sock, readfds); in select_ws()
828 FD_CLR(sock, writefds); in select_ws()
841 FD_CLR(sock, exceptfds); in select_ws()
[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 …]
/external/srtp/test/
Drtpw.c115 leave_group(int sock, struct ip_mreq mreq, char *name);
129 int sock, ret; in main() local
257 sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); in main()
258 if (sock < 0) { in main()
275 ret = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, in main()
286 ret = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (void*)&mreq, in main()
399 ret = bind(sock, (struct sockaddr *) &local, sizeof(struct sockaddr_in)); in main()
413 rtp_sender_init(snd, sock, name, ssrc); in main()
427 leave_group(sock, mreq, argv[0]); in main()
448 if (bind(sock, (struct sockaddr *)&name, sizeof(name)) < 0) { in main()
[all …]
/external/chromium-trace/catapult/telemetry/third_party/websocket-client/
Dwebsocket.py377 self.sock = socket.socket()
379 self.sock.setsockopt(*opts)
392 return self.sock.fileno()
410 return self.sock.gettimeout()
418 self.sock.settimeout(timeout)
444 self.sock.connect((hostname, port))
451 self.sock = ssl.wrap_socket(self.sock, **sslopt)
458 sock = self.sock
697 timeout = self.sock.gettimeout()
698 self.sock.settimeout(3)
[all …]

12345678910>>...14