Creates a socket of a specified address family for a Remote Procedure Call (RPC) server.
void rpc_$use_family (family, sockaddr, slength, status)
unsigned long family; socket_$addr_t *sockaddr;
unsigned long *slength; status_$t *status;
The rpc_$use_family routine creates a socket for a server without specifying its port number. (The RPC runtime software assigns the port number.) Use this routine to create the server socket unless the server must listen on a particular well-known port. If the socket must listen on a specific well-known port, use the rpc_$use_family_wk routine to create the socket.
A server can listen on more than one socket. However, a server normally does not listen on more than one socket for each address family, regardless of the number of interfaces that it exports. Therefore, most servers should make this call once for each supported address family.
Note: This routine is used by servers only.
The rpc_$use_family routine can fail if one or more of the following is true:
To create the bank server's socket, enter:
rpc_$use_family(atoi(argv[1]), &saddr, &slen, &st);
The numeric value of the address family to be used is supplied as an argument to the program.
This Library Routine is part of Network Computing System in Network Support Facilities in Base Operating System (BOS) Runtime.
Remote Procedure Call (RPC) Runtime Library (NCS) in AIX Version 4.3 Communications Programming Concepts.