A White Paper from the X/Open XNET Working Group.
Version 1 Last update July 24 1997.
This section highlights the major changes in Networking Services, Issue 5 that might affect an application programmer.
Many of the interfaces using size_t have a new abstract type, socklen_t, introduced as part of the data size neutrality changes in the Single UNIX Specification, Version 2.
This has been introduced due to the widespread use of
to represent lengths of various objects in the context of socket
interfaces and the move to 64-bit architectures.
being the largest size abstract buffer length, needs to evolve so
that interfaces can use 64 bits to their advantage, most of the
objects it is used with do not need to evolve, as such.
Thus continued use of
would have caused unnecessary evolution of the socket
binary interface without any added benefit.
The interfaces affected are as follows:
Instances of the types unsigned long and long have been changed to an abstract unsigned integral type, t_uscalar_t, and an abstract signed integral type, t_scalar_t, respectively.
t_scalar_t and t_uscalar_t are equal length and occupy at least 32 bits.
This has been introduced due to the use of type long in 64-bit environments causing a binary incompatibility problem. Since long in 64-bit environments is 64 bit and 32 bit in 32-bit environments, if the specification had remained as is, XTI providers would have had to provide two sets of XTI libraries and expensive conversion modules to convert structures of one form to another. XTI performance would have consequently suffered significant degradation.
This change is pervasive in Networking Services, Issue 5 XTI.
It also explicitly affects the following interfaces:
The instances of the types in_addr_t and in_port_t have been changed to unsigned integral types uint32_t and uint16_t, respectively. The change has been made since the functions htons(), and so on, which make use of the in_addr_t and in_port_t types are, in practice, used with general 32 and 16-bit quantities, not just Internet addresses and port numbers.
The functions affected include:
Networking Services, Issue 5 has been updated to address thread-safety since the Single UNIX Specification, Version 2 includes threads. All interfaces defined by Networking Services, Issue 5 will be thread-safe, except for the following interfaces which need not be thread-safe:
A portable multi-threaded application may only safely call these functions when access to the function is serialized.
The following functions are new in Networking Services, Issue 5, added to support scatter/gather vectored input/output. These routines are analogous to readv() and writev() from the XSH specification.
Networking Services Mailing List
The Open Group hosts an open mailing list to discuss Networking Services, to join the list send a request to xnet-request (at) opengroup.org
Read other technical papers.
Read or download the complete Single UNIX Specification from http://www.UNIX-systems.org/go/unix.
Copyright © 1997-1998 The Open Group
UNIX is a registered trademark of The Open Group.