Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ socket_family_from_name(3ncs) — Ultrix/UWS 4.0 RISC

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(3ncs)

socket_family_to_name(3ncs)

socket_from_name(3ncs)

socket_to_name(3ncs)

socket_family_from_name(3ncs)

Name

socket_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 status.all is equal to status_$ok , then the routine that supplied it was successful. 

Description

The socket_$family_from_name routine returns the integer representation of the address family specified in the text string name. 

Examples

The server program for the banks example, /usr/examples/banks/bankd.c accepts a textual family name as its first argument.  The program uses the following socket_$family_from_name routine to convert this name to the corresponding integer representation:

family = socket_$family_from_name
              (argv[1], (long)strlen(argv[1]), &status);

Files

/usr/include/idl/socket.idl
/usr/include/idl/c/socket.h

See Also

intro(3ncs), socket_family_to_name(3ncs), socket_from_name(3ncs), socket_to_name(3ncs)

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026