Previous | Contents | Index |
If a program does not bind a socket to a particular local address/port combination, the underlying TCP/IP software will automatically assign an address and/or port.
NETLIB_CLOSE closes a socket.
NETLIB_CLOSE socket
VMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
ARGUMENTS
socket
VMS usage: longword_unsigned type: longword (unsigned) access: read only mechanism: by reference
Socket to be closed.
DESCRIPTION
NETLIB Programmer's Guide NETLIB Programmer's Guide
Previous Contents Index
If a program does not bind a socket to a particular local address/port combination, the underlying TCP/IP software will automatically assign an address and/or port.
NETLIB_CLOSE closes a socket.
NETLIB_CLOSE socket
VMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
ARGUMENTS
socket
VMS usage: longword_unsigned type: longword (unsigned) access: read only mechanism: by reference
Socket to be closed.
DESCRIPTION
This routine deletes the specified socket, closing the associated network communications channel, if one is open. Once closed, the socket can no longer be used; you must open a new one with the NETLIB_SOCKET call.
NETLIB_CONNECT
NETLIB_CONNECT connects a socket to a remote address/port.
Format
NETLIB_CONNECT socket, socket-address, sockaddr-len [,iosb] [,astadr] [,astprm]
RETURNS
VMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
ARGUMENTS
socket
VMS usage: longword_unsigned type: longword (unsigned) access: read only mechanism: by reference
Socket to be connected.socket-address
VMS usage: structure type: longword (unsigned) access: read only mechanism: by reference
Socket_address structure describing the addreses and port to which the socket is to be connected.sockaddr-len
VMS usage: longword_unsigned type: longword (unsigned) access: read only mechanism: by reference
Size of the socket address structure.iosb
VMS usage: io_status_block type: longword (unsigned) access: write only mechanism: by reference
I/O status block to receive the status for this call.astadr
VMS usage: procedure type: longword (unsigned) access: call mechanism: by reference
Address of an AST routine to be invoked on completion of this operation.astprm
VMS usage: user_arg type: longword (unsigned) access: read only mechanism: by value
Parameter to be passed to the AST routine.
DESCRIPTION
This routine is used primarily with TCP-based programs to establish a connection to a remote system. When used with UDP, this routine fixes the address to which subsequent UDP datagrams will be sent.
NETLIB_CONNECT_BY_NAME
NETLIB_CONNECT_BY_NAME establishes a TCP connection to a host using the host's name, rather than its IP address.
Format
NETLIB_CONNECT_BY_NAME socket, hostname, port [,iosb] [,astadr] [,astprm]
RETURNS
VMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
ARGUMENTS
socket
VMS usage: longword_unsigned type: longword (unsigned) access: read only mechanism: by reference
A STREAM-type socket allocated with NETLIB_SOCKET.hostname
VMS usage: char_string type: character string access: read only mechanism: by descriptor
A character string containing either a host name or an IP address in dotted-decimal format.port
VMS usage: word_unsigned type: word (unsigned) access: read only mechanism: by reference
The port number to connect to on the destination host. Unlike the SIN_W_PORT field of a SINDEF (socket address) structure, this number is specified in host order, not network order. NETLIB_CONNECT_BY_NAME will automatically convert the port number to network order for you.iosb
VMS usage: io_status_block type: longword (unsigned) access: write only mechanism: by reference
I/O status block to receive the status for this call.astadr
VMS usage: procedure type: longword (unsigned) access: call mechanism: by reference
Address of an AST routine to be invoked on completion of this operation.astprm
VMS usage: user_arg type: longword (unsigned) access: read only mechanism: by value
Parameter to be passed to the AST routine.
DESCRIPTION
This routine converts the specified name or dotted-decimal address to an IP address and uses NETLIB_CONNECT to connect to the specified host and port. If multiple addresses are returned by the host name lookup, each address will be tried until a connection is established or all addresses have been tried.
NETLIB_DNS_EXPANDNAME
NETLIB_DNS_EXPANDNAME is a utility routine used for extracting a domain name from a DNS response.
Format
NETLIB_DNS_EXPANDNAME bufstart, buflen, bufptr, name [,retlen] [,skipcount]
RETURNS
VMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
ARGUMENTS
bufstart
VMS usage: pointer type: longword (unsigned) access: read only mechanism: by value
A pointer to the start of the DNS response buffer.buflen
VMS usage: word_unsigned type: word (unsigned) access: read only mechanism: by reference
The size of the buffer, in bytes.bufptr
VMS usage: pointer type: longword (unsigned) access: read only mechanism: by value
A pointer to the area of the buffer containing the domain name to be expanded.name
VMS usage: char_string type: character string access: write only mechanism: by descriptor
A descriptor for a character string buffer into which the expanded name will be written.retlen
VMS usage: word_unsigned type: word (unsigned) access: write only mechanism: by reference
The returned length of the expanded name, in bytes.skipcount
VMS usage: word_unsigned type: word (unsigned) access: write only mechanism: by reference
The number of bytes in the buffer that were used for the domain name.
DESCRIPTION
This is a utility routine used when parsing a response returned by a call to NETLIB_DNS_QUERY. It expands a domain name stored in a DNS response out to the typical, human-readable, dotted-domain format.This routine is needed because of the way domain names are represented in DNS responses. Refer to RFC 1035 for further information on the format of DNS queries and responses.
NETLIB_DNS_MX_LOOKUP
NETLIB_DNS_MX_LOOKUP looks up a host name, returning any MX records.
Format
NETLIB_DNS_MX_LOOKUP socket, hostname, mxrrlist, mxrrlist-size [,mxrrcount] [,iosb] [,astadr] [,astprm]
RETURNS
VMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
ARGUMENTS
socket
VMS usagbr>
VMS usage: longword_unsigned « s ÐI 0. access: read only mechanism: by reference
Any socket allocated with NETLIB_SOCKET.hostname
VMS usage: erence
The actual number of MX records written to mxrrlist.iosb
VMS usage: io_status_block type: longword (unsigned) access: write only mechanism: by reference
I/O status block to receive the status for this call.astadr
VMS usage: procedure type: longword (unsigned) access: call mechanism: by reference
Address of an AST routine to be invoked on completion of this operation.astprm
VMS usage: user_arg type: longword (unsigned) access: read only mechanism: by value
Parameter to be passed to the AST routine.
DESCRIPTION
This routine performs a DNS lookup on the specified name, returning any Mail Exchanger (MX) records for that name.This routism:
by reference
The actual number of MX records written to mxrrlist.iosb
VMS usage: io_status_block type: longword (unsigned) access: write only mechanism: by reference
I/O status block to receive the status for this call.astadr
VMS usage: procedure type: longword (unsigned) access: call mechanism: by reference
Address of an AST routine to be invoked on completion of this operation.astprm
VMS usage: user_arg type: longword (unsigned) access: read only mechanism: by value
Parameter to be passed to the AST routine.
DESCRIPTION
This routine performs a DNS lookup on the specified name, returning any Mail Exchanger (MX) records for that name.This routine is a front-end that uses NETLIB_DNS_QUERY to perform the DNS queries.
NETLIB_DNS_QUERY
NETLIB_DNS_QUERY formats a domain name service query and returns the response from a DNS server.
Format
NETLIB_DNS_QUERY socket, name, [class], type, buffer, bufsize [,flags] [,iosb] [,astadr] [,astprm]
RETURNS
VMS usage: cond_value type: longword (unsigned) access: write only mechanism: by value
ARGUMENTS
socket
VMS usage: longword_unsigned type: longword (unsigned) access: read only mechanism: by reference
A socket allocated with NETLIB_SOCKET. Any socket can be used.name
VMS usage: char_string type: character string access: read only mechanism: by descriptor
The domain name to be looked up.class
_K_DNS_TYPE_SOA 6 Start-of-Authority (SOA) records › ¢ @