hpux man page for xopen_networking

Query: xopen_networking

OS: hpux

Section: 7

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

xopen_networking(7)					 Miscellaneous Information Manual				       xopen_networking(7)

NAME
xopen_networking - X/Open Networking Interfaces
DESCRIPTION
X/Open has defined and interfaces in and X/Open has also defined XTI in and Beginning in UNIX 03, XTI is no longer part of For more information on the specifications or a detailed description of the X/Open Networking Interfaces, please refer to the above speci- fications at website, Prior to HP-UX 11i v3, HP-UX is certified to UNIX 95 on PA-RISC and Integrity systems. Beginning with HP-UX 11i v3, HP-UX is certified to UNIX 95 on PA-RISC systems and to UNIX 95 and UNIX 03 on Integrity systems. COMPILATION ENVIRONMENT There are two ways to obtain X/Open Sockets functionality: Method A is in compliance with X/Open compilation specification. Method B slightly deviates from X/Open compilation specification. However, Method B allows a program to include both objects com- piled to X/Open Sockets specification and objects compiled to BSD Sockets specification. Either or utilities can be used. Refer to cc(1) for details. Also note certain features in are only available if is used. For example, the "restrict" qualifier for pointers is only available if c99 is used. Method A) Strict Compliance Method An X/Open conforming application is one that has all its parts compiled and built according to X/Open specifications. For such conforming applications, this compilation method would be appropriate. Applications should ensure that the feature test macro is defined with the value To ensure portability, applications should define the macro either on the compilation command line, or at the beginning of each source module prior to the inclusion of any headers. For example, to compile a 64 bit object using Applications should ensure that the feature test macros and are defined. To ensure portability, applications should define the macros either on the compilation command line, or at the beginning of each source module prior to the inclusion of any headers. For example, to compile a 64 bit object using Link the program objects with library. For example: Note if the library is also specified in the link line, the library has to be specified before the library. Otherwise, X/Open Sockets calls would have been resolved to BSD Sockets functions in the library instead of X/Open Sockets functions in the library. Method B) Alternative Method HP-UX provides two styles of Sockets API: o default BSD Sockets o X/Open Sockets These two styles of Sockets API have the same function names but they have differences in semantics and argument types. For example, the optlen field in X/Open is type, while BSD is type. In 64 bit mode, is 64 bit and is still 32 bit. Linking objects compiled to X/Open Sockets specification and objects compiled to BSD Sockets specification in the same program using the linkage method in method A would erroneously resolve BSD Sockets calls to X/Open Sockets functions in the library. As a result, the pro- gram may result in application core dumps or unexpected Socket errors when it is run. These symptoms commonly occur when BSD Sockets and are called. For such mixed program configuration, the compilation and linkage methods described below in should be used. Define in addition to either defining in or and in For example to compile a 64-bit X/Open Sockets object and a 64-bit BSD Sockets object using With this method, X/Open Sockets calls are remapped by the static Sockets functions in <sys/socket.h> to an alternative set of X/Open Sock- ets functions in library. This alternative set has a prefix in its function names, for example, Because the alternative set has different function names, X/Open Sockets calls are not confused with BSD Sockets calls at link time. Other than the naming difference, this alternative set is identical to the X/Open Sockets functions in library. Other than adding an addi- tional macro, this compilation method is compliant to X/Open specifications. Link with library instead of library. library should not be included in the application link line. For example: Because library is not in the link line, BSD Sockets calls are not erroneously resolved to X/Open Sockets functions in library.
FUTURE DIRECTION
Method B might become the default method in a future release. At that time, would be defined by default.
AUTHOR
X/Open and interfaces were developed by HP and X/Open Company Limited.
SEE ALSO
t_accept(3), t_alloc(3), t_bind(3), t_close(3), t_connect(3), t_error(3), t_free(3), t_getinfo(3), t_getprotaddr(3), t_getstate(3), t_lis- ten(3), t_look(3), t_open(3), t_optmgmt(3), t_rcv(3), t_rcvconnect(3), t_rcvdis(3), t_rcvrel(3), t_rcvudata(3), t_rcvuderr(3), t_snd(3), t_snddis(3), t_sndrel(3), t_sndudata(3), t_strerror(3), t_sync(3), t_unbind(3). accept(2), bind(2), close(2), connect(2), fcntl(2), fgetpos(3S), fsetpos(3S), ftell(3S), getpeername(2), getsockname(2), getsockopt(2), listen(2), lseek(2), poll(2), read(1), recv(2), recvfrom(2), recvmsg(2), select(2), send(2), sendmsg(2), sendto(2), setsockopt(2), shut- down(2), sockatmark(3N), socket(2), socketpair(2), write(1). gethostname(2), endhostent(3N), endnetent(3N), endprotoent(3N), endservent(3N), freeaddrinfo(3N), gai_strerror(3N), getaddrinfo(3N), geth- ostbyaddr(3N), getnameinfo(3N), getnetbyaddr(3N), getprotobynumber(3N), getservbyport(3N), htonl(3N), if_freenameindex(3N), if_indexton- ame(3N), if_nameindex(3N), if_nametoindex(3N), inet_addr(3N), ntohl(3N), sethostent(3N), setnetent(3N), setprotoent(3N), setservent(3N). xopen_networking(7)
Similar Topics in the Unix Linux Community
Open Invention Network Is Looking For Prior Art -- 2 Ways To Help Out
UNIX network programming execution problem