Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

socket_equal(3ncs) [ultrix man page]

socket_equal(3ncs)														socket_equal(3ncs)

Name
       socket_equal - compare two socket addresses

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

       boolean socket_$equal(sockaddr1, s1length, sockaddr2, s2length, flags,			      status)
       socket_$addr_t *sockaddr1;
       unsigned long s1length;
       socket_$addr_t *sockaddr2;
       unsigned long s2length;
       unsigned long flags;
       status_$t *status;

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

       s1length 	   The length, in bytes, of sockaddr1.

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

       s2length 	   The length, in bytes, of sockaddr2.

       flags		   The logical OR of values selected from the following:

			   socket_$eq_hostid   Indicates that the host IDs are to be compared.

			   socket_$eq_netaddr  Indicates that the network addresses are to be compared.

			   socket_$eq_port     Indicates that the port numbers are to be compared.

			   socket_$eq_network  Indicates that the network IDs are to be compared.

       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 compares two socket addresses.  The flags parameter determines which fields of the socket addresses	are  compared.	 The  call
       returns `true' (not zero) if all of the fields compared are equal, `false' (zero) if not.

Examples
       The following routine compares the network and host IDs in the socket addresses sockaddr1 and sockaddr2:
       if (socket_$equal (&sockaddr1, s1length, &sockaddr2, s2length,
	       socket_$eq_network | socket_$eq_hostid, &status))
       printf ("sockaddrs have equal network and host IDs
");

Files
See Also
       intro(3ncs)

																socket_equal(3ncs)

Check Out this Related Man Page

rpc_bind(3ncs)															    rpc_bind(3ncs)

Name
       rpc_bind - allocate an RPC handle and set its binding to a server (client only)

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

       handle_t rpc_$bind(object, sockaddr, slength, status)
       uuid_$t *object;
       socket_$addr_t *sockaddr;
       unsigned long slength;
       status_$t *status;

Arguments
       object		   The UUID of the object to be accessed.  If there is no specific object, specify uuid_$nil.

       sockaddr 	   The socket address of the server.

       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 successful.

Description
       The routine creates a fully bound RPC handle that identifies a particular object and server.  This routine is equivalent to an routine fol-
       lowed by an routine.

Examples
       The  following  statement binds the binop client to the specified object and socket address.  The loc parameter is the result of a previous
       call to which converted the host name and port number to a socket address.
       rh = rpc_$bind (&uuid_$nil, &loc, llen, &status);

Diagnostics
       This section lists status codes for errors returned by this routine in

       rpc_$cant_bind_sock The RPC runtime library created a socket but was unable to bind it to a socket address.

       rpc_$not_in_call    An internal error.

       rpc_$proto_error    An internal protocol error.

Files
See Also
       intro(3ncs), rpc_clear_binding(3ncs), rpc_clear_server_binding(3ncs), rpc_set_binding(3ncs)

																    rpc_bind(3ncs)
Man Page