File: socket_local4.3

package info (click to toggle)
libowfat 0.34-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,288 kB
  • sloc: ansic: 20,181; makefile: 16
file content (16 lines) | stat: -rw-r--r-- 496 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
.TH socket_local4 3
.SH NAME
socket_local4 \- get local IP address of socket
.SH SYNTAX
.B #include <libowfat/socket.h>

int \fBsocket_local4\fP(int \fIs\fR,char \fIip\fR[4],uint16 *\fIport\fR);
.SH DESCRIPTION
socket_local4 returns the local IP address and port for the UDP or TCP
socket \fIs\fR and writes the IP address to \fIip\fR and the port to
\fIport\fR.

If something goes wrong, socket_local4 returns -1, setting errno
appropriately.
.SH "SEE ALSO"
socket_accept4(3), socket_remote4(3)