Lines Matching defs:sfd
740 struct serverfd *sfd;
744 the INADDR_ANY/port0 socket have sfd set to NULL */
763 for (sfd = daemon->sfds; sfd; sfd = sfd->next )
764 if (sockaddr_isequal(&sfd->source_addr, addr) &&
765 mark == sfd->mark &&
766 strcmp(intname, sfd->interface) == 0)
767 return sfd;
771 if (!(sfd = whine_malloc(sizeof(struct serverfd))))
774 if ((sfd->fd = socket(addr->sa.sa_family, SOCK_DGRAM, 0)) == -1)
776 free(sfd);
780 if (!local_bind(sfd->fd, addr, intname, mark, 0) || !fix_fd(sfd->fd))
783 close(sfd->fd);
784 free(sfd);
789 strcpy(sfd->interface, intname);
790 sfd->source_addr = *addr;
791 sfd->mark = mark;
792 sfd->next = daemon->sfds;
793 daemon->sfds = sfd;
794 return sfd;
877 if (!new->sfd &&
878 !(new->sfd = allocate_sfd(&new->source_addr, new->interface, new->mark)) &&
1125 serv->sfd = NULL;
1239 serv->sfd = NULL;