+/* The is the end of the code that parses the command-line options. All information have now been stored in the structure preference. All strings are still pointing to decoded_parm that needs to be kept in memory as long as preference is needed, and decoded_param needs to be deallocated at each exit point of this function */

+

+

+ dissector_matching = NULL;

+

+/* We now have a pointer to the handle for the requested table inside the variable table_matching */

+ if ( ! (*dissector_str) ) { /* Is the dissector name empty, if so, don't even search for a matching dissector and display all dissectors found for the selected table */

+ fprintf(stderr, "tethereal: No protocol name specified\n"); /* Note, we don't exit here, but dissector_matching will remain NULL, so we exit below */

+ }

+ else {

+ user_protocol_name.nb_match = 0;

+ user_protocol_name.searched_name = dissector_str;

+ user_protocol_name.matched_handle = NULL;

+ dissector_table_foreach_handle(table_name, find_name_func, &user_protocol_name); /* Go and perform the search for this dissector in the this table's dissectors' names and shortnames */