]> granicus.if.org Git - python/commitdiff
Documented getprotobyname() interface.
authorGuido van Rossum <guido@python.org>
Thu, 19 Dec 1996 16:43:25 +0000 (16:43 +0000)
committerGuido van Rossum <guido@python.org>
Thu, 19 Dec 1996 16:43:25 +0000 (16:43 +0000)
Doc/lib/libsocket.tex
Doc/libsocket.tex

index b105b228d7972acfb08c1ed863cda5bb44d0ed7e..3743100c54455737c6fea68489db87facc8b49c5 100644 (file)
@@ -107,6 +107,15 @@ a list of IP addresses for the same interface on the same
 host (most likely containing only a single address).
 \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}
 Translate an Internet service name and protocol name to a port number
 for that service.  The protocol name should be \code{'tcp'} or
index b105b228d7972acfb08c1ed863cda5bb44d0ed7e..3743100c54455737c6fea68489db87facc8b49c5 100644 (file)
@@ -107,6 +107,15 @@ a list of IP addresses for the same interface on the same
 host (most likely containing only a single address).
 \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}
 Translate an Internet service name and protocol name to a port number
 for that service.  The protocol name should be \code{'tcp'} or