The Directory Service

Horus provides a directory service through which binary values (particularly entity identifiers) can be communicated through ASCII names. The directory service implements a flat name spaces that maps ASCII strings to byte strings.

This utility consists of two parts. There is a server, "dirsvr", which can be built by typing "make" in your configuration directory, and started by called "dirsvr". The dirsvr installs its group and contact entity identifiers in your "etc" directory under the names "dir-address" and "dir-contact". Note that you can change the "etc" directory by setting the MUTS_ETC environment variable.

The second part is the API (application programmer's interfaces). This is documented below. It reads the files in the etc directory to locate the directory service.

SOURCES

include/horus/dir.h
src/dir/dirsvr.c
src/dir/dirclt.c

INCLUDE

#include "muts.h"
#include "horus/xxx_layer.h"
#include "horus/dir.h"

SWITCHES

#define DIR_FS /* instead of using a server, use the file system */

INTERFACE

error_t dir_init(dir_handle *ph);
Sets up an endpoint and group view to communication with the directory server. Returns a handle for future RPCs to the directory server.
error_t dir_install(
	dir_handle,
	char *name,
	void *data,
	int size
);
Remember the given data under the given name.
error_t dir_tryinstall(
	dir_handle,
	char *name,
	void *data,
	int size
);
Remember the given data under the given name. Fails if the name exists already.
error_t dir_lookup(
	dir_handle,
	char *name,
	void *data,
	int size
);
Retrieve the data under the given name and store it under the given data.
error_t dir_release(dir_handle);
Release this handle on the directory server.

FUTURE WORK

The directory service will be replicated, and an hierarchical name space will be added. In addition, security features will be added to the service.