IPX/SPX Programming Manual
Library Routines
HP NonStop IPX/SPX Programming Manual—528022-001
5-5
Interfacing TAL Programs to the Socket Library
the meaning of each error according to the type of call and the circumstances in which
your program issues the call.
Nowait Call Errors
The nowait versions of the routines return the error in the file-system variable error,
which you can obtain by calling the FILE_GETINFOBYNAME_ procedure immediately
following the call to AWAITIOX. In that case, it is your application’s responsibility to set
errno to the error returned by FILE_GETINFOBYNAME_.
Socket error numbers are in the range reserved by the NonStop Kernel operating
system for application-defined errors. These do not conflict with the range the
operating system has reserved for file-system errors. However, it is possible to get
regular NonStop Kernel file-system errors that pertain to interprocess I/O, because the
socket routines are built on NonStop Kernel interprocess I/O. For descriptions of these
interprocess I/O errors, refer to the Guardian Procedure Calls Reference Manual.
Interfacing TAL Programs to the Socket
Library
A program is considered a TAL program if its MAIN section is written in TAL. A program
that has a C main section but calls TAL procedures is not bound by the requirements
given in this subsection. The topics covered include:
•
Implications of the C socket library
•
Startup considerations
•
Bind considerations
•
CRE considerations
Any experience writing C language socket code is applicable to writing TAL socket
code. All the functions, parameters, data structures, and return codes are the same in
TAL as they are in C. The differences are only a matter of TAL syntax.
Note. The perror function is not supported for TAL sockets.
Note. When you initiate a nowait call,
errno is set to reflect any error detected upon
initiation. If errno is nonzero after initiation, your program should not call the AWAITIOX
procedure because the operation is not successfully initiated.
Note. For more information about socket library support for TAL and pTAL applications, see
TALDOCUM in $system.ztcpip.
Note. Use the Common Run-Time Environment (CRE) when developing TAL socket
applications. CRE is described in the CRE Programming Manual.