Library
Module
Module type
Parameter
Class
Class type
Object identifiers.
Magic numbers in a suit and tie. Their consulting fee is astronomical.
type t = oid
OIDs are conceptually a sequence of non-negative integers, called nodes.
Every OID has at least two nodes.
val hash : t -> int
val seeded_hash : int -> t -> int
val base : int -> int -> t
base n1 n2
is the OID n1.n2
.
Either n1
is [0..1]
and n2
is [0..39]
(inclusive), or n1
is 2
and n2
is non-negative.
val to_nodes : t -> int * int * int list
to_nodes oid
are the nodes this oid
consists of. Every OID has at least two nodes; the rest are collected in the list.
val of_nodes : int -> int -> int list -> t option
val pp : Format.formatter -> t -> unit
pp ppf oid
pretty-prints oid
on ppf
as dotted-decimal.
val of_string : string -> t option
of_string s
is the OID represented by s
, or None
, if s
is not dotted-decimal or the components are out of range.