mirror of
https://github.com/python/cpython.git
synced 2025-11-13 23:46:24 +00:00
Documented getprotobyname() interface.
This commit is contained in:
parent
25405c786b
commit
62ac99ebf5
2 changed files with 18 additions and 0 deletions
|
|
@ -107,6 +107,15 @@ a list of IP addresses for the same interface on the same
|
||||||
host (most likely containing only a single address).
|
host (most likely containing only a single address).
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
\begin{funcdesc}{getprotobyname}{protocolname}
|
||||||
|
Translate an Internet protocol name (e.g. \code{'icmp'}) to a constant
|
||||||
|
suitable for passing as the (optional) third argument to the
|
||||||
|
\code{socket()} function. This is usually only needed for sockets
|
||||||
|
opened in ``raw'' mode (\code{SOCK_RAW}); for the normal socket modes,
|
||||||
|
the correct protocol is chosen automatically if the protocol is
|
||||||
|
omitted or zero.
|
||||||
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{getservbyname}{servicename\, protocolname}
|
\begin{funcdesc}{getservbyname}{servicename\, protocolname}
|
||||||
Translate an Internet service name and protocol name to a port number
|
Translate an Internet service name and protocol name to a port number
|
||||||
for that service. The protocol name should be \code{'tcp'} or
|
for that service. The protocol name should be \code{'tcp'} or
|
||||||
|
|
|
||||||
|
|
@ -107,6 +107,15 @@ a list of IP addresses for the same interface on the same
|
||||||
host (most likely containing only a single address).
|
host (most likely containing only a single address).
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
\begin{funcdesc}{getprotobyname}{protocolname}
|
||||||
|
Translate an Internet protocol name (e.g. \code{'icmp'}) to a constant
|
||||||
|
suitable for passing as the (optional) third argument to the
|
||||||
|
\code{socket()} function. This is usually only needed for sockets
|
||||||
|
opened in ``raw'' mode (\code{SOCK_RAW}); for the normal socket modes,
|
||||||
|
the correct protocol is chosen automatically if the protocol is
|
||||||
|
omitted or zero.
|
||||||
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{getservbyname}{servicename\, protocolname}
|
\begin{funcdesc}{getservbyname}{servicename\, protocolname}
|
||||||
Translate an Internet service name and protocol name to a port number
|
Translate an Internet service name and protocol name to a port number
|
||||||
for that service. The protocol name should be \code{'tcp'} or
|
for that service. The protocol name should be \code{'tcp'} or
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue