Lines Matching refs:psp

119 ps_inet_startcb(struct ps_process *psp)  in ps_inet_startcb()  argument
121 struct dhcpcd_ctx *ctx = psp->psp_ctx; in ps_inet_startcb()
265 struct ps_process *psp; in ps_inet_sendmsg() local
268 psp = ps_findprocess(ctx, &psm->ps_id); in ps_inet_sendmsg()
269 if (psp != NULL) { in ps_inet_sendmsg()
270 s = psp->psp_work_fd; in ps_inet_sendmsg()
308 struct ps_process *psp = arg; in ps_inet_recvmsg() local
311 if (ps_recvpsmsg(psp->psp_ctx, psp->psp_fd, events, NULL, NULL) == -1) in ps_inet_recvmsg()
346 struct ps_process *psp = arg; in ps_inet_dodispatch() local
348 if (ps_recvpsmsg(psp->psp_ctx, psp->psp_fd, events, in ps_inet_dodispatch()
349 ps_inet_dispatch, psp->psp_ctx) == -1) in ps_inet_dodispatch()
360 struct ps_process *psp; in ps_inet_start() local
363 psp = ctx->ps_inet = ps_newprocess(ctx, &id); in ps_inet_start()
364 if (psp == NULL) in ps_inet_start()
367 strlcpy(psp->psp_name, "network proxy", sizeof(psp->psp_name)); in ps_inet_start()
368 pid = ps_startprocess(psp, ps_inet_recvmsg, ps_inet_dodispatch, in ps_inet_start()
388 struct ps_process *psp = arg; in ps_inet_recvinbootp() local
390 if (ps_recvmsg(psp->psp_work_fd, events, in ps_inet_recvinbootp()
391 PS_BOOTP, psp->psp_ctx->ps_data_fd) == -1) in ps_inet_recvinbootp()
396 ps_inet_listenin(struct ps_process *psp) in ps_inet_listenin() argument
398 struct in_addr *ia = &psp->psp_id.psi_addr.psa_in_addr; in ps_inet_listenin()
402 setproctitle("[%s proxy] %s", psp->psp_protostr, buf); in ps_inet_listenin()
404 psp->psp_work_fd = dhcp_openudp(ia); in ps_inet_listenin()
405 if (psp->psp_work_fd == -1) { in ps_inet_listenin()
411 if (ps_rights_limit_fd_rdonly(psp->psp_work_fd) == -1) { in ps_inet_listenin()
417 if (eloop_event_add(psp->psp_ctx->eloop, psp->psp_work_fd, ELE_READ, in ps_inet_listenin()
418 ps_inet_recvinbootp, psp) == -1) in ps_inet_listenin()
431 struct ps_process *psp = arg; in ps_inet_recvin6nd() local
433 if (ps_recvmsg(psp->psp_work_fd, in ps_inet_recvin6nd()
434 PS_ND, psp->psp_ctx->ps_data_fd) == -1) in ps_inet_recvin6nd()
439 ps_inet_listennd(struct ps_process *psp) in ps_inet_listennd() argument
444 psp->psp_work_fd = ipv6nd_open(&psp->psp_ifp); in ps_inet_listennd()
445 if (psp->psp_work_fd == -1) { in ps_inet_listennd()
451 if (ps_rights_limit_fd_rdonly(psp->psp_work_fd) == -1) { in ps_inet_listennd()
457 if (eloop_event_add(psp->psp_ctx->eloop, psp->psp_work_fd, in ps_inet_listennd()
458 ps_inet_recvin6nd, psp) == -1) in ps_inet_listennd()
471 struct ps_process *psp = arg; in ps_inet_recvin6dhcp6() local
473 if (ps_recvmsg(psp->psp_work_fd, events, in ps_inet_recvin6dhcp6()
474 PS_DHCP6, psp->psp_ctx->ps_data_fd) == -1) in ps_inet_recvin6dhcp6()
479 ps_inet_listenin6(struct ps_process *psp) in ps_inet_listenin6() argument
481 struct in6_addr *ia = &psp->psp_id.psi_addr.psa_in6_addr; in ps_inet_listenin6()
485 setproctitle("[%s proxy] %s", psp->psp_protostr, buf); in ps_inet_listenin6()
487 psp->psp_work_fd = dhcp6_openudp(psp->psp_id.psi_ifindex, ia); in ps_inet_listenin6()
488 if (psp->psp_work_fd == -1) { in ps_inet_listenin6()
494 if (ps_rights_limit_fd_rdonly(psp->psp_work_fd) == -1) { in ps_inet_listenin6()
500 if (eloop_event_add(psp->psp_ctx->eloop, psp->psp_work_fd, ELE_READ, in ps_inet_listenin6()
501 ps_inet_recvin6dhcp6, psp) == -1) in ps_inet_listenin6()
513 struct ps_process *psp = arg; in ps_inet_recvmsgpsp() local
516 if (ps_recvpsmsg(psp->psp_ctx, psp->psp_fd, events, NULL, NULL) == -1) in ps_inet_recvmsgpsp()
524 struct ps_process *psp; in ps_inet_cmd() local
535 psp = ps_findprocess(ctx, &psm->ps_id); in ps_inet_cmd()
538 logerrx("%s: IN cmd %x, psp %p", __func__, psm->ps_cmd, psp); in ps_inet_cmd()
542 assert(psp == NULL); in ps_inet_cmd()
551 if (psp != NULL) in ps_inet_cmd()
554 psp = ps_newprocess(ctx, &psm->ps_id); in ps_inet_cmd()
555 if (psp == NULL) in ps_inet_cmd()
563 psp->psp_protostr = "BOOTP"; in ps_inet_cmd()
571 psp->psp_protostr = "ND"; in ps_inet_cmd()
578 psp->psp_protostr = "DHCP6"; in ps_inet_cmd()
589 snprintf(psp->psp_name, sizeof(psp->psp_name), in ps_inet_cmd()
590 "%s proxy %s", psp->psp_protostr, in ps_inet_cmd()
592 start = ps_startprocess(psp, ps_inet_recvmsgpsp, NULL, in ps_inet_cmd()
596 ps_freeprocess(psp); in ps_inet_cmd()
603 psp->psp_ifname, psp->psp_name, psp->psp_pid); in ps_inet_cmd()