• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/isdn/hardware/eicon/

Lines Matching refs:pLib

65 static int ScheduleNextTraceRequest (diva_strace_context_t* pLib);
66 static int process_idi_event (diva_strace_context_t* pLib,
68 static int process_idi_info (diva_strace_context_t* pLib,
70 static int diva_modem_event (diva_strace_context_t* pLib, int Channel);
71 static int diva_fax_event (diva_strace_context_t* pLib, int Channel);
72 static int diva_line_event (diva_strace_context_t* pLib, int Channel);
73 static int diva_modem_info (diva_strace_context_t* pLib,
76 static int diva_fax_info (diva_strace_context_t* pLib,
79 static int diva_line_info (diva_strace_context_t* pLib,
82 static int diva_ifc_statistics (diva_strace_context_t* pLib,
93 static void diva_create_parse_table (diva_strace_context_t* pLib);
94 static void diva_trace_error (diva_strace_context_t* pLib,
96 static void diva_trace_notify_user (diva_strace_context_t* pLib,
111 diva_strace_context_t* pLib = (diva_strace_context_t*)pmem;
114 if (!pLib) {
118 pmem += sizeof(*pLib);
119 memset(pLib, 0x00, sizeof(*pLib));
121 pLib->Adapter = Adapter;
126 pLib->instance.hLib = pLib;
127 pLib->instance.DivaSTraceLibraryStart = DivaSTraceLibraryStart;
128 pLib->instance.DivaSTraceLibraryStop = DivaSTraceLibraryStop;
129 pLib->instance.DivaSTraceLibraryFinit = SuperTraceLibraryFinit;
130 pLib->instance.DivaSTraceMessageInput = SuperTraceMessageInput;
131 pLib->instance.DivaSTraceGetHandle = SuperTraceGetHandle;
132 pLib->instance.DivaSTraceSetAudioTap = SuperTraceSetAudioTap;
133 pLib->instance.DivaSTraceSetBChannel = SuperTraceSetBChannel;
134 pLib->instance.DivaSTraceSetDChannel = SuperTraceSetDChannel;
135 pLib->instance.DivaSTraceSetInfo = SuperTraceSetInfo;
136 pLib->instance.DivaSTraceGetOutgoingCallStatistics = \
138 pLib->instance.DivaSTraceGetIncomingCallStatistics = \
140 pLib->instance.DivaSTraceGetModemStatistics = \
142 pLib->instance.DivaSTraceGetFaxStatistics = \
144 pLib->instance.DivaSTraceGetBLayer1Statistics = \
146 pLib->instance.DivaSTraceGetBLayer2Statistics = \
148 pLib->instance.DivaSTraceGetDLayer1Statistics = \
150 pLib->instance.DivaSTraceGetDLayer2Statistics = \
152 pLib->instance.DivaSTraceClearCall = SuperTraceClearCall;
156 pLib->user_proc_table.user_context = user_proc->user_context;
157 pLib->user_proc_table.notify_proc = user_proc->notify_proc;
158 pLib->user_proc_table.trace_proc = user_proc->trace_proc;
159 pLib->user_proc_table.error_notify_proc = user_proc->error_notify_proc;
162 if (!(pLib->hAdapter = SuperTraceOpenAdapter (Adapter))) {
166 pLib->Channels = SuperTraceGetNumberOfChannels (pLib->hAdapter);
172 pLib->parse_entries = (MODEM_PARSE_ENTRIES + FAX_PARSE_ENTRIES + \
174 LINE_PARSE_ENTRIES + 1) * pLib->Channels;
175 pLib->parse_table = (diva_strace_path2action_t*)pmem;
178 pLib->lines[i].pInterface = &pLib->Interface;
179 pLib->lines[i].pInterfaceStat = &pLib->InterfaceStat;
182 pLib->e.R = &pLib->RData;
184 pLib->req_busy = 1;
185 pLib->rc_ok = ASSIGN_OK;
187 diva_create_parse_table (pLib);
189 return ((diva_strace_library_interface_t*)pLib);
193 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
195 return (SuperTraceASSIGN (pLib->hAdapter, pLib->buffer));
204 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
206 if (!pLib->e.Id) { /* Was never started/assigned */
210 switch (pLib->removal_state) {
212 pLib->removal_state = 1;
213 ScheduleNextTraceRequest(pLib);
224 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
225 if (pLib) {
226 if (pLib->hAdapter) {
227 SuperTraceCloseAdapter (pLib->hAdapter);
235 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
237 return (&pLib->e);
246 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
250 if (pLib->e.complete == 255) {
254 pLib->req_busy = 0;
255 Rc = pLib->e.Rc;
256 pLib->e.Rc = 0;
258 if (pLib->removal_state == 2) {
259 pLib->removal_state = 3;
263 if (Rc != pLib->rc_ok) {
268 if (pLib->general_b_ch_event == 1) {
269 pLib->general_b_ch_event = 2;
271 } else if (pLib->general_fax_event == 1) {
272 pLib->general_fax_event = 2;
274 } else if (pLib->general_mdm_event == 1) {
275 pLib->general_mdm_event = 2;
277 } else if ((pLib->ChannelsTraceActive < pLib->Channels) && pLib->ChannelsTraceActive) {
278 pLib->ChannelsTraceActive = pLib->Channels;
280 } else if (pLib->ModemTraceActive < pLib->Channels) {
281 pLib->ModemTraceActive = pLib->Channels;
283 } else if (pLib->FaxTraceActive < pLib->Channels) {
284 pLib->FaxTraceActive = pLib->Channels;
286 } else if (pLib->audio_trace_init == 2) {
288 pLib->audio_trace_init = 1;
289 } else if (pLib->eye_pattern_pending) {
290 pLib->eye_pattern_pending = 0;
292 } else if (pLib->audio_tap_pending) {
293 pLib->audio_tap_pending = 0;
301 if (pLib->general_b_ch_event == 1) {
302 pLib->ChannelsTraceActive = pLib->Channels;
303 pLib->general_b_ch_event = 2;
304 } else if (pLib->general_fax_event == 1) {
305 pLib->general_fax_event = 2;
306 pLib->FaxTraceActive = pLib->Channels;
307 } else if (pLib->general_mdm_event == 1) {
308 pLib->general_mdm_event = 2;
309 pLib->ModemTraceActive = pLib->Channels;
312 if (pLib->audio_trace_init == 2) {
313 pLib->audio_trace_init = 1;
315 pLib->rc_ok = 0xff; /* default OK after assign was done */
316 if ((ret = ScheduleNextTraceRequest(pLib))) {
324 Ind = pLib->e.Ind;
325 pLib->e.Ind = 0;
326 if (pLib->removal_state) {
327 pLib->e.RNum = 0;
328 pLib->e.RNR = 2;
329 } else if (pLib->req_busy) {
330 pLib->e.RNum = 0;
331 pLib->e.RNR = 1;
333 if (pLib->e.complete != 0x02) {
337 pLib->e.RNum = 1;
338 pLib->e.R->P = (byte*)&pLib->buffer[0];
339 pLib->e.R->PLength = (word)(sizeof(pLib->buffer) - 1);
345 byte* p = (byte*)&pLib->buffer[0];
346 pLib->buffer[pLib->e.R->PLength] = 0; /* terminate I.E. with zero */
350 int total_length = pLib->e.R->PLength;
360 if (process_idi_info (pLib, (diva_man_var_header_t*)p)) {
365 if (process_idi_event (pLib, (diva_man_var_header_t*)p)) {
370 if (pLib->trace_on == 1) {
375 pLib->trace_on++;
380 if (pLib->user_proc_table.trace_proc) {
381 (*(pLib->user_proc_table.trace_proc))(pLib->user_proc_table.user_context,
382 &pLib->instance, pLib->Adapter,
395 if (process_idi_info (pLib, (diva_man_var_header_t*)p)) {
400 if (process_idi_event (pLib, (diva_man_var_header_t*)p)) {
405 if (pLib->trace_on == 1) {
410 pLib->trace_on++;
415 if (pLib->user_proc_table.trace_proc) {
416 (*(pLib->user_proc_table.trace_proc))(pLib->user_proc_table.user_context,
417 &pLib->instance, pLib->Adapter,
418 p, pLib->e.R->PLength);
429 if ((ret = ScheduleNextTraceRequest(pLib))) {
439 static int ScheduleNextTraceRequest (diva_strace_context_t* pLib) {
444 if (pLib->req_busy) {
448 if (pLib->removal_state == 1) {
449 if (SuperTraceREMOVE (pLib->hAdapter)) {
450 pLib->removal_state = 3;
452 pLib->req_busy = 1;
453 pLib->removal_state = 2;
458 if (pLib->removal_state) {
462 if (!pLib->general_b_ch_event) {
463 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, "State\\B Event", pLib->buffer))) {
466 pLib->general_b_ch_event = 1;
467 pLib->req_busy = 1;
471 if (!pLib->general_fax_event) {
472 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, "State\\FAX Event", pLib->buffer))) {
475 pLib->general_fax_event = 1;
476 pLib->req_busy = 1;
480 if (!pLib->general_mdm_event) {
481 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, "State\\Modem Event", pLib->buffer))) {
484 pLib->general_mdm_event = 1;
485 pLib->req_busy = 1;
489 if (pLib->ChannelsTraceActive < pLib->Channels) {
490 pLib->ChannelsTraceActive++;
491 sprintf (name, "State\\B%d\\Line", pLib->ChannelsTraceActive);
492 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, name, pLib->buffer))) {
493 pLib->ChannelsTraceActive--;
496 pLib->req_busy = 1;
500 if (pLib->ModemTraceActive < pLib->Channels) {
501 pLib->ModemTraceActive++;
502 sprintf (name, "State\\B%d\\Modem\\Event", pLib->ModemTraceActive);
503 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, name, pLib->buffer))) {
504 pLib->ModemTraceActive--;
507 pLib->req_busy = 1;
511 if (pLib->FaxTraceActive < pLib->Channels) {
512 pLib->FaxTraceActive++;
513 sprintf (name, "State\\B%d\\FAX\\Event", pLib->FaxTraceActive);
514 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, name, pLib->buffer))) {
515 pLib->FaxTraceActive--;
518 pLib->req_busy = 1;
522 if (!pLib->trace_mask_init) {
524 if (SuperTraceWriteVar (pLib->hAdapter,
525 pLib->buffer,
532 pLib->trace_mask_init = 1;
533 pLib->req_busy = 1;
537 if (!pLib->audio_trace_init) {
539 if (SuperTraceWriteVar (pLib->hAdapter,
540 pLib->buffer,
547 pLib->audio_trace_init = 2;
548 pLib->req_busy = 1;
552 if (!pLib->bchannel_init) {
554 if (SuperTraceWriteVar (pLib->hAdapter,
555 pLib->buffer,
562 pLib->bchannel_init = 1;
563 pLib->req_busy = 1;
567 if (!pLib->trace_length_init) {
569 if (SuperTraceWriteVar (pLib->hAdapter,
570 pLib->buffer,
577 pLib->trace_length_init = 1;
578 pLib->req_busy = 1;
582 if (!pLib->trace_on) {
583 if (SuperTraceTraceOnRequest (pLib->hAdapter,
585 pLib->buffer)) {
588 pLib->trace_on = 1;
589 pLib->req_busy = 1;
593 if (pLib->trace_event_mask != pLib->current_trace_event_mask) {
594 if (SuperTraceWriteVar (pLib->hAdapter,
595 pLib->buffer,
597 &pLib->trace_event_mask,
599 sizeof(pLib->trace_event_mask))) {
602 pLib->current_trace_event_mask = pLib->trace_event_mask;
603 pLib->req_busy = 1;
607 if ((pLib->audio_tap_pending >= 0) && (pLib->audio_tap_mask != pLib->current_audio_tap_mask)) {
608 if (SuperTraceWriteVar (pLib->hAdapter,
609 pLib->buffer,
611 &pLib->audio_tap_mask,
613 sizeof(pLib->audio_tap_mask))) {
616 pLib->current_audio_tap_mask = pLib->audio_tap_mask;
617 pLib->audio_tap_pending = 1;
618 pLib->req_busy = 1;
622 if ((pLib->eye_pattern_pending >= 0) && (pLib->audio_tap_mask != pLib->current_eye_pattern_mask)) {
623 if (SuperTraceWriteVar (pLib->hAdapter,
624 pLib->buffer,
626 &pLib->audio_tap_mask,
628 sizeof(pLib->audio_tap_mask))) {
631 pLib->current_eye_pattern_mask = pLib->audio_tap_mask;
632 pLib->eye_pattern_pending = 1;
633 pLib->req_busy = 1;
637 if (pLib->bchannel_trace_mask != pLib->current_bchannel_trace_mask) {
638 if (SuperTraceWriteVar (pLib->hAdapter,
639 pLib->buffer,
641 &pLib->bchannel_trace_mask,
643 sizeof(pLib->bchannel_trace_mask))) {
646 pLib->current_bchannel_trace_mask = pLib->bchannel_trace_mask;
647 pLib->req_busy = 1;
651 if (!pLib->trace_events_down) {
652 if (SuperTraceTraceOnRequest (pLib->hAdapter,
654 pLib->buffer)) {
657 pLib->trace_events_down = 1;
658 pLib->req_busy = 1;
662 if (!pLib->l1_trace) {
663 if (SuperTraceTraceOnRequest (pLib->hAdapter,
665 pLib->buffer)) {
668 pLib->l1_trace = 1;
669 pLib->req_busy = 1;
673 if (!pLib->l2_trace) {
674 if (SuperTraceTraceOnRequest (pLib->hAdapter,
676 pLib->buffer)) {
679 pLib->l2_trace = 1;
680 pLib->req_busy = 1;
685 if (pLib->pending_line_status & (1L << i)) {
687 if (SuperTraceReadRequest (pLib->hAdapter, name, pLib->buffer)) {
690 pLib->pending_line_status &= ~(1L << i);
691 pLib->req_busy = 1;
694 if (pLib->pending_modem_status & (1L << i)) {
696 if (SuperTraceReadRequest (pLib->hAdapter, name, pLib->buffer)) {
699 pLib->pending_modem_status &= ~(1L << i);
700 pLib->req_busy = 1;
703 if (pLib->pending_fax_status & (1L << i)) {
705 if (SuperTraceReadRequest (pLib->hAdapter, name, pLib->buffer)) {
708 pLib->pending_fax_status &= ~(1L << i);
709 pLib->req_busy = 1;
712 if (pLib->clear_call_command & (1L << i)) {
714 if (SuperTraceExecuteRequest (pLib->hAdapter, name, pLib->buffer)) {
717 pLib->clear_call_command &= ~(1L << i);
718 pLib->req_busy = 1;
723 if (pLib->outgoing_ifc_stats) {
724 if (SuperTraceReadRequest (pLib->hAdapter,
726 pLib->buffer)) {
729 pLib->outgoing_ifc_stats = 0;
730 pLib->req_busy = 1;
734 if (pLib->incoming_ifc_stats) {
735 if (SuperTraceReadRequest (pLib->hAdapter,
737 pLib->buffer)) {
740 pLib->incoming_ifc_stats = 0;
741 pLib->req_busy = 1;
745 if (pLib->modem_ifc_stats) {
746 if (SuperTraceReadRequest (pLib->hAdapter,
748 pLib->buffer)) {
751 pLib->modem_ifc_stats = 0;
752 pLib->req_busy = 1;
756 if (pLib->fax_ifc_stats) {
757 if (SuperTraceReadRequest (pLib->hAdapter,
759 pLib->buffer)) {
762 pLib->fax_ifc_stats = 0;
763 pLib->req_busy = 1;
767 if (pLib->b1_ifc_stats) {
768 if (SuperTraceReadRequest (pLib->hAdapter,
770 pLib->buffer)) {
773 pLib->b1_ifc_stats = 0;
774 pLib->req_busy = 1;
778 if (pLib->b2_ifc_stats) {
779 if (SuperTraceReadRequest (pLib->hAdapter,
781 pLib->buffer)) {
784 pLib->b2_ifc_stats = 0;
785 pLib->req_busy = 1;
789 if (pLib->d1_ifc_stats) {
790 if (SuperTraceReadRequest (pLib->hAdapter,
792 pLib->buffer)) {
795 pLib->d1_ifc_stats = 0;
796 pLib->req_busy = 1;
800 if (pLib->d2_ifc_stats) {
801 if (SuperTraceReadRequest (pLib->hAdapter,
803 pLib->buffer)) {
806 pLib->d2_ifc_stats = 0;
807 pLib->req_busy = 1;
811 if (!pLib->IncomingCallsCallsActive) {
812 pLib->IncomingCallsCallsActive = 1;
814 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, name, pLib->buffer))) {
815 pLib->IncomingCallsCallsActive = 0;
818 pLib->req_busy = 1;
821 if (!pLib->IncomingCallsConnectedActive) {
822 pLib->IncomingCallsConnectedActive = 1;
824 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, name, pLib->buffer))) {
825 pLib->IncomingCallsConnectedActive = 0;
828 pLib->req_busy = 1;
831 if (!pLib->OutgoingCallsCallsActive) {
832 pLib->OutgoingCallsCallsActive = 1;
834 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, name, pLib->buffer))) {
835 pLib->OutgoingCallsCallsActive = 0;
838 pLib->req_busy = 1;
841 if (!pLib->OutgoingCallsConnectedActive) {
842 pLib->OutgoingCallsConnectedActive = 1;
844 if ((ret = SuperTraceTraceOnRequest(pLib->hAdapter, name, pLib->buffer))) {
845 pLib->OutgoingCallsConnectedActive = 0;
848 pLib->req_busy = 1;
855 static int process_idi_event (diva_strace_context_t* pLib,
864 if (!pLib->line_init_event && !pLib->pending_line_status) {
865 for (i = 1; i <= pLib->Channels; i++) {
866 diva_line_event(pLib, i);
869 } else if (ch_id && ch_id <= pLib->Channels) {
870 return (diva_line_event(pLib, (int)ch_id));
880 if (!pLib->pending_fax_status && !pLib->fax_init_event) {
881 for (i = 1; i <= pLib->Channels; i++) {
882 diva_fax_event(pLib, i);
885 } else if (ch_id && ch_id <= pLib->Channels) {
886 return (diva_fax_event(pLib, (int)ch_id));
896 if (!pLib->pending_modem_status && !pLib->modem_init_event) {
897 for (i = 1; i <= pLib->Channels; i++) {
898 diva_modem_event(pLib, i);
901 } else if (ch_id && ch_id <= pLib->Channels) {
902 return (diva_modem_event(pLib, (int)ch_id));
912 for (i = 1; i <= pLib->Channels; i++) {
915 return (diva_line_event(pLib, i));
922 for (i = 1; i <= pLib->Channels; i++) {
925 return (diva_modem_event (pLib, i));
932 for (i = 1; i <= pLib->Channels; i++) {
935 return (diva_fax_event (pLib, i));
943 if (pLib->trace_events_down == 1) {
944 pLib->trace_events_down = 2;
946 diva_trace_error (pLib, 1, "Events Down", 0);
952 diva_strace_read_asz (pVar, &pLib->lines[0].pInterface->Layer1[0]);
953 if (pLib->l1_trace == 1) {
954 pLib->l1_trace = 2;
956 diva_trace_notify_user (pLib, 0, DIVA_SUPER_TRACE_INTERFACE_CHANGE);
961 char* tmp = &pLib->lines[0].pInterface->Layer2[0];
1011 if (pLib->l2_trace == 1) {
1012 pLib->l2_trace = 2;
1014 diva_trace_notify_user (pLib, 0, DIVA_SUPER_TRACE_INTERFACE_CHANGE);
1021 return (SuperTraceGetIncomingCallStatistics (pLib));
1026 return (SuperTraceGetOutgoingCallStatistics (pLib));
1032 static int diva_line_event (diva_strace_context_t* pLib, int Channel) {
1033 pLib->pending_line_status |= (1L << (Channel-1));
1037 static int diva_modem_event (diva_strace_context_t* pLib, int Channel) {
1038 pLib->pending_modem_status |= (1L << (Channel-1));
1042 static int diva_fax_event (diva_strace_context_t* pLib, int Channel) {
1043 pLib->pending_fax_status |= (1L << (Channel-1));
1052 static int process_idi_info (diva_strace_context_t* pLib,
1061 for (i = pLib->Channels; i > 0; i--) {
1064 return (diva_modem_info (pLib, i, pVar));
1071 for (i = pLib->Channels; i > 0; i--) {
1074 return (diva_fax_info (pLib, i, pVar));
1081 for (i = pLib->Channels; i > 0; i--) {
1084 return (diva_line_info (pLib, i, pVar));
1088 if (!diva_ifc_statistics (pLib, pVar)) {
1102 static int diva_modem_info (diva_strace_context_t* pLib,
1108 for (i = pLib->modem_parse_entry_first[nr];
1109 i <= pLib->modem_parse_entry_last[nr]; i++) {
1110 if ((cur = find_var (pVar, pLib->parse_table[i].path))) {
1111 if (diva_trace_read_variable (cur, pLib->parse_table[i].variable)) {
1112 diva_trace_error (pLib, -3 , __FILE__, __LINE__);
1116 diva_trace_error (pLib, -2 , __FILE__, __LINE__);
1126 if (pLib->modem_init_event & (1L << nr)) {
1127 diva_trace_notify_user (pLib, nr, DIVA_SUPER_TRACE_NOTIFY_MODEM_CHANGE);
1129 pLib->modem_init_event |= (1L << nr);
1135 static int diva_fax_info (diva_strace_context_t* pLib,
1141 for (i = pLib->fax_parse_entry_first[nr];
1142 i <= pLib->fax_parse_entry_last[nr]; i++) {
1143 if ((cur = find_var (pVar, pLib->parse_table[i].path))) {
1144 if (diva_trace_read_variable (cur, pLib->parse_table[i].variable)) {
1145 diva_trace_error (pLib, -3 , __FILE__, __LINE__);
1149 diva_trace_error (pLib, -2 , __FILE__, __LINE__);
1159 if (pLib->fax_init_event & (1L << nr)) {
1160 diva_trace_notify_user (pLib, nr, DIVA_SUPER_TRACE_NOTIFY_FAX_CHANGE);
1162 pLib->fax_init_event |= (1L << nr);
1173 static int diva_line_info (diva_strace_context_t* pLib,
1179 for (i = pLib->line_parse_entry_first[nr];
1180 i <= pLib->line_parse_entry_last[nr]; i++) {
1181 if ((cur = find_var (pVar, pLib->parse_table[i].path))) {
1182 if (diva_trace_read_variable (cur, pLib->parse_table[i].variable)) {
1183 diva_trace_error (pLib, -3 , __FILE__, __LINE__);
1187 diva_trace_error (pLib, -2 , __FILE__, __LINE__);
1200 if (pLib->line_init_event & (1L << nr)) {
1201 diva_trace_notify_user (pLib, nr, DIVA_SUPER_TRACE_NOTIFY_LINE_CHANGE);
1203 pLib->line_init_event |= (1L << nr);
1204 if (strcmp (&pLib->lines[nr].Line[0], "Idle")) {
1205 diva_trace_notify_user (pLib, nr, DIVA_SUPER_TRACE_NOTIFY_LINE_CHANGE);
1249 static void diva_create_line_parse_table (diva_strace_context_t* pLib,
1251 diva_trace_line_state_t* pLine = &pLib->lines[Channel];
1254 if ((pLib->cur_parse_entry + LINE_PARSE_ENTRIES) >= pLib->parse_entries) {
1255 diva_trace_error (pLib, -1, __FILE__, __LINE__);
1261 pLib->line_parse_entry_first[Channel] = pLib->cur_parse_entry;
1263 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1265 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->Framing[0];
1267 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1269 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->Line[0];
1271 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1273 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->Layer2[0];
1275 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1277 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->Layer3[0];
1279 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1281 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1284 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1286 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1289 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1291 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1294 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1296 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1299 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1301 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->call_BC;
1303 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1305 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->call_HLC;
1307 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1309 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->call_LLC;
1311 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1313 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->Charges;
1315 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1317 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->CallReference;
1319 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1321 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1324 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1326 pLib->parse_table[pLib->cur_parse_entry++].variable = &pLine->UserID[0];
1328 pLib->line_parse_entry_last[Channel] = pLib->cur_parse_entry - 1;
1331 static void diva_create_fax_parse_table (diva_strace_context_t* pLib,
1333 diva_trace_fax_state_t* pFax = &pLib->lines[Channel].fax;
1336 if ((pLib->cur_parse_entry + FAX_PARSE_ENTRIES) >= pLib->parse_entries) {
1337 diva_trace_error (pLib, -1, __FILE__, __LINE__);
1342 pLib->fax_parse_entry_first[Channel] = pLib->cur_parse_entry;
1344 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1346 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Event;
1348 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1350 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Page_Counter;
1352 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1354 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Features;
1356 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1358 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Station_ID[0];
1360 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1362 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Subaddress[0];
1364 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1366 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Password[0];
1368 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1370 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Speed;
1372 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1374 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Resolution;
1376 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1378 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Paper_Width;
1380 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1382 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Paper_Length;
1384 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1386 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Scanline_Time;
1388 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1390 pLib->parse_table[pLib->cur_parse_entry++].variable = &pFax->Disc_Reason;
1392 pLib->fax_parse_entry_last[Channel] = pLib->cur_parse_entry - 1;
1395 static void diva_create_modem_parse_table (diva_strace_context_t* pLib,
1397 diva_trace_modem_state_t* pModem = &pLib->lines[Channel].modem;
1400 if ((pLib->cur_parse_entry + MODEM_PARSE_ENTRIES) >= pLib->parse_entries) {
1401 diva_trace_error (pLib, -1, __FILE__, __LINE__);
1406 pLib->modem_parse_entry_first[Channel] = pLib->cur_parse_entry;
1408 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1410 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->Event;
1412 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1414 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->Norm;
1416 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1418 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->Options;
1420 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1422 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->TxSpeed;
1424 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1426 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->RxSpeed;
1428 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1430 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->RoundtripMsec;
1432 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1434 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->SymbolRate;
1436 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1438 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->RxLeveldBm;
1440 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1442 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->EchoLeveldBm;
1444 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1446 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->SNRdb;
1448 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1450 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->MAE;
1452 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1454 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->LocalRetrains;
1456 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1458 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->RemoteRetrains;
1460 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1462 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->LocalResyncs;
1464 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1466 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->RemoteResyncs;
1468 sprintf (pLib->parse_table[pLib->cur_parse_entry].path,
1470 pLib->parse_table[pLib->cur_parse_entry++].variable = &pModem->DiscReason;
1472 pLib->modem_parse_entry_last[Channel] = pLib->cur_parse_entry - 1;
1475 static void diva_create_parse_table (diva_strace_context_t* pLib) {
1478 for (i = 0; i < pLib->Channels; i++) {
1479 diva_create_line_parse_table (pLib, i);
1480 diva_create_modem_parse_table (pLib, i);
1481 diva_create_fax_parse_table (pLib, i);
1484 pLib->statistic_parse_first = pLib->cur_parse_entry;
1489 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1491 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1492 &pLib->InterfaceStat.outg.Calls;
1494 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1496 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1497 &pLib->InterfaceStat.outg.Connected;
1499 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1501 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1502 &pLib->InterfaceStat.outg.User_Busy;
1504 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1506 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1507 &pLib->InterfaceStat.outg.No_Answer;
1509 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1511 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1512 &pLib->InterfaceStat.outg.Wrong_Number;
1514 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1516 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1517 &pLib->InterfaceStat.outg.Call_Rejected;
1519 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1521 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1522 &pLib->InterfaceStat.outg.Other_Failures;
1527 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1529 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1530 &pLib->InterfaceStat.inc.Calls;
1532 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1534 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1535 &pLib->InterfaceStat.inc.Connected;
1537 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1539 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1540 &pLib->InterfaceStat.inc.User_Busy;
1542 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1544 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1545 &pLib->InterfaceStat.inc.Call_Rejected;
1547 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1549 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1550 &pLib->InterfaceStat.inc.Wrong_Number;
1552 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1554 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1555 &pLib->InterfaceStat.inc.Incompatible_Dst;
1557 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1559 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1560 &pLib->InterfaceStat.inc.Out_of_Order;
1562 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1564 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1565 &pLib->InterfaceStat.inc.Ignored;
1570 pLib->mdm_statistic_parse_first = pLib->cur_parse_entry;
1572 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1574 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1575 &pLib->InterfaceStat.mdm.Disc_Normal;
1577 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1579 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1580 &pLib->InterfaceStat.mdm.Disc_Unspecified;
1582 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1584 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1585 &pLib->InterfaceStat.mdm.Disc_Busy_Tone;
1587 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1589 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1590 &pLib->InterfaceStat.mdm.Disc_Congestion;
1592 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1594 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1595 &pLib->InterfaceStat.mdm.Disc_Carr_Wait;
1597 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1599 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1600 &pLib->InterfaceStat.mdm.Disc_Trn_Timeout;
1602 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1604 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1605 &pLib->InterfaceStat.mdm.Disc_Incompat;
1607 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1609 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1610 &pLib->InterfaceStat.mdm.Disc_Frame_Rej;
1612 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1614 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1615 &pLib->InterfaceStat.mdm.Disc_V42bis;
1617 pLib->mdm_statistic_parse_last = pLib->cur_parse_entry - 1;
1622 pLib->fax_statistic_parse_first = pLib->cur_parse_entry;
1624 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1626 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1627 &pLib->InterfaceStat.fax.Disc_Normal;
1629 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1631 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1632 &pLib->InterfaceStat.fax.Disc_Not_Ident;
1634 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1636 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1637 &pLib->InterfaceStat.fax.Disc_No_Response;
1639 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1641 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1642 &pLib->InterfaceStat.fax.Disc_Retries;
1644 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1646 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1647 &pLib->InterfaceStat.fax.Disc_Unexp_Msg;
1649 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1651 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1652 &pLib->InterfaceStat.fax.Disc_No_Polling;
1654 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1656 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1657 &pLib->InterfaceStat.fax.Disc_Training;
1659 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1661 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1662 &pLib->InterfaceStat.fax.Disc_Unexpected;
1664 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1666 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1667 &pLib->InterfaceStat.fax.Disc_Application;
1669 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1671 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1672 &pLib->InterfaceStat.fax.Disc_Incompat;
1674 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1676 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1677 &pLib->InterfaceStat.fax.Disc_No_Command;
1679 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1681 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1682 &pLib->InterfaceStat.fax.Disc_Long_Msg;
1684 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1686 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1687 &pLib->InterfaceStat.fax.Disc_Supervisor;
1689 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1691 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1692 &pLib->InterfaceStat.fax.Disc_SUB_SEP_PWD;
1694 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1696 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1697 &pLib->InterfaceStat.fax.Disc_Invalid_Msg;
1699 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1701 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1702 &pLib->InterfaceStat.fax.Disc_Page_Coding;
1704 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1706 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1707 &pLib->InterfaceStat.fax.Disc_App_Timeout;
1709 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1711 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1712 &pLib->InterfaceStat.fax.Disc_Unspecified;
1714 pLib->fax_statistic_parse_last = pLib->cur_parse_entry - 1;
1719 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1721 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1722 &pLib->InterfaceStat.b1.X_Frames;
1724 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1726 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1727 &pLib->InterfaceStat.b1.X_Bytes;
1729 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1731 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1732 &pLib->InterfaceStat.b1.X_Errors;
1734 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1736 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1737 &pLib->InterfaceStat.b1.R_Frames;
1739 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1741 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1742 &pLib->InterfaceStat.b1.R_Bytes;
1744 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1746 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1747 &pLib->InterfaceStat.b1.R_Errors;
1752 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1754 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1755 &pLib->InterfaceStat.b2.X_Frames;
1757 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1759 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1760 &pLib->InterfaceStat.b2.X_Bytes;
1762 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1764 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1765 &pLib->InterfaceStat.b2.X_Errors;
1767 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1769 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1770 &pLib->InterfaceStat.b2.R_Frames;
1772 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1774 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1775 &pLib->InterfaceStat.b2.R_Bytes;
1777 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1779 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1780 &pLib->InterfaceStat.b2.R_Errors;
1785 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1787 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1788 &pLib->InterfaceStat.d1.X_Frames;
1790 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1792 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1793 &pLib->InterfaceStat.d1.X_Bytes;
1795 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1797 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1798 &pLib->InterfaceStat.d1.X_Errors;
1800 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1802 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1803 &pLib->InterfaceStat.d1.R_Frames;
1805 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1807 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1808 &pLib->InterfaceStat.d1.R_Bytes;
1810 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1812 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1813 &pLib->InterfaceStat.d1.R_Errors;
1818 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1820 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1821 &pLib->InterfaceStat.d2.X_Frames;
1823 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1825 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1826 &pLib->InterfaceStat.d2.X_Bytes;
1828 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1830 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1831 &pLib->InterfaceStat.d2.X_Errors;
1833 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1835 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1836 &pLib->InterfaceStat.d2.R_Frames;
1838 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1840 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1841 &pLib->InterfaceStat.d2.R_Bytes;
1843 strcpy (pLib->parse_table[pLib->cur_parse_entry].path,
1845 pLib->parse_table[pLib->cur_parse_entry++].variable = \
1846 &pLib->InterfaceStat.d2.R_Errors;
1849 pLib->statistic_parse_last = pLib->cur_parse_entry - 1;
1852 static void diva_trace_error (diva_strace_context_t* pLib,
1854 if (pLib->user_proc_table.error_notify_proc) {
1855 (*(pLib->user_proc_table.error_notify_proc))(\
1856 pLib->user_proc_table.user_context,
1857 &pLib->instance, pLib->Adapter,
1865 static void diva_trace_notify_user (diva_strace_context_t* pLib,
1868 if (pLib->user_proc_table.notify_proc) {
1869 (*(pLib->user_proc_table.notify_proc))(pLib->user_proc_table.user_context,
1870 &pLib->instance,
1871 pLib->Adapter,
1872 &pLib->lines[Channel],
2019 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2021 if ((Channel < 1) || (Channel > pLib->Channels)) {
2027 pLib->audio_tap_mask |= (1L << Channel);
2029 pLib->audio_tap_mask &= ~(1L << Channel);
2036 if (pLib->audio_tap_mask) {
2037 pLib->trace_event_mask |= TM_M_DATA;
2039 pLib->trace_event_mask &= ~TM_M_DATA;
2042 return (ScheduleNextTraceRequest (pLib));
2046 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2048 if ((Channel < 1) || (Channel > pLib->Channels)) {
2054 pLib->bchannel_trace_mask |= (1L << Channel);
2056 pLib->bchannel_trace_mask &= ~(1L << Channel);
2059 return (ScheduleNextTraceRequest (pLib));
2063 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2066 pLib->trace_event_mask |= (TM_D_CHAN | TM_C_COMM | TM_DL_ERR | TM_LAYER1);
2068 pLib->trace_event_mask &= ~(TM_D_CHAN | TM_C_COMM | TM_DL_ERR | TM_LAYER1);
2071 return (ScheduleNextTraceRequest (pLib));
2075 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2078 pLib->trace_event_mask |= TM_STRING;
2080 pLib->trace_event_mask &= ~TM_STRING;
2083 return (ScheduleNextTraceRequest (pLib));
2087 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2089 if ((Channel < 1) || (Channel > pLib->Channels)) {
2094 pLib->clear_call_command |= (1L << Channel);
2096 return (ScheduleNextTraceRequest (pLib));
2102 static int diva_ifc_statistics (diva_strace_context_t* pLib,
2107 for (i = pLib->statistic_parse_first; i <= pLib->statistic_parse_last; i++) {
2108 if ((cur = find_var (pVar, pLib->parse_table[i].path))) {
2109 if (diva_trace_read_variable (cur, pLib->parse_table[i].variable)) {
2110 diva_trace_error (pLib, -3 , __FILE__, __LINE__);
2114 if ((i >= pLib->mdm_statistic_parse_first) && (i <= pLib->mdm_statistic_parse_last)) {
2117 if ((i >= pLib->fax_statistic_parse_first) && (i <= pLib->fax_statistic_parse_last)) {
2129 diva_trace_notify_user (pLib, 0, DIVA_SUPER_TRACE_NOTIFY_MDM_STAT_CHANGE);
2131 diva_trace_notify_user (pLib, 0, DIVA_SUPER_TRACE_NOTIFY_FAX_STAT_CHANGE);
2133 diva_trace_notify_user (pLib, 0, DIVA_SUPER_TRACE_NOTIFY_STAT_CHANGE);
2140 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2141 pLib->outgoing_ifc_stats = 1;
2142 return (ScheduleNextTraceRequest (pLib));
2146 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2147 pLib->incoming_ifc_stats = 1;
2148 return (ScheduleNextTraceRequest (pLib));
2152 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2153 pLib->modem_ifc_stats = 1;
2154 return (ScheduleNextTraceRequest (pLib));
2158 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2159 pLib->fax_ifc_stats = 1;
2160 return (ScheduleNextTraceRequest (pLib));
2164 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2165 pLib->b1_ifc_stats = 1;
2166 return (ScheduleNextTraceRequest (pLib));
2170 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2171 pLib->b2_ifc_stats = 1;
2172 return (ScheduleNextTraceRequest (pLib));
2176 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2177 pLib->d1_ifc_stats = 1;
2178 return (ScheduleNextTraceRequest (pLib));
2182 diva_strace_context_t* pLib = (diva_strace_context_t*)hLib;
2183 pLib->d2_ifc_stats = 1;
2184 return (ScheduleNextTraceRequest (pLib));