Portability Issues; Porting Issues For Ipc Functions And Library Calls - HP Rp3440-4 - 9000 - 0 MB RAM Programmer's Manual

Bsd sockets interface programmer’s guide
Hide thumbs Also See for Rp3440-4 - 9000 - 0 MB RAM:
Table of Contents

Advertisement

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 HP-
UX 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

Advertisement

Table of Contents
loading

Table of Contents