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
395 if ((tftpfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1) in create_wildcard_listeners()
398 if (!fix_fd(tftpfd) || in create_wildcard_listeners()
400 setsockopt(tftpfd, SOL_IP, IP_PKTINFO, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
402 setsockopt(tftpfd, IPPROTO_IP, IP_RECVDSTADDR, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
403 setsockopt(tftpfd, IPPROTO_IP, IP_RECVIF, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
405 bind(tftpfd, (struct sockaddr *)&addr, sa_len(&addr)) == -1) in create_wildcard_listeners()
414 l->tftpfd = tftpfd; in create_wildcard_listeners()
445 new->tftpfd = -1; in create_bound_listener()
511 if ((new->tftpfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1 || in create_bound_listener()
512 setsockopt(new->tftpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_bound_listener()
513 !fix_fd(new->tftpfd) || in create_bound_listener()
514 bind(new->tftpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listener()
562 if (listener->tftpfd != -1) in delete_listener()
564 close(listener->tftpfd); in delete_listener()
565 listener->tftpfd = -1; in delete_listener()
636 new->tftpfd = -1; in create_bound_listeners()
695 if ((new->tftpfd = socket(AF_INET, SOCK_DGRAM, 0)) == -1 || in create_bound_listeners()
696 setsockopt(new->tftpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_bound_listeners()
697 !fix_fd(new->tftpfd) || in create_bound_listeners()
698 bind(new->tftpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listeners()