critical impact:
miscellaneous rpc functions - obsolete; use new functions (CrCh184)
Problem description
Numerous RPC functions previously in libc have
been replaced by new functions of different names.
For backward compatibility, these functions still exist.
The use of these interfaces is strongly discouraged, and they may not be available
in future implementations of HP-UX. The old functions have been moved to RPC
libraries, alongside the recommended ones. You must use #define PORTMAP to
access the obsolete interfaces. Identifiers
 authunix_create |
 pmap_set |
 authunix_create_default |
 pmap_unset |
 callrpc |
 registerrpc |
 clnt_broadcast |
 svc_getreq |
 clntraw_create |
 svc_register |
 clnttcp_create |
 svc_unregister |
 clntudp_bufcreate |
 svcfd_create |
 clntudp_create |
 svcraw_create |
 get_myaddress |
 svctcp_create |
 pmap_getmaps |
 svcudp_bufcreate |
 pmap_getport |
 svcudp_create |
 pmap_rmtcall |
 xdr_authunix_parms |
Old behavior
#include < rpc/rpc.h >
struct sockaddr_in myaddr;
get_myaddress(&myaddr);
See also
Solution description
Modify your code to use the new functions, include the
correct header files, and link with the NSL library. Refer to the manpages
to determine the appropriate usage.
The following functions exist only for backward
compatibility, are obsolete, and have been replaced by the listed functions. You should modify
your software to use the new function names.
obsolete functions new functions
----------------------- ----------------------
authdes_create authdes_seccreate
authunix_create authsys_create
authunix_create_default authsys_create_default
callrpc rpc_call
clnt_broadcast rpc_broadcast
clntraw_create clnt_raw_create
clnttcp_create clnt_create,
clnt_tli_create,
clnt_vc_create
clntudp_create clnt_create,
clnt_tli_create,
clnt_dg_create
clntudp_bufcreate clnt_tli_create,
clnt_dg_create
get_myaddress netdir_getbyname
pmap_getmaps rpcb_getmaps
pmap_getport rpcb_getaddr
pmap_rmtcall rpcb_rmtcall
pmap_set rpcb_set
pmap_unset rpcb_unset
registerrpc rpc_reg
svc_getreq svc_getreqset
svc_register svc_reg
svc_unregister svc_unreg
svcfd_create svc_fd_create
svcraw_create svc_raw_create
svctcp_create svc_create,
svc_tli_create,
svc_vc_create
svcudp_bufcreate svc_tli_create,
svc_dg_create
svcudp_create svc_create,
svc_tli_create,
svc_dg_create
xdr_authunix_parms xdr_authsys_parms
All of the preceding functions (both new and old) exist in the RPC libraries.
If you plan on recompiling your program, you must use #define PORTMAP to
access any of the preceding functions. New behavior
#include < netdir.h >
.
.
.
struct netconfig *config;
struct t_unitdata *unit;
struct nd_addrlist *addr_list;
.
.
.
netdir_getbyname(config, service, &addr_list);
See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| NW |
C, C++ |
any HP-UX 11i version |
critical |
changed |
|