File: getpeername.1

package info (click to toggle)
tcputils 0.6.2-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 148 kB
  • ctags: 105
  • sloc: ansic: 1,277; makefile: 105
file content (29 lines) | stat: -rw-r--r-- 796 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
.TH GETPEERNAME 1 "1997 April 13"
.SH NAME
getpeername \- get name of connected TCP/IP peer
.SH SYNOPSIS
.B getpeername
.RB [ -n ]
\fR[\fB\-p \fIprotocol\fR]
.SH DESCRIPTION
.B getpeername
prints the IP address and service name (port number) of the
remote peer connected to standard input.
The IP address and the service name are printed on the same line,
separated by one space.
.SH OPTIONS
.TP
.B \-n
Don't translate IP addresses and port numbers to names.
.TP
.B \-p \fIprotocol\fP
Force getpeername to use \fIprotocol\fP as the protocol when
translating port numbers to service names.
\fIProtocol\fP can be \fBtcp\fP and \fBudp\fP.
Normally, getpeername automatically determines what type of
socket it is connected to.
.SH SEE ALSO
.PD
.BR getpeername (3).
.SH BUGS
Only works on IP sockets.