149 lines
18 KiB
HTML
149 lines
18 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
|
<meta name="Copyright" content="Copyright (c) 2006 by IBM Corporation">
|
|
<title>Sockets Network Functions</title>
|
|
<!-- All rights reserved. Licensed Materials Property of IBM -->
|
|
<!-- US Government Users Restricted Rights -->
|
|
<!-- Use, duplication or disclosure restricted by -->
|
|
<!-- GSA ADP Schedule Contract with IBM Corp. -->
|
|
<!-- Begin Header Records ========================================= -->
|
|
<!-- Unix8 SCRIPT J converted by B2H R4.1 (346) (CMS) by V2KEA304 -->
|
|
<!-- at RCHVMW2 on 17 Feb 1999 at 11:05:09 -->
|
|
<!-- 031112 JETAYLOR replaced API and/or Exit listings with -->
|
|
<!-- pagegenerator output from javascript array -->
|
|
<!-- End Header Records -->
|
|
<link rel="stylesheet" type="text/css" href="../rzahg/ic.css">
|
|
</head>
|
|
<body>
|
|
<a name="Top_Of_Page"></a>
|
|
<!-- Java sync-link -->
|
|
<script type="text/javascript" language="Javascript" src="../rzahg/synch.js">
|
|
</script>
|
|
|
|
<h2>Sockets Network Functions</h2>
|
|
|
|
<p>The network functions and the Berkeley Resolver routines supported by the
|
|
sockets APIs are:</p>
|
|
|
|
<!-- ***** NOTE ***** Do not manually update text or links in this section. -->
|
|
<!-- Updates made in this section *will* be overlaid by automated tools -->
|
|
<!-- Notify User Technologies of needed updates to be made in XML for API finder.-->
|
|
<!--***************API BEGIN PASTE***************-->
|
|
<ul>
|
|
<li><A HREF="getl.htm">_getlong()</A> (Get long byte quantities from a byte stream) is used to retrieve an unsigned long byte quantity.</li>
|
|
<li><A HREF="gets.htm">_getshort()</A> (Get short byte quantities from a byte stream.) is used to retrieve an unsigned short byte quantity.</li>
|
|
<li><A HREF="putl.htm">_putlong()</A> (Put long byte quantities into a byte stream.) is used to put an unsigned long byte quantity into a byte stream.</li>
|
|
<li><A HREF="puts.htm">_putshort()</A> (Put short byte quantities into a byte stream.) is used to put an unsigned short byte quantity into a byte stream.</li>
|
|
<li><A HREF="dncomp.htm">dn_comp()</A> (Compress an expanded domain name) is used to compress an expanded domain name.</li>
|
|
<li><A HREF="dncomp_ts.htm">dn_comp_ts64()</A> (Compress an expanded domain name) is used to compress an expanded domain name.</li>
|
|
<li><A HREF="dnexp.htm">dn_expand()</A> (Expand a compressed domain name.) is used to expand a compressed domain name.</li>
|
|
<li><A HREF="dnfind.htm">dn_find()</A> (Search for a compressed domain name from a list of previously compressed domain names) is used to search for an expanded domain name in a list of compressed domain names.</li>
|
|
<li><A HREF="dnfind_ts.htm">dn_find_ts64()</A> (Search for a compressed domain name from a list of previously compressed domain names) is used to search for an expanded domain name in a list of compressed domain names.</li>
|
|
<li><A HREF="dnsknm.htm">dn_skipname()</A> (Skip over a compressed domain name.) is used to skip over a compressed domain name in a DNS packet.</li>
|
|
<li><A HREF="ehostnt.htm">endhostent()</A> (Close the nameserver database) is used to close the host database file.</li>
|
|
<li><A HREF="tsehoste.htm">endhostent_r()</A> (Close the nameserver database) is used to close the host database file.</li>
|
|
<li><A HREF="enetnt.htm">endnetent()</A> (Close the network database) is used to close the network database file.</li>
|
|
<li><A HREF="tsenete.htm">endnetent_r()</A> (Close the network database) is used to close the network database file.</li>
|
|
<li><A HREF="eprotnt.htm">endprotoent()</A> (Close the protocol database) is used to close the protocols database file.</li>
|
|
<li><A HREF="tseprote.htm">endprotoent_r()</A> (Close the protocol database) is used to close the protocol database file.</li>
|
|
<li><A HREF="esrvnt.htm">endservent()</A> (Close the service database) is used to close the services database file.</li>
|
|
<li><A HREF="tseserve.htm">endservent_r()</A> (Close the service database) is used to close the service database file.</li>
|
|
<li><A HREF="freeaddrinfo.htm">freeaddrinfo()</A> (Free Address Information) frees one or more addrinfo structures returned by getaddrinfo(), along with any additional storage associated with those structures.</li>
|
|
<li><A HREF="gai_strerror.htm">gai_strerror()</A> (Retrieve Address Information Runtime Error Message) retrieves a text string that describes a return value received from calling the getaddrinfo() or getnameinfo() API.</li>
|
|
<li><A HREF="getaddrinfo.htm">getaddrinfo()</A> (Get Address Information) translates the name of a service location or a service name and returns a set of socket addresses and associated information to be used in creating a socket with which to address the specified service.</li>
|
|
<li><A HREF="ghosta.htm">gethostbyaddr()</A> (Provide information about host given an Internet address) is used to retrieve information about a host.</li>
|
|
<li><A HREF="tsghosta.htm">gethostbyaddr_r()</A> (Provide information about host given an Internet address) is used to retrieve information about a host.</li>
|
|
<li><A HREF="ghostnm.htm">gethostbyname()</A> (Provide information about host given a host name) is used to retrieve information about a host.</li>
|
|
<li><A HREF="tsghostb.htm">gethostbyname_r()</A> (Provide information about host given a host name) is used to retrieve information about a host.</li>
|
|
<li><A HREF="ghostnt.htm">gethostent()</A> (Get next host entry from the nameserver database) is used to retrieve information from the host database file.</li>
|
|
<li><A HREF="tsghoste.htm">gethostent_r()</A> (Get next host entry from the nameserver database) is used to retrieve information from the host database file.</li>
|
|
<li><A HREF="getnameinfo.htm">getnameinfo()</A> (Get Name Information for Socket Address) translates a socket address to a node name and service location.</li>
|
|
<li><A HREF="gnetadr.htm">getnetbyaddr()</A> (Get information from the network database about a given internet address) is used to retrieve information about a network.</li>
|
|
<li><A HREF="tsgneta.htm">getnetbyaddr_r()</A> (Get information from the network database about a given internet address) is used to retrieve information about a network.</li>
|
|
<li><A HREF="gnetnm.htm">getnetbyname()</A> (Get information from the network database about a given domain name) is used to retrieve information about a network.</li>
|
|
<li><A HREF="tsgnetn.htm">getnetbyname_r()</A> (Get information from the network database about a given domain name) is used to retrieve information about a network.</li>
|
|
<li><A HREF="gnetnt.htm">getnetent()</A> (Get network entry from the network database) is used to retrieve network information from the network database file.</li>
|
|
<li><A HREF="tsgnete.htm">getnetent_r()</A> (Get network entry from the network database) is used to retrieve network information from the network database file.</li>
|
|
<li><A HREF="gprotnm.htm">getprotobyname()</A> (Get information regarding a protocol given the protocol name) is used to retrieve information about a protocol.</li>
|
|
<li><A HREF="tsgprotn.htm">getprotobyname_r()</A> (Get information regarding a protocol given the protocol name) is used to retrieve information about a protocol.</li>
|
|
<li><A HREF="gprotnu.htm">getprotobynumber()</A> (Get information regarding a protocol given the protocol number) is used to retrieve information about a protocol.</li>
|
|
<li><A HREF="tsgprotd.htm">getprotobynumber_r()</A> (Get information regarding a protocol given the protocol number) is used to retrieve information about a protocol.</li>
|
|
<li><A HREF="gprotnt.htm">getprotoent()</A> (Get next protocol entry in the protocol data base) is used to retrieve protocol information from the protocol database file.</li>
|
|
<li><A HREF="tsgprote.htm">getprotoent_r()</A> (Get next protocol entry in the protocol data base) is used to retrieve protocol information from the protocol database file.</li>
|
|
<li><A HREF="gsrvnm.htm">getservbyname()</A> (Get port number for a given service name.) is used to retrieve information about services (the protocol being used by the service and the port number assigned for the service).</li>
|
|
<li><A HREF="tsgservn.htm">getservbyname_r()</A> (Get port number for a given service name.) is used to retrieve information about services: the protocol being used by the service and the port number assigned for the service.</li>
|
|
<li><A HREF="gsrvprt.htm">getservbyport()</A> (Get service name given a port number) is used to retrieve information about a service assigned to a port number.</li>
|
|
<li><A HREF="tsgservp.htm">getservbyport_r()</A> (Get service name given a port number) is used to retrieve information about a service assigned to a port number.</li>
|
|
<li><A HREF="gsrvnt.htm">getservent()</A> (Get next service entry from the service database) is used to retrieve information about services (the protocol being used by the service and the port number assigned for the service).</li>
|
|
<li><A HREF="tsgserve.htm">getservent_r()</A> (Get next service entry from the service database) is used to retrieve information about services: the protocol being used by the service and the port number assigned for the service.</li>
|
|
<li><A HREF="hstrerror.htm">hstrerror()</A> (Retrieve resolver error message.) is used to retrieve the text string that describes a resolver h_errno value.</li>
|
|
<li><A HREF="htonl.htm">htonl()</A> (Convert a long (4 byte) integer from local host byte order to the network byte order) is used to convert a long (4-byte) integer from the local host byte order to standard network byte order.</li>
|
|
<li><A HREF="htons.htm">htons()</A> (Convert a short (2 byte) integer from local host byte order to the network byte order) is used to convert a short (2-byte) integer from the local host byte order to standard network byte order.</li>
|
|
<li><A HREF="inaddr.htm">inet_addr()</A> (Translate the full address from dotted decimal format to a 32-bit Internet address) is used to translate an Internet address from dotted decimal format to a 32-bit IP address.</li>
|
|
<li><A HREF="inlnao.htm">inet_lnaof()</A> (Separate the local portion of an Internet address.) is used to extract the local host portion of an IP address.</li>
|
|
<li><A HREF="inmaka.htm">inet_makeaddr()</A> (Formulate an Internet address that combines a network address with the local address of a host.) is used to generate a 32-bit IP address from the 32-bit network IP address and the local address of the host.</li>
|
|
<li><A HREF="inneto.htm">inet_netof()</A> (Separate the network portion of an Internet address.) is used to extract the network portion of an IP address.</li>
|
|
<li><A HREF="innetw.htm">inet_network()</A> (Translate the network portion of the address from dotted decimal format to a 32-bit Internet address) is used to translate an Internet address from dotted decimal format to a 32-bit network IP address, in which the host part of the IP address is set to zeros.</li>
|
|
<li><A HREF="inntoa.htm">inet_ntoa()</A> (Translate from 32-bit Internet address to a dotted decimal format) is used to translate an Internet address from a 32-bit IP address to dotted decimal format.</li>
|
|
<li><A HREF="tsinntoa.htm">inet_ntoa_r()</A> (Translate from 32-bit Internet address to a dotted decimal format) is used to translate an Internet address from a 32-bit IP address to dotted decimal format.</li>
|
|
<li><A HREF="inet_ntop.htm">inet_ntop()</A> (Convert IPv4 and IPv6 Addresses Between Binary and Text Form) converts a numeric address into a text string suitable for presentation.</li>
|
|
<li><A HREF="inet_pton.htm">inet_pton()</A> (Convert IPv4 and IPv6 Addresses Between Text and Binary Form) converts an address in its standard text presentation form into its numeric binary form.</li>
|
|
<li><A HREF="nsaddr.htm">ns_addr()</A> (Translate a network services address from human readable format to a 12-byte hexadecimal address) is used to translate a network services address from human readable format to a 12-byte hexadecimal address.</li>
|
|
<li><A HREF="nsntoa.htm">ns_ntoa()</A> (Translate a network services address from a 12-byte address to a human readable format) is used to translate a network services address from a 12-byte address to a human readable format.</li>
|
|
<li><A HREF="tsnsntoa.htm">ns_ntoa_r()</A> (Translate a network services address from a 12-byte address to a human readable format) is used to translate a network services address from a 12-byte address to a human readable format.</li>
|
|
<li><A HREF="ntohl.htm">ntohl()</A> (Convert a long (4 byte) integer from network byte order to the local host byte order) is used to convert a long (4-byte) integer from the standard network byte order to the local host byte order.</li>
|
|
<li><A HREF="ntohs.htm">ntohs()</A> (Convert a short (2 byte) integer from network byte order to the local host byte order) is used to convert a short (2-byte) integer from the standard network byte order to the local host byte order.</li>
|
|
<li><A HREF="resclo.htm">res_close()</A> (Close a socket and reset the _res structure.) is used to reset the _res structure to the beginning defaults and close a socket that is opened as a result of the RES_STAYOPEN flag.</li>
|
|
<li><A HREF="resfindzonecut.htm">res_findzonecut()</A> (Find the enclosing zone and servers) queries name servers until it finds the enclosing zone and its master name servers for the specified domain name.</li>
|
|
<li><A HREF="reshostalias.htm">res_hostalias()</A> (Retrieve the host alias) looks up the specified name in the host aliases file specified by the environment variable HOSTALIASES.</li>
|
|
<li><A HREF="resini.htm">res_init()</A> (Initialize _res structure for domain name server.) is used to initialize the _res structure for name resolution.</li>
|
|
<li><A HREF="resmkq.htm">res_mkquery()</A> (Form a domain name query and place it in a buffer in memory.) is used to make standard query messages (DNS packets) for name servers.</li>
|
|
<li><A HREF="resnclose.htm">res_nclose()</A> (Close socket and reset res structure) is used to reset the _res structure to the beginning defaults and close a socket that is opened as a result of the RES_STAYOPEN flag.</li>
|
|
<li><A HREF="resninit.htm">res_ninit()</A> (Initialize res structure) is used to initialize the _res structure for name resolution.</li>
|
|
<li><A HREF="resnisourserver.htm">res_nisourserver()</A> (Check server address) looks up the specified server address in the ns_addr_list[] of the specified res structure.</li>
|
|
<li><A HREF="resnmkquery.htm">res_nmkquery()</A> (Place domain query in buffer) is used to make standard query messages (DNS packets) for name servers.</li>
|
|
<li><A HREF="resnmkupdate.htm">res_nmkupdate()</A> (Construct an update packet) builds a dynamic update packet from the linked list of update records.</li>
|
|
<li><A HREF="resnquery.htm">res_nquery()</A> (Send domain query) is used to interface to the server query mechanism.</li>
|
|
<li><A HREF="resnquerydomain.htm">res_nquerydomain()</A> (Send 2-string domain query) is used to interface to the server query mechanism.</li>
|
|
<li><A HREF="resnsearch.htm">res_nsearch()</A> (Search for domain name) is used to make a query message and wait for a response.</li>
|
|
<li><A HREF="resnsend.htm">res_nsend()</A> (Send buffered domain query or update) is used to send a query or update message to a name server and retrieve a response.</li>
|
|
<li><A HREF="resnsendsigned.htm">res_nsendsigned()</A> (Send authenticated domain query or update) is similar to res_nsend() but it uses the specified key to create a transaction signature (TSIG) to sign the query or update packet and to authenticate the response.</li>
|
|
<li><A HREF="resnupdate.htm">res_nupdate()</A> (Build and send dynamic updates) separates the linked list of update records into groups so that all records in a group will belong to a single zone on the nameserver.</li>
|
|
<li><A HREF="resqry.htm">res_query()</A> (Form a domain name query and send it to the domain name server.) is used to interface to the server query mechanism.</li>
|
|
<li><A HREF="ressch.htm">res_search()</A> (Search for a domain name from a list of domain names) is used to make a query message and wait for a response.</li>
|
|
<li><A HREF="ressnd.htm">res_send()</A> (Send the query formed in res_mkquery to the domain name server.) is used to send a query or update message to a name server and retrieve a response.</li>
|
|
<li><A HREF="resxlt.htm">res_xlate()</A> (Translate standard DNS packets between ASCII and EBCDIC) is used to translate a standard DNS packet between ASCII and EBCDIC.</li>
|
|
<li><A HREF="shostnt.htm">sethostent()</A> (Open the nameserver database) is used to prepare for sequential access to the host database file. sethostent() opens the file and repositions the file marker to the beginning of the file.</li>
|
|
<li><A HREF="tsshoste.htm">sethostent_r()</A> (Open the nameserver database) is used in preparation for sequential access to the host database file.</li>
|
|
<li><A HREF="snetnt.htm">setnetent()</A> (Open the network database) is used to prepare for sequential access to the network database file.</li>
|
|
<li><A HREF="tssnete.htm">setnetent_r()</A> (Open the network database) is used in preparation for sequential access to the network database file.</li>
|
|
<li><A HREF="sprotnt.htm">setprotoent()</A> (Open the protocol database) is used to prepare for sequential access to the protocol database file.</li>
|
|
<li><A HREF="tssprote.htm">setprotoent_r()</A> (Open the protocol database) is used in preparation for sequential access to the protocol database file.</li>
|
|
<li><A HREF="ssrvnt.htm">setservent()</A> (Open the service database) is used to prepare for sequential access to the service database file.</li>
|
|
<li><A HREF="tssserve.htm">setservent_r()</A> (Open the service database) is used in preparation for sequential access to the service database file.</li>
|
|
</ul>
|
|
<!--***************API END PASTE***************-->
|
|
|
|
<p><em><sup>1</sup></em> IBM<SUP>(R)</SUP> addition to the Berkeley Resolver
|
|
Routines</p>
|
|
|
|
<p><strong>Note:</strong> These functions use header (include) files from the
|
|
library QSYSINC, which is optionally installable. Make sure QSYSINC is
|
|
installed on your system before using any of the functions.</p>
|
|
|
|
<hr>
|
|
<center>
|
|
<table cellpadding="2" cellspacing="2">
|
|
<tr align="center">
|
|
<td valign="middle" align="center">
|
|
<a href="#Top_Of_Page">Top</a> |
|
|
<a href="unix.htm">UNIX-Type APIs</a> |
|
|
<a href="aplist.htm">APIs by category</a></td>
|
|
</tr>
|
|
</table>
|
|
</center>
|
|
</body>
|
|
</html>
|