12.07.2015 Views

z/VM: TCP/IP Programmer's Reference - z/VM - IBM

z/VM: TCP/IP Programmer's Reference - z/VM - IBM

z/VM: TCP/IP Programmer's Reference - z/VM - IBM

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

C Sockets Application Program InterfaceIf the sockets program is being run from the CMS command line (or equivalent),then the global variables existing in the CENV group managed by the GLOBALVcommand are used as the environment variables for the process. In this case, aCMS command like the following could be used to temporarily set the X-SITEenvironment variable: 1GLOBALV SELECT CENV SET X-SITE MY.SITEINFOSome of the environment variables described below are set to values whichrepresent file names. For these environment variables, the given file names areinterpreted as POSIX-style file names, which means that case is significant, andthat the file name is interpreted as residing in the Byte File System unless youprecede the file name with two slashes. To specify the name of a file which resideson a minidisk or accessed SFS directory instead of in the BFS, precede the name ofthe file with two slashes, and separate the CMS file name and type (and mode, ifspecified) with a period.The following environment variables can be used to affect the execution of thesockets library:Variable DescriptionX-SITEX-ADDRThis environment variable tells the socket library resolver code touse the named file in place of the HOSTS SITEINFO file, whichcontains information about AF_INET hosts known to this host. Forexample, setting the variable to the string /etc/hosts tells theresolver to use the /etc/hosts file in place of the default file, whichis //HOSTS.SITEINFO. This environment variable is used by thegethostbyname() function call, the gethostent() function call, andseveral others.This environment variable tells the socket library resolver code touse the named file in place of the HOSTS ADDRINFO file, whichcontains information about AF_INET networks known to this host.For example, setting the variable to the string /etc/addrs tells theresolver to use the /etc/addrs file in place of the default file,which is //HOSTS.ADDRINFO. This environment variable is used bythe gethostbyaddr() function call, the getnetent() function call, andseveral others.X-XLATE This environment variable tells the socket library resolver code touse the named file in place of the STANDARD <strong>TCP</strong>XLBIN file, whichcontains ASCII to EBCDIC and EBCDIC to ASCII translation tablesfor use by the resolver when sending or receiving information froman AF_INET network. For example, setting the variable to thestring /etc/xlate tells the resolver to use the /etc/xlate file inplace of the default file, which is //STANDARD.<strong>TCP</strong>XLBIN. Thisenvironment variable is used by the gethostbyname() andgethostbyaddr() function calls.HOSTALIASESThis environment variable tells the socket library resolver code touse the named file when searching for aliases for AF_INET hostnames. For example, setting the variable to the string /etc/aliases1. Be aware, however, that some of the environment variables described accept values which are case sensitive, and which will oftenbe set to lowercase values. It can be difficult, using the GLOBALV command, to set lowercase values, because commands typed infrom the CMS command line are automatically uppercased by CMS before processing. One way to set the variable to amixed-case value is to issue the GLOBALV command from a REXX exec with “Address Command” in effect.18 z/<strong>VM</strong>: <strong>TCP</strong>/<strong>IP</strong> Programmer’s <strong>Reference</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!