Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

intro(3ncs)

socket_family_from_name(3ncs)

socket_to_name(3ncs)

socket_from_name(3ncs)

Name

socket_from_name − convert a name and port number to a socket address

Syntax

#include <idl/c/socket.h>
 
void socket_$from_name(family, name, nlength, port, sockaddr, slength,                           status)

unsigned long family;
socket_$string_t name;
unsigned long nlength;
unsigned long port;
socket_$addr_t *sockaddr;
unsigned long *slength;
status_$t *status;

Arguments

family
The integer representation of an address family.  Value can be socket_$internet or socket_$unspec If the family parameter is socket_$unspec, then the name parameter is scanned for a prefix of family: (for example, ip:). 

name A string in the format family:host[port], where family:, host, and [port] are all optional. The family is an address family.  The only valid family is ip.  If you specify a family as part of the name parameter, you must specify socket_$unspec in the family parameter.  The host is a host name.  A leading number sign (#) can be used to indicate that the host name is in the standard numeric form (for example, #192.9.8.7).  If host is omitted, the local host name is used.  The port is a port number.  If you specify a port as part of the name parameter, the port parameter is ignored. 

nlength
The length, in bytes, of name. 

port A port number.  If you specify a port number in the name parameter, this parameter is ignored. 

sockaddr
A socket address.

slength
The length, in bytes, of sockaddr. 

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_$from_name routine converts a textual address family, host name, and port number to a socket address. The address family and the port number can be either specified as separate parameters or included in the name parameter. 

Files

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

See Also

intro(3ncs), socket_family_from_name(3ncs), socket_to_name(3ncs)

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