Lines Matching refs:Pr

83 	struct ps_prochandle *Pr;  in main()  local
145 if ((Pr = proc_arg_xgrab(arg, NULL, PR_ARG_CORES, in main()
159 Prelease(Pr, 0); in main()
165 show_files(Pr); in main()
166 Prelease(Pr, 0); in main()
168 } else if ((Pr = Pgrab(pid, Fflag, &gret)) != NULL) { in main()
169 if (Pcreate_agent(Pr) == 0) { in main()
173 show_files(Pr); in main()
174 Pdestroy_agent(Pr); in main()
181 Prelease(Pr, 0); in main()
182 Pr = NULL; in main()
219 struct ps_prochandle *Pr = data; in show_file() local
269 dofcntl(Pr, info, in show_file()
273 if (Pstate(Pr) != PS_DEAD) { in show_file()
277 dosocket(Pr, info->pr_fd); in show_file()
279 dofifo(Pr, info->pr_fd); in show_file()
304 dotli(Pr, info->pr_fd); in show_file()
324 show_files(struct ps_prochandle *Pr) in show_files() argument
328 if (pr_getrlimit(Pr, RLIMIT_NOFILE, &rlim) == 0) { in show_files()
338 (void) Pfdinfo_iter(Pr, show_file, Pr); in show_files()
343 getflock(struct ps_prochandle *Pr, int fd, struct flock *flock_native) in getflock() argument
349 if (Pstatus(Pr)->pr_dmodel == PR_MODEL_ILP32) { in getflock()
351 ret = pr_fcntl(Pr, fd, F_GETLK, &flock_target); in getflock()
356 ret = pr_fcntl(Pr, fd, F_GETLK, flock_native); in getflock()
362 dofcntl(struct ps_prochandle *Pr, prfdinfo_t *info, int mandatory, int isdoor) in dofcntl() argument
380 if (isdoor && (Pstate(Pr) != PS_DEAD)) in dofcntl()
381 show_door(Pr, fd); in dofcntl()
383 } else if (isdoor && (Pstate(Pr) != PS_DEAD)) { in dofcntl()
385 show_door(Pr, fd); in dofcntl()
395 if ((Pstate(Pr) != PS_DEAD) && (getflock(Pr, fd, &flock) != -1)) { in dofcntl()
487 show_door(struct ps_prochandle *Pr, int fd) in show_door() argument
491 if (pr_door_info(Pr, fd, &door_info) != 0) in show_door()
609 show_sockopts(struct ps_prochandle *Pr, int fd) in show_sockopts() argument
645 if (pr_getsockopt(Pr, fd, boolopts[i].level, boolopts[i].opt, in show_sockopts()
651 if (pr_getsockopt(Pr, fd, SOL_SOCKET, SO_LINGER, &l, &vlen) == 0 && in show_sockopts()
659 if (pr_getsockopt(Pr, fd, SOL_SOCKET, SO_SNDBUF, &val, &vlen) == 0) { in show_sockopts()
664 if (pr_getsockopt(Pr, fd, SOL_SOCKET, SO_RCVBUF, &val, &vlen) == 0) { in show_sockopts()
669 if (pr_getsockopt(Pr, fd, IPPROTO_IP, IP_NEXTHOP, &nexthop_val, in show_sockopts()
687 show_sockfilters(struct ps_prochandle *Pr, int fd) in show_sockfilters() argument
700 if (pr_getsockopt(Pr, fd, SOL_FILTER, FIL_LIST, fi, &len) != 0) in show_sockfilters()
751 dopeerucred(struct ps_prochandle *Pr, int fd) in dopeerucred() argument
755 if (pr_getpeerucred(Pr, fd, &peercred) == 0) { in dopeerucred()
763 dosocket(struct ps_prochandle *Pr, int fd) in dosocket() argument
773 if (pr_getsockopt(Pr, fd, SOL_SOCKET, SO_TYPE, &type, &tlen) == 0) in dosocket()
776 show_sockopts(Pr, fd); in dosocket()
777 show_sockfilters(Pr, fd); in dosocket()
780 if (pr_getsockname(Pr, fd, sa, &len) == 0) in dosocket()
784 if (pr_getpeername(Pr, fd, sa, &len) == 0) in dosocket()
787 dopeerucred(Pr, fd); in dosocket()
792 dofifo(struct ps_prochandle *Pr, int fd) in dofifo() argument
794 dopeerucred(Pr, fd); in dofifo()
799 dotli(struct ps_prochandle *Pr, int fd) in dotli() argument
807 if (pr_ioctl(Pr, fd, _I_CMD, &strcmd, sizeof (strcmd)) == 0) in dotli()
812 if (pr_ioctl(Pr, fd, _I_CMD, &strcmd, sizeof (strcmd)) == 0) in dotli()