Lines Matching refs:tftpfd
323 l->tftpfd = -1; in create_ipv6_listener()
338 int tcpfd = -1, fd = -1, tftpfd = -1; in create_wildcard_listeners() local
378 if ((tftpfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) in create_wildcard_listeners()
381 if (!fix_fd(tftpfd) || in create_wildcard_listeners()
383 setsockopt(tftpfd, SOL_IP, IP_PKTINFO, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
385 setsockopt(tftpfd, IPPROTO_IP, IP_RECVDSTADDR, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
386 setsockopt(tftpfd, IPPROTO_IP, IP_RECVIF, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
388 bind(tftpfd, (struct sockaddr *)&addr, sa_len(&addr)) == -1) in create_wildcard_listeners()
397 l->tftpfd = tftpfd; in create_wildcard_listeners()
428 new->tftpfd = -1; in create_bound_listener()
488 if ((new->tftpfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1 || in create_bound_listener()
489 setsockopt(new->tftpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_bound_listener()
490 !fix_fd(new->tftpfd) || in create_bound_listener()
491 bind(new->tftpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listener()
539 if (listener->tftpfd != -1) in delete_listener()
541 close(listener->tftpfd); in delete_listener()
542 listener->tftpfd = -1; in delete_listener()
613 new->tftpfd = -1; in create_bound_listeners()
672 if ((new->tftpfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1 || in create_bound_listeners()
673 setsockopt(new->tftpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_bound_listeners()
674 !fix_fd(new->tftpfd) || in create_bound_listeners()
675 bind(new->tftpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listeners()