The identity of a file descriptor's layer.

Syntax

#include <prio.h>

typedef PRUintn PRDescIdentity;

Description

File descriptors may be layered. Each layer has it own identity. Identities are allocated by the runtime and are to be associated (by the layer implementor) with all file descriptors of that layer. It is then possible to scan the chain of layers and find a layer that one recognizes, then predict that it will implement a desired protocol.

There are three well-known identities:

Layers are created by PR_GetUniqueIdentity. A string may be associated with a layer when the layer is created. The string is copied by the runtime, and PR_GetNameForIdentity returns a reference to that copy. There is no way to delete a layer's identity after the layer is created.