Lines Matching defs:fds
389 /* close all fds in pfd */
698 struct pollfd **fds, nfds_t *nfds,
715 *fds = NULL;
758 if (!(*fds = calloc(num_givenifs, sizeof (**fds)))) {
774 free_pfds(*fds, *nfds);
779 (*fds)[i].fd = fd;
780 (*fds)[i].events |= POLLRDNORM;
835 if (*fds && !have_valid_if) {
837 free(*fds);
841 if (!(*fds = calloc(1, sizeof (**fds)))) {
851 free(*fds);
855 (**fds).fd = fd;
856 (**fds).events |= POLLRDNORM;
860 /* set required options on all configured fds */
864 if (setsockopt((*fds)[nfd_i].fd, SOL_SOCKET,
872 if (setsockopt((*fds)[nfd_i].fd, IPPROTO_IP,
916 * Sends msg on 1st fd in fds for multicast, or on all interfaces
921 static SLPError mc_sendmsg(struct pollfd *fds,
928 if (ifs && *ifs && bc_sendmsg(fds, msg, bcifs) == SLP_OK) {
947 if (sendmsg(fds[0].fd, msg, 0) < 0) {
962 static SLPError bc_sendmsg(struct pollfd *fds, struct msghdr *msg,
970 if (sendmsg(fds[0].fd, msg, 0) < 0) {
987 * pfd IN an array of pollfd structs containing fds to poll
1027 /* iterate through all fds to find one with data to read */