'l' - Reflector Lookup (Identification) Command
The lookup command is most often used with the reflector DBM to determine an alias or a PUID.
Symbol
The puidnetd.h symbol for the 'i' command is PUIDNETD_CMD_LOOKUP.
Keys
These keys may be used to locate a person. The field identifier symbols come from puidnetd.h
a -- alias (PUIDNETD_DATA_AKA); do an exact match on the alias
field
value.
h -- Human Resources ID (PUIDNETD_DATA_HRID); do an exact match on the HRID
field
value. Note: an HRID value is NEVER returned in response to a reflector lookup command. Use of this key is
restricted to authorized PUIDs.
N -- common name (PUIDNETD_DATA_CNM); do an exact, case insensitive match on the common name
field
value.
p -- PUID (PUIDNETD_DATA_PUID); do an exact match on the PUID
field
value.
r -- regular expression (PUIDNETD_DATA_RE); do a regular expression match on the third, comma-separated sub-field of the
regular expression
field value.
s -- Student ID (PUIDNETD_DATA_SID); do an exact match on the SID
field value.
Note an SID value is NEVER returned in response to a reflector lookup command. Use of this key is
restricted to authorized PUIDs.
Restricted Keys - The PUIDNETD_DATA_HRID ('h') and PUIDNETD_DATA_S ('s') keys may only be used when the PUID of the requester is known -- e.g., via a client-side certificate in an SSL connection to the net daemon -- and the known PUID has been authorized to use the keys. Questions about obtaining authorization may be directed to I2A2 Administration.
Reply
A positive acknowledgement (ACK) reflector reply message may contain these fields. The field identifier symbols come from puidnetd.h
a -- an alias (PUIDNETD_DATA_AKA); it accompanies an ACK reply.
N -- a common name (PUIDNETD_DATA_CNM); it accompanies an ACK reply.
p -- PUID (PUIDNETD_DATA_PUID); a unique PUID; it accompanies an ACK reply.
A negative acknowledgement (NAK) reply will contain these fields.
e -- an error code (PUIDNETD_DATA_ERRC); it accompanies a NAK reply.
M -- a message (PUIDNETD_DATA_MSG); it accompanies a NAK reply.
Name Regular Expression Search
The reflector DBM will accept a key that specifies a regular expression to be applied to names it knows.
Name regular expressions follow standard rules for UNIX basic regular expressions. More information on reflector name
regular expression searching may be found here
Examples
Here are some examples using the simple keys: alias, PUID, and common name. Look
here for name regular expression examples.
This example asks the reflector to report the identity of a person named "Foo Bar":
External protocol lookup command message:
l NFoo Bar
Positive acknowledgement (ACK) reply:
a NFOO BAR p18 afoobar
Negative acknowledgement (NAK) reply:
n e17 MPerson not found (75)
17 is the external protocol PUIDNETD_EDBME error code. 75 is the internal protocol error number from the DBM, expanded
in the first part of the message (PUIDNETD_DATA_MSG) field.
Here's the previous example's command, altered to use the alias, "foobar," as the key:
l afoobar
Finally, here's the lookup command, using PUID 18 as the key:
l p18