diff Doc/libsocket.tex @ 4784:e43362910a5e legacy-trunk

Documented getprotobyname() interface.
author Guido van Rossum <guido@python.org>
date Thu, 19 Dec 1996 16:43:25 +0000
parents c3b0895c90fb
children 8d17d552d0ec
line wrap: on
line diff
--- a/Doc/libsocket.tex	Thu Dec 19 16:42:52 1996 +0000
+++ b/Doc/libsocket.tex	Thu Dec 19 16:43:25 1996 +0000
@@ -107,6 +107,15 @@
 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