HP Rp5405 BSD Sockets Interface Programmer's Guide - Page 177
Portability Issues
View all HP Rp5405 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 177 highlights
Programming Hints Portability Issues Portability Issues This section describes implementation differences between 4.3 BSD Sockets and HP-UX IPC. It contains porting issues for: • IPC functions and library calls. • Other functions and library calls typically used by IPC programs. Because HP-UX IPC is based on 4.3 BSD Sockets (it is a subset of 4.3 BSD), programs should port easily between HP-UX and 4.3 BSD systems. If you need to have portable applications, keep the information described in this appendix in mind when you write your IPC programs. Porting Issues for IPC Functions and Library Calls The following is a list of differences in IPC functions and library calls to watch out for if you want to port your IPC applications between HP-UX and 4.3 BSD systems. Shutdown When shutdown has been used on a datagram socket on an HP-UX system, the local port number bound to that socket remains unavailable for use until that socket has been destroyed by close. Some other systems free that port number for use immediately after the shutdown. In general, sockets should be destroyed by close (or by terminating the process) when they are no longer needed. This allows you to avoid unnecessary delay in deallocating local port numbers. Address Conversion Functions for DEC VAX Hosts The functions htonl, htons, ntonl and ntons are not required on HPUX systems. They are included for porting to a DEC VAX host. You can use these functions in your HP-UX programs for portability; they are defined as null macros on HP-UX systems, and are found in netinet/ in.h. Chapter 8 177