Searched refs:sockfd (Results 1 - 25 of 38) sorted by relevance

12

/netbsd-current/external/ibm-public/postfix/dist/src/util/
H A Dvstream_popen.c201 int sockfd[2]; local
214 if (duplex_pipe(sockfd) < 0)
219 (void) close(sockfd[0]);
220 (void) close(sockfd[1]);
224 if (close(sockfd[1]))
227 if (sockfd[0] != fd)
228 if (DUP2(sockfd[0], fd) < 0)
230 if (sockfd[0] >= 2 && close(sockfd[0]))
270 if (close(sockfd[
[all...]
/netbsd-current/external/mit/libuv/dist/docs/code/uvwget/
H A Dmain.c13 curl_socket_t sockfd; member in struct:curl_context_s
16 curl_context_t *create_curl_context(curl_socket_t sockfd) { argument
21 context->sockfd = sockfd;
23 int r = uv_poll_init_socket(loop, &context->poll_handle, sockfd);
93 curl_multi_socket_action(curl_handle, context->sockfd, flags, &running_handles);
/netbsd-current/external/apache2/mDNSResponder/dist/mDNSPosix/
H A DmDNSUNP.c95 int sockfd = -1; local
104 sockfd = socket(AF_INET6, SOCK_DGRAM, 0);
105 if (sockfd < 0) {
169 if (ioctl(sockfd, SIOCGIFFLAGS, &ifr) < 0) {
203 if (sockfd != -1) {
205 rv = close(sockfd);
219 int sockfd, sockf6, len, lastlen, flags, myflags; local
236 sockfd = -1;
241 sockfd = socket(AF_INET, SOCK_DGRAM, 0);
242 if (sockfd <
[all...]
/netbsd-current/external/mpl/bind/dist/bin/named/
H A Dfuzz.c62 int sockfd; local
94 sockfd = socket(AF_INET, SOCK_DGRAM, 0);
95 RUNTIME_CHECK(sockfd != -1);
128 close(sockfd);
142 sent = sendto(sockfd, buf, length, 0,
150 (void)recvfrom(sockfd, buf, 65536, MSG_DONTWAIT, NULL, NULL);
161 close(sockfd);
272 int sockfd; local
338 sockfd = socket(AF_INET, SOCK_DGRAM, 0);
339 RUNTIME_CHECK(sockfd !
608 int sockfd; local
[all...]
/netbsd-current/external/mit/libuv/dist/src/unix/
H A Dos390.c276 int sockfd; local
289 if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP)))
295 uv__close(sockfd);
302 if (ioctl(sockfd, SIOCGIFCONF6, &ifc) == -1) {
308 uv__close(sockfd);
329 uv__close(sockfd);
337 uv__close(sockfd);
366 uv__close(sockfd);
391 uv__close(sockfd);
398 int sockfd; local
[all...]
H A Dpipe.c46 int sockfd; local
68 sockfd = err;
74 if (bind(sockfd, (struct sockaddr*)&saddr, sizeof saddr)) {
80 uv__close(sockfd);
87 handle->io_watcher.fd = sockfd;
H A Dtcp.c34 int sockfd; local
40 sockfd = err;
42 err = uv__stream_open((uv_stream_t*) handle, sockfd, flags);
44 uv__close(sockfd);
53 uv__close(sockfd);
58 uv__close(sockfd);
H A Dcore.c463 int sockfd; local
467 sockfd = socket(domain, type | SOCK_NONBLOCK | SOCK_CLOEXEC, protocol);
468 if (sockfd != -1)
469 return sockfd;
475 sockfd = socket(domain, type, protocol);
476 if (sockfd == -1)
479 err = uv__nonblock(sockfd, 1);
481 err = uv__cloexec(sockfd, 1);
484 uv__close(sockfd);
491 setsockopt(sockfd, SOL_SOCKE
515 uv__accept(int sockfd) argument
[all...]
H A Dsunos.c768 int sockfd; local
793 sockfd = socket(AF_INET, SOCK_DGRAM, 0);
794 if (sockfd < 0)
797 if (ioctl(sockfd, SIOCGARP, (char*)&arpreq) == -1) {
798 uv__close(sockfd);
802 uv__close(sockfd);
H A Daix.c1102 int sockfd, sock6fd, inet6, i, r, size = 1; local
1114 if (0 > (sockfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP))) {
1124 if (ioctl(sockfd, SIOCGSIZIFCONF, &size) == -1) {
1135 if (ioctl(sockfd, SIOCGIFCONF, &ifc) == -1) {
1154 if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1) {
1189 if (ioctl(sockfd, SIOCGIFFLAGS, &flg) == -1)
1217 if (ioctl(sockfd, SIOCGIFNETMASK, p) == -1)
1259 if (sockfd != -1)
1260 uv__close(sockfd);
/netbsd-current/sys/lib/libsa/
H A Dbootparam.c106 bp_whoami(int sockfd) argument
138 if (!(d = socktodesc(sockfd))) {
139 RPC_PRINTF(("%s: bad socket. %d\n", __func__, sockfd));
236 bp_getfile(int sockfd, char *key, struct in_addr *serv_addr, char *pathname) argument
253 if (!(d = socktodesc(sockfd))) {
254 RPC_PRINTF(("%s: bad socket. %d\n", __func__, sockfd));
/netbsd-current/external/apache2/mDNSResponder/dist/mDNSShared/
H A Ddnssd_clientstub.c133 #define DNSServiceRefValid(X) (dnssd_SocketValid((X)->sockfd) && (((X)->sockfd ^ (X)->validator) == ValidatorBits))
145 dnssd_sock_t sockfd; // Connected socket between client and daemon member in struct:_DNSServiceRef_t
430 // then sockfd could legitimately contain a failing value (e.g. dnssd_InvalidSocket)
431 if ((x->sockfd ^ x->validator) != ValidatorBits)
434 syslog(LOG_WARNING, "dnssd_clientstub attempt to dispose invalid DNSServiceRef %p %08X %08X", x, x->sockfd, x->validator);
441 x->sockfd = dnssd_InvalidSocket;
492 (*ref), (*ref)->sockfd, (*ref)->validator, (*ref)->op);
519 sdr->sockfd = dnssd_InvalidSocket;
520 sdr->validator = sdr->sockfd
[all...]
/netbsd-current/usr.sbin/faithd/
H A Dfaithd.c89 static int sockfd = 0; variable
154 sockfd = socket(PF_ROUTE, SOCK_RAW, PF_UNSPEC);
155 if (sockfd < 0) {
321 sockfd = socket(PF_ROUTE, SOCK_RAW, PF_UNSPEC);
322 if (sockfd < 0) {
362 if (sockfd) {
363 pfd[1].fd = sockfd;
818 len = read(sockfd, msg, sizeof(msg));
830 (void)close(sockfd);
831 sockfd
[all...]
/netbsd-current/sys/arch/usermode/usermode/
H A Dthunk.c989 rfb->sockfd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP);
990 if (rfb->sockfd == -1) {
1000 if (bind(rfb->sockfd, (struct sockaddr *)&sin, sizeof(sin)) == -1) {
1003 close(rfb->sockfd);
1007 if (listen(rfb->sockfd, 1) != 0) {
1010 close(rfb->sockfd);
1021 int sockfd; local
1025 sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP);
1026 if (sockfd < 0) {
1037 if (bind(sockfd, (struc
1055 thunk_gdb_accept(int sockfd) argument
[all...]
/netbsd-current/external/bsd/ntp/dist/ntpdc/
H A Dntpdc.c183 static SOCKET sockfd; /* fd socket is opened on */ variable
490 closesocket(sockfd);
520 sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
521 if (sockfd == INVALID_SOCKET) {
531 if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
539 if (connect(sockfd, (struct sockaddr *)&hostaddr,
542 if (connect(sockfd, ai->ai_addr, ai->ai_addrlen) == -1)
567 if (send(sockfd, xdata, xdatalen, 0) == -1) {
648 FD_SET(sockfd, &fds);
649 n = select(sockfd
[all...]
/netbsd-current/sys/arch/usermode/include/
H A Dthunk.h131 int thunk_gdb_accept(int sockfd);
234 int sockfd; member in struct:__anon16954
/netbsd-current/external/gpl3/gdb.old/dist/gnulib/import/
H A Dsys_socket.in.h708 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
711 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
715 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
718 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
/netbsd-current/external/gpl3/gdb/dist/gnulib/import/
H A Dsys_socket.in.h708 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
711 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
715 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
718 (int sockfd, struct sockaddr *addr, socklen_t *addrlen,
/netbsd-current/external/bsd/libpcap/dist/
H A Dpcap-sita.c325 int sockfd; local
345 if ((sockfd = socket(AF_INET, SOCK_STREAM, 0)) < 0) {
349 if (connect(sockfd, (struct sockaddr *)u->serv_addr, sizeof(struct sockaddr_in)) < 0) {
353 if (flag == LIVE) u->fd = sockfd;
354 else u->find_fd = sockfd;
356 return sockfd; /* return the non-zero file descriptor as a 'success' indicator */
/netbsd-current/external/bsd/ntp/dist/ntpq/
H A Dntpq.c369 SOCKET sockfd; /* fd socket is opened on */ variable
749 closesocket(sockfd);
783 sockfd = socket(ai->ai_family, ai->ai_socktype,
785 if (sockfd == INVALID_SOCKET) {
795 if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
804 (connect(sockfd, (struct sockaddr *)&hostaddr,
807 (connect(sockfd, (struct sockaddr *)ai->ai_addr,
882 if (send(sockfd, xdata, xdatalen, 0) == -1) {
960 FD_SET(sockfd, &fds);
961 n = select(sockfd
[all...]
H A Dlibntpq.c271 return closesocket(sockfd);
/netbsd-current/external/bsd/ntp/dist/ntpdate/
H A Dntpdate.c1326 SOCKET sockfd; local
1328 sockfd = socket(AF(dst), SOCK_DGRAM, 0);
1329 if (sockfd == -1) {
1333 if (connect(sockfd, &dst->sa, SOCKLEN(dst))) {
1334 closesocket(sockfd);
1337 closesocket(sockfd);
/netbsd-current/external/bsd/libfido2/dist/fuzz/
H A Dwrap.c648 (int sockfd, const struct sockaddr *addr, socklen_t addrlen),
650 (sockfd, addr, addrlen),
/netbsd-current/crypto/external/bsd/openssh/dist/
H A Dmisc.c348 timeout_connect(int sockfd, const struct sockaddr *serv_addr, argument
356 return connect(sockfd, serv_addr, addrlen);
358 set_nonblock(sockfd);
360 if (connect(sockfd, serv_addr, addrlen) == 0) {
362 unset_nonblock(sockfd);
371 if (waitfd(sockfd, timeoutp, POLLIN | POLLOUT, NULL) == -1)
375 if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval, &optlen) == -1) {
383 unset_nonblock(sockfd);
/netbsd-current/external/apache2/llvm/dist/clang/tools/libclang/
H A DCIndexCodeCompletion.cpp836 int sockfd = socket(AF_INET, SOCK_DGRAM, 0); local
837 if (sockfd < 0)
840 sendto(sockfd, res.data(), res.size(), 0,
842 close(sockfd);

Completed in 241 milliseconds

12