Lines Matching refs:sfd
742 struct serverfd *sfd; in allocate_sfd() local
765 for (sfd = daemon->sfds; sfd; sfd = sfd->next ) in allocate_sfd()
766 if (sockaddr_isequal(&sfd->source_addr, addr) && in allocate_sfd()
767 mark == sfd->mark && in allocate_sfd()
768 strcmp(intname, sfd->interface) == 0) in allocate_sfd()
769 return sfd; in allocate_sfd()
773 if (!(sfd = whine_malloc(sizeof(struct serverfd)))) in allocate_sfd()
776 if ((sfd->fd = socket(addr->sa.sa_family, SOCK_DGRAM, 0)) == -1) in allocate_sfd()
778 free(sfd); in allocate_sfd()
782 if (!local_bind(sfd->fd, addr, intname, mark, 0) || !fix_fd(sfd->fd)) in allocate_sfd()
785 close(sfd->fd); in allocate_sfd()
786 free(sfd); in allocate_sfd()
791 strcpy(sfd->interface, intname); in allocate_sfd()
792 sfd->source_addr = *addr; in allocate_sfd()
793 sfd->mark = mark; in allocate_sfd()
794 sfd->next = daemon->sfds; in allocate_sfd()
795 daemon->sfds = sfd; in allocate_sfd()
796 return sfd; in allocate_sfd()
879 if (!new->sfd && in check_servers()
880 !(new->sfd = allocate_sfd(&new->source_addr, new->interface, new->mark)) && in check_servers()
1127 serv->sfd = NULL; in set_servers()
1241 serv->sfd = NULL; in reload_servers()