• Home
  • Raw
  • Download

Lines Matching refs:dhcp_fd

1159 	if (sendmsg(ctx->dhcp_fd, &ctx->sndhdr, 0) == -1) {  in dhcp6_sendmessage()
2623 bytes = recvmsg(ctx->dhcp_fd, &ctx->rcvhdr, 0); in dhcp6_handledata()
2626 close(ctx->dhcp_fd); in dhcp6_handledata()
2627 eloop_event_delete(dctx->eloop, ctx->dhcp_fd, 0); in dhcp6_handledata()
2628 ctx->dhcp_fd = -1; in dhcp6_handledata()
3101 ctx->dhcp_fd = socket(PF_INET6, in dhcp6_open()
3104 if (ctx->dhcp_fd == -1) in dhcp6_open()
3107 if ((ctx->dhcp_fd = socket(PF_INET6, SOCK_DGRAM, IPPROTO_UDP)) == -1) in dhcp6_open()
3109 if ((n = fcntl(ctx->dhcp_fd, F_GETFD, 0)) == -1 || in dhcp6_open()
3110 fcntl(ctx->dhcp_fd, F_SETFD, n | FD_CLOEXEC) == -1) in dhcp6_open()
3112 close(ctx->dhcp_fd); in dhcp6_open()
3113 ctx->dhcp_fd = -1; in dhcp6_open()
3116 if ((n = fcntl(ctx->dhcp_fd, F_GETFL, 0)) == -1 || in dhcp6_open()
3117 fcntl(ctx->dhcp_fd, F_SETFL, n | O_NONBLOCK) == -1) in dhcp6_open()
3119 close(ctx->dhcp_fd); in dhcp6_open()
3120 ctx->dhcp_fd = -1; in dhcp6_open()
3126 if (setsockopt(ctx->dhcp_fd, SOL_SOCKET, SO_REUSEADDR, in dhcp6_open()
3131 if (setsockopt(ctx->dhcp_fd, SOL_SOCKET, SO_BROADCAST, in dhcp6_open()
3137 if (setsockopt(ctx->dhcp_fd, SOL_SOCKET, SO_REUSEPORT, in dhcp6_open()
3142 if (bind(ctx->dhcp_fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) in dhcp6_open()
3146 if (setsockopt(ctx->dhcp_fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, in dhcp6_open()
3150 eloop_event_add(dctx->eloop, ctx->dhcp_fd, in dhcp6_open()
3155 close(ctx->dhcp_fd); in dhcp6_open()
3156 ctx->dhcp_fd = -1; in dhcp6_open()
3275 if (ifp->ctx->ipv6->dhcp_fd == -1 && dhcp6_open(ifp->ctx) == -1) in dhcp6_start()
3414 if (ctx->ipv6->dhcp_fd != -1) { in dhcp6_freedrop()
3415 eloop_event_delete(ctx->eloop, ctx->ipv6->dhcp_fd, 0); in dhcp6_freedrop()
3416 close(ctx->ipv6->dhcp_fd); in dhcp6_freedrop()
3417 ctx->ipv6->dhcp_fd = -1; in dhcp6_freedrop()