Lines Matching refs:sfd
777 struct serverfd *sfd; in allocate_sfd() local
800 for (sfd = daemon->sfds; sfd; sfd = sfd->next ) in allocate_sfd()
801 if (sockaddr_isequal(&sfd->source_addr, addr) && in allocate_sfd()
802 mark == sfd->mark && in allocate_sfd()
803 strcmp(intname, sfd->interface) == 0) in allocate_sfd()
804 return sfd; in allocate_sfd()
808 if (!(sfd = whine_malloc(sizeof(struct serverfd)))) in allocate_sfd()
811 if ((sfd->fd = socket(addr->sa.sa_family, SOCK_DGRAM, 0)) == -1) in allocate_sfd()
813 free(sfd); in allocate_sfd()
817 if (!local_bind(sfd->fd, addr, intname, mark, 0) || !fix_fd(sfd->fd)) in allocate_sfd()
820 close(sfd->fd); in allocate_sfd()
821 free(sfd); in allocate_sfd()
826 strcpy(sfd->interface, intname); in allocate_sfd()
827 sfd->source_addr = *addr; in allocate_sfd()
828 sfd->mark = mark; in allocate_sfd()
829 sfd->next = daemon->sfds; in allocate_sfd()
830 daemon->sfds = sfd; in allocate_sfd()
831 return sfd; in allocate_sfd()
914 if (!new->sfd && in check_servers()
915 !(new->sfd = allocate_sfd(&new->source_addr, new->interface, new->mark)) && in check_servers()
1168 serv->sfd = NULL; in set_servers()
1276 serv->sfd = NULL; in reload_servers()