int BIOP_ModuleInfo (int v, u_char *b, u_int len_org) { int len = len_org; int n1, i; // -- due to some misbehavior of some service providers // -- we do a simple plausi check for tap_counts_min_bytes > len i = getBits (b, 0, 96, 8); // tap_counts i = i * 7; if (i > len_org) { // this is no ModuleInfo print_databytes (v,"Data Bytes (non-standard):", b, len_org); return len_org; } out_nl (v, "BIOP::ModuleInfo:"); indent (+1); outBit_S2Tx_NL (v,"ModuleTimeOut: ", b, 0, 32, "(ms)"); outBit_S2Tx_NL (v,"BlockTimeOut: ", b, 32, 32, "(ms)"); outBit_S2Tx_NL (v,"MinBlockTime: ", b, 64, 32, "(ms)"); n1 = outBit_Sx_NL (v,"taps_count: ", b, 96, 8); b += 13, len -= 13; indent (+1); while (n1-- > 0) { int n2; // BIOP_OBJECT_USE n2 = BIOP_TAP (v, "DSM", b); b += n2; len -= n2; } indent (-1); out_NL (v); n1 = outBit_Sx_NL (v,"userInfoLength: ", b, 0, 8); // print_databytes (v,"UserInfoData:", b, n1); dsmcc_CarouselDescriptor_Loop ("userInfo", b+1, n1); b += 1+n1; len -= 1+n1; indent (-1); return len_org; }
void descriptorMHP_AIT_DII_location (u_char *b) { int len; // descriptor_tag = b[0]; len = b[1]; outBit_Sx_NL (4,"transport_protcol_label: ", b+2, 0, 8); b += 3; len --; indent(+1); while (len > 0) { out_NL (4); outBit_Sx_NL (4,"reserved: ", b, 0, 1); outBit_S2Tx_NL (4,"DII_identification: ", b, 1, 15, "refers to identification in transaction_id"); outBit_Sx_NL (4,"association_tag: ", b, 16, 16); b += 4; len -= 4; } indent(-1); }
void descriptor_PRIVATE_PremiereDE_ContentTransmission (u_char *b) { int len, str_tim_len; u_int time_MJD, time_UTC; // tag = b[0]; len = b[1]; out_nl (4,"--> Premiere Content Transmission descriptor "); outBit_Sx_NL (4,"transport_stream_ID: ", b, 16, 16); outBit_S2x_NL (4,"original_network_id: ", b, 32, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_S2Tx_NL(4,"service_ID: ", b, 48, 16, " --> refers to PMT program_number"); b += 8; len -= 6; out_NL(4); while (len>0) { out (4,"Start_date: "); time_MJD = getBits (b, 0, 0, 16); print_time_mjd (4, time_MJD); out_NL (4); str_tim_len = outBit_Sx_NL (5,"start_time_loop_length: ", b, 16, 8); b += 3; len -= 3; indent (+1); for(; str_tim_len>0; str_tim_len-=3) { out (4,"Start_time: "); time_UTC = getBits (b, 0, 0, 24); print_time_utc (4, time_UTC); out_NL (4); b += 3; len -= 3; } out_NL (4); indent (-1); } }
int BIOP_TAP (int v, const char *str, u_char *b) { u_char *b_org = b; int use; int n; out_nl (v, "%s::TAP:"); indent (+1); outBit_Sx_NL (v,"id: ", b, 0, 16); use = outBit_S2x_NL(v,"use: ", b, 16, 16, (char *(*)(u_long))dsmccStrBIOP_TAP_Use ); outBit_Sx_NL (v,"association_tag: ", b, 32, 16); n = outBit_Sx_NL (v,"selector_length: ", b, 48, 8); b += 7; // -- a TAP may have a Selector() if (n >= 2) { int stype; stype = outBit_S2x_NL(v,"selector_type: ", b, 0, 16, (char *(*)(u_long))dsmccStrBIOP_TAP_SelectorType ); indent (+1); switch (stype) { case 0x0001: // MessageSelector dsmcc_print_transactionID_32 (v, b+2); outBit_S2Tx_NL (v,"timeout: ", b, 48, 32, "usec."); break; case 0x0109: // ATSC A95: TSFS_selector outBit_Sx_NL (v,"carouselId: ", b, 16, 32); outBit_S2Tx_NL (v,"DSI_timeout: ", b, 48, 32, "usec."); if (n > 10) { print_databytes (v,"URI_byte:", b+10, n-10); } break; case 0x0000: // ISO/IEC reserved default: // unknown, default print_databytes (v,"selector_data:", b+2, n-2); break; } indent (-1); } else { if (n > 0) { print_databytes (v,"selector_data:", b, n); } } b += n; indent (-1); out_NL (v); return (int) (b - b_org); }
void section_PRIVATE_PremiereDE_CPT (u_char *b, int len) { u_int table_id; u_int section_syntax_indicator; u_int section_length; u_int time_MJD, time_UTC; u_int i, content_list_length; out_nl (3,"User_Defined-decoding...."); table_id = outBit_S2Tx_NL (3,"Table_ID: ", b, 0, 8, "Premiere Content Presentation Table"); if (table_id != 0xa1) { out_nl (3,"wrong Table ID"); return; } section_syntax_indicator = outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); // == 1 outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); outBit_Sx_NL (6,"reserved: ", b,10, 2); section_length = outBit_Sx_NL (5,"private_section_length: ", b,12,12); outBit_Sx_NL (3,"table_id_extension: ", b, 24,16); outBit_Sx_NL (6,"reserved: ", b, 40, 2); outBit_Sx_NL (3,"Version_number: ", b, 42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b, 47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b, 48, 8); outBit_Sx_NL (3,"Last_section_number: ", b, 56, 8); b += 8; section_length -= 5; // // -- Premiere Content Presentation Table CIT // -- provided by Peter.Pavlov (Premiere.de) // outBit_Sx_NL (4,"Transport_stream_ID: ",b, 0, 16); outBit_Sx_NL (4,"Original_network_ID: ",b, 16, 16); outBit_Sx_NL (4,"virtual_channel_id: ",b, 32, 32); outBit_Sx_NL (4,"virtual_channel_name_length: ",b, 64, 8); b+=8; print_text_468A (4, "virtual_channel_name: ", b+1, *b); section_length -= 9+*b; b += *b+1; outBit_Sx_NL (4,"reserved: ",b, 0, 4); outBit_Sx_NL (4,"virtual_channel_info_length: ",b, 4, 12); b+=2; section_length -= 2; while (section_length > 4) { time_MJD = getBits (b, 0, 0, 16); time_UTC = getBits (b, 0, 16, 24); out (4,"start_time: "); print_time40 (4, time_MJD, time_UTC); out_NL (4); out_nl (4,"duration: %02x:%02x:%02x", *(b+5), *(b+6), *(b+7)); b+=8; outBit_Sx_NL (4,"virtual_event_name_length: ",b, 0, 8); print_text_468A (4, "virtual_event_name: ", b+1, *b); section_length -= *b+9; b += *b+1; outBit_Sx_NL (4,"virtual_event_info_length: ",b, 0, 8); print_text_468A (4, "virtual_event_info: ", b+1, *b); section_length -= *b+1; b += *b+1; outBit_Sx_NL (4,"reserved: ",b, 0, 4); outBit_Sx_NL (4,"content_list_length: ",b, 4, 12); content_list_length = ((b[0]&15)<<8)+b[1]; for(i=0, b+=2; i<content_list_length; i+=4, b+=4) { outBit_Sx_NL (4,"content_id: ",b, 0, 32); } section_length -= content_list_length+2; } outBit_Sx_NL (5,"CRC: ", b, 0, 32); }
void section_PRIVATE_PremiereDE_CIT (u_char *b, int len) { u_int table_id; u_int section_syntax_indicator; u_int section_length; out_nl (3,"User_Defined-decoding...."); table_id = outBit_S2Tx_NL (3,"Table_ID: ", b, 0, 8, "Premiere Content Information Table"); if (table_id != 0xa0) { out_nl (3,"wrong Table ID"); return; } section_syntax_indicator = outBit_Sx_NL (3,"Section_syntax_indicator: ", b, 8, 1); // ==1 outBit_Sx_NL (3,"private_indicator: ", b, 9, 1); outBit_Sx_NL (6,"reserved: ", b,10, 2); section_length = outBit_Sx_NL (5,"private_section_length: ", b,12,12); outBit_Sx_NL (3,"table_id_extension: ", b, 24,16); outBit_Sx_NL (6,"reserved: ", b, 40, 2); outBit_Sx_NL (3,"Version_number: ", b, 42, 5); outBit_S2x_NL(3,"Current_next_indicator: ", b, 47, 1, (char *(*)(u_long))dvbstrCurrentNextIndicator ); outBit_Sx_NL (3,"Section_number: ", b, 48, 8); outBit_Sx_NL (3,"Last_section_number: ", b, 56, 8); b += 8; section_length -= 5; // // -- Premiere Content Information Table CIT // -- provided by Peter.Pavlov (Premiere.de) // out_NL (3); outBit_Sx_NL (3,"Content id: ", b, 0, 32); outBit_Sx_NL (3,"Duration: ", b, 32,24); outBit_Sx_NL (3,"Reserved: ", b, 56, 4); outBit_Sx_NL (5,"descriptor_section_length: ", b, 60,12); b += 9; section_length -=9; while (section_length > 4 ) { int x; x = descriptor (b, DVB_SI); if (section_length < x) break; b += x; section_length -= x; } outBit_Sx_NL (5,"CRC: ", b, 0, 32); }
void descriptorMHP_AIT_transport_protocol (u_char *b) { int len; int p_id; // descriptor_tag = b[0]; len = b[1]; p_id = outBit_S2x_NL (4,"protocol_id: ", b, 16, 16, (char *(*)(u_long)) dsmccStrMHP_protocol_id); outBit_Sx_NL (4,"transport_protocol_label: ", b, 32, 8); b += 5; len -= 3; // -- 0x0001 = Transport via OC // -- 0x0002 = Transport via IP // -- 0x0003 = Transport via interaction channel if (p_id == 0x0001 || p_id == 0x0002) { int remote_conn; remote_conn = outBit_Sx_NL (4,"remote_connection: ", b, 0, 1); outBit_Sx_NL (6,"reserved: ", b, 1, 7); b++; len--; if (remote_conn == 0x01) { // $$$ TODO reminder: this code part is used several time outBit_S2x_NL (4,"Original_network_id: ", b, 0, 16, (char *(*)(u_long)) dvbstrOriginalNetwork_ID); outBit_Sx_NL (4,"transport_stream_ID: ", b, 16, 16); outBit_S2Tx_NL(4,"service_ID: ", b, 32, 16, " --> refers to PMT program_number"); b += 6; len -= 6; } if (p_id == 0x0001) { // -- Transport via OC outBit_Sx_NL (4,"component_tag: ", b, 0, 8); b++; len--; } else { // -- Transport via IP outBit_Sx_NL (4,"alignment_indicator: ", b, 0, 1); outBit_Sx_NL (6,"reserved: ", b, 1, 7); b++; len--; while (len > 0) { int len2; out_NL (4); len2 = outBit_Sx_NL (4,"URL_length: ", b, 0, 8); print_text_UTF8 (4, "URL: ", b+1, len2); b += 1+len2; len -= 1+len2; } } } if (p_id == 0x0003) { int len2; out_NL (4); len2 = outBit_Sx_NL (4,"URL_base_length: ", b, 0, 8); print_text_UTF8 (4, "URL_base: ", b+1, len2); b += 1+len2; len -= 1+len2; while (len > 0) { int len2; out_NL (4); len2 = outBit_Sx_NL (4,"URL_extension_length: ", b, 0, 8); print_text_UTF8 (4, "URL_extension: ", b+1, len2); b += 1+len2; len -= 1+len2; } } else { // -- all other print_databytes(4,"selector_bytes:", b, len); } }