Home
last modified time | relevance | path

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

1234567891011

/external/kernel-headers/original/linux/
Dnet.h113 struct sock *sk;
128 int (*release) (struct socket *sock);
129 int (*bind) (struct socket *sock,
132 int (*connect) (struct socket *sock,
137 int (*accept) (struct socket *sock,
139 int (*getname) (struct socket *sock,
142 unsigned int (*poll) (struct file *file, struct socket *sock,
144 int (*ioctl) (struct socket *sock, unsigned int cmd,
146 int (*compat_ioctl) (struct socket *sock, unsigned int cmd,
148 int (*listen) (struct socket *sock, int len);
[all …]
Dnetlink.h174 extern struct sock *netlink_kernel_create(struct net *net,
179 extern void netlink_kernel_release(struct sock *sk);
180 extern int __netlink_change_ngroups(struct sock *sk, unsigned int groups);
181 extern int netlink_change_ngroups(struct sock *sk, unsigned int groups);
182 extern void __netlink_clear_multicast_users(struct sock *sk, unsigned int group);
183 extern void netlink_clear_multicast_users(struct sock *sk, unsigned int group);
185 extern int netlink_has_listeners(struct sock *sk, unsigned int group);
186 extern int netlink_unicast(struct sock *ssk, struct sk_buff *skb, __u32 pid, int nonblock);
187 extern int netlink_broadcast(struct sock *ssk, struct sk_buff *skb, __u32 pid,
189 extern int netlink_broadcast_filtered(struct sock *ssk, struct sk_buff *skb,
[all …]
/external/quake/quake/src/WinQuake/
Dnet_loop.cpp127 int Loop_GetMessage (qsocket_t *sock) in Loop_GetMessage() argument
132 if (sock->receiveMessageLength == 0) in Loop_GetMessage()
135 ret = sock->receiveMessage[0]; in Loop_GetMessage()
136 length = sock->receiveMessage[1] + (sock->receiveMessage[2] << 8); in Loop_GetMessage()
139 SZ_Write (&net_message, &sock->receiveMessage[4], length); in Loop_GetMessage()
142 sock->receiveMessageLength -= length; in Loop_GetMessage()
144 if (sock->receiveMessageLength) in Loop_GetMessage()
145 Q_memcpy(sock->receiveMessage, &sock->receiveMessage[length], sock->receiveMessageLength); in Loop_GetMessage()
147 if (sock->driverdata && ret == 1) in Loop_GetMessage()
148 ((qsocket_t *)sock->driverdata)->canSend = true; in Loop_GetMessage()
[all …]
Dnet_main.cpp87 #define sfunc net_drivers[sock->driver]
112 qsocket_t *sock; in NET_NewQSocket() local
121 sock = net_freeSockets; in NET_NewQSocket()
122 net_freeSockets = sock->next; in NET_NewQSocket()
125 sock->next = net_activeSockets; in NET_NewQSocket()
126 net_activeSockets = sock; in NET_NewQSocket()
128 sock->disconnected = false; in NET_NewQSocket()
129 sock->connecttime = net_time; in NET_NewQSocket()
130 Q_strcpy (sock->address,"UNSET ADDRESS"); in NET_NewQSocket()
131 sock->driver = net_driverlevel; in NET_NewQSocket()
[all …]
Dnet_ser.cpp75 qsocket_t *sock; member
172 if (p->sequence == p->sock->receiveSequence) in ProcessInQueue()
174 p->sock->receiveSequence = (p->sequence + 1) & 0xff; in ProcessInQueue()
175 p->sock->receiveMessageLength += p->lengthFound; in ProcessInQueue()
178 …Con_DPrintf("Serial: reliable out of order; got %u wanted %u\n", p->sequence, p->sock->receiveSequ… in ProcessInQueue()
182 p->sock->unreliableReceiveSequence = (p->sequence + 1) & 0xff; in ProcessInQueue()
183 p->sock->receiveMessageLength += p->lengthFound; in ProcessInQueue()
188 if (p->sequence == p->sock->sendSequence) in ProcessInQueue()
190 p->sock->sendSequence = (p->sock->sendSequence + 1) & 0xff; in ProcessInQueue()
191 p->sock->canSend = true; in ProcessInQueue()
[all …]
Dnet_dgrm.cpp44 #define sfunc net_landrivers[sock->landriver]
163 int Datagram_SendMessage (qsocket_t *sock, sizebuf_t *data) in Datagram_SendMessage() argument
176 if (sock->canSend == false) in Datagram_SendMessage()
180 Q_memcpy(sock->sendMessage, data->data, data->cursize); in Datagram_SendMessage()
181 sock->sendMessageLength = data->cursize; in Datagram_SendMessage()
196 packetBuffer.sequence = BigLong(sock->sendSequence++); in Datagram_SendMessage()
197 Q_memcpy (packetBuffer.data, sock->sendMessage, dataLen); in Datagram_SendMessage()
199 sock->canSend = false; in Datagram_SendMessage()
201 if (sfunc.Write (sock->socket, (byte *)&packetBuffer, packetLen, &sock->addr) == -1) in Datagram_SendMessage()
204 sock->lastSendTime = net_time; in Datagram_SendMessage()
[all …]
Dnet_vcr.cpp77 static long getDriverDataAsLong(qsocket_t *sock) { in getDriverDataAsLong() argument
79 memcpy(&driverDataAsLong, &sock->driverdata, sizeof(long)); in getDriverDataAsLong()
83 int VCR_GetMessage (qsocket_t *sock) in VCR_GetMessage() argument
87 …ost_time != next.time || next.op != VCR_OP_GETMESSAGE || next.session != getDriverDataAsLong(sock)) in VCR_GetMessage()
106 int VCR_SendMessage (qsocket_t *sock, sizebuf_t *data) in VCR_SendMessage() argument
110 …st_time != next.time || next.op != VCR_OP_SENDMESSAGE || next.session != getDriverDataAsLong(sock)) in VCR_SendMessage()
121 qboolean VCR_CanSendMessage (qsocket_t *sock) in VCR_CanSendMessage() argument
125 …time != next.time || next.op != VCR_OP_CANSENDMESSAGE || next.session != getDriverDataAsLong(sock)) in VCR_CanSendMessage()
136 void VCR_Close (qsocket_t *sock) in VCR_Close() argument
154 qsocket_t *sock; in VCR_CheckNewConnections() local
[all …]
/external/bluetooth/bluez/btio/
Dbtio.c152 int err = 0, sock = g_io_channel_unix_get_fd(io); in connect_cb() local
155 if (getsockopt(sock, SOL_SOCKET, SO_ERROR, &err, &len) < 0) in connect_cb()
256 static int l2cap_bind(int sock, const bdaddr_t *src, uint16_t psm, in l2cap_bind() argument
270 if (bind(sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in l2cap_bind()
278 static int l2cap_connect(int sock, const bdaddr_t *dst, in l2cap_connect() argument
292 err = connect(sock, (struct sockaddr *) &addr, sizeof(addr)); in l2cap_connect()
299 static int l2cap_set_master(int sock, int master) in l2cap_set_master() argument
305 if (getsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, &len) < 0) in l2cap_set_master()
318 if (setsockopt(sock, SOL_L2CAP, L2CAP_LM, &flags, sizeof(flags)) < 0) in l2cap_set_master()
324 static int rfcomm_set_master(int sock, int master) in rfcomm_set_master() argument
[all …]
/external/qemu/
Dqemu-sockets-android.c194 int sock, nn; in inet_connect_opts() local
229 sock = socket_create(sock_address_get_family(e), SOCKET_STREAM); in inet_connect_opts()
230 if (sock < 0) { in inet_connect_opts()
235 socket_set_xreuseaddr(sock); in inet_connect_opts()
238 if (socket_connect(sock,e) < 0) { in inet_connect_opts()
243 socket_close(sock); in inet_connect_opts()
253 sock = -1; in inet_connect_opts()
256 return sock; in inet_connect_opts()
269 int sock = -1; in inet_dgram_opts() local
327 sock = socket_create(sock_address_get_family(e), SOCKET_DGRAM); in inet_dgram_opts()
[all …]
Dqemu-sockets.c239 int sock,rc; in inet_connect_opts() local
281 sock = qemu_socket(e->ai_family, e->ai_socktype, e->ai_protocol); in inet_connect_opts()
282 if (sock < 0) { in inet_connect_opts()
287 setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(void*)&on,sizeof(on)); in inet_connect_opts()
290 if (connect(sock,e->ai_addr,e->ai_addrlen) < 0) { in inet_connect_opts()
295 closesocket(sock); in inet_connect_opts()
303 return sock; in inet_connect_opts()
316 int sock = -1, rc; in inet_dgram_opts() local
374 sock = qemu_socket(peer->ai_family, peer->ai_socktype, peer->ai_protocol); in inet_dgram_opts()
375 if (sock < 0) { in inet_dgram_opts()
[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()
57 int linux_iface_up(int sock, const char *ifname) in linux_iface_up() argument
62 if (sock < 0) in linux_iface_up()
68 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { in linux_iface_up()
79 int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr) in linux_get_ifhwaddr() argument
85 if (ioctl(sock, SIOCGIFHWADDR, &ifr)) { in linux_get_ifhwaddr()
102 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/chromium/net/tools/flip_server/
Dcreate_listener.cc141 int sock = socket(results->ai_family, in CreateListeningSocket() local
144 if (sock == -1) { in CreateListeningSocket()
154 rc = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, in CreateListeningSocket()
157 close(sock); in CreateListeningSocket()
168 rc = setsockopt(sock, SOL_SOCKET, SO_REUSEPORT, in CreateListeningSocket()
171 close(sock); in CreateListeningSocket()
176 if (bind(sock, results->ai_addr, results->ai_addrlen)) { in CreateListeningSocket()
186 if (CloseSocket(&sock, 100)) { in CreateListeningSocket()
201 if (!SetDisableNagle(sock)) { in CreateListeningSocket()
206 if (listen(sock, backlog)) { in CreateListeningSocket()
[all …]
/external/wpa_supplicant_8/wpa_supplicant/
Dctrl_iface_unix.c46 int sock; member
127 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, in wpa_supplicant_ctrl_iface_receive() argument
140 res = recvfrom(sock, buf, sizeof(buf) - 1, 0, in wpa_supplicant_ctrl_iface_receive()
201 sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
205 sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
208 sendto(sock, "OK\n", 3, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
297 priv->sock = -1; in wpa_supplicant_ctrl_iface_init()
308 priv->sock = android_get_control_socket(addr.sun_path); in wpa_supplicant_ctrl_iface_init()
309 if (priv->sock >= 0) in wpa_supplicant_ctrl_iface_init()
375 priv->sock = socket(PF_UNIX, SOCK_DGRAM, 0); in wpa_supplicant_ctrl_iface_init()
[all …]
Dctrl_iface_udp.c42 int sock; member
146 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, in wpa_supplicant_ctrl_iface_receive() argument
160 res = recvfrom(sock, buf, sizeof(buf) - 1, 0, in wpa_supplicant_ctrl_iface_receive()
238 sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
242 sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
245 sendto(sock, "OK\n", 3, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
274 priv->sock = -1; in wpa_supplicant_ctrl_iface_init()
280 priv->sock = socket(PF_INET, SOCK_DGRAM, 0); in wpa_supplicant_ctrl_iface_init()
281 if (priv->sock < 0) { in wpa_supplicant_ctrl_iface_init()
290 if (bind(priv->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in wpa_supplicant_ctrl_iface_init()
[all …]
/external/wpa_supplicant_6/wpa_supplicant/
Dctrl_iface_unix.c51 int sock; member
141 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, in wpa_supplicant_ctrl_iface_receive() argument
154 res = recvfrom(sock, buf, sizeof(buf) - 1, 0, in wpa_supplicant_ctrl_iface_receive()
186 sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
190 sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
193 sendto(sock, "OK\n", 3, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
281 priv->sock = -1; in wpa_supplicant_ctrl_iface_init()
292 priv->sock = android_get_control_socket(addr.sun_path); in wpa_supplicant_ctrl_iface_init()
293 if (priv->sock >= 0) in wpa_supplicant_ctrl_iface_init()
359 priv->sock = socket(PF_UNIX, SOCK_DGRAM, 0); in wpa_supplicant_ctrl_iface_init()
[all …]
Dctrl_iface_udp.c48 int sock; member
152 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, in wpa_supplicant_ctrl_iface_receive() argument
166 res = recvfrom(sock, buf, sizeof(buf) - 1, 0, in wpa_supplicant_ctrl_iface_receive()
244 sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
248 sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
251 sendto(sock, "OK\n", 3, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
280 priv->sock = -1; in wpa_supplicant_ctrl_iface_init()
286 priv->sock = socket(PF_INET, SOCK_DGRAM, 0); in wpa_supplicant_ctrl_iface_init()
287 if (priv->sock < 0) { in wpa_supplicant_ctrl_iface_init()
296 if (bind(priv->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) { in wpa_supplicant_ctrl_iface_init()
[all …]
/external/qemu/block/
Dnbd.c37 int sock; member
47 int sock; in nbd_open() local
60 sock = unix_socket_outgoing(unixpath); in nbd_open()
79 sock = tcp_socket_outgoing(hostname, port); in nbd_open()
82 if (sock == -1) in nbd_open()
85 ret = nbd_receive_negotiate(sock, &size, &blocksize); in nbd_open()
89 s->sock = sock; in nbd_open()
108 if (nbd_send_request(s->sock, &request) == -1) in nbd_read()
111 if (nbd_receive_reply(s->sock, &reply) == -1) in nbd_read()
120 if (nbd_wr_sync(s->sock, buf, request.len, 1) != request.len) in nbd_read()
[all …]
/external/apache-http/src/org/apache/http/impl/conn/
DDefaultClientConnectionOperator.java140 Socket sock = plain_sf.createSocket(); in openConnection() local
141 conn.opening(sock, target); in openConnection()
144 Socket connsock = plain_sf.connectSocket(sock, in openConnection()
148 if (sock != connsock) { in openConnection()
149 sock = connsock; in openConnection()
150 conn.opening(sock, target); in openConnection()
163 prepareSocket(sock, context, params); in openConnection()
165 Socket layeredsock = layered_sf.createSocket(sock, in openConnection()
169 if (layeredsock != sock) { in openConnection()
174 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/dropbear/
Ddbutil.c156 static void set_sock_priority(int sock) { in set_sock_priority() argument
162 setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, (void*)&val, sizeof(val)); in set_sock_priority()
168 setsockopt(sock, IPPROTO_IP, IP_TOS, (void*)&val, sizeof(val)); in set_sock_priority()
175 setsockopt(sock, SOL_SOCKET, SO_PRIORITY, (void*) &val, sizeof(val)); in set_sock_priority()
194 int sock; in dropbear_listen() local
241 sock = socks[nsock]; /* For clarity */ in dropbear_listen()
243 if (sock < 0) { in dropbear_listen()
252 setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (void*) &val, sizeof(val)); in dropbear_listen()
255 setsockopt(sock, SOL_SOCKET, SO_LINGER, (void*)&linger, sizeof(linger)); in dropbear_listen()
257 set_sock_priority(sock); in dropbear_listen()
[all …]
/external/chromium/net/socket/
Dssl_client_socket_unittest.cc82 scoped_ptr<net::SSLClientSocket> sock( in TEST_F() local
87 EXPECT_FALSE(sock->IsConnected()); in TEST_F()
89 rv = sock->Connect(&callback); in TEST_F()
98 EXPECT_TRUE(sock->IsConnected()); in TEST_F()
102 sock->Disconnect(); in TEST_F()
103 EXPECT_FALSE(sock->IsConnected()); in TEST_F()
124 scoped_ptr<net::SSLClientSocket> sock( in TEST_F() local
128 EXPECT_FALSE(sock->IsConnected()); in TEST_F()
130 rv = sock->Connect(&callback); in TEST_F()
167 scoped_ptr<net::SSLClientSocket> sock( in TEST_F() local
[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.java100 public Socket connectSocket(Socket sock, String host, int port, in connectSocket() argument
112 if (sock == null) in connectSocket()
113 sock = createSocket(); in connectSocket()
123 sock.bind(isa); in connectSocket()
136 sock.connect(new InetSocketAddress(address, port), timeout); in connectSocket()
142 sock = new Socket(); in connectSocket()
150 return sock; in connectSocket()
165 public final boolean isSecure(Socket sock) in isSecure() argument
168 if (sock == null) { in isSecure()
174 if (sock.getClass() != Socket.class) { in isSecure()
[all …]
/external/apache-http/src/org/apache/http/conn/scheme/
DPlainSocketFactory.java84 public Socket connectSocket(Socket sock, String host, int port, in connectSocket() argument
96 if (sock == null) in connectSocket()
97 sock = createSocket(); in connectSocket()
107 sock.bind(isa); in connectSocket()
119 sock.connect(remoteAddress, timeout); in connectSocket()
123 return sock; in connectSocket()
139 public final boolean isSecure(Socket sock) in isSecure() argument
142 if (sock == null) { in isSecure()
148 if (sock.getClass() != Socket.class) { in isSecure()
154 if (sock.isClosed()) { in isSecure()

1234567891011