/hardware/qcom/data/ipacfg-mgr/msm8998/ipacm/src/ |
IPACM_Log.cpp | 54 int create_socket(int *sockfd) 57 if ((*sockfd = socket(AF_UNIX, SOCK_DGRAM, 0)) == IPACM_FAILURE) 63 if(fcntl(*sockfd, F_SETFD, FD_CLOEXEC) < 0)
|
/system/extras/simpleperf/ |
UnixSocket.cpp | 51 int sockfd = socket(AF_UNIX, SOCK_STREAM, 0); local 52 if (sockfd < 0) { 60 if (bind(sockfd, reinterpret_cast<sockaddr*>(&serv_addr), sizeof(serv_addr)) < 65 if (listen(sockfd, 1) < 0) { 70 new UnixSocketServer(sockfd, server_path)); 76 int sockfd = accept(server_fd_, nullptr, nullptr); local 77 if (sockfd < 0) { 82 new UnixSocketConnection(sockfd)); 87 int sockfd = socket(AF_UNIX, SOCK_STREAM, 0); local 88 if (sockfd < 0) [all...] |
/external/llvm/examples/Kaleidoscope/BuildingAJIT/Chapter5/Server/ |
server.cpp | 59 int sockfd = socket(PF_INET, SOCK_STREAM, 0); local 70 if (setsockopt(sockfd,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(int)) == -1) { 76 if (bind(sockfd, reinterpret_cast<sockaddr*>(&servAddr), 81 listen(sockfd, 1); 82 int newsockfd = accept(sockfd, reinterpret_cast<sockaddr*>(&clientAddr),
|
/external/ltp/testcases/kernel/syscalls/sendfile/ |
sendfile04.c | 71 static int sockfd, s; variable 142 shutdown(sockfd, SHUT_RDWR); 164 recvfrom(sockfd, rbuf, 4096, 0, (struct sockaddr *)&sin1, 215 sockfd = socket(PF_INET, SOCK_DGRAM, 0); 216 if (sockfd < 0) { 225 if (bind(sockfd, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) { 230 if (getsockname(sockfd, (struct sockaddr *)&sin1, &slen) == -1)
|
sendfile05.c | 66 static int sockfd, s; variable 111 shutdown(sockfd, SHUT_RDWR); 128 recvfrom(sockfd, rbuf, 4096, 0, (struct sockaddr *)&sin1, 179 sockfd = socket(PF_INET, SOCK_DGRAM, 0); 180 if (sockfd < 0) { 189 if (bind(sockfd, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) { 194 if (getsockname(sockfd, (struct sockaddr *)&sin1, &slen) == -1)
|
sendfile02.c | 72 static int sockfd, s; variable 127 shutdown(sockfd, SHUT_RDWR); 166 recvfrom(sockfd, rbuf, 4096, 0, (struct sockaddr *)&sin1, 217 sockfd = socket(PF_INET, SOCK_DGRAM, 0); 218 if (sockfd < 0) { 227 if (bind(sockfd, (struct sockaddr *)&sin1, sizeof(sin1)) < 0) { 232 if (getsockname(sockfd, (struct sockaddr *)&sin1, &slen) == -1)
|
/external/curl/lib/ |
memdebug.c | 349 curl_socket_t sockfd = socket(domain, type, protocol); local 351 if(source && (sockfd != CURL_SOCKET_BAD)) 352 curl_memlog(fmt, source, line, sockfd); 354 return sockfd; 389 curl_socket_t sockfd = accept(s, addr, addrlen); local 391 if(source && (sockfd != CURL_SOCKET_BAD)) 392 curl_memlog(fmt, source, line, sockfd); 394 return sockfd; 398 void curl_mark_sclose(curl_socket_t sockfd, int line, const char *source) 407 curl_memlog(fmt, source, line, sockfd); [all...] |
socks.h | 39 curl_socket_t sockfd,
|
sendf.c | 127 const curl_socket_t sockfd = conn->sock[num]; local 138 const int readymask = Curl_socket_check(sockfd, CURL_SOCKET_BAD, 149 psnd->bindsock = sockfd; /* Used only for DEBUGASSERT */ 155 DEBUGASSERT(psnd->bindsock == sockfd); 156 recvedbytes = sread(sockfd, psnd->buffer + psnd->recv_size, 253 CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *conn, 275 result = Curl_write(conn, sockfd, sptr, write_len, &bytes_written); 306 curl_socket_t sockfd, 313 int num = (sockfd == conn->sock[SECONDARYSOCKET]); 341 curl_socket_t sockfd = conn->sock[num] local 415 curl_socket_t sockfd = conn->sock[num]; local [all...] |
/external/autotest/client/site_tests/platform_CompressedSwapPerf/src/ |
hog.c | 89 int sockfd; local 108 sockfd = socket(AF_UNIX, SOCK_STREAM, 0); 110 if (sockfd < 0) { 127 if (bind(sockfd, (struct sockaddr *)&test_sock_addr, sizeof test_sock_addr)) { 132 if (listen(sockfd, 1)) { 138 if ((connfd = accept(sockfd, NULL, NULL)) < 0) {
|
/external/curl/docs/examples/ |
multi-uv.c | 46 curl_socket_t sockfd; member in struct:curl_context_s 49 curl_context_t* create_curl_context(curl_socket_t sockfd) 55 context->sockfd = sockfd; 57 uv_poll_init_socket(loop, &context->poll_handle, sockfd); 147 curl_multi_socket_action(curl_handle, context->sockfd, flags,
|
hiperfifo.c | 102 curl_socket_t sockfd; member in struct:_SockInfo 239 f->sockfd = s; 244 f->ev = event_new(g->evbase, f->sockfd, kind, event_cb, g); 377 curl_socket_t sockfd; local 392 sockfd = open(fifo, O_RDWR | O_NONBLOCK, 0); 393 if(sockfd == -1) { 397 g->input = fdopen(sockfd, "r"); 400 g->fifo_event = event_new(g->evbase, sockfd, EV_READ|EV_PERSIST, fifo_cb, g);
|
/device/linaro/hikey/bluetooth/ |
bluetooth_hci.cc | 59 int sockfd[2]; local 60 socketpair(AF_LOCAL, SOCK_STREAM, 0, sockfd); 61 int shim_fd = sockfd[0]; 62 int for_hci = sockfd[1];
|
/system/connectivity/wifilogd/ |
raw_os.h | 49 virtual ssize_t Recv(int sockfd, void* buf, size_t buflen, int flags);
|
/external/iproute2/tc/ |
em_ipset.c | 74 int res, sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); local 78 if (sockfd < 0) { 84 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req_version, &size); 91 return sockfd; 96 int sockfd, res; local 98 sockfd = get_version(&req->version); 99 if (sockfd < 0) 101 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, req, &size); 104 close(sockfd);
|
/external/ppp/pppd/plugins/radius/ |
sendserver.c | 194 int sockfd; local 235 sockfd = socket (AF_INET, SOCK_DGRAM, 0); 236 if (sockfd < 0) 249 if (bind (sockfd, (struct sockaddr *) sin, length) < 0 || 250 getsockname (sockfd, (struct sockaddr *) sin, &length) < 0) 252 close (sockfd); 296 sendto (sockfd, (char *) auth, (unsigned int) total_length, (int) 0, 302 FD_SET (sockfd, &readfds); 303 if (select (sockfd + 1, &readfds, NULL, NULL, &authtime) < 0) 309 close (sockfd); [all...] |
/system/core/debuggerd/tombstoned/ |
tombstoned.cpp | 200 static void crash_accept_cb(evconnlistener* listener, evutil_socket_t sockfd, sockaddr*, int, void*); 201 static void crash_request_cb(evutil_socket_t sockfd, short ev, void* arg); 202 static void crash_completed_cb(evutil_socket_t sockfd, short ev, void* arg); 237 static void crash_accept_cb(evconnlistener* listener, evutil_socket_t sockfd, sockaddr*, int, 245 event* crash_event = event_new(base, sockfd, EV_TIMEOUT | EV_READ, crash_request_cb, crash); 246 crash->crash_fd.reset(sockfd); 251 static void crash_request_cb(evutil_socket_t sockfd, short ev, void* arg) { 265 rc = TEMP_FAILURE_RETRY(read(sockfd, &request, sizeof(request))); 295 int ret = getsockopt(sockfd, SOL_SOCKET, SO_PEERCRED, &cr, &len); 318 static void crash_completed_cb(evutil_socket_t sockfd, short ev, void* arg) [all...] |
intercept_manager.h | 39 android::base::unique_fd sockfd; member in struct:Intercept
|
/external/mesa3d/src/gallium/auxiliary/hud/ |
hud_nic.c | 110 int sockfd; local 123 if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { 128 if (ioctl(sockfd, SIOCGIWRATE, &req) == -1) { 130 close(sockfd); 135 close(sockfd); 141 int sockfd; local 157 if ((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) { 163 if (ioctl(sockfd, SIOCGIWSTATS, &req) == -1) { 165 close(sockfd); 170 close(sockfd); [all...] |
/external/toybox/toys/net/ |
ifconfig.c | 56 int sockfd; 113 if (ioctl(TT.sockfd, SIOCGIFFLAGS, &ifre)<0) perror_exit_raw(name); 118 i = ioctl(TT.sockfd, SIOCGIFHWADDR, &ifre); 137 ioctl(TT.sockfd, SIOCGIFADDR, &ifre); 158 if (addr[i].ioctl && ioctl(TT.sockfd, addr[i].ioctl, &ifre)) 225 if (ioctl(TT.sockfd, SIOCGIFMTU, &ifre) < 0) ifre.ifr_mtu = 0; 227 if (ioctl(TT.sockfd, SIOCGIFMETRIC, &ifre) < 0) ifre.ifr_metric = 0; 242 if (ioctl(TT.sockfd, SIOCGIFTXQLEN, &ifre) >= 0) val[16] = ifre.ifr_qlen; 254 if(!ioctl(TT.sockfd, SIOCGIFMAP, &ifre) && (ifre.ifr_map.irq || 320 xioctl(TT.sockfd, SIOCGIFCONF, &ifcon) [all...] |
/external/mdnsresponder/mDNSPosix/ |
mDNSUNP.c | 95 int sockfd = -1; local 104 sockfd = socket(AF_INET6, SOCK_DGRAM, 0); 105 if (sockfd < 0) { 174 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) { 207 if (sockfd != -1) { 209 int sockfd_closed = close(sockfd); 225 int sockfd, sockf6, len, lastlen, flags, myflags; local 242 sockfd = -1; 247 sockfd = socket(AF_INET, SOCK_DGRAM, 0); 248 if (sockfd < 0) [all...] |
/system/netd/client/ |
NetdClient.cpp | 55 int netdClientAccept4(int sockfd, sockaddr* addr, socklen_t* addrlen, int flags) { 56 int acceptedSocket = libcAccept4(sockfd, addr, addrlen, flags); 78 int netdClientConnect(int sockfd, const sockaddr* addr, socklen_t addrlen) { 79 const bool shouldSetFwmark = (sockfd >= 0) && addr 83 if (int error = FwmarkClient().send(&command, sockfd, nullptr)) { 90 const int ret = libcConnect(sockfd, addr, addrlen); 101 FwmarkClient().send(&command, sockfd, &connectInfo);
|
/test/vts/drivers/hal/server/ |
SocketServer.cpp | 227 int sockfd; local 232 sockfd = socket(PF_UNIX, SOCK_STREAM, 0); 233 if (sockfd < 0) { 246 if (::bind(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) == -1) { 254 listen(sockfd, 5); 259 int newsockfd = ::accept(sockfd, (struct sockaddr*)&cli_addr, &clilen); 268 close(sockfd);
|
/external/compiler-rt/test/msan/Linux/ |
cmsghdr.cc | 37 int sockfd = sock[0]; local 55 fd = sockfd; 93 ret = sendmsg(sockfd, &msg, 0);
|
/external/curl/tests/server/ |
sockfilt.c | 903 if sockfd is CURL_SOCKET_BAD, listendfd is a listening socket we must 914 curl_socket_t sockfd = CURL_SOCKET_BAD; local 955 sockfd = listenfd; 957 FD_SET(sockfd, &fds_read); 958 maxfd = (int)sockfd; 963 sockfd = *sockfdp; 964 if(CURL_SOCKET_BAD == sockfd) { 971 FD_SET(sockfd, &fds_read); 973 FD_SET(sockfd, &fds_err); 975 maxfd = (int)sockfd; [all...] |