Plan 9 from Bell Labs’s /usr/web/sources/contrib/anothy/src/lib/djb-ape/unix/socket_local6.3

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


.TH socket_local6 3
.SH NAME
socket_local6 \- get local IP address of socket
.SH SYNTAX
.B #include <socket.h>

int \fBsocket_local6\fP(int \fIs\fR,char \fIip\fR[16],uint16 *\fIport\fR,uint32 *\fIscope_id\fR);
.SH DESCRIPTION
socket_local6 returns the local IPv6 address, port and scope ID for the
UDP or TCP socket \fIs\fR and writes the IPv6 address to \fIip\fR, the
port to \fIport\fR and the scope ID to \fIscope_id\fR.

If \fIscope_id\fR is the null pointer, socket_local6 will discard the
scope ID.

If something goes wrong, socket_local6 returns -1, setting errno
appropriately.
.SH "SEE ALSO"
socket_accept6(3), socket_remote6(3)

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.