• Home
  • Raw
  • Download

Lines Matching refs:tcpfd

283   int tcpfd, fd;  in create_ipv6_listener()  local
301 if ((tcpfd = socket(AF_INET6, SOCK_STREAM, 0)) == -1) in create_ipv6_listener()
305 setsockopt(tcpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
307 setsockopt(tcpfd, IPV6_LEVEL, IPV6_V6ONLY, &opt, sizeof(opt)) == -1 || in create_ipv6_listener()
309 !fix_fd(tcpfd) || in create_ipv6_listener()
315 bind(tcpfd, (struct sockaddr *)&addr, sa_len(&addr)) == -1 || in create_ipv6_listener()
316 listen(tcpfd, 5) == -1 || in create_ipv6_listener()
322 l->tcpfd = tcpfd; in create_ipv6_listener()
337 int tcpfd = -1, fd = -1; in create_wildcard_listeners() local
351 (tcpfd = socket(AF_INET, SOCK_STREAM, 0)) == -1) in create_wildcard_listeners()
354 if (setsockopt(tcpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_wildcard_listeners()
355 bind(tcpfd, (struct sockaddr *)&addr, sa_len(&addr)) == -1 || in create_wildcard_listeners()
356 listen(tcpfd, 5) == -1 || in create_wildcard_listeners()
357 !fix_fd(tcpfd) || in create_wildcard_listeners()
376 setsockopt(tcpfd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)) == -1 || in create_wildcard_listeners()
378 setsockopt(l6->tcpfd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)) == -1)) in create_wildcard_listeners()
382 close(tcpfd); in create_wildcard_listeners()
384 close(l6->tcpfd); in create_wildcard_listeners()
393 l->tcpfd = tcpfd; in create_wildcard_listeners()
424 new->tcpfd = -1; in create_bound_listener()
430 if ((new->tcpfd = socket(iface->addr.sa.sa_family, SOCK_STREAM, 0)) == -1 || in create_bound_listener()
433 setsockopt(new->tcpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_bound_listener()
434 !fix_fd(new->tcpfd) || in create_bound_listener()
442 setsockopt(new->tcpfd, IPV6_LEVEL, IPV6_V6ONLY, &opt, sizeof(opt)) == -1) in create_bound_listener()
468 if (rc == -1 || bind(new->tcpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listener()
477 setsockopt(new->tcpfd, SOL_SOCKET, SO_MARK, &mark, sizeof(mark)) == -1)) in create_bound_listener()
480 if (listen(new->tcpfd, 5) == -1) in create_bound_listener()
526 if (listener->tcpfd != -1) in delete_listener()
528 close(listener->tcpfd); in delete_listener()
529 listener->tcpfd = -1; in delete_listener()
595 new->tcpfd = -1; in create_bound_listeners()
601 if ((new->tcpfd = socket(iface->addr.sa.sa_family, SOCK_STREAM, 0)) == -1 || in create_bound_listeners()
604 setsockopt(new->tcpfd, SOL_SOCKET, SO_REUSEADDR, &opt, sizeof(opt)) == -1 || in create_bound_listeners()
605 !fix_fd(new->tcpfd) || in create_bound_listeners()
613 setsockopt(new->tcpfd, IPV6_LEVEL, IPV6_V6ONLY, &opt, sizeof(opt)) == -1) in create_bound_listeners()
637 if (rc == -1 || bind(new->tcpfd, &iface->addr.sa, sa_len(&iface->addr)) == -1) in create_bound_listeners()
644 if (listen(new->tcpfd, 5) == -1) in create_bound_listeners()