Home
last modified time | relevance | path

Searched refs:sockfd (Results 1 – 17 of 17) sorted by relevance

/external/iptables/extensions/
Dlibxt_set.h18 int res, sockfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW); in get_version() local
22 if (sockfd < 0) in get_version()
27 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req_version, &size); in get_version()
34 return sockfd; in get_version()
42 int res, sockfd; in get_set_byid() local
44 sockfd = get_version(&req.version); in get_set_byid()
47 res = getsockopt(sockfd, SOL_IP, SO_IP_SET, &req, &size); in get_set_byid()
48 close(sockfd); in get_set_byid()
71 int res, sockfd; in get_set_byname() local
73 sockfd = get_version(&req.version); in get_set_byname()
[all …]
/external/ppp/pppd/plugins/radius/
Dsendserver.c194 int sockfd; in rc_send_server() local
235 sockfd = socket (AF_INET, SOCK_DGRAM, 0); in rc_send_server()
236 if (sockfd < 0) in rc_send_server()
249 if (bind (sockfd, (struct sockaddr *) sin, length) < 0 || in rc_send_server()
250 getsockname (sockfd, (struct sockaddr *) sin, &length) < 0) in rc_send_server()
252 close (sockfd); in rc_send_server()
296 sendto (sockfd, (char *) auth, (unsigned int) total_length, (int) 0, in rc_send_server()
302 FD_SET (sockfd, &readfds); in rc_send_server()
303 if (select (sockfd + 1, &readfds, NULL, NULL, &authtime) < 0) in rc_send_server()
309 close (sockfd); in rc_send_server()
[all …]
/external/mdnsresponder/mDNSPosix/
DmDNSUNP.c95 int sockfd = -1; in get_ifi_info_linuxv6() local
104 sockfd = socket(AF_INET6, SOCK_DGRAM, 0); in get_ifi_info_linuxv6()
105 if (sockfd < 0) { in get_ifi_info_linuxv6()
174 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) { in get_ifi_info_linuxv6()
207 if (sockfd != -1) { in get_ifi_info_linuxv6()
208 assert(close(sockfd) == 0); in get_ifi_info_linuxv6()
218 int sockfd, sockf6, len, lastlen, flags, myflags; in get_ifi_info() local
235 sockfd = -1; in get_ifi_info()
240 sockfd = socket(AF_INET, SOCK_DGRAM, 0); in get_ifi_info()
241 if (sockfd < 0) { in get_ifi_info()
[all …]
/external/mdnsresponder/mDNSShared/
Ddnssd_clientstub.c119 #define DNSServiceRefValid(X) (dnssd_SocketValid((X)->sockfd) && (((X)->sockfd ^ (X)->validator) ==…
131 dnssd_sock_t sockfd; // Connected socket between client and daemon member
386 if ((x->sockfd ^ x->validator) != ValidatorBits) in FreeDNSServiceOp()
387 …ssd_clientstub attempt to dispose invalid DNSServiceRef %p %08X %08X", x, x->sockfd, x->validator); in FreeDNSServiceOp()
392 x->sockfd = dnssd_InvalidSocket; in FreeDNSServiceOp()
438 (*ref), (*ref)->sockfd, (*ref)->validator); in ConnectToServer()
459 sdr->sockfd = dnssd_InvalidSocket; in ConnectToServer()
460 sdr->validator = sdr->sockfd ^ ValidatorBits; in ConnectToServer()
484 sdr->sockfd = (*ref)->sockfd; // Inherit primary's socket in ConnectToServer()
495 sdr->sockfd = socket(AF_DNSSD, SOCK_STREAM, 0); in ConnectToServer()
[all …]
/external/dnsmasq/src/
Dtftp.c147 if ((transfer->sockfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) in tftp_request()
166 if (bind(transfer->sockfd, (struct sockaddr *)&addr, sizeof(addr)) == -1 || in tftp_request()
168 setsockopt(transfer->sockfd, SOL_IP, IP_MTU_DISCOVER, &mtuflag, sizeof(mtuflag)) == -1 || in tftp_request()
170 !fix_fd(transfer->sockfd)) in tftp_request()
275 while (sendto(transfer->sockfd, packet, len, 0, in tftp_request()
385 if (FD_ISSET(transfer->sockfd, rset)) in check_tftp_listeners()
390 …if ((len = recv(transfer->sockfd, daemon->packet, daemon->packet_buff_sz, 0)) >= (ssize_t)sizeof(s… in check_tftp_listeners()
453 while(sendto(transfer->sockfd, daemon->packet, len, 0, in check_tftp_listeners()
471 close(transfer->sockfd); in free_transfer()
Ddnsmasq.c1028 FD_SET(transfer->sockfd, set); in set_dns_listeners()
1029 bump_maxfd(transfer->sockfd, maxfdp); in set_dns_listeners()
Ddnsmasq.h585 int sockfd; member
/external/openssh/
Dsshconnect.c243 timeout_connect(int sockfd, const struct sockaddr *serv_addr, in timeout_connect() argument
254 result = connect(sockfd, serv_addr, addrlen); in timeout_connect()
258 set_nonblock(sockfd); in timeout_connect()
259 rc = connect(sockfd, serv_addr, addrlen); in timeout_connect()
261 unset_nonblock(sockfd); in timeout_connect()
270 fdset = (fd_set *)xcalloc(howmany(sockfd + 1, NFDBITS), in timeout_connect()
272 FD_SET(sockfd, fdset); in timeout_connect()
276 rc = select(sockfd + 1, NULL, fdset, NULL, &tv); in timeout_connect()
294 if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, in timeout_connect()
304 unset_nonblock(sockfd); in timeout_connect()
/external/valgrind/tsan/
Dts_util.cc479 int sockfd; in OpenSocketForWriting() local
482 sockfd = socket(AF_INET, SOCK_STREAM, 0); in OpenSocketForWriting()
483 if (sockfd < 0) return NULL; in OpenSocketForWriting()
492 if (connect(sockfd, (struct sockaddr*)&serv_addr, sizeof(serv_addr)) < 0) in OpenSocketForWriting()
494 return fdopen(sockfd, "w"); in OpenSocketForWriting()
/external/iptables/libiptc/
Dlibiptc.c135 int sockfd; variable
1316 int sockfd; in TC_INIT() local
1325 sockfd = socket(TC_AF, SOCK_RAW, IPPROTO_RAW); in TC_INIT()
1326 if (sockfd < 0) in TC_INIT()
1333 if (getsockopt(sockfd, TC_IPPROTO, SO_GET_INFO, &info, &s) < 0) { in TC_INIT()
1334 close(sockfd); in TC_INIT()
1343 close(sockfd); in TC_INIT()
1348 h->sockfd = sockfd; in TC_INIT()
1355 if (getsockopt(h->sockfd, TC_IPPROTO, SO_GET_ENTRIES, h->entries, in TC_INIT()
1389 close(h->sockfd); in TC_FREE()
[all …]
/external/iptables/iptables/
Dxtables.c744 int max_rev, sockfd; in compatible_revision() local
746 sockfd = socket(afinfo->family, SOCK_RAW, IPPROTO_RAW); in compatible_revision()
747 if (sockfd < 0) { in compatible_revision()
762 if (fcntl(sockfd, F_SETFD, FD_CLOEXEC) == -1) { in compatible_revision()
773 max_rev = getsockopt(sockfd, afinfo->ipproto, opt, &rev, &s); in compatible_revision()
777 close(sockfd); in compatible_revision()
780 close(sockfd); in compatible_revision()
789 close(sockfd); in compatible_revision()
/external/clang/tools/libclang/
DCIndexCodeCompletion.cpp782 int sockfd = socket(AF_INET, SOCK_DGRAM, 0); in clang_codeCompleteAt_Impl() local
783 if (sockfd < 0) in clang_codeCompleteAt_Impl()
786 sendto(sockfd, res.data(), res.size(), 0, in clang_codeCompleteAt_Impl()
788 close(sockfd); in clang_codeCompleteAt_Impl()
/external/valgrind/main/coregrind/
Dm_libcfile.c680 Int my_connect ( Int sockfd, struct vki_sockaddr_in* serv_addr, Int addrlen );
861 Int my_connect ( Int sockfd, struct vki_sockaddr_in* serv_addr, Int addrlen ) in my_connect() argument
867 args[0] = sockfd; in my_connect()
875 res = VG_(do_syscall3)(__NR_connect, sockfd, (UWord)serv_addr, addrlen); in my_connect()
881 sockfd, (UWord)serv_addr, addrlen); in my_connect()
/external/valgrind/main/coregrind/m_syswrap/
Dsyswrap-amd64-linux.c679 int, sockfd, struct sockaddr *, serv_addr, int, addrlen); in PRE()
776 int, sockfd, struct sockaddr *, my_addr, int, addrlen); in PRE()
Dsyswrap-arm-linux.c648 int, sockfd, struct sockaddr *, serv_addr, int, addrlen); in PRE()
892 int, sockfd, struct sockaddr *, my_addr, int, addrlen); in PRE()
Dsyswrap-darwin.c3012 int, sockfd, struct sockaddr *, serv_addr, int, addrlen); in PRE()
3140 int, sockfd, struct sockaddr *, my_addr, int, addrlen); in PRE()
/external/blktrace/
Dblktrace.c698 static int my_accept(int sockfd, struct sockaddr *addr, socklen_t *addrlen) in my_accept() argument
703 fd = accept(sockfd, addr, addrlen); in my_accept()