NOTE for command line gnokii: --netmonitordata we have used two data structure, defined in gnokii.h : PARAM_INFO_MON wich is a single linked recursive list of pointers, each pointers contain the complete description of one netmonitor param. /////////////////////////////////////////////////////////////////////// // start->next->next->next-> ...->next->NULL // | | | | // V V V V // par0 par1 par2 parN /////////////////////////////////////////////////////////////////////// OUT_INFO_MON, contains parameters as specified from the command line and an array of data pointers requested by user, each one point to a single PARAM_INFO_MON for optimization reason, also we filled in one array of required screen. this the block diagram of program: PARAM_INFO_MON *info: OUT_INFO_MON *out: netmonitordata() check for -S option, assign filename check for -I option, assign filename autodetect_phonemodel_phone_version() This is TO DO info = get_min_param_info() // nedeed here, so later we can check args param // here we check command line arguments if -I option for each line do parse_check(f_argc, f_argv, info, file, line) done else parse_check(argc, argv, info, NULL, 0) fi // HERE, ALL IS CHECKED // here we make OUT_INFO_MON if -I option for each line do out = parse_process(f_argc, f_argv, info, file, line) nmd_output(out) free(out) done else out = parse_process(argc, argv, info, NULL, 0) nmd_output(out) free(out) fi