Details
ND_TraceFunc ()
void (*ND_TraceFunc) (ND_Trace *trace,
void *user_data); |
The trace registry uses functions of this signature as
callbacks for iterating over the registered traces.
See also nd_trace_registry_foreach().
nd_trace_registry_init ()
void nd_trace_registry_init (void); |
The trace registry is Netdude's central repository for currently
edited traces. This function sets up the necessary data structures
and is called when Netdude is launched.
nd_trace_registry_set_current ()
void nd_trace_registry_set_current (ND_Trace *trace); |
There is always one trace in the registry that is the current one,
i.e. the one the user has selected right now. This function sets it
and updates the GUI accordingly (i.e. adjusts window title etc).
nd_trace_registry_get_current ()
ND_Trace* nd_trace_registry_get_current (void); |
This function returns the current trace. Use this to obtain the
trace when you have no other means, like a ND_Packet, for example.
nd_trace_registry_add ()
void nd_trace_registry_add (ND_Trace *trace); |
In order to register a trace in the registry, use this function.
It checks if the trace is already registered and in that case,
simply returns. Takes care of adding the trace in the GUI etc.
nd_trace_registry_remove ()
void nd_trace_registry_remove (ND_Trace *trace); |
Removes a trace from the registry and takes care of updating
the gui etc.
nd_trace_registry_foreach ()
void nd_trace_registry_foreach (ND_TraceFunc callback,
void *user_data); |
The function calls callback for every trace currently registered
and passes it as first argument. The second argument is the user data,
which is simply passed through.