nd_gui

Name

nd_gui -- 

Synopsis



void        (*ND_MenuEntryCB)               (ND_Packet *packet,
                                             guchar *header,
                                             int value);
enum        ND_GuiColor;
void        nd_gui_init                     (void);
void        nd_gui_sync                     (void);
void        nd_gui_show_packet_menu         (GdkEventButton *event);
void        nd_gui_num_packets_set          (void);
void        nd_gui_modified_set             (ND_Trace *trace);
void        nd_gui_statusbar_set            (const char *text);
gint        nd_gui_statusbar_clear          (gpointer data);
void        nd_gui_pbar_reset               (int num_steps);
void        nd_gui_pbar_inc                 (void);
void        nd_gui_pbar_clear               (void);
void        nd_gui_pbar_start_activity      (void);
void        nd_gui_pbar_stop_activity       (void);
void        nd_gui_list_incomplete_column_visible
                                            (GtkWidget *clist,
                                             gboolean visible);
void        nd_gui_list_incomplete_row_set  (GtkWidget *clist,
                                             int row,
                                             gboolean incomplete);
void        nd_gui_list_remove_selected_rows
                                            (GtkWidget *clist);
void        nd_gui_list_remove_row          (GtkWidget *clist,
                                             guint index);
void        nd_gui_list_update              (ND_Trace *trace,
                                             gboolean find_context);
void        nd_gui_list_update_packet       (const ND_Packet *packet);
void        nd_gui_list_update_packet_at_index
                                            (const ND_Packet *packet,
                                             int index);
void        nd_gui_list_update_packet_state (const ND_Packet *packet);
void        nd_gui_list_update_packet_state_at_index
                                            (const ND_Packet *packet,
                                             int index);
void        nd_gui_windowtitle_set          (const char *filename);
void        nd_gui_timestamp_schedule       (GtkCList *clist,
                                             GdkEventMotion *event);
void        nd_gui_timestamp_hide           (void);
void        nd_gui_proto_menu_register      (ND_Protocol *proto);
void        nd_gui_trace_add                (ND_Trace *trace);
void        nd_gui_trace_remove             (ND_Trace *trace);
void        nd_gui_trace_new_tab            (ND_Trace *trace);
void        nd_gui_trace_name_set           (ND_Trace *trace);
void        nd_gui_widget_set_color         (GtkWidget *widget,
                                             ND_GuiColor color);
GtkWidget*  nd_gui_create_menu              (ND_MenuData *data);
GtkWidget*  nd_gui_proto_table_create       (ND_Trace *trace,
                                             ND_ProtoInfo *pinf);
void        nd_gui_proto_table_clear        (ND_Trace *trace,
                                             ND_ProtoInfo *pinf);
void        nd_gui_proto_table_add          (ND_Trace *trace,
                                             ND_ProtoInfo *pinf,
                                             ND_ProtoField *field,
                                             void *data,
                                             gboolean is_error);
void        nd_gui_proto_table_block_events (ND_Trace *trace,
                                             ND_ProtoInfo *pi);
void        nd_gui_proto_table_unblock_events
                                            (ND_Trace *trace,
                                             ND_ProtoInfo *pi);
void        nd_gui_add_monowidth_widget     (GtkWidget *widget);
void        nd_gui_del_monowidth_widget     (GtkWidget *widget);
void        nd_gui_update_monowidth_widgets (void);

Description

Details

ND_MenuEntryCB ()

void        (*ND_MenuEntryCB)               (ND_Packet *packet,
                                             guchar *header,
                                             int value);

Functions of this signature are used for nd_gui_create_menu(). Each menu item supplies a specific header field value, which gets passed to the callback as value. header is automatically set correctly and points to the beginning of the protocol data currently edited when the menu was popped up (including the correct nesting level).


enum ND_GuiColor

typedef enum {
  ND_COLOR_BG,
  ND_COLOR_RED,
  ND_COLOR_YELLOW
} ND_GuiColor;


nd_gui_init ()

void        nd_gui_init                     (void);

The function initializes Netdude GUI components, beyond what can be done through Glade, e.g. the progress bar, tooltips etc.


nd_gui_sync ()

void        nd_gui_sync                     (void);

This function sets various GUI elements sensitive or insensitive according to the current packet/trace selection.


nd_gui_show_packet_menu ()

void        nd_gui_show_packet_menu         (GdkEventButton *event);

This function pops up the packet menu when the user right-clicks a line in the packet list.


nd_gui_num_packets_set ()

void        nd_gui_num_packets_set          (void);

The function updates the field in the lower left containing the number of packets of the current trace.


nd_gui_modified_set ()

void        nd_gui_modified_set             (ND_Trace *trace);

The function adjusts the GUI to reflect the modification status of trace (at the moment this means that the close button of trace is displayed either red or green).


nd_gui_statusbar_set ()

void        nd_gui_statusbar_set            (const char *text);

The function sets the statusbar content to text, and schedules a timout that clears the statusbar after a little while.


nd_gui_statusbar_clear ()

gint        nd_gui_statusbar_clear          (gpointer data);

The function immediately clears the status bar and is used by nd_gui_statusbar_set(). data is not used, nor is the return value, these only exist to make this function usable as a GTK timeout callback.


nd_gui_pbar_reset ()

void        nd_gui_pbar_reset               (int num_steps);

The function initializes the progress bar in the lower right part of the main window to num_steps number of steps. Each call to nd_gui_pbar_inc() will advance the progress bar by one of these steps.


nd_gui_pbar_inc ()

void        nd_gui_pbar_inc                 (void);

The function increments the progress bar. The amount by which is increased depends on the value passed to nd_gui_pbar_reset().


nd_gui_pbar_clear ()

void        nd_gui_pbar_clear               (void);

The function clears the progress bar in the main window.


nd_gui_pbar_start_activity ()

void        nd_gui_pbar_start_activity      (void);

The function starts activity display in the main window, causing a small bar to slide back and forth in the progress bar.


nd_gui_pbar_stop_activity ()

void        nd_gui_pbar_stop_activity       (void);

The function stops activity display in the progress bar.


nd_gui_list_incomplete_column_visible ()

void        nd_gui_list_incomplete_column_visible
                                            (GtkWidget *clist,
                                             gboolean visible);

The packet lists for each trace can provide an additional column indicating whether a packet was captured completely or not. This function specifies whether this column is visible or not. clist is usually obtained from the current trace as trace->list.


nd_gui_list_incomplete_row_set ()

void        nd_gui_list_incomplete_row_set  (GtkWidget *clist,
                                             int row,
                                             gboolean incomplete);

The function adjusts the completeness status in the GUI for the given packet. See also nd_gui_list_incomplete_column_visible(). The function does not adjust any internal structures -- only the GUI.

clist : list widget to update.
row : which row to update.
incomplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whether to mark the row mplete : whethe