2 * expert_comp_table 2005 Greg Morris
3 * Portions copied from service_response_time_table.c by Ronnie Sahlberg
4 * Helper routines common to all composite expert statistics
9 * Wireshark - Network traffic analyzer
10 * By Gerald Combs <gerald@wireshark.org>
11 * Copyright 1998 Gerald Combs
13 * This program is free software; you can redistribute it and/or
14 * modify it under the terms of the GNU General Public License
15 * as published by the Free Software Foundation; either version 2
16 * of the License, or (at your option) any later version.
18 * This program is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU General Public License for more details.
23 * You should have received a copy of the GNU General Public License
24 * along with this program; if not, write to the Free Software
25 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
39 #include "epan/packet_info.h"
40 #include "epan/strutil.h"
42 #include <epan/expert.h>
44 #include "../simple_dialog.h"
45 #include "../globals.h"
48 #include "gtk/expert_comp_table.h"
49 #include "gtk/filter_utils.h"
50 #include "gtk/find_dlg.h"
51 #include "gtk/color_dlg.h"
53 #include "gtk/gui_utils.h"
54 #include "gtk/gtkglobals.h"
55 #include "gtk/webbrowser.h"
58 #define SORT_ALPHABETICAL 0
61 sort_iter_compare_func (GtkTreeModel *model,
66 gint sortcol = GPOINTER_TO_INT(userdata);
70 case SORT_ALPHABETICAL:
73 gtk_tree_model_get(model, a, 0, &name1, -1);
74 gtk_tree_model_get(model, b, 0, &name2, -1);
75 if (name1 == NULL || name2 == NULL)
77 if (name1 == NULL && name2 == NULL)
78 break; /* both equal => ret = 0 */
79 ret = (name1 == NULL) ? -1 : 1;
83 ret = g_ascii_strcasecmp(name1,name2);
90 g_return_val_if_reached(0);
104 static gint find_summary_data(error_equiv_table *err, const expert_info_t *expert_data)
107 error_procedure_t *procedure;
109 /* First time thru values will be 0 */
110 if (err->num_procs==0) {
113 for (i=0;i<err->num_procs;i++) {
114 procedure = &g_array_index(err->procs_array, error_procedure_t, i);
115 if (strcmp(procedure->entries[1], expert_data->protocol) == 0 &&
116 strcmp(procedure->entries[2], expert_data->summary) == 0) {
124 error_select_filter_cb(GtkWidget *widget _U_, gpointer callback_data, guint callback_action)
126 int action, type, selection;
127 error_equiv_table *err = (error_equiv_table *)callback_data;
129 const char *current_filter;
130 error_procedure_t *procedure;
134 expert_info_t expert_data;
137 action=FILTER_ACTION(callback_action);
138 type=FILTER_ACTYPE(callback_action);
141 gtk_tree_selection_get_selected(err->select, &model, &iter);
143 gtk_tree_model_get (model, &iter,
145 PROTOCOL_COLUMN, &expert_data.protocol,
146 SUMMARY_COLUMN, &expert_data.summary,
149 if (strcmp(grp, "Packet:")==0) {
150 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "You cannot filter or search for packet number. Click on a valid item header.");
152 g_free(expert_data.summary);
158 /* XXX: find_summary_data doesn't (currently) reference expert_data.group. */
159 /* If "group" is required, then the message from GROUP_COLUMN will need */
160 /* to be translated to the group number (or the actual group number */
161 /* will also need to be stored in the TreeModel). */
162 selection = find_summary_data(err, &expert_data);
164 g_free(expert_data.summary);
166 if(selection>=(int)err->num_procs){
167 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "No items are selected");
170 current_filter=gtk_entry_get_text(GTK_ENTRY(main_display_filter_widget));
172 /* Some expert data doesn't pass an expert item. Without this we cannot create a filter */
173 /* But allow for searching of internet for error string */
174 procedure = &g_array_index(err->procs_array, error_procedure_t, selection);
176 /* FIXME what is 7 ?*/
177 if (action != ACTION_WEB_LOOKUP && action != 7) {
179 if (0 /*procedure->fvalue_value==NULL*/) {
180 if (action != ACTION_FIND_FRAME && action != ACTION_FIND_NEXT && action != ACTION_FIND_PREVIOUS) {
181 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Wireshark cannot create a filter on this item - %s, try using find instead.",
182 procedure->entries[2]);
186 msg = g_malloc(escape_string_len(procedure->entries[2]));
187 escape_string(msg, procedure->entries[2]);
189 case ACTYPE_SELECTED:
190 /* if no expert item was passed */
191 if (procedure->fvalue_value==NULL) {
192 g_snprintf(str, sizeof(str), "expert.message==%s", msg);
196 /* expert item exists. Use it. */
197 g_strlcpy(str, procedure->fvalue_value, sizeof(str));
200 case ACTYPE_NOT_SELECTED:
201 /* if no expert item was passed */
202 if (procedure->fvalue_value==NULL) {
203 g_snprintf(str, sizeof(str), "!(expert.message==%s)", msg);
207 /* expert item exists. Use it. */
208 g_snprintf(str, sizeof(str), "!(%s)", procedure->fvalue_value);
211 /* the remaining cases will only exist if the expert item exists so no need to check */
212 case ACTYPE_AND_SELECTED:
213 if ((!current_filter) || (0 == strlen(current_filter)))
214 g_snprintf(str, sizeof(str), "expert.message==%s", msg);
216 g_snprintf(str, sizeof(str), "(%s) && (expert.message==%s)", current_filter, msg);
218 case ACTYPE_OR_SELECTED:
219 if ((!current_filter) || (0 == strlen(current_filter)))
220 g_snprintf(str, sizeof(str), "expert.message==%s", msg);
222 g_snprintf(str, sizeof(str), "(%s) || (expert.message==%s)", current_filter, msg);
224 case ACTYPE_AND_NOT_SELECTED:
225 if ((!current_filter) || (0 == strlen(current_filter)))
226 g_snprintf(str, sizeof(str), "!(expert.message==%s)", msg);
228 g_snprintf(str, sizeof(str), "(%s) && !(expert.message==%s)", current_filter, msg);
230 case ACTYPE_OR_NOT_SELECTED:
231 if ((!current_filter) || (0 == strlen(current_filter)))
232 g_snprintf(str, sizeof(str), "!(expert.message==%s)", msg);
234 g_snprintf(str, sizeof(str), "(%s) || !(expert.message==%s)", current_filter, msg);
237 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Can't find menu type - %u", type);
244 main_filter_packets(&cfile, str, FALSE);
247 gtk_entry_set_text(GTK_ENTRY(main_display_filter_widget), str);
249 case ACTION_FIND_FRAME:
250 /* When trying to perform a find without expert item, we must pass
251 * the expert string to the find window. The user might need to modify
252 * the string and click on the text search to locate the packet in question.
253 * So regardless of the type we will just bring up the find window and allow
254 * the user to modify the search criteria and options.
256 find_frame_with_filter(str);
258 case ACTION_FIND_NEXT:
259 /* In the case of find next, if there was no expert item, then most likely the expert
260 * string was modified to locate the text inside the message. So we can't just perform
261 * a find with the expert string or we will not really be performing a find next.
262 * In an effort to allow the user to modify the string and/or continue searching, we
263 * will just present the user with the find window again with the default expert string.
264 * A better aproach would be to attempt in capturing the last find string and utilize this
265 * with a find next/previous. Also a better approach might be to just send a <Ctl-N> keystroke.
267 if (procedure->fvalue_value==NULL) {
268 find_frame_with_filter(str);
272 /* We have an expert item so just continue search without find dialog. */
273 find_previous_next_frame_with_filter(str, FALSE);
276 case ACTION_FIND_PREVIOUS:
277 /* In the case of find previous, if there was no expert item, then most likely the expert
278 * string was modified to locate the text inside the message. So we can't just perform
279 * a find with the expert string or we will not really be performing a find previous.
280 * In an effort to allow the user to modify the string and/or continue searching, we
281 * will just present the user with the find window again with the default expert string.
282 * A better aproach would be to attempt in capturing the last find string and utilize this
283 * with a find next/previous. Also a better approach might be to just send a <Ctl-B> keystroke.
285 if (procedure->fvalue_value==NULL) {
286 find_frame_with_filter(str);
290 /* We have an expert item so just continue search without find dialog. */
291 find_previous_next_frame_with_filter(str, TRUE);
294 case ACTION_COLORIZE:
295 color_display_with_filter(str);
297 case ACTION_WEB_LOOKUP:
298 /* Lookup expert string on internet. Default search via www.google.com */
299 g_snprintf(str, sizeof(str), "http://www.google.com/search?hl=en&q=%s+'%s'", procedure->entries[1], procedure->entries[2]);
300 browser_open_url(str);
303 simple_dialog(ESD_TYPE_ERROR, ESD_BTN_OK, "Can't find menu action - %u", action);
308 error_show_popup_menu_cb(void *widg _U_, GdkEvent *event, error_equiv_table *err)
310 GdkEventButton *bevent = (GdkEventButton *)event;
312 if(event->type==GDK_BUTTON_PRESS && bevent->button==3){
313 gtk_menu_popup(GTK_MENU(err->menu), NULL, NULL, NULL, NULL,
314 bevent->button, bevent->time);
320 static GtkItemFactoryEntry error_list_menu_items[] =
323 {"/Apply as Filter", NULL, NULL, 0, "<Branch>", NULL,},
324 {"/Apply as Filter/Selected", NULL,
325 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_MATCH(ACTYPE_SELECTED, 0),
327 {"/Apply as Filter/... not Selected", NULL,
328 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_MATCH(ACTYPE_NOT_SELECTED, 0),
330 {"/Apply as Filter/.. and Selected", NULL,
331 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_MATCH(ACTYPE_AND_SELECTED, 0),
333 {"/Apply as Filter/... or Selected", NULL,
334 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_MATCH(ACTYPE_OR_SELECTED, 0),
336 {"/Apply as Filter/... and not Selected", NULL,
337 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_MATCH(ACTYPE_AND_NOT_SELECTED, 0),
339 {"/Apply as Filter/... or not Selected", NULL,
340 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_MATCH(ACTYPE_OR_NOT_SELECTED, 0),
344 {"/Prepare a Filter", NULL, NULL, 0, "<Branch>", NULL,},
345 {"/Prepare a Filter/Selected", NULL,
346 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_PREPARE(ACTYPE_SELECTED, 0),
348 {"/Prepare a Filter/Not Selected", NULL,
349 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_PREPARE(ACTYPE_NOT_SELECTED, 0),
351 {"/Prepare a Filter/... and Selected", NULL,
352 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_PREPARE(ACTYPE_AND_SELECTED, 0),
354 {"/Prepare a Filter/... or Selected", NULL,
355 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_PREPARE(ACTYPE_OR_SELECTED, 0),
357 {"/Prepare a Filter/... and not Selected", NULL,
358 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_PREPARE(ACTYPE_AND_NOT_SELECTED, 0),
360 {"/Prepare a Filter/... or not Selected", NULL,
361 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_PREPARE(ACTYPE_OR_NOT_SELECTED, 0),
365 {"/Find Frame", NULL, NULL, 0, "<Branch>", NULL,},
366 {"/Find Frame/Find Frame", NULL, NULL, 0, "<Branch>", NULL,},
367 {"/Find Frame/Find Frame/Selected", NULL,
368 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_FIND_FRAME(ACTYPE_SELECTED, 0),
370 {"/Find Frame/Find Frame/Not Selected", NULL,
371 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_FIND_FRAME(ACTYPE_NOT_SELECTED, 0),
374 {"/Find Frame/Find Next", NULL, NULL, 0, "<Branch>", NULL,},
375 {"/Find Frame/Find Next/Selected", NULL,
376 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_FIND_NEXT(ACTYPE_SELECTED, 0),
378 {"/Find Frame/Find Next/Not Selected", NULL,
379 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_FIND_NEXT(ACTYPE_NOT_SELECTED, 0),
383 {"/Find Frame/Find Previous", NULL, NULL, 0, "<Branch>", NULL,},
384 {"/Find Frame/Find Previous/Selected", NULL,
385 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_FIND_PREVIOUS(ACTYPE_SELECTED, 0),
387 {"/Find Frame/Find Previous/Not Selected", NULL,
388 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_FIND_PREVIOUS(ACTYPE_NOT_SELECTED, 0),
391 /* Colorize Procedure */
392 {"/Colorize Procedure", NULL, NULL, 0, "<Branch>", NULL,},
393 {"/Colorize Procedure/Selected", NULL,
394 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_COLORIZE(ACTYPE_SELECTED, 0),
396 {"/Colorize Procedure/Not Selected", NULL,
397 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_COLORIZE(ACTYPE_NOT_SELECTED, 0),
400 /* Search Internet */
401 {"/Internet Search for Info Text", NULL,
402 GTK_MENU_FUNC(error_select_filter_cb), CALLBACK_WEB_LOOKUP, NULL, NULL,}
406 expert_goto_pkt_cb (GtkTreeSelection *selection, gpointer data _U_)
413 if (gtk_tree_selection_get_selected (selection, &model, &iter))
415 gtk_tree_model_get (model, &iter,
416 PROTOCOL_COLUMN, &pkt,
420 if (strcmp(grp, "Packet:")==0) {
421 cf_goto_frame(&cfile, atoi(pkt));
429 error_create_popup_menu(error_equiv_table *err)
431 GtkItemFactory *item_factory;
434 err->select = gtk_tree_view_get_selection (GTK_TREE_VIEW (err->tree_view));
435 gtk_tree_selection_set_mode (err->select, GTK_SELECTION_SINGLE);
436 g_signal_connect (G_OBJECT (err->select), "changed",
437 G_CALLBACK (expert_goto_pkt_cb),
439 item_factory = gtk_item_factory_new(GTK_TYPE_MENU, "<main>", NULL);
441 gtk_item_factory_create_items_ac(item_factory, sizeof(error_list_menu_items)/sizeof(error_list_menu_items[0]), error_list_menu_items, err, 2);
443 err->menu = gtk_item_factory_get_widget(item_factory, "<main>");
444 g_signal_connect(err->tree_view, "button_press_event", G_CALLBACK(error_show_popup_menu_cb), err);
448 init_error_table(error_equiv_table *err, guint num_procs, GtkWidget *vbox)
452 GtkTreeViewColumn *column;
453 GtkCellRenderer *renderer;
454 GtkTreeSortable *sortable;
456 /* Create the store */
457 store = gtk_tree_store_new (4, /* Total number of columns */
459 G_TYPE_POINTER, /* Group */
460 G_TYPE_POINTER, /* Protocol */
461 G_TYPE_POINTER, /* Summary */
463 G_TYPE_STRING, /* Group */
464 G_TYPE_STRING, /* Protocol */
465 G_TYPE_STRING, /* Summary */
467 G_TYPE_INT); /* Count */
470 tree = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));
471 err->tree_view = GTK_TREE_VIEW(tree);
472 sortable = GTK_TREE_SORTABLE(store);
474 #if GTK_CHECK_VERSION(2,6,0)
475 /* Speed up the list display */
476 gtk_tree_view_set_fixed_height_mode(err->tree_view, TRUE);
479 /* Setup the sortable columns */
481 gtk_tree_sortable_set_sort_func(sortable, SORT_ALPHABETICAL, sort_iter_compare_func, GINT_TO_POINTER(SORT_ALPHABETICAL), NULL);
482 gtk_tree_sortable_set_sort_column_id(sortable, SORT_ALPHABETICAL, GTK_SORT_ASCENDING);
484 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW (tree), FALSE);
486 /* The view now holds a reference. We can get rid of our own reference */
487 g_object_unref (G_OBJECT (store));
489 /* Create a cell renderer */
490 renderer = gtk_cell_renderer_text_new ();
492 /* Create the first column, associating the "text" attribute of the
493 * cell_renderer to the first column of the model */
494 column = gtk_tree_view_column_new_with_attributes ("Group", renderer, "text", GROUP_COLUMN, NULL);
495 gtk_tree_view_column_set_sort_column_id(column, GROUP_COLUMN);
496 gtk_tree_view_column_set_resizable(column, TRUE);
497 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
498 gtk_tree_view_column_set_min_width(column, 80);
499 /* Add the column to the view. */
500 gtk_tree_view_append_column (GTK_TREE_VIEW (err->tree_view), column);
502 /* Second column.. Protocol. */
503 renderer = gtk_cell_renderer_text_new ();
504 column = gtk_tree_view_column_new_with_attributes ("Protocol", renderer, "text", PROTOCOL_COLUMN, NULL);
505 gtk_tree_view_column_set_sort_column_id(column, PROTOCOL_COLUMN);
506 gtk_tree_view_column_set_resizable(column, TRUE);
507 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
508 gtk_tree_view_column_set_min_width(column, 80);
509 gtk_tree_view_append_column (GTK_TREE_VIEW (err->tree_view), column);
511 /* Third column.. Summary. */
512 renderer = gtk_cell_renderer_text_new ();
513 column = gtk_tree_view_column_new_with_attributes ("Summary", renderer, "text", SUMMARY_COLUMN, NULL);
514 gtk_tree_view_column_set_sort_column_id(column, SUMMARY_COLUMN);
515 gtk_tree_view_column_set_resizable(column, TRUE);
516 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
517 gtk_tree_view_column_set_min_width(column, 90);
518 gtk_tree_view_append_column (GTK_TREE_VIEW (err->tree_view), column);
520 /* Last column.. Count. */
521 column = gtk_tree_view_column_new_with_attributes ("Count", renderer, "text", COUNT_COLUMN, NULL);
522 gtk_tree_view_column_set_sort_column_id(column, COUNT_COLUMN);
523 gtk_tree_view_column_set_resizable(column, TRUE);
524 gtk_tree_view_column_set_sizing(column, GTK_TREE_VIEW_COLUMN_FIXED);
525 gtk_tree_view_column_set_min_width(column, 80);
526 gtk_tree_view_append_column (GTK_TREE_VIEW (err->tree_view), column);
528 err->scrolled_window=scrolled_window_new(NULL, NULL);
530 gtk_container_add(GTK_CONTAINER(err->scrolled_window), GTK_WIDGET (err->tree_view));
532 gtk_box_pack_start(GTK_BOX(vbox), err->scrolled_window, TRUE, TRUE, 0);
534 gtk_tree_view_set_search_column (err->tree_view, SUMMARY_COLUMN); /* Allow searching the summary */
535 gtk_tree_view_set_reorderable (err->tree_view, TRUE); /* Allow user to reorder data with drag n drop */
537 /* Now enable the sorting of each column */
538 gtk_tree_view_set_rules_hint(GTK_TREE_VIEW(err->tree_view), TRUE);
539 gtk_tree_view_set_headers_clickable(GTK_TREE_VIEW(err->tree_view), TRUE);
541 gtk_widget_show(err->scrolled_window);
543 err->num_procs=num_procs;
545 err->text = g_string_chunk_new(100);
546 err->procs_array = g_array_sized_new(FALSE, FALSE, sizeof(error_procedure_t), num_procs);
548 /* create popup menu for this table */
549 error_create_popup_menu(err);
553 init_error_table_row(error_equiv_table *err, const expert_info_t *expert_data)
555 guint old_num_procs=err->num_procs;
558 error_procedure_t *procedure;
560 GtkTreeIter new_iter;
562 /* we have discovered a new procedure. Extend the table accordingly */
563 row = find_summary_data(err, expert_data);
565 error_procedure_t new_procedure;
566 /* First time we have seen this event so initialize memory table */
567 row = old_num_procs; /* Number of expert events since this is a new event */
569 new_procedure.count=0; /* count of events for this item */
570 new_procedure.fvalue_value = NULL; /* Filter string value */
572 new_procedure.entries[j]=NULL;
574 g_array_append_val(err->procs_array, new_procedure);
575 procedure = &g_array_index(err->procs_array, error_procedure_t, row);
577 /* Create the item in our memory table */
578 procedure->entries[0]=(char *)g_string_chunk_insert(err->text,
579 val_to_str(expert_data->group, expert_group_vals,"Unknown group (%u)")); /* Group */
580 procedure->entries[1]=(char *)g_string_chunk_insert(err->text, expert_data->protocol); /* Protocol */
581 procedure->entries[2]=(char *)g_string_chunk_insert(err->text, expert_data->summary); /* Summary */
583 /* Create a new item in our tree view */
584 store = GTK_TREE_STORE(gtk_tree_view_get_model(err->tree_view)); /* Get store */
585 gtk_tree_store_append (store, &procedure->iter, NULL); /* Acquire an iterator */
587 gtk_tree_store_set (store, &procedure->iter,
588 GROUP_COLUMN, procedure->entries[0],
589 PROTOCOL_COLUMN, procedure->entries[1],
590 SUMMARY_COLUMN, procedure->entries[2], -1);
592 /* If an expert item was passed then build the filter string */
593 if (expert_data->pitem) {
596 g_assert(PITEM_FINFO(expert_data->pitem));
597 filter = proto_construct_match_selected_string(PITEM_FINFO(expert_data->pitem), NULL);
599 procedure->fvalue_value = g_string_chunk_insert(err->text, filter);
601 /* Store the updated count of events */
602 err->num_procs = ++old_num_procs;
605 /* Update our memory table with event data */
606 procedure = &g_array_index(err->procs_array, error_procedure_t, row);
607 procedure->count++; /* increment the count of events for this item */
610 /* Store the updated count for this event item */
611 err->procedures[row].entries[3]=(char *)g_strdup_printf("%d", err->procedures[row].count); /* Count */
614 /* Update the tree with new count for this event */
615 store = GTK_TREE_STORE(gtk_tree_view_get_model(err->tree_view));
616 gtk_tree_store_set(store, &procedure->iter, COUNT_COLUMN, procedure->count, -1);
617 gtk_tree_store_append(store, &new_iter, &procedure->iter);
618 gtk_tree_store_set(store, &new_iter,
619 GROUP_COLUMN, "Packet:",
620 PROTOCOL_COLUMN, (char *)g_strdup_printf("%d", expert_data->packet_num),
626 reset_error_table_data(error_equiv_table *err)
630 store = GTK_TREE_STORE(gtk_tree_view_get_model(err->tree_view));
631 gtk_tree_store_clear(store);
633 /* g_string_chunk_clear() is introduced in glib 2.14 */
634 g_string_chunk_free(err->text);
635 err->text = g_string_chunk_new(100);
637 g_array_set_size(err->procs_array, 0);
641 free_error_table_data(error_equiv_table *err)
644 g_string_chunk_free(err->text);
645 g_array_free(err->procs_array, TRUE);