Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

socket_to_numeric_name(3ncs) [ultrix man page]

socket_to_numeric_name(3ncs)											      socket_to_numeric_name(3ncs)

Name
       socket_to_numeric_name - convert a socket address to a numeric name and port number

Syntax
       #include <idl/c/socket.h>

       void socket_$to_numeric_name(sockaddr, slength, name, nlength, port,				   status

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

Arguments
       sockaddr 	   A socket address.  The socket address is the structure returned by either or

       slength		   The length, in bytes, of sockaddr.

       name		   A  string in the format family:host[port], where family is the address family and host is the host name in the standard
			   numeric form (for example, #192.7.8.9 for an IP address).  Currently only ip is supported for family.

       nlength		   On input, the maximum length, in bytes, of the name to be returned.	(error if less than  size  of  "nnnnn.nnnn").	On
			   output, the actual length of the name returned.

       port		   The port number.

       status		   The	completion status. If the completion status returned in is equal to status_$ok , then the routine that supplied it
			   was successful.

Description
       The routine converts a socket address to a textual address family, a numeric host name, and a port number.

Files
See Also
       intro(3ncs), socket_family_to_name(3ncs), socket_from_name(3ncs), socket_to_name(3ncs)

														      socket_to_numeric_name(3ncs)

Check Out this Related Man Page

socket_from_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 spec-
	      ify 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 is equal to status_$ok , then the routine that supplied it was  success-
	      ful.

Description
       The  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
See Also
       intro(3ncs), socket_family_from_name(3ncs), socket_to_name(3ncs)

															    socket_from_name(3ncs)
Man Page