lb_$register Library Routine (NCS)

Purpose

Registers an object and an interface with the Location Broker.

Syntax

void lb_$register ( object,  object_type,  object_interface,  flags,  annotation)
void lb_$register ( sockaddr,  slength,  entry,  status)
uuid_$t *object;
uuid_$t *object_type;
uuid_$t *object_interface;
b_$server_flag_t *flags;
char annotation [ ];
socket_$addr_t *sockaddr;
unsigned long slength;
lb_$entry_t *entry;
status_$t *status;

Description

The lb_$register routine registers with the Location Broker a specific interface to an object and the location of a server that exports that interface. This routine replaces an existing entry in the Location Broker database that matches the object, object_type, and object_interface parameters as well as both the address family and host in the socket address specified by the sockaddr parameter. If no such entry exists, the routine adds a new entry to the database.

If the flags parameter has a value of lb_$server_flag_local, the entry is registered only in the Local Location Broker (LLB) database at the host where the call is issued. Otherwise, the entry is registered in both the LLB and the Global Location Broker (GLB) databases.

Parameters

Input

Item Description
object Points to the Universal Unique Identifier (UUID) of the object being looked up.
object_type Points to the UUID of the type being looked up.
object_interface Points to the UUID of the interface being looked up.
flags Points to the server that implements the interface. The value must be 0 or lb_$server_flag_local.
annotation Specifies information, such as textual descriptions of the object and the interface. It is set in a 64-character array.
sockaddr Points to the socket address of the server that exports the interface to the object.
slength Specifies the length, in bytes, of the socket address (sockaddr) parameter.

Output

Item Description
entry Points to the copy of the entry that was entered in the Location Broker database.
status Points to the completion status.

Examples

To register the bank interface to the bank_id object, enter:

lb_$register (&bank_id, &bank_$uuid, &bank_$if_spec.id, 0,
   BankName, &saddr, slen, &entry, &st);