2 * ncp_stat 2005 Greg Morris
6 * Wireshark - Network traffic analyzer
7 * By Gerald Combs <gerald@wireshark.org>
8 * Copyright 1998 Gerald Combs
10 * This program is free software; you can redistribute it and/or
11 * modify it under the terms of the GNU General Public License
12 * as published by the Free Software Foundation; either version 2
13 * of the License, or (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
29 #ifdef HAVE_SYS_TYPES_H
30 # include <sys/types.h>
37 #include <epan/packet_info.h>
38 #include <epan/epan.h>
39 #include <epan/value_string.h>
41 #include <epan/dissectors/packet-ncp-int.h>
43 #include "../timestats.h"
44 #include "../simple_dialog.h"
46 #include "../stat_menu.h"
48 #include "gtk/gui_utils.h"
49 #include "gtk/dlg_utils.h"
50 #include "gtk/filter_dlg.h"
51 #include "gtk/service_response_time_table.h"
52 #include "gtk/tap_param_dlg.h"
53 #include "gtk/gtkglobals.h"
57 /* used to keep track of the statistics for an entire program interface */
58 typedef struct _ncpstat_t {
60 srt_stat_table ncp_srt_table;
61 srt_stat_table nds_srt_table;
62 srt_stat_table func_srt_table;
63 srt_stat_table sss_srt_table;
64 srt_stat_table nmas_srt_table;
65 srt_stat_table sub_17_srt_table;
66 srt_stat_table sub_21_srt_table;
67 srt_stat_table sub_22_srt_table;
68 srt_stat_table sub_23_srt_table;
69 srt_stat_table sub_32_srt_table;
70 srt_stat_table sub_34_srt_table;
71 srt_stat_table sub_35_srt_table;
72 srt_stat_table sub_36_srt_table;
73 srt_stat_table sub_86_srt_table;
74 srt_stat_table sub_87_srt_table;
75 srt_stat_table sub_89_srt_table;
76 srt_stat_table sub_90_srt_table;
77 srt_stat_table sub_92_srt_table;
78 srt_stat_table sub_94_srt_table;
79 srt_stat_table sub_104_srt_table;
80 srt_stat_table sub_111_srt_table;
81 srt_stat_table sub_114_srt_table;
82 srt_stat_table sub_123_srt_table;
83 srt_stat_table sub_131_srt_table;
86 static const value_string ncp_group_vals[] = {
87 { 0, "Synchronization" },
91 { 4, "File Server Environment" },
94 { 7, "Queue Management System (QMS)" },
96 { 9, "Transaction Tracking" },
98 { 11, "NCP Extension" },
99 { 12, "Extended Attribute" },
101 { 14, "Enhanced File System" },
103 { 16, "Novell Modular Authentication Services (NMAS)" },
104 { 17, "Secret Store Services (SSS)" },
105 { 18, "Packet Burst" },
106 { 19, "Novell Directory Services (NDS)" },
107 { 20, "Time Synchronization" },
108 { 21, "Server Statistics" },
113 static const value_string sss_verb_enum[] = {
114 { 0x00000000, "Query Server" },
115 { 0x00000001, "Read App Secrets" },
116 { 0x00000002, "Write App Secrets" },
117 { 0x00000003, "Add Secret ID" },
118 { 0x00000004, "Remove Secret ID" },
119 { 0x00000005, "Remove SecretStore" },
120 { 0x00000006, "Enumerate Secret IDs" },
121 { 0x00000007, "Unlock Store" },
122 { 0x00000008, "Set Master Password" },
123 { 0x00000009, "Get Service Information" },
124 { 0x000000ff, "Fragment"},
128 static const value_string nmas_subverb_enum[] = {
129 { 0, "Fragmented Ping" },
130 { 2, "Client Put Data" },
131 { 4, "Client Get Data" },
132 { 6, "Client Get User NDS Credentials" },
133 { 8, "Login Store Management" },
134 { 10, "Writable Object Check" },
135 { 1242, "Message Handler" },
139 static const value_string ncp_nds_verb_vals[] = {
140 { 1, "Resolve Name" },
141 { 2, "Read Entry Information" },
145 { 6, "Search Entries" },
147 { 8, "Remove Entry" },
148 { 9, "Modify Entry" },
149 { 10, "Modify RDN" },
150 { 11, "Create Attribute" },
151 { 12, "Read Attribute Definition" },
152 { 13, "Remove Attribute Definition" },
153 { 14, "Define Class" },
154 { 15, "Read Class Definition" },
155 { 16, "Modify Class Definition" },
156 { 17, "Remove Class Definition" },
157 { 18, "List Containable Classes" },
158 { 19, "Get Effective Rights" },
159 { 20, "Add Partition" },
160 { 21, "Remove Partition" },
161 { 22, "List Partitions" },
162 { 23, "Split Partition" },
163 { 24, "Join Partitions" },
164 { 25, "Add Replica" },
165 { 26, "Remove Replica" },
166 { 27, "Open Stream" },
167 { 28, "Search Filter" },
168 { 29, "Create Subordinate Reference" },
169 { 30, "Link Replica" },
170 { 31, "Change Replica Type" },
171 { 32, "Start Update Schema" },
172 { 33, "End Update Schema" },
173 { 34, "Update Schema" },
174 { 35, "Start Update Replica" },
175 { 36, "End Update Replica" },
176 { 37, "Update Replica" },
177 { 38, "Synchronize Partition" },
178 { 39, "Synchronize Schema" },
179 { 40, "Read Syntaxes" },
180 { 41, "Get Replica Root ID" },
181 { 42, "Begin Move Entry" },
182 { 43, "Finish Move Entry" },
183 { 44, "Release Moved Entry" },
184 { 45, "Backup Entry" },
185 { 46, "Restore Entry" },
186 { 47, "Save DIB (Obsolete)" },
188 { 49, "Remove Backlink" },
189 { 50, "Close Iteration" },
190 { 51, "Mutate Entry" },
191 { 52, "Audit Skulking" },
192 { 53, "Get Server Address" },
194 { 55, "Change Password" },
195 { 56, "Verify Password" },
196 { 57, "Begin Login" },
197 { 58, "Finish Login" },
198 { 59, "Begin Authentication" },
199 { 60, "Finish Authentication" },
201 { 62, "Repair Ring (Obsolete)" },
202 { 63, "Repair Timestamps" },
203 { 64, "Create Back Link" },
204 { 65, "Delete External Reference" },
205 { 66, "Rename External Reference" },
206 { 67, "Create Queue Entry Directory" },
207 { 68, "Remove Queue Entry Directory" },
208 { 69, "Merge Entries" },
209 { 70, "Change Tree Name" },
210 { 71, "Partition Entry Count" },
211 { 72, "Check Login Restrictions" },
212 { 73, "Start Join" },
213 { 74, "Low Level Split" },
214 { 75, "Low Level Join" },
215 { 76, "Abort Partition Operation" },
216 { 77, "Get All Servers" },
217 { 78, "Partition Function" },
218 { 79, "Read References" },
219 { 80, "Inspect Entry" },
220 { 81, "Get Remote Entry ID" },
221 { 82, "Change Security" },
222 { 83, "Check Console Operator" },
223 { 84, "Start Move Tree" },
225 { 86, "End Move Tree" },
226 { 87, "Low Level Abort Join" },
227 { 88, "Check Security Equivalence" },
228 { 89, "Merge Tree" },
229 { 90, "Sync External Reference" },
230 { 91, "Resend Entry" },
231 { 92, "New Schema Epoch" },
232 { 93, "Statistics" },
234 { 95, "Get Bindery Contexts" },
235 { 96, "Monitor Connection" },
236 { 97, "Get DS Statistics" },
237 { 98, "Reset DS Counters" },
239 { 100, "Read Stream" },
240 { 101, "Write Stream" },
241 { 102, "Create Orphan Partition" },
242 { 103, "Remove Orphan Partition" },
243 { 104, "Link Orphan Partition" },
244 { 105, "Set Distributed Reference Link (DRL)" },
245 { 106, "Available" },
246 { 107, "Available" },
247 { 108, "Verify Distributed Reference Link (DRL)" },
248 { 109, "Verify Partition" },
250 { 111, "Available" },
251 { 112, "Close Stream" },
252 { 113, "Available" },
253 { 114, "Read Status" },
254 { 115, "Partition Sync Status" },
255 { 116, "Read Reference Data" },
256 { 117, "Write Reference Data" },
257 { 118, "Resource Event" },
258 { 119, "DIB Request (obsolete)" },
259 { 120, "Set Replication Filter" },
260 { 121, "Get Replication Filter" },
261 { 122, "Change Attribute Definition" },
262 { 123, "Schema in Use" },
263 { 124, "Remove Keys" },
265 { 126, "Multiple Operations Transaction" },
267 { 255, "EDirectory Call" },
272 ncpstat_set_title(ncpstat_t *ss)
276 title = g_strdup_printf("NCP Service Response Time statistics: %s",
277 cf_get_display_name(&cfile));
278 gtk_window_set_title(GTK_WINDOW(ss->win), title);
283 ncpstat_reset(void *pss)
285 ncpstat_t *ss=(ncpstat_t *)pss;
287 reset_srt_table_data(&ss->ncp_srt_table);
288 reset_srt_table_data(&ss->func_srt_table);
289 reset_srt_table_data(&ss->nds_srt_table);
290 reset_srt_table_data(&ss->sss_srt_table);
291 reset_srt_table_data(&ss->nmas_srt_table);
292 reset_srt_table_data(&ss->sub_17_srt_table);
293 reset_srt_table_data(&ss->sub_21_srt_table);
294 reset_srt_table_data(&ss->sub_22_srt_table);
295 reset_srt_table_data(&ss->sub_23_srt_table);
296 reset_srt_table_data(&ss->sub_32_srt_table);
297 reset_srt_table_data(&ss->sub_34_srt_table);
298 reset_srt_table_data(&ss->sub_35_srt_table);
299 reset_srt_table_data(&ss->sub_36_srt_table);
300 reset_srt_table_data(&ss->sub_86_srt_table);
301 reset_srt_table_data(&ss->sub_87_srt_table);
302 reset_srt_table_data(&ss->sub_89_srt_table);
303 reset_srt_table_data(&ss->sub_90_srt_table);
304 reset_srt_table_data(&ss->sub_92_srt_table);
305 reset_srt_table_data(&ss->sub_94_srt_table);
306 reset_srt_table_data(&ss->sub_104_srt_table);
307 reset_srt_table_data(&ss->sub_111_srt_table);
308 reset_srt_table_data(&ss->sub_114_srt_table);
309 reset_srt_table_data(&ss->sub_123_srt_table);
310 reset_srt_table_data(&ss->sub_131_srt_table);
311 ncpstat_set_title(ss);
315 ncpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv)
317 ncpstat_t *ss=(ncpstat_t *)pss;
318 const ncp_req_hash_value *request_val=prv;
320 /* if we havent seen the request, just ignore it */
321 if(!request_val || request_val->ncp_rec==0){
325 init_srt_table_row(&ss->ncp_srt_table, request_val->ncp_rec->group, val_to_str(request_val->ncp_rec->group, ncp_group_vals, "Unknown(%u)"));
326 add_srt_table_data(&ss->ncp_srt_table, request_val->ncp_rec->group, &request_val->req_frame_time, pinfo);
327 /* By NCP number without subfunction*/
328 if (request_val->ncp_rec->subfunc==0) {
329 init_srt_table_row(&ss->func_srt_table, request_val->ncp_rec->func, request_val->ncp_rec->name);
330 add_srt_table_data(&ss->func_srt_table, request_val->ncp_rec->func, &request_val->req_frame_time, pinfo);
332 /* By Subfunction number */
333 if(request_val->ncp_rec->subfunc!=0){
334 if (request_val->ncp_rec->func==17) {
335 init_srt_table_row(&ss->sub_17_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
336 add_srt_table_data(&ss->sub_17_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
338 if (request_val->ncp_rec->func==21) {
339 init_srt_table_row(&ss->sub_21_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
340 add_srt_table_data(&ss->sub_21_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
342 if (request_val->ncp_rec->func==22) {
343 init_srt_table_row(&ss->sub_22_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
344 add_srt_table_data(&ss->sub_22_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
346 if (request_val->ncp_rec->func==23) {
347 init_srt_table_row(&ss->sub_23_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
348 add_srt_table_data(&ss->sub_23_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
350 if (request_val->ncp_rec->func==32) {
351 init_srt_table_row(&ss->sub_32_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
352 add_srt_table_data(&ss->sub_32_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
354 if (request_val->ncp_rec->func==34) {
355 init_srt_table_row(&ss->sub_34_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
356 add_srt_table_data(&ss->sub_34_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
358 if (request_val->ncp_rec->func==35) {
359 init_srt_table_row(&ss->sub_35_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
360 add_srt_table_data(&ss->sub_35_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
362 if (request_val->ncp_rec->func==36) {
363 init_srt_table_row(&ss->sub_36_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
364 add_srt_table_data(&ss->sub_36_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
366 if (request_val->ncp_rec->func==86) {
367 init_srt_table_row(&ss->sub_86_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
368 add_srt_table_data(&ss->sub_86_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
370 if (request_val->ncp_rec->func==87) {
371 init_srt_table_row(&ss->sub_87_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
372 add_srt_table_data(&ss->sub_87_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
374 if (request_val->ncp_rec->func==89) {
375 init_srt_table_row(&ss->sub_89_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
376 add_srt_table_data(&ss->sub_89_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
378 if (request_val->ncp_rec->func==90) {
379 init_srt_table_row(&ss->sub_90_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
380 add_srt_table_data(&ss->sub_90_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
382 if (request_val->ncp_rec->func==92) {
383 init_srt_table_row(&ss->sub_92_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
384 add_srt_table_data(&ss->sub_92_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
386 if (request_val->ncp_rec->func==94) {
387 init_srt_table_row(&ss->sub_94_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
388 add_srt_table_data(&ss->sub_94_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
390 if (request_val->ncp_rec->func==104) {
391 init_srt_table_row(&ss->sub_104_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
392 add_srt_table_data(&ss->sub_104_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
394 if (request_val->ncp_rec->func==111) {
395 init_srt_table_row(&ss->sub_111_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
396 add_srt_table_data(&ss->sub_111_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
398 if (request_val->ncp_rec->func==114) {
399 init_srt_table_row(&ss->sub_114_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
400 add_srt_table_data(&ss->sub_114_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
402 if (request_val->ncp_rec->func==123) {
403 init_srt_table_row(&ss->sub_123_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
404 add_srt_table_data(&ss->sub_123_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
406 if (request_val->ncp_rec->func==131) {
407 init_srt_table_row(&ss->sub_131_srt_table, (request_val->ncp_rec->subfunc), request_val->ncp_rec->name);
408 add_srt_table_data(&ss->sub_131_srt_table, (request_val->ncp_rec->subfunc), &request_val->req_frame_time, pinfo);
412 if (request_val->ncp_rec->func==0x68) {
413 init_srt_table_row(&ss->nds_srt_table, (request_val->nds_request_verb), val_to_str(request_val->nds_request_verb, ncp_nds_verb_vals, "Unknown(%u)"));
414 add_srt_table_data(&ss->nds_srt_table, (request_val->nds_request_verb), &request_val->req_frame_time, pinfo);
416 if (request_val->ncp_rec->func==0x5c) {
417 init_srt_table_row(&ss->sss_srt_table, (request_val->req_nds_flags), val_to_str(request_val->req_nds_flags, sss_verb_enum, "Unknown(%u)"));
418 add_srt_table_data(&ss->sss_srt_table, (request_val->req_nds_flags), &request_val->req_frame_time, pinfo);
420 if (request_val->ncp_rec->func==0x5e) {
421 init_srt_table_row(&ss->nmas_srt_table, (request_val->req_nds_flags), val_to_str(request_val->req_nds_flags, nmas_subverb_enum, "Unknown(%u)"));
422 add_srt_table_data(&ss->nmas_srt_table, (request_val->req_nds_flags), &request_val->req_frame_time, pinfo);
430 ncpstat_draw(void *pss)
432 ncpstat_t *ss=(ncpstat_t *)pss;
434 draw_srt_table_data(&ss->ncp_srt_table);
435 draw_srt_table_data(&ss->func_srt_table);
436 draw_srt_table_data(&ss->nds_srt_table);
437 draw_srt_table_data(&ss->sss_srt_table);
438 draw_srt_table_data(&ss->nmas_srt_table);
439 draw_srt_table_data(&ss->sub_17_srt_table);
440 draw_srt_table_data(&ss->sub_21_srt_table);
441 draw_srt_table_data(&ss->sub_22_srt_table);
442 draw_srt_table_data(&ss->sub_23_srt_table);
443 draw_srt_table_data(&ss->sub_32_srt_table);
444 draw_srt_table_data(&ss->sub_34_srt_table);
445 draw_srt_table_data(&ss->sub_35_srt_table);
446 draw_srt_table_data(&ss->sub_36_srt_table);
447 draw_srt_table_data(&ss->sub_86_srt_table);
448 draw_srt_table_data(&ss->sub_87_srt_table);
449 draw_srt_table_data(&ss->sub_89_srt_table);
450 draw_srt_table_data(&ss->sub_90_srt_table);
451 draw_srt_table_data(&ss->sub_92_srt_table);
452 draw_srt_table_data(&ss->sub_94_srt_table);
453 draw_srt_table_data(&ss->sub_104_srt_table);
454 draw_srt_table_data(&ss->sub_111_srt_table);
455 draw_srt_table_data(&ss->sub_114_srt_table);
456 draw_srt_table_data(&ss->sub_123_srt_table);
457 draw_srt_table_data(&ss->sub_131_srt_table);
461 win_destroy_cb(GtkWindow *win _U_, gpointer data)
463 ncpstat_t *ss=(ncpstat_t *)data;
465 protect_thread_critical_region();
466 remove_tap_listener(ss);
467 unprotect_thread_critical_region();
470 free_srt_table_data(&ss->ncp_srt_table);
471 free_srt_table_data(&ss->func_srt_table);
472 free_srt_table_data(&ss->nds_srt_table);
473 free_srt_table_data(&ss->sss_srt_table);
474 free_srt_table_data(&ss->nmas_srt_table);
475 free_srt_table_data(&ss->sub_17_srt_table);
476 free_srt_table_data(&ss->sub_21_srt_table);
477 free_srt_table_data(&ss->sub_22_srt_table);
478 free_srt_table_data(&ss->sub_23_srt_table);
479 free_srt_table_data(&ss->sub_32_srt_table);
480 free_srt_table_data(&ss->sub_34_srt_table);
481 free_srt_table_data(&ss->sub_35_srt_table);
482 free_srt_table_data(&ss->sub_36_srt_table);
483 free_srt_table_data(&ss->sub_86_srt_table);
484 free_srt_table_data(&ss->sub_87_srt_table);
485 free_srt_table_data(&ss->sub_89_srt_table);
486 free_srt_table_data(&ss->sub_90_srt_table);
487 free_srt_table_data(&ss->sub_92_srt_table);
488 free_srt_table_data(&ss->sub_94_srt_table);
489 free_srt_table_data(&ss->sub_104_srt_table);
490 free_srt_table_data(&ss->sub_111_srt_table);
491 free_srt_table_data(&ss->sub_114_srt_table);
492 free_srt_table_data(&ss->sub_123_srt_table);
493 free_srt_table_data(&ss->sub_131_srt_table);
499 gtk_ncpstat_init(const char *optarg, void *userdata _U_)
502 const char *filter=NULL;
505 GString *error_string;
506 GtkWidget *temp_page;
512 if(!strncmp(optarg,"ncp,srt,",8)){
518 ss=g_malloc(sizeof(ncpstat_t));
520 ss->win = dlg_window_new("ncp-stat"); /* transient_for top_level */
521 gtk_window_set_destroy_with_parent (GTK_WINDOW(ss->win), TRUE);
522 gtk_window_set_default_size(GTK_WINDOW(ss->win), 300, 400);
524 ncpstat_set_title(ss);
526 vbox=gtk_vbox_new(FALSE, 3);
527 gtk_container_add(GTK_CONTAINER(ss->win), vbox);
528 gtk_container_set_border_width(GTK_CONTAINER(vbox), 12);
530 label=gtk_label_new("NCP Service Response Time Statistics");
531 gtk_box_pack_start(GTK_BOX(vbox), label, TRUE, TRUE, 0);
533 filter_string = g_strdup_printf("Filter: %s",filter ? filter : "");
534 label=gtk_label_new(filter_string);
535 g_free(filter_string);
536 gtk_label_set_line_wrap(GTK_LABEL(label), TRUE);
537 gtk_box_pack_start(GTK_BOX(vbox), label, FALSE, FALSE, 0);
539 main_nb = gtk_notebook_new();
540 gtk_box_pack_start(GTK_BOX(vbox), main_nb, TRUE, TRUE, 0);
541 temp_page = gtk_vbox_new(FALSE, 6);
542 label = gtk_label_new("Groups");
543 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
546 /* We must display TOP LEVEL Widget before calling init_srt_table() */
547 gtk_widget_show_all(ss->win);
548 label=gtk_label_new("NCP by Group Type");
549 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
550 init_srt_table(&ss->ncp_srt_table, 256, temp_page, "ncp.group");
553 temp_page = gtk_vbox_new(FALSE, 6);
554 label = gtk_label_new("Functions");
555 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
556 label=gtk_label_new("NCP Functions without Subfunctions");
557 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
558 init_srt_table(&ss->func_srt_table, 256, temp_page, "ncp.func");
560 /* NCP Subfunctions */
562 temp_page = gtk_vbox_new(FALSE, 6);
563 label = gtk_label_new("17");
564 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
565 label=gtk_label_new("Subfunctions for NCP 17");
566 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
567 init_srt_table(&ss->sub_17_srt_table, 256, temp_page, "ncp.func==17 && ncp.subfunc");
568 temp_page = gtk_vbox_new(FALSE, 6);
569 label=gtk_label_new("21");
570 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
571 label=gtk_label_new("Subfunctions for NCP 21");
572 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
573 init_srt_table(&ss->sub_21_srt_table, 256, temp_page, "ncp.func==21 && ncp.subfunc");
574 temp_page = gtk_vbox_new(FALSE, 6);
575 label=gtk_label_new("22");
576 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
577 label=gtk_label_new("Subfunctions for NCP 22");
578 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
579 init_srt_table(&ss->sub_22_srt_table, 256, temp_page, "ncp.func==22 && ncp.subfunc");
580 temp_page = gtk_vbox_new(FALSE, 6);
581 label=gtk_label_new("23");
582 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
583 label=gtk_label_new("Subfunctions for NCP 23");
584 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
585 init_srt_table(&ss->sub_23_srt_table, 256, temp_page, "ncp.func==23 && ncp.subfunc");
586 temp_page = gtk_vbox_new(FALSE, 6);
587 label=gtk_label_new("32");
588 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
589 label=gtk_label_new("Subfunctions for NCP 32");
590 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
591 init_srt_table(&ss->sub_32_srt_table, 256, temp_page, "ncp.func==32 && ncp.subfunc");
592 temp_page = gtk_vbox_new(FALSE, 6);
593 label=gtk_label_new("34");
594 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
595 label=gtk_label_new("Subfunctions for NCP 34");
596 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
597 init_srt_table(&ss->sub_34_srt_table, 256, temp_page, "ncp.func==34 && ncp.subfunc");
598 temp_page = gtk_vbox_new(FALSE, 6);
599 label=gtk_label_new("35");
600 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
601 label=gtk_label_new("Subfunctions for NCP 35");
602 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
603 init_srt_table(&ss->sub_35_srt_table, 256, temp_page, "ncp.func==35 && ncp.subfunc");
604 temp_page = gtk_vbox_new(FALSE, 6);
605 label=gtk_label_new("36");
606 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
607 label=gtk_label_new("Subfunctions for NCP 36");
608 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
609 init_srt_table(&ss->sub_36_srt_table, 256, temp_page, "ncp.func==36 && ncp.subfunc");
610 temp_page = gtk_vbox_new(FALSE, 6);
611 label=gtk_label_new("86");
612 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
613 label=gtk_label_new("Subfunctions for NCP 86");
614 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
615 init_srt_table(&ss->sub_86_srt_table, 256, temp_page, "ncp.func==86 && ncp.subfunc");
616 temp_page = gtk_vbox_new(FALSE, 6);
617 label=gtk_label_new("87");
618 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
619 label=gtk_label_new("Subfunctions for NCP 87");
620 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
621 init_srt_table(&ss->sub_87_srt_table, 256, temp_page, "ncp.func==87 && ncp.subfunc");
622 temp_page = gtk_vbox_new(FALSE, 6);
623 label=gtk_label_new("89");
624 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
625 label=gtk_label_new("Subfunctions for NCP 89 (Extended NCP's with UTF8 Support)");
626 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
627 init_srt_table(&ss->sub_89_srt_table, 256, temp_page, "ncp.func==89 && ncp.subfunc");
628 temp_page = gtk_vbox_new(FALSE, 6);
629 label=gtk_label_new("90");
630 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
631 label=gtk_label_new("Subfunctions for NCP 90");
632 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
633 init_srt_table(&ss->sub_90_srt_table, 256, temp_page, "ncp.func==90 && ncp.subfunc");
634 temp_page = gtk_vbox_new(FALSE, 6);
635 label=gtk_label_new("92");
636 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
637 label=gtk_label_new("Subfunctions for NCP 92 (Secret Store Services)");
638 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
639 init_srt_table(&ss->sub_92_srt_table, 256, temp_page, "ncp.func==92 && ncp.subfunc");
640 temp_page = gtk_vbox_new(FALSE, 6);
641 label=gtk_label_new("94");
642 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
643 label=gtk_label_new("Subfunctions for NCP 94 (Novell Modular Authentication Services)");
644 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
645 init_srt_table(&ss->sub_94_srt_table, 256, temp_page, "ncp.func==94 && ncp.subfunc");
646 temp_page = gtk_vbox_new(FALSE, 6);
647 label=gtk_label_new("104");
648 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
649 label=gtk_label_new("Subfunctions for NCP 104");
650 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
651 init_srt_table(&ss->sub_104_srt_table, 256, temp_page, "ncp.func==104 && ncp.subfunc");
652 temp_page = gtk_vbox_new(FALSE, 6);
653 label=gtk_label_new("111");
654 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
655 label=gtk_label_new("Subfunctions for NCP 111");
656 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
657 init_srt_table(&ss->sub_111_srt_table, 256, temp_page, "ncp.func==111 && ncp.subfunc");
658 temp_page = gtk_vbox_new(FALSE, 6);
659 label=gtk_label_new("114");
660 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
661 label=gtk_label_new("Subfunctions for NCP 114");
662 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
663 init_srt_table(&ss->sub_114_srt_table, 256, temp_page, "ncp.func==114 && ncp.subfunc");
664 temp_page = gtk_vbox_new(FALSE, 6);
665 label=gtk_label_new("123");
666 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
667 label=gtk_label_new("Subfunctions for NCP 123");
668 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
669 init_srt_table(&ss->sub_123_srt_table, 256, temp_page, "ncp.func==123 && ncp.subfunc");
670 temp_page = gtk_vbox_new(FALSE, 6);
671 label=gtk_label_new("131");
672 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
673 label=gtk_label_new("Subfunctions for NCP 131");
674 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
675 init_srt_table(&ss->sub_131_srt_table, 256, temp_page, "ncp.func==131 && ncp.subfunc");
678 temp_page = gtk_vbox_new(FALSE, 6);
679 label=gtk_label_new("NDS");
680 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
681 label=gtk_label_new("NDS Verbs");
682 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
683 init_srt_table(&ss->nds_srt_table, 256, temp_page, "ncp.ndsverb");
684 /* Secret Store Verbs */
685 temp_page = gtk_vbox_new(FALSE, 6);
686 label=gtk_label_new("SSS");
687 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
688 label=gtk_label_new("Secret Store Verbs");
689 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
690 init_srt_table(&ss->sss_srt_table, 256, temp_page, "sss.subverb");
692 temp_page = gtk_vbox_new(FALSE, 6);
693 label=gtk_label_new("NMAS");
694 gtk_notebook_append_page(GTK_NOTEBOOK(main_nb), temp_page, label);
695 label=gtk_label_new("NMAS Verbs");
696 gtk_box_pack_start(GTK_BOX(temp_page), label, FALSE, FALSE, 0);
697 init_srt_table(&ss->nmas_srt_table, 256, temp_page, "nmas.subverb");
699 /* Register the tap listener */
700 error_string=register_tap_listener("ncp_srt", ss, filter, 0, ncpstat_reset, ncpstat_packet, ncpstat_draw);
702 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "%s", error_string->str);
703 g_string_free(error_string, TRUE);
709 bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL);
710 gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0);
712 close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE);
713 window_set_cancel_button(ss->win, close_bt, window_cancel_button_cb);
715 g_signal_connect(ss->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL);
716 g_signal_connect(ss->win, "destroy", G_CALLBACK(win_destroy_cb), ss);
718 gtk_widget_show_all(ss->win);
719 window_present(ss->win);
721 cf_redissect_packets(&cfile);
724 static tap_param ncp_stat_params[] = {
725 { PARAM_FILTER, "Filter", NULL }
728 static tap_param_dlg ncp_stat_dlg = {
729 "NCP SRT Statistics",
733 G_N_ELEMENTS(ncp_stat_params),
738 register_tap_listener_gtkncpstat(void)
740 register_dfilter_stat(&ncp_stat_dlg, "NCP",
741 REGISTER_STAT_GROUP_RESPONSE_TIME);