The function registers a protocol in the registry.
For normal protocol plugins, this gets called automatically when
the plugin is loaded and initialized, so you don't have to do this
manually.
proto :
protocol to register.
Returns :
TRUE when protocol was registered, FALSE on error or
when the protocol is already found in the registry.
The function looks up a protocol plugin for a given layer and magic.
If the protocol isn't found, the raw data display plugin is
returned, which you can discern by a protocol ID value of 1. The magic
is the usual magic for the protocol you're looking for that is used
at the layer below the protocol to identify it, e.g. one of the DLT_xxx
values for a link layer protocol, or one of the ETHERTYPE_xxx values
for a network layer protocol.
layer :
layer where to look for protocol
magic :
magic of protocol.
Returns :
retrieved protocol - either the one you were looking for, or
the raw data protocol otherwise.
nd_proto_registry_size ()
guint nd_proto_registry_size (void);
The function returns the number of protocols in the registry.