Google

NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+ ">

nd_protocol_registry

Name

nd_protocol_registry -- 

Description

Details

ND_ProtocolFunc ()

void        (*ND_ProtocolFunc)              (ND_Protocol *proto,
                                             void *user_data);

This is the signature of functions that can be passed to nd_proto_registry_foreach_proto().


nd_proto_registry_init ()

void        nd_proto_registry_init          (void);

The function initializes the registry, sets up hashes etc.


nd_proto_registry_register ()

gboolean    nd_proto_registry_register      (ND_Protocol *proto);

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.


nd_proto_registry_unregister ()

void        nd_proto_registry_unregister    (ND_Protocol *proto);

The given protcol is removed from the registry. The protocol is not touched otherwise.


nd_proto_registry_find ()

ND_Protocol* nd_proto_registry_find         (ND_ProtocolLayer layer,
                                             guint64 magic);

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.


nd_proto_registry_size ()

guint       nd_proto_registry_size          (void);

The function returns the number of protocols in the registry.


nd_proto_registry_foreach_proto ()

void        nd_proto_registry_foreach_proto (ND_ProtocolFunc callback,
                                             void *user_data);

The function iterates over the registered protocols and applies a callback function to each of them.