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

12

/freebsd-10.0-release/usr.sbin/nscd/
H A Dsingletons.h38 int sockfd; member in struct:runtime_env
H A Dnscdcli.h38 int sockfd; member in struct:nscd_connection_
H A Dnscdcli.c75 s_result = write(connection->sockfd,
112 s_result = read(connection->sockfd,
161 EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD,
167 result = (sendmsg(connection->sockfd, &cred_hdr, 0) == -1) ? -1
169 EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD,
211 retval->sockfd = client_socket;
216 EV_SET(&eventlist, retval->sockfd, EVFILT_WRITE, EV_ADD,
223 EV_SET(&eventlist, retval->sockfd, EVFILT_READ, EV_ADD,
238 close(connection->sockfd);
H A Dquery.h79 int sockfd; /* the unix socket to read/write */ member in struct:query_state
H A Dnscd.c170 retval->sockfd = socket(PF_LOCAL, SOCK_STREAM, 0);
182 if (bind(retval->sockfd, (struct sockaddr *)&serv_addr,
184 close(retval->sockfd);
200 listen(retval->sockfd, -1);
201 fcntl(retval->sockfd, F_SETFL, O_NONBLOCK);
206 EV_SET(&eventlist, retval->sockfd, EVFILT_READ, EV_ADD | EV_ONESHOT,
221 close(env->sockfd);
503 if ((int)event_data->ident == env->sockfd) {
507 EV_SET(eventlist, s_runtime_env->sockfd,
/freebsd-10.0-release/tools/regression/kqueue/
H A Dread.c22 int sockfd[2]; variable
31 if (read(sockfd[0], &buf[0], 1) < 1)
39 if (write(sockfd[1], ".", 1) < 1)
51 EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD, 0, 0, &sockfd[0]);
66 EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD, 0, 0, &sockfd[0]);
95 EV_SET(&kev, sockfd[0], EVFILT_READ, EV_ADD | EV_CLEAR, 0, 0, &sockfd[0]);
112 EV_SET(&kev, sockfd[
[all...]
/freebsd-10.0-release/contrib/ldns/
H A Dnet.c232 ldns_sock_nonblock(int sockfd) argument
236 if((flag = fcntl(sockfd, F_GETFL)) != -1) {
238 if(fcntl(sockfd, F_SETFL, flag) == -1) {
244 if(ioctlsocket(sockfd, FIONBIO, &on) != 0) {
252 ldns_sock_block(int sockfd) argument
256 if((flag = fcntl(sockfd, F_GETFL)) != -1) {
258 if(fcntl(sockfd, F_SETFL, flag) == -1) {
264 if(ioctlsocket(sockfd, FIONBIO, &off) != 0) {
272 ldns_sock_wait(int sockfd, struct timeval timeout, int write) argument
278 FD_SET(FD_SET_T sockfd,
297 int sockfd; local
341 int sockfd; local
363 int sockfd; local
379 int sockfd; local
466 ldns_tcp_send_query(ldns_buffer *qbin, int sockfd, const struct sockaddr_storage *to, socklen_t tolen) argument
491 ldns_udp_send_query(ldns_buffer *qbin, int sockfd, const struct sockaddr_storage *to, socklen_t tolen) argument
509 ldns_udp_read_wire(int sockfd, size_t *size, struct sockaddr_storage *from, socklen_t *fromlen) argument
539 ldns_tcp_read_wire_timeout(int sockfd, size_t *size, struct timeval timeout) argument
598 ldns_tcp_read_wire(int sockfd, size_t *size) argument
653 int sockfd; local
687 int sockfd; local
[all...]
/freebsd-10.0-release/contrib/ldns/ldns/
H A Dnet.h124 * \param[in] sockfd the socket to use
129 ssize_t ldns_tcp_send_query(ldns_buffer *qbin, int sockfd, const struct sockaddr_storage *to, socklen_t tolen);
135 * \param[in] sockfd the socket to use
140 ssize_t ldns_udp_send_query(ldns_buffer *qbin, int sockfd, const struct sockaddr_storage *to, socklen_t tolen);
146 * \param[in] sockfd the socket to read from
151 uint8_t *ldns_tcp_read_wire_timeout(int sockfd, size_t *size, struct timeval timeout);
158 * \param[in] sockfd the socket to read from
162 uint8_t *ldns_tcp_read_wire(int sockfd, size_t *size);
168 * \param[in] sockfd the socket to read from
174 uint8_t *ldns_udp_read_wire(int sockfd, size_
[all...]
H A Dnet.h.in124 * \param[in] sockfd the socket to use
129 ssize_t ldns_tcp_send_query(ldns_buffer *qbin, int sockfd, const struct sockaddr_storage *to, socklen_t tolen);
135 * \param[in] sockfd the socket to use
140 ssize_t ldns_udp_send_query(ldns_buffer *qbin, int sockfd, const struct sockaddr_storage *to, socklen_t tolen);
146 * \param[in] sockfd the socket to read from
151 uint8_t *ldns_tcp_read_wire_timeout(int sockfd, size_t *size, struct timeval timeout);
158 * \param[in] sockfd the socket to read from
162 uint8_t *ldns_tcp_read_wire(int sockfd, size_t *size);
168 * \param[in] sockfd the socket to read from
174 uint8_t *ldns_udp_read_wire(int sockfd, size_
[all...]
/freebsd-10.0-release/tools/tools/nxge/
H A Dxge_info.c62 if((sockfd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
144 if(ioctl(sockfd, SIOCGPRIVATE_0, &ifreqp) < 0) {
159 if(ioctl(sockfd, SIOCGPRIVATE_0, &ifreqp) < 0) {
202 if(ioctl(sockfd, SIOCGPRIVATE_0, &ifreqp) < 0) {
240 if(ioctl(sockfd, SIOCGPRIVATE_0, &ifreqp) < 0) {
276 if(ioctl(sockfd, SIOCGPRIVATE_0, &ifreqp) < 0) {
317 if(ioctl(sockfd, SIOCGPRIVATE_0, &ifreqp) < 0) {
363 if(ioctl(sockfd, SIOCGPRIVATE_1, &ifreqp) < 0) {
403 if(ioctl(sockfd, SIOCGPRIVATE_1, &ifreqp) < 0) {
445 if(ioctl(sockfd, SIOCGPRIVATE_
[all...]
H A Dxge_info.h78 int sockfd, indexer, buffer_size = 0; variable
/freebsd-10.0-release/contrib/ntp/ntpd/
H A Dntp_intres.c132 static SOCKET sockfd = INVALID_SOCKET; /* NT uses SOCKET */ variable
591 if (sockfd != INVALID_SOCKET)
616 sockfd = socket(addr->ai_family, addr->ai_socktype, 0);
618 if (INVALID_SOCKET == sockfd) {
629 if (sockfd >= FD_SETSIZE) {
631 (int)sockfd, FD_SETSIZE);
640 if (fcntl(sockfd, F_SETFL, O_NONBLOCK) == -1) {
646 if (fcntl(sockfd, F_SETFL, FNDELAY) == -1) {
661 err = ioctlsocket(sockfd, FIONBIO, &on);
668 err = connect(sockfd, add
[all...]
/freebsd-10.0-release/contrib/ofed/libibverbs/examples/
H A Drc_pingpong.c149 int sockfd = -1; local
165 sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
166 if (sockfd >= 0) {
167 if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
169 close(sockfd);
170 sockfd = -1;
177 if (sockfd < 0) {
184 if (write(sockfd, msg, sizeof msg) != sizeof msg) {
189 if (read(sockfd, msg, sizeof msg) != sizeof msg) {
195 write(sockfd, "don
224 int sockfd = -1, connfd; local
[all...]
H A Duc_pingpong.c137 int sockfd = -1; local
153 sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
154 if (sockfd >= 0) {
155 if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
157 close(sockfd);
158 sockfd = -1;
165 if (sockfd < 0) {
172 if (write(sockfd, msg, sizeof msg) != sizeof msg) {
177 if (read(sockfd, msg, sizeof msg) != sizeof msg) {
183 write(sockfd, "don
212 int sockfd = -1, connfd; local
[all...]
H A Dud_pingpong.c136 int sockfd = -1; local
152 sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
153 if (sockfd >= 0) {
154 if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
156 close(sockfd);
157 sockfd = -1;
164 if (sockfd < 0) {
171 if (write(sockfd, msg, sizeof msg) != sizeof msg) {
176 if (read(sockfd, msg, sizeof msg) != sizeof msg) {
182 write(sockfd, "don
210 int sockfd = -1, connfd; local
[all...]
H A Dsrq_pingpong.c158 int sockfd = -1; local
174 sockfd = socket(t->ai_family, t->ai_socktype, t->ai_protocol);
175 if (sockfd >= 0) {
176 if (!connect(sockfd, t->ai_addr, t->ai_addrlen))
178 close(sockfd);
179 sockfd = -1;
186 if (sockfd < 0) {
194 if (write(sockfd, msg, sizeof msg) != sizeof msg) {
207 r = read(sockfd, msg + n, sizeof msg - n);
222 write(sockfd, "don
246 int sockfd = -1, connfd; local
[all...]
/freebsd-10.0-release/tools/tools/vxge/
H A Dvxge_info.c36 static int sockfd; variable
106 sockfd = socket(AF_INET, SOCK_DGRAM, 0);
107 if (sockfd < 0) {
312 err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
345 err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
377 err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
410 err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
449 err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
488 err = ioctl(sockfd, SIOCGPRIVATE_1, &ifr);
511 err = ioctl(sockfd, SIOCGPRIVATE_
[all...]
/freebsd-10.0-release/lib/libstand/
H A Dbootparam.c107 bp_whoami(sockfd)
108 int sockfd;
139 if (!(d = socktodesc(sockfd))) {
140 RPC_PRINTF(("bp_whoami: bad socket. %d\n", sockfd));
236 bp_getfile(sockfd, key, serv_addr, pathname)
237 int sockfd;
256 if (!(d = socktodesc(sockfd))) {
257 RPC_PRINTF(("bp_getfile: bad socket. %d\n", sockfd));
/freebsd-10.0-release/contrib/openbsm/bin/auditdistd/
H A Dproto_tls.c269 tls_loop(int sockfd, SSL *tcpssl) argument
279 FD_SET(sockfd, &fds);
281 maxfd = MAX(sockfd, tcpfd);
289 if (FD_ISSET(sockfd, &fds))
290 tcp_recv_ssl_send(sockfd, tcpssl);
292 ssl_recv_tcp_send(tcpssl, sockfd);
346 int sockfd, tcpfd; local
356 sockfd = startfd;
412 nonblock(sockfd);
422 switch (send(sockfd,
571 int error, sockfd; local
657 int sockfd, tcpfd, ret; local
712 int startfd, sockfd, tcpfd, safefd; local
[all...]
/freebsd-10.0-release/lib/libc/include/
H A Dnscachedcli.h63 int sockfd; member in struct:cached_connection_
/freebsd-10.0-release/lib/libc/net/
H A Dnscachedcli.c78 s_result = _sendto(connection->sockfd, data + result,
121 s_result = _read(connection->sockfd, data + result,
172 EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD,
179 result = (_sendmsg(connection->sockfd, &cred_hdr,
181 EV_SET(&eventlist, connection->sockfd, EVFILT_WRITE, EV_ADD,
222 retval->sockfd = client_socket;
227 EV_SET(&eventlist, retval->sockfd, EVFILT_WRITE, EV_ADD, 0, 0, NULL);
233 EV_SET(&eventlist, retval->sockfd, EVFILT_READ, EV_ADD, 0, 0, NULL);
244 _close(connection->sockfd);
/freebsd-10.0-release/tools/regression/sockets/unix_passfd/
H A Dunix_passfd.c109 sendfd(const char *test, int sockfd, int sendfd) argument
138 len = sendmsg(sockfd, &msghdr, 0);
146 recvfd(const char *test, int sockfd, int *recvfd) argument
172 len = recvmsg(sockfd, &msghdr, 0);
/freebsd-10.0-release/usr.sbin/faithd/
H A Dfaithd.c96 static int sockfd = 0; variable
166 sockfd = socket(PF_ROUTE, SOCK_RAW, PF_UNSPEC);
167 if (sockfd < 0) {
329 sockfd = socket(PF_ROUTE, SOCK_RAW, PF_UNSPEC);
330 if (sockfd < 0) {
384 if (sockfd) {
386 pfd[1].fd = sockfd;
389 if (sockfd >= FD_SETSIZE)
391 FD_SET(sockfd, &rfds);
392 maxfd = (maxfd < sockfd)
[all...]
/freebsd-10.0-release/contrib/ntp/ntpdc/
H A Dntpdc.c184 static SOCKET sockfd; /* fd socket is opened on */ variable
561 (void) closesocket(sockfd);
590 sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
591 if (sockfd == INVALID_SOCKET) {
596 sockfd = socket(ai->ai_family, SOCK_DGRAM, 0);
597 if (sockfd == -1)
607 if (setsockopt(sockfd, SOL_SOCKET, SO_RCVBUF,
615 if (connect(sockfd, (struct sockaddr *)&hostaddr,
618 if (connect(sockfd, (struct sockaddr *)ai->ai_addr,
641 if (send(sockfd, xdat
[all...]
/freebsd-10.0-release/crypto/openssh/
H A Dsshconnect.c279 timeout_connect(int sockfd, const struct sockaddr *serv_addr, argument
290 result = connect(sockfd, serv_addr, addrlen);
294 set_nonblock(sockfd);
295 rc = connect(sockfd, serv_addr, addrlen);
297 unset_nonblock(sockfd);
306 fdset = (fd_set *)xcalloc(howmany(sockfd + 1, NFDBITS),
308 FD_SET(sockfd, fdset);
312 rc = select(sockfd + 1, NULL, fdset, NULL, &tv);
330 if (getsockopt(sockfd, SOL_SOCKET, SO_ERROR, &optval,
340 unset_nonblock(sockfd);
[all...]

Completed in 363 milliseconds

12