File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change 807807\hlabel {IPv4_IPv6_ADDRESSES}
808808
809809\begin {itemize }
810+ \item \texttt {n } stands for \texttt {network }, \texttt {p } stands for \texttt {presentable }
810811\item The functions are declared in \texttt {arpa/inet.h }.
811812\item \texttt {inet\_ pton } returns 1 if the conversion successfully happened,
8128130 if given string is not an address or -1 if \emph {\texttt {af } } is not supported
817818specifying the size. This is not a problem since according to the value of
818819\texttt {af } appropriate address structure or character array can be passed in.
819820For maximal lengths of strings for addresses, 2 macros can be used --
820- \texttt {INET\_ ADDRSTR\- LEN } (16) or \texttt {INET6\_ ADDRSTRLEN } (48).
821+ \texttt {INET\_ ADDRSTR\- LEN } (16) or \texttt {INET6\_ ADDRSTRLEN } (48).
821822These values contain space for terminating \texttt {\bs {}0 }.
822823\item \texttt {size } is string size of \texttt {dst }. If not sufficient, the call
823824will fail and \texttt {ENOSPC } will be set.
824- \item \texttt {n } stands for \texttt {network }, \texttt {p } stands for
825- \texttt {presentable }
826825\item In the past \texttt {inet\_ aton } and \texttt {inet\_ ntoa } (\texttt {a } as
827826\texttt {ascii }) were used for IPv4 addresses. Thanks to the functions above
828827these are now legacy. All these calls are usually documented in the
You can’t perform that action at this time.
0 commit comments