2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source. A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
12 .\" Copyright 2015 Joyent, Inc.
15 .Dt PR_GETPEERNAME 3PROC
19 .Nd inject getpeername library call into victim process
25 .Fa "struct ps_prochandle *P"
27 .Fa "struct sockaddr *name"
28 .Fa "socklen_t *namelen"
34 .Xr getpeername 3SOCKET
35 library call into the target process
37 by means of the agent LWP.
42 then this is equivalent to calling
43 .Xr getpeername 3SOCKET
44 on the currently running process.
51 have the same meaning as in
52 .Xr getpeername 3SOCKET .
54 .Xr getpeername 3SOCKET
55 for the full description and purpose of the
57 library call and its arguments.
61 function only works on active processes.
62 Process handles that correspond to core files, zombie processes, or ELF objects
63 do not support library call injection.
65 Upon successful completion, the
67 function's return value is that described in
68 .Xr getpeername 3SOCKET .
75 to indicate that the library call could not be injected.
77 For the full list of errors see the
80 .Xr getpeername 3SOCKET .
84 function will fail if:
87 An error occurred while trying to invoke the agent LWP and inject a
88 library call in the process handle
92 does not support library call injection.
94 .Sh INTERFACE STABILITY
103 .Xr getpeername 3SOCKET ,