Converted from .HLP to .HTML by HLPTOHTML.

cc .HLP

accept

Accepts a connection on a socket.

Syntax:

#include types

#include socket

int accept (int s, struct sockaddr *addr, int *addrlen);

bind

Binds a name to a socket.

Syntax:

#include types

#include socket

int bind (int s, struct sockaddr *name, int namelen);

close

Closes a connection and deletes a socket descriptor.

Syntax:

#include unixio

int close (s);

connect

Initiates a connection on a socket.

Syntax:

#include types

#include socket

int connect (int s, struct sockaddr *name, int namelen);

getpeername

Returns the name of the connected peer.

Syntax:

#include types

#include socket

getpeername (int s, struct sockaddr *name, int *namelen);

getsockname

Returns the name associated with a socket.

Syntax:

#include types

#include socket

int getsockname (int s, struct sockaddr *name, int *namelen);

getsockopt

Returns the options set on a socket.

Syntax:

#include types

#include socket

int getsockopt (int s, int level, int optname, char *optval,

int *optlen);

setsockopt

Sets options on a socket.

Syntax:

#include types

#include socket

int setsockopt (int s,int level, int optname,char *optval,

int *optlen);

gethostbyaddr

Searches the host database sequentially from the beginning of the database for a host record with a given address.

Syntax:

#include netdb

struct hostent *gethostbyaddr (char *addr, int len,

int type);

gethostbyname

Searches the host database sequentially from the beginning of the database for a host record with a given name or alias.

Syntax:

#include netdb

struct hostent *gethostbyname (char *name);

gethostent

Reads the next record in the host database, opening the database if necessary. This routine is not currently supported by the VMS/ULTRIX Connection product on a system running the VMS operating system, but it is supported by the ULTRIX operating system.

Syntax:

#include netdb

struct hostent *gethostent ();

gethostname

Returns the name currently associated to the host.

Syntax:

#include types

#include socket

gethostname (char *name, int namelen);

getnetbyaddr

Searches the network database sequentially from the beginning of the database for a network record with a given address.

Syntax:

#include netdb

struct netent *getnetbyaddr (long net, int type);

getnetbyname

Searches the network database sequentially from the beginning of the database for a network record with a given name or alias.

Syntax:

#include netdb

struct netent *getnetbyname (char *name);

getnetent

Reads the next record in the network database, opening the database if necessary. This routine is not currently supported by the VMS/ULTRIX Connection product on a VMS operating system, but it is supported by the ULTRIX operating system.

Syntax:

#include netdb

struct netent *getnetent ();

htonl

Converts longwords from host to network byte order.

Syntax:

#include in

unsigned long int htonl (unsigned long int hostlong);

htons

Converts short integers from host to network byte order.

Syntax:

#include in

unsigned short int htons (unsigned short int hostshort);

inet_addr

Converts Internet addresses in text form into numeric (binary) Internet addresses.

Syntax:

#include in

#include inet

int inet_addr (char *cp);

inet_lnaof

Returns the local network address portion of an Internet address.

Syntax:

#include in

#include inet

int inet_lnaof (struct in_addr in);

inet_makeaddr

Returns an Internet address given a network address and a local address on that network.

Syntax:

#include in

#include inet

struct in_addr inet_makeaddr (int net, int lna) ;

inet_netof

Returns the Internet network address portion of an Internet address.

Syntax:

#include in

#include inet

int inet_netof (struct in_addr in);

inet_network

Converts a text string representing an Internet network address in the standard Internet "." notation into an Internet network address in network byte order.

Syntax:

#include in

#include inet

int inet_network (char *cp);

inet_ntoa

Converts an internet address into a text string representing the address in the standard Internet "." notation.

Syntax:

#include in

#include inet

char *inet_ntoa (struct in_addr in);

listen

Sets the maximum limit of outstanding connection requests for a socket that is connection-oriented.

Syntax:

int listen (int s, int backlog);

ntohl

Converts longwords from network to host byte order.

Syntax:

#include in

unsigned long int ntohl (unsigned long int netlong) ;

ntohs

Converts short integers from network to host byte order.

Syntax:

#include in

unsigned short int ntohs (unsigned short int netshort);

read

Reads bytes from a socket or file and places them in a buffer.

Syntax:

#include unixio

int read (int d, void *buffer, int nbytes);

recv

Receives bytes from a connected socket and places them into a buffer.

Syntax:

#include types

#include socket

int recv (int s, char *buf, int len, int flags);

recvfrom

Receives bytes from a socket from any source.

Syntax:

#include types

#include socket

int recvfrom (int s, char *buf, int len, int flags, struct

sockaddr *from, int *fromlen) ;

recvmsg

Receives bytes on a socket and places them into scattered buffers.

Syntax:

#include types

#include socket

int recvmsg (int s, struct msghdr msg[], int flags);

select

Allows the user to poll or check a group of sockets for I/O activity. It can check what sockets are ready to be read or written, or what sockets have a pending exception.

Syntax:

#include time

int select (int nfds, int *readfds, int *writefds, int

*execptfds, struct timeval *timeout);

send

Sends bytes though a socket to its connected peer.

Syntax:

#include types

#include socket

int send (int s, char *msg, int len, int flags);

sendmsg

Sends gathered bytes throgh a socket to any other socket.

Syntax:

#include types

#include socket

int sendmsg (int s, struct msghdr msg[], int flags);

sendto

Sends bytes through a socket to any other socket.

Syntax:

#include types

#include socket

int sendto (int s, char *msg, int len, int flags, struct

sockaddr *to, int tolen);

shutdown

Shuts down all or part of a bidirectional connection on a socket. It can disallow further receives, further sends, or both.

Syntax:

#include socket

shutdown (int s, int how);

socket

Creates an endpoint for communication by returning a special kind of file descriptor called a socket descriptor, which is associated with a VMS/ULTRIX Connection socket device channel.

Syntax:

#include types

#include socket

int socket (int af, int type, int protocol);

vaxc$get_sdc

Returns the socket device channel associated with a socket descriptor for direct use with the VMS/ULTRIX Connection product.

Syntax:

#include socket

short int vaxc$get_sdc (int s);

write

Writes a buffer of data to a socket or file.

Syntax:

#include unixio

int write (int d, void *buffer, int nbytes);