socket_family_from_name(3ncs)socket_family_from_name(3ncs)Namesocket_family_from_name - convert an address family name to an integer
Syntax
#include <idl/c/socket.h>
unsigned long socket_$family_from_name(name, nlength, status)
socket_$string_t name;
unsigned long nlength;
status_$t *status;
Arguments
name The textual name of an address family. Currently,
only ip is supported.
nlength The length, in bytes, of name.
status The completion status. If the completion status
returned in is equal to status_$ok , then the rou‐
tine that supplied it was successful.
Description
The routine returns the integer representation of the address family
specified in the text string name.
Examples
The server program for the banks example, accepts a textual family name
as its first argument. The program uses the following routine to con‐
vert this name to the corresponding integer representation:
family = socket_$family_from_name
(argv[1], (long)strlen(argv[1]), &status);
FilesSee Alsointro(3ncs), socket_family_to_name(3ncs), socket_from_name(3ncs),
socket_to_name(3ncs)socket_family_from_name(3ncs)