109 lines
12 KiB
HTML
109 lines
12 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 System 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 ========================================= -->
|
||
|
<!-- NETMG2 SCRIPT A converted by B2H R4.1 (346) (CMS) by HOLTJM at -->
|
||
|
<!-- RCHVMW2 on 29 Jan 1999 at 10:01:37 -->
|
||
|
<!-- File Edited December 2001 -->
|
||
|
<!-- 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 language="Javascript" src="../rzahg/synch.js" type="text/javascript">
|
||
|
</script>
|
||
|
|
||
|
<h2>Sockets System Functions</h2>
|
||
|
|
||
|
<p>The system functions 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="accept.htm">accept()</A> (Wait for an incoming connection and tie that connection to the application) is used to wait for connection requests.</li>
|
||
|
<li><A HREF="acceptr.htm">accept_and_recv()</A> (Wait for connection request and receive the first message that was sent.) is used to wait for an incoming connection request, receive the first message from the peer, and return the local and remote socket addresses associated with the connection.</li>
|
||
|
<li><A HREF="bind.htm">bind()</A> (Set a local address for the socket) is used to associate a local address with a socket.</li>
|
||
|
<li><A HREF="close.htm">close()</A> (Close file descriptor) closes a descriptor, fildes.</li>
|
||
|
<li><A HREF="connec.htm">connect()</A> (Bind a destination to a socket or set a connection) is used to establish a connection on a connection-oriented socket or establish the destination address on a connectionless socket.</li>
|
||
|
<li><A HREF="fcntl.htm">fcntl()</A> (Perform file control command) performs various actions on open descriptors.</li>
|
||
|
<li><A HREF="fstat.htm">fstat()</A> (Get file information by descriptor) gets status information about the file specified by the open file descriptor file_descriptor and stores the information in the area of memory indicated by the buf argument.</li>
|
||
|
<li><A HREF="gdomn.htm">getdomainname()</A> (Retrieve domain name for the system) is used to retrieve the name of the domain from the system.</li>
|
||
|
<li><A HREF="ghosti.htm">gethostid()</A> (Retrieve host ID for the system) is used to retrieve a host ID's 32-bit IP address.</li>
|
||
|
<li><A HREF="ghostn.htm">gethostname()</A> (Retrieve host name for the system) is used to retrieve the name of the host from the system.</li>
|
||
|
<li><A HREF="gpeern.htm">getpeername()</A> (Retrieve destination address of a socket) is used to retrieve the destination address to which the socket is connected.</li>
|
||
|
<li><A HREF="gsockn.htm">getsockname()</A> (Retrieve local address of a socket) is used to retrieve the local address associated with the socket.</li>
|
||
|
<li><A HREF="gsocko.htm">getsockopt()</A> (Allow an application to request information about a socket (timeout, retransmission, buffer space)) is used to retrieve information about socket options.</li>
|
||
|
<li><A HREF="gvsoc.htm">givedescriptor()</A> (Pass the access rights to a descriptor) is used to pass a descriptor from one i5/OS job to another i5/OS job.</li>
|
||
|
<li><img src="delta.gif" alt="Start of change" border="0"><A HREF="if_freenameindex.htm">if_freenameindex()</A> (Free dynamic memory allocated by if_nameindex()) frees the dynamic memory that was allocated by if_nameindex(). <img src="deltaend.gif" ALT="End of change" border="0"></li>
|
||
|
<li><img src="delta.gif" alt="Start of change" border="0"><A HREF="if_indextoname.htm">if_indextoname()</A> (Map an Interface index to its corresponding name ) places the name of the interface with index ifindex into the buffer pointed at by ifname. <img src="deltaend.gif" ALT="End of change" border="0"></li>
|
||
|
<li><img src="delta.gif" alt="Start of change" border="0"><A HREF="if_nameindex.htm">if_nameindex()</A> (Return all interface names and indexes) returns an array of if_nameindex structures, one structure per interface. <img src="deltaend.gif" ALT="End of change" border="0"></li>
|
||
|
<li><img src="delta.gif" alt="Start of change" border="0"><A HREF="if_nametoindex.htm">if_nametoindex()</A> (Map an Interface Name to its Corresponding Index s) returns the interface index corresponding to name ifname. <img src="deltaend.gif" ALT="End of change" border="0"></li>
|
||
|
<li><A HREF="ioctl.htm">ioctl()</A> (Perform I/O control request) performs control functions (requests) on a file descriptor.</li>
|
||
|
<li><A HREF="listen.htm">listen()</A> (Prepare a socket for incoming connections) is used to indicate a willingness to accept incoming connection requests. If a listen() is not done, incoming connections are silently discarded.</li>
|
||
|
<li><img src="delta.gif" alt="Start of change" border="0"><A HREF="poll.htm">poll()</A> (Wait for Events on Multiple Descriptors) enables an application to wait for events on multiple descriptors. <img src="deltaend.gif" ALT="End of change" border="0"></li>
|
||
|
<li><A HREF="createiocompletionport.htm">QsoCreateIOCompletionPort()</A> (Create I/O Completion Port) is used to create a common wait point for a completed overlapped I/O operation.</li>
|
||
|
<li><A HREF="destroyiocompletionport.htm">QsoDestroyIOCompletionPort()</A> (Destroy I/O Completion Port) is used to destroy an I/O completion port.</li>
|
||
|
<li><A HREF="postiocompletion.htm">QsoPostIOCompletion()</A> (Post I/O Completion Request) will post an Qso_OverlappedIO_t request on a specifed I/O completion port.</li>
|
||
|
<li><A HREF="startaccept.htm">QsoStartAccept()</A> (Start Asynchronous Accept Operation) is used to wait asynchronously for connection requests.</li>
|
||
|
<li><A HREF="startrecv.htm">QsoStartRecv()</A> (Start Asynchronous Receive Operation) is used to initiate a asynchronous receive operation.</li>
|
||
|
<li><A HREF="startsend.htm">QsoStartSend()</A> (Start Asynchronous Send Operation) is used to initiate a asynchronous send operation.</li>
|
||
|
<li><A HREF="waitforiocompletion.htm">QsoWaitForIOCompletion()</A> (Wait for I/O Operation) is used to wait for a completed overlapped I/O operation.</li>
|
||
|
<li><A HREF="rbind.htm">Rbind()</A> (Establish remote bind) used to request that a SOCKS server allow an inbound connection request across a firewall.</li>
|
||
|
<li><A HREF="read.htm">read()</A> (Read from Descriptor) reads nbyte bytes of input into the memory area indicated by buf.</li>
|
||
|
<li><A HREF="readv.htm">readv()</A> (Read from Descriptor Using Multiple Buffers) is used to receive data from a file or socket descriptor.</li>
|
||
|
<li><A HREF="recv.htm">recv()</A> (Receive data using a socket descriptor) is used to receive data through a socket.</li>
|
||
|
<li><A HREF="recvfr.htm">recvfrom()</A> (Receive data and remote address using a socket descriptor) is used to receive data through a connected or unconnected socket.</li>
|
||
|
<li><A HREF="recvms.htm">recvmsg()</A> (Receive data and remote address using a socket descriptor and multiple buffers (scatter read)) is used to receive data or descriptors or both through a connected or unconnected socket.</li>
|
||
|
<li><A HREF="rexec.htm">rexec()</A> (Issue a command on a remote host) is used to open a connection to a remote host and send a user ID, password, and command to the remote host.</li>
|
||
|
<li><A HREF="rexec_r.htm">rexec_r()</A> (Issue a command on a remote host) is used to open a connection to a remote host and send a user ID, password, and command to the remote host.</li>
|
||
|
<li><A HREF="rexec_r_ts.htm">rexec_r_ts64()</A> (Issue a command on a remote host) is used to open a connection to a remote host and send a user ID, password, and command to the remote host.</li>
|
||
|
<li><A HREF="rexec_ts.htm">rexec_tx64()</A> (Issue a command on a remote host) is used to open a connection to a remote host and send a user ID, password, and command to the remote host.</li>
|
||
|
<li><A HREF="sselect.htm">select()</A> (Allow a single process to wait for connections on multiple sockets) is used to enable an application to multiplex I/O.</li>
|
||
|
<li><A HREF="send.htm">send()</A> (Send data using a socket descriptor) is used to send data through a connected socket.</li>
|
||
|
<li><A HREF="sendfile.htm">send_file()</A> (Send a file over a socket connection) is used to send the contents of an open file over an existing socket connection.</li>
|
||
|
<li><A HREF="sendf64.htm">send_file64()</A> (Send a file over a socket connection) is used to send the contents of an open file over an existing socket connection.</li>
|
||
|
<li><A HREF="sendms.htm">sendmsg()</A> (Send data with a destination address using a socket descriptor and multiple buffers (gather write)) is used to send data or descriptors or both through a connected or unconnected socket.</li>
|
||
|
<li><A HREF="sendto.htm">sendto()</A> (Send data with a destination address using a socket descriptor) is used to send data through a connected or unconnected socket.</li>
|
||
|
<li><A HREF="sdomn.htm">setdomainname()</A> (Set domain name for the system) is used to set the name of the domain.</li>
|
||
|
<li><A HREF="shosti.htm">sethostid()</A> (Set Host ID) is used to set a host ID.</li>
|
||
|
<li><A HREF="shostn.htm">sethostname()</A> (Set host name for the system) is used to set the name of the host for a system.</li>
|
||
|
<li><A HREF="ssocko.htm">setsockopt()</A> (Allow an application to set characteristics of a socket (timeout, retransmission, buffer space)) is used to set socket options.</li>
|
||
|
<li><A HREF="shutdn.htm">shutdown()</A> (End Receiving and/or Sending of Data on Socket) is used to disable reading, writing, or reading and writing on a socket.</li>
|
||
|
<li><A HREF="socket.htm">socket()</A> (Create a socket) is used to create an end point for communications.</li>
|
||
|
<li><A HREF="socketp.htm">socketpair()</A> (Create a pair of sockets) is used to create a pair of unnamed, connected sockets in the AF_UNIX or AF_UNIX_CCSID address_family.</li>
|
||
|
<li><A HREF="tksoc.htm">takedescriptor()</A> (Receive the access rights to a descriptor) is used to obtain a descriptor in one i5/OS job which was passed from another i5/OS job by a givedescriptor().</li>
|
||
|
<li><A HREF="write.htm">write()</A> (Write to Descriptor) writes nbyte bytes from buf to the file or socket associated with file_descriptor.</li>
|
||
|
<li><A HREF="writev.htm">writev()</A> (Write to Descriptor Using Multiple Buffers) is used to write data to a file or socket descriptor.</li>
|
||
|
</ul>
|
||
|
<!--***************API END PASTE***************-->
|
||
|
|
||
|
<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>
|