#include "isdn_lib_intern.h"#include "isdn_lib.h"#include "ie.c"Include dependency graph for isdn_msg_parser.c:

Go to the source code of this file.
Defines | |
| #define | ANY_CHANNEL 0xff |
| #define | msgs_max (sizeof(msgs_g)/sizeof(struct isdn_msg)) |
Functions | |
| static msg_t * | build_alerting (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_connect (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_connect_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_disconnect (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_facility (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_hold (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_hold_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_hold_reject (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_information (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_notify (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_proceeding (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_progress (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_release (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_release_complete (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_restart (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_resume (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_resume_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_resume_reject (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_retrieve (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_retrieve_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_retrieve_reject (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_setup (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_setup_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_status (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_status_enquiry (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_suspend (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_suspend_acknowledge (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_suspend_reject (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_timeout (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| static msg_t * | build_user_information (struct isdn_msg msgs[], struct misdn_bchannel *bc, int nt) |
| char * | isdn_get_info (struct isdn_msg msgs[], enum event_e event, int nt) |
| msg_t * | isdn_msg_build_event (struct isdn_msg msgs[], struct misdn_bchannel *bc, enum event_e event, int nt) |
| enum event_e | isdn_msg_get_event (struct isdn_msg msgs[], msg_t *msg, int nt) |
| int | isdn_msg_get_index (struct isdn_msg msgs[], msg_t *msg, int nt) |
| int | isdn_msg_get_index_by_event (struct isdn_msg msgs[], enum event_e event, int nt) |
| char * | isdn_msg_get_info (struct isdn_msg msgs[], msg_t *msg, int nt) |
| int | isdn_msg_parse_event (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_alerting (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_connect (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_connect_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_disconnect (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_facility (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_hold (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_hold_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_hold_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_information (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_notify (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_proceeding (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_progress (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_release (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_release_complete (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_restart (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_resume (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_resume_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_resume_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_retrieve (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_retrieve_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_retrieve_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_setup (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_setup_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_status (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_status_enquiry (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_suspend (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_suspend_acknowledge (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_suspend_reject (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_timeout (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | parse_user_information (struct isdn_msg msgs[], msg_t *msg, struct misdn_bchannel *bc, int nt) |
| static void | set_channel (struct misdn_bchannel *bc, int channel) |
Variables | |
| char | EVENT_BCHAN_ACTIVATED_INFO [] = "BCHAN_ACTIVATED" |
| char | EVENT_BCHAN_DATA_INFO [] = "BCHAN_DATA" |
| char | EVENT_BCHAN_ERROR_INFO [] = "BCHAN_ERROR" |
| char | EVENT_CLEAN_INFO [] = "CLEAN_UP" |
| char | EVENT_DTMF_TONE_INFO [] = "DTMF_TONE" |
| char | EVENT_NEW_BC_INFO [] = "NEW_BC" |
| char | EVENT_NEW_CHANNEL_INFO [] = "NEW_CHANNEL" |
| char | EVENT_NEW_L3ID_INFO [] = "NEW_L3ID" |
| char | EVENT_PORT_ALARM_INFO [] = "ALARM" |
| char | EVENT_TONE_GENERATE_INFO [] = "TONE_GENERATE" |
| isdn_msg | msgs_g [] |
| #define ANY_CHANNEL 0xff |
Definition at line 1252 of file isdn_msg_parser.c.
Referenced by isdn_msg_get_index(), and isdn_msg_get_index_by_event().
| static msg_t* build_alerting | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 107 of file isdn_msg_parser.c.
References misdn_stack::bc, misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), enc_ie_progress(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00108 { 00109 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00110 ALERTING_t *alerting; 00111 msg_t *msg =(msg_t*)create_l3msg(CC_ALERTING | REQUEST, MT_ALERTING, bc?bc->l3_id:-1, sizeof(ALERTING_t) ,nt); 00112 00113 alerting=(ALERTING_t*)((msg->data+HEADER_LEN)); 00114 00115 enc_ie_channel_id(&alerting->CHANNEL_ID, msg, 1,bc->channel, nt,bc); 00116 00117 if (nt) 00118 enc_ie_progress(&alerting->PROGRESS, msg, 0, nt?1:5, 8, nt,bc); 00119 #if DEBUG 00120 printf("Building ALERTING Msg\n"); 00121 #endif 00122 return msg; 00123 }
| static msg_t* build_connect | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 381 of file isdn_msg_parser.c.
References misdn_stack::bc, misdn_bchannel::cad, cb_log, misdn_bchannel::cpnnumplan, create_l3msg(), enc_ie_connected_pn(), enc_ie_date(), HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, misdn_bchannel::port, and type.
00382 { 00383 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00384 CONNECT_t *connect; 00385 msg_t *msg =(msg_t*)create_l3msg(CC_CONNECT | REQUEST, MT_CONNECT, bc?bc->l3_id:-1, sizeof(CONNECT_t) ,nt); 00386 00387 cb_log(6,bc->port,"BUILD_CONNECT: bc:%p bc->l3id:%d, nt:%d\n",bc,bc->l3_id,nt); 00388 00389 connect=(CONNECT_t*)((msg->data+HEADER_LEN)); 00390 00391 if (nt) { 00392 time_t now; 00393 time(&now); 00394 enc_ie_date(&connect->DATE, msg, now, nt,bc); 00395 } 00396 00397 { 00398 int type=bc->cpnnumplan, plan=1, present=2, screen=0; 00399 enc_ie_connected_pn(&connect->CONNECT_PN, msg, type,plan, present, screen, bc->cad, nt , bc); 00400 } 00401 00402 #if DEBUG 00403 printf("Building CONNECT Msg\n"); 00404 #endif 00405 return msg; 00406 }
| static msg_t* build_connect_acknowledge | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 457 of file isdn_msg_parser.c.
References misdn_stack::bc, misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00458 { 00459 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00460 CONNECT_ACKNOWLEDGE_t *connect_acknowledge; 00461 msg_t *msg =(msg_t*)create_l3msg(CC_CONNECT | RESPONSE, MT_CONNECT, bc?bc->l3_id:-1, sizeof(CONNECT_ACKNOWLEDGE_t) ,nt); 00462 00463 connect_acknowledge=(CONNECT_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN)); 00464 00465 enc_ie_channel_id(&connect_acknowledge->CHANNEL_ID, msg, 1, bc->channel, nt,bc); 00466 00467 #if DEBUG 00468 printf("Building CONNECT_ACKNOWLEDGE Msg\n"); 00469 #endif 00470 return msg; 00471 }
| static msg_t* build_disconnect | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 790 of file isdn_msg_parser.c.
References misdn_stack::bc, cb_log, create_l3msg(), enc_ie_cause(), enc_ie_progress(), enc_ie_useruser(), HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, misdn_bchannel::out_cause, misdn_bchannel::port, misdn_bchannel::uu, and misdn_bchannel::uulen.
00791 { 00792 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00793 DISCONNECT_t *disconnect; 00794 msg_t *msg =(msg_t*)create_l3msg(CC_DISCONNECT | REQUEST, MT_DISCONNECT, bc?bc->l3_id:-1, sizeof(DISCONNECT_t) ,nt); 00795 00796 disconnect=(DISCONNECT_t*)((msg->data+HEADER_LEN)); 00797 00798 enc_ie_cause(&disconnect->CAUSE, msg, (nt)?1:0, bc->out_cause,nt,bc); 00799 if (nt) enc_ie_progress(&disconnect->PROGRESS, msg, 0, nt?1:5, 8 ,nt,bc); 00800 00801 if (bc->uulen) { 00802 int protocol=4; 00803 enc_ie_useruser(&disconnect->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc); 00804 cb_log(1,bc->port,"ENCODING USERUESRINFO:%s\n",bc->uu); 00805 } 00806 00807 #if DEBUG 00808 printf("Building DISCONNECT Msg\n"); 00809 #endif 00810 return msg; 00811 }
| static msg_t* build_facility | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 978 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), misdn_bchannel::display, enc_ie_display(), misdn_bchannel::fac_out, HEADER_LEN, misdn_bchannel::l3_id, len, mISDNUSER_HEAD_SIZE, and misdn_bchannel::nt.
00979 { 00980 int len, 00981 HEADER_LEN = nt ? mISDNUSER_HEAD_SIZE : mISDN_HEADER_LEN; 00982 unsigned char *ie_fac, 00983 fac_tmp[256]; 00984 msg_t *msg =(msg_t*)create_l3msg(CC_FACILITY | REQUEST, MT_FACILITY, bc?bc->l3_id:-1, sizeof(FACILITY_t) ,nt); 00985 FACILITY_t *facility = (FACILITY_t*)(msg->data+HEADER_LEN); 00986 Q931_info_t *qi; 00987 00988 #if DEBUG 00989 printf("Building FACILITY Msg\n"); 00990 #endif 00991 00992 len = encodeFac(fac_tmp, &(bc->fac_out)); 00993 if (len <= 0) 00994 return NULL; 00995 00996 ie_fac = msg_put(msg, len); 00997 if (bc->nt) { 00998 facility->FACILITY = ie_fac + 1; 00999 } else { 01000 qi = (Q931_info_t *)(msg->data + mISDN_HEADER_LEN); 01001 qi->QI_ELEMENT(facility) = ie_fac - (unsigned char *)qi - sizeof(Q931_info_t); 01002 } 01003 01004 memcpy(ie_fac, fac_tmp, len); 01005 01006 if (*bc->display) { 01007 printf("Sending %s as Display\n", bc->display); 01008 enc_ie_display(&facility->DISPLAY, msg, bc->display, nt,bc); 01009 } 01010 01011 return msg; 01012 }
| static msg_t* build_hold | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 551 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00552 { 00553 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00554 HOLD_t *hold; 00555 msg_t *msg =(msg_t*)create_l3msg(CC_HOLD | REQUEST, MT_HOLD, bc?bc->l3_id:-1, sizeof(HOLD_t) ,nt); 00556 00557 hold=(HOLD_t*)((msg->data+HEADER_LEN)); 00558 00559 #if DEBUG 00560 printf("Building HOLD Msg\n"); 00561 #endif 00562 return msg; 00563 }
| static msg_t* build_hold_acknowledge | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 620 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00621 { 00622 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00623 HOLD_ACKNOWLEDGE_t *hold_acknowledge; 00624 msg_t *msg =(msg_t*)create_l3msg(CC_HOLD_ACKNOWLEDGE | REQUEST, MT_HOLD_ACKNOWLEDGE, bc?bc->l3_id:-1, sizeof(HOLD_ACKNOWLEDGE_t) ,nt); 00625 00626 hold_acknowledge=(HOLD_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN)); 00627 00628 #if DEBUG 00629 printf("Building HOLD_ACKNOWLEDGE Msg\n"); 00630 #endif 00631 return msg; 00632 }
| static msg_t* build_hold_reject | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 689 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00690 { 00691 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00692 HOLD_REJECT_t *hold_reject; 00693 msg_t *msg =(msg_t*)create_l3msg(CC_HOLD_REJECT | REQUEST, MT_HOLD_REJECT, bc?bc->l3_id:-1, sizeof(HOLD_REJECT_t) ,nt); 00694 00695 hold_reject=(HOLD_REJECT_t*)((msg->data+HEADER_LEN)); 00696 00697 #if DEBUG 00698 printf("Building HOLD_REJECT Msg\n"); 00699 #endif 00700 return msg; 00701 }
| static msg_t* build_information | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 1074 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), misdn_bchannel::display, enc_ie_called_pn(), enc_ie_display(), HEADER_LEN, misdn_bchannel::info_dad, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
01075 { 01076 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 01077 INFORMATION_t *information; 01078 msg_t *msg =(msg_t*)create_l3msg(CC_INFORMATION | REQUEST, MT_INFORMATION, bc?bc->l3_id:-1, sizeof(INFORMATION_t) ,nt); 01079 01080 information=(INFORMATION_t*)((msg->data+HEADER_LEN)); 01081 01082 { 01083 enc_ie_called_pn(&information->CALLED_PN, msg, 0, 1, bc->info_dad, nt,bc); 01084 } 01085 01086 { 01087 if (*bc->display) { 01088 printf("Sending %s as Display\n", bc->display); 01089 enc_ie_display(&information->DISPLAY, msg, bc->display, nt,bc); 01090 } 01091 } 01092 01093 #if DEBUG 01094 printf("Building INFORMATION Msg\n"); 01095 #endif 01096 return msg; 01097 }
| static msg_t* build_notify | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 1021 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
01022 { 01023 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 01024 NOTIFY_t *notify; 01025 msg_t *msg =(msg_t*)create_l3msg(CC_NOTIFY | REQUEST, MT_NOTIFY, bc?bc->l3_id:-1, sizeof(NOTIFY_t) ,nt); 01026 01027 notify=(NOTIFY_t*)((msg->data+HEADER_LEN)); 01028 01029 #if DEBUG 01030 printf("Building NOTIFY Msg\n"); 01031 #endif 01032 return msg; 01033 }
| static msg_t* build_proceeding | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 72 of file isdn_msg_parser.c.
References misdn_stack::bc, misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), enc_ie_progress(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00073 { 00074 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00075 CALL_PROCEEDING_t *proceeding; 00076 msg_t *msg =(msg_t*)create_l3msg(CC_PROCEEDING | REQUEST, MT_CALL_PROCEEDING, bc?bc->l3_id:-1, sizeof(CALL_PROCEEDING_t) ,nt); 00077 00078 proceeding=(CALL_PROCEEDING_t*)((msg->data+HEADER_LEN)); 00079 00080 enc_ie_channel_id(&proceeding->CHANNEL_ID, msg, 1,bc->channel, nt,bc); 00081 00082 if (nt) 00083 enc_ie_progress(&proceeding->PROGRESS, msg, 0, nt?1:5, 8, nt,bc); 00084 00085 00086 #if DEBUG 00087 printf("Building PROCEEDING Msg\n"); 00088 #endif 00089 return msg; 00090 }
| static msg_t* build_progress | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 139 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00140 { 00141 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00142 PROGRESS_t *progress; 00143 msg_t *msg =(msg_t*)create_l3msg(CC_PROGRESS | REQUEST, MT_PROGRESS, bc?bc->l3_id:-1, sizeof(PROGRESS_t) ,nt); 00144 00145 progress=(PROGRESS_t*)((msg->data+HEADER_LEN)); 00146 00147 #if DEBUG 00148 printf("Building PROGRESS Msg\n"); 00149 #endif 00150 return msg; 00151 }
| static msg_t* build_release | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 872 of file isdn_msg_parser.c.
References misdn_stack::bc, cb_log, create_l3msg(), enc_ie_cause(), enc_ie_useruser(), HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, misdn_bchannel::out_cause, misdn_bchannel::port, misdn_bchannel::uu, and misdn_bchannel::uulen.
00873 { 00874 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00875 RELEASE_t *release; 00876 msg_t *msg =(msg_t*)create_l3msg(CC_RELEASE | REQUEST, MT_RELEASE, bc?bc->l3_id:-1, sizeof(RELEASE_t) ,nt); 00877 00878 release=(RELEASE_t*)((msg->data+HEADER_LEN)); 00879 00880 if (bc->out_cause>= 0) 00881 enc_ie_cause(&release->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc); 00882 00883 if (bc->uulen) { 00884 int protocol=4; 00885 enc_ie_useruser(&release->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc); 00886 cb_log(1,bc->port,"ENCODING USERUESRINFO:%s\n",bc->uu); 00887 } 00888 00889 #if DEBUG 00890 printf("Building RELEASE Msg\n"); 00891 #endif 00892 return msg; 00893 }
| static msg_t* build_release_complete | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 929 of file isdn_msg_parser.c.
References misdn_stack::bc, cb_log, create_l3msg(), enc_ie_cause(), enc_ie_useruser(), HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, misdn_bchannel::out_cause, misdn_bchannel::port, misdn_bchannel::uu, and misdn_bchannel::uulen.
00930 { 00931 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00932 RELEASE_COMPLETE_t *release_complete; 00933 msg_t *msg =(msg_t*)create_l3msg(CC_RELEASE_COMPLETE | REQUEST, MT_RELEASE_COMPLETE, bc?bc->l3_id:-1, sizeof(RELEASE_COMPLETE_t) ,nt); 00934 00935 release_complete=(RELEASE_COMPLETE_t*)((msg->data+HEADER_LEN)); 00936 00937 enc_ie_cause(&release_complete->CAUSE, msg, nt?1:0, bc->out_cause, nt,bc); 00938 00939 if (bc->uulen) { 00940 int protocol=4; 00941 enc_ie_useruser(&release_complete->USER_USER, msg, protocol, bc->uu, bc->uulen, nt,bc); 00942 cb_log(1,bc->port,"ENCODING USERUESRINFO:%s\n",bc->uu); 00943 } 00944 00945 #if DEBUG 00946 printf("Building RELEASE_COMPLETE Msg\n"); 00947 #endif 00948 return msg; 00949 }
| static msg_t* build_restart | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 832 of file isdn_msg_parser.c.
References misdn_stack::bc, cb_log, misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), enc_ie_restart_ind(), HEADER_LEN, misdn_bchannel::l3_id, mISDNUSER_HEAD_SIZE, and misdn_bchannel::port.
00833 { 00834 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00835 RESTART_t *restart; 00836 msg_t *msg =(msg_t*)create_l3msg(CC_RESTART | REQUEST, MT_RESTART, bc?bc->l3_id:-1, sizeof(RESTART_t) ,nt); 00837 00838 restart=(RESTART_t*)((msg->data+HEADER_LEN)); 00839 00840 #if DEBUG 00841 printf("Building RESTART Msg\n"); 00842 #endif 00843 00844 if (bc->channel > 0) { 00845 enc_ie_channel_id(&restart->CHANNEL_ID, msg, 1,bc->channel, nt,bc); 00846 enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x80, nt, bc); 00847 } else { 00848 enc_ie_restart_ind(&restart->RESTART_IND, msg, 0x87, nt, bc); 00849 } 00850 00851 cb_log(0,bc->port, "Restarting channel %d\n", bc->channel); 00852 00853 return msg; 00854 }
| static msg_t* build_resume | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 597 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00598 { 00599 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00600 RESUME_t *resume; 00601 msg_t *msg =(msg_t*)create_l3msg(CC_RESUME | REQUEST, MT_RESUME, bc?bc->l3_id:-1, sizeof(RESUME_t) ,nt); 00602 00603 resume=(RESUME_t*)((msg->data+HEADER_LEN)); 00604 00605 #if DEBUG 00606 printf("Building RESUME Msg\n"); 00607 #endif 00608 return msg; 00609 }
| static msg_t* build_resume_acknowledge | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 666 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00667 { 00668 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00669 RESUME_ACKNOWLEDGE_t *resume_acknowledge; 00670 msg_t *msg =(msg_t*)create_l3msg(CC_RESUME_ACKNOWLEDGE | REQUEST, MT_RESUME_ACKNOWLEDGE, bc?bc->l3_id:-1, sizeof(RESUME_ACKNOWLEDGE_t) ,nt); 00671 00672 resume_acknowledge=(RESUME_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN)); 00673 00674 #if DEBUG 00675 printf("Building RESUME_ACKNOWLEDGE Msg\n"); 00676 #endif 00677 return msg; 00678 }
| static msg_t* build_resume_reject | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 528 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00529 { 00530 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00531 RESUME_REJECT_t *resume_reject; 00532 msg_t *msg =(msg_t*)create_l3msg(CC_RESUME_REJECT | REQUEST, MT_RESUME_REJECT, bc?bc->l3_id:-1, sizeof(RESUME_REJECT_t) ,nt); 00533 00534 resume_reject=(RESUME_REJECT_t*)((msg->data+HEADER_LEN)); 00535 00536 #if DEBUG 00537 printf("Building RESUME_REJECT Msg\n"); 00538 #endif 00539 return msg; 00540 }
| static msg_t* build_retrieve | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 712 of file isdn_msg_parser.c.
References misdn_stack::bc, create_l3msg(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00713 { 00714 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00715 RETRIEVE_t *retrieve; 00716 msg_t *msg =(msg_t*)create_l3msg(CC_RETRIEVE | REQUEST, MT_RETRIEVE, bc?bc->l3_id:-1, sizeof(RETRIEVE_t) ,nt); 00717 00718 retrieve=(RETRIEVE_t*)((msg->data+HEADER_LEN)); 00719 00720 #if DEBUG 00721 printf("Building RETRIEVE Msg\n"); 00722 #endif 00723 return msg; 00724 }
| static msg_t* build_retrieve_acknowledge | ( | struct isdn_msg | msgs[], | |
| struct misdn_bchannel * | bc, | |||
| int | nt | |||
| ) | [static] |
Definition at line 735 of file isdn_msg_parser.c.
References misdn_stack::bc, misdn_bchannel::channel, create_l3msg(), enc_ie_channel_id(), HEADER_LEN, misdn_bchannel::l3_id, and mISDNUSER_HEAD_SIZE.
00736 { 00737 int HEADER_LEN = nt?mISDNUSER_HEAD_SIZE:mISDN_HEADER_LEN; 00738 RETRIEVE_ACKNOWLEDGE_t *retrieve_acknowledge; 00739 msg_t *msg =(msg_t*)create_l3msg(CC_RETRIEVE_ACKNOWLEDGE | REQUEST, MT_RETRIEVE_ACKNOWLEDGE, bc?bc->l3_id:-1, sizeof(RETRIEVE_ACKNOWLEDGE_t) ,nt); 00740 00741 retrieve_acknowledge=(RETRIEVE_ACKNOWLEDGE_t*)((msg->data+HEADER_LEN)); 00742 00743 enc_ie_channel_id(&retrieve_acknowledge->CHANNEL_ID, msg, 1, bc->channel, nt,bc); 00744 #if DEBUG 00745 printf("Building RETRIEVE_ACKNOWLEDGE Msg\n"); 00746 #endif 00747 return msg; 00748 }
| static msg_t* build_retrieve_reject | ( | struct isdn_msg | < |