forked from osmocom/wireshark
Make several functions static; remove trailing commas and white space.
svn path=/trunk/; revision=41606
This commit is contained in:
parent
255c803c61
commit
0c8b0a9f3d
|
@ -50,14 +50,14 @@ static gint ett_mpeg_ca = -1;
|
|||
#define MPEG_CA_CURRENT_NEXT_INDICATOR_MASK 0x000001
|
||||
|
||||
static const value_string mpeg_ca_cur_next_vals[] = {
|
||||
|
||||
|
||||
{ 0x0, "Not yet applicable" },
|
||||
{ 0x1, "Currently applicable" },
|
||||
{ 0x0, NULL },
|
||||
{ 0x0, NULL }
|
||||
|
||||
};
|
||||
|
||||
void
|
||||
static void
|
||||
dissect_mpeg_ca(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
|
||||
|
@ -80,7 +80,7 @@ dissect_mpeg_ca(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
offset += packet_mpeg_sect_header(tvb, offset, mpeg_ca_tree, &length, NULL);
|
||||
length -= 4;
|
||||
|
||||
|
||||
proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_reserved, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_version_number, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(mpeg_ca_tree, hf_mpeg_ca_current_next_indicator, tvb, offset, 3, ENC_BIG_ENDIAN);
|
||||
|
@ -106,7 +106,7 @@ proto_register_mpeg_ca(void)
|
|||
{
|
||||
|
||||
static hf_register_info hf[] = {
|
||||
|
||||
|
||||
{ &hf_mpeg_ca_reserved, {
|
||||
"Reserved", "mpeg_ca.reserved",
|
||||
FT_UINT24, BASE_HEX, NULL, MPEG_CA_RESERVED_MASK, NULL, HFILL
|
||||
|
@ -126,7 +126,7 @@ proto_register_mpeg_ca(void)
|
|||
"Section Number", "mpeg_ca.sect_num",
|
||||
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
|
||||
} },
|
||||
|
||||
|
||||
{ &hf_mpeg_ca_last_section_number, {
|
||||
"Last Section Number", "mpeg_ca.last_sect_num",
|
||||
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
|
||||
|
@ -142,7 +142,7 @@ proto_register_mpeg_ca(void)
|
|||
|
||||
proto_register_field_array(proto_mpeg_ca, hf, array_length(hf));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -59,12 +59,12 @@ static gint ett_mpeg_pat_prog = -1;
|
|||
#define MPEG_PAT_PROGRAM_MAP_PID_MASK 0x1FFF
|
||||
|
||||
static const true_false_string mpeg_pat_cur_next_vals = {
|
||||
|
||||
|
||||
"Currently applicable", "Not yet applicable"
|
||||
|
||||
};
|
||||
|
||||
void
|
||||
static void
|
||||
dissect_mpeg_pat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
|
||||
|
@ -106,11 +106,11 @@ dissect_mpeg_pat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
if (offset >= length)
|
||||
return;
|
||||
|
||||
|
||||
|
||||
/* Parse all the programs */
|
||||
while (offset < length) {
|
||||
|
||||
|
||||
prog_num = tvb_get_ntohs(tvb, offset);
|
||||
prog_pid = tvb_get_ntohs(tvb, offset + 2) & MPEG_PAT_PROGRAM_MAP_PID_MASK;
|
||||
|
||||
|
@ -123,7 +123,7 @@ dissect_mpeg_pat(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(mpeg_pat_prog_tree, hf_mpeg_pat_program_reserved, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(mpeg_pat_prog_tree, hf_mpeg_pat_program_map_pid, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
|
||||
|
||||
}
|
||||
|
||||
packet_mpeg_sect_crc(tvb, pinfo, mpeg_pat_tree, 0, offset);
|
||||
|
@ -135,7 +135,7 @@ proto_register_mpeg_pat(void)
|
|||
{
|
||||
|
||||
static hf_register_info hf[] = {
|
||||
|
||||
|
||||
{ &hf_mpeg_pat_transport_stream_id, {
|
||||
"Transport Stream ID", "mpeg_pat.tsid",
|
||||
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
|
||||
|
@ -160,7 +160,7 @@ proto_register_mpeg_pat(void)
|
|||
"Section Number", "mpeg_pat.sect_num",
|
||||
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
|
||||
} },
|
||||
|
||||
|
||||
{ &hf_mpeg_pat_last_section_number, {
|
||||
"Last Section Number", "mpeg_pat.last_sect_num",
|
||||
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
|
||||
|
@ -192,7 +192,7 @@ proto_register_mpeg_pat(void)
|
|||
|
||||
proto_register_field_array(proto_mpeg_pat, hf, array_length(hf));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -75,7 +75,7 @@ static gint ett_mpeg_pmt_stream = -1;
|
|||
|
||||
|
||||
static const value_string mpeg_pmt_cur_next_vals[] = {
|
||||
|
||||
|
||||
{ 0x0, "Not yet applicable" },
|
||||
{ 0x1, "Currently applicable" },
|
||||
|
||||
|
@ -113,11 +113,10 @@ static const value_string mpeg_pmt_stream_type_vals[] = {
|
|||
{ 0x1A, "IPMP stream (defined in ISO/IEC 13818-11, MPEG-2 IPMP)" },
|
||||
{ 0x1B, "AVC video stream as defined in ITU-T Rec. H.264 | ISO/IEC 14496-10 Video" },
|
||||
{ 0x7F, "IPMP stream" },
|
||||
{ 0x00, NULL },
|
||||
|
||||
{ 0x00, NULL }
|
||||
};
|
||||
|
||||
void
|
||||
static void
|
||||
dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
|
||||
|
@ -169,12 +168,12 @@ dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
descriptor_end = offset + prog_info_len;
|
||||
while (offset < descriptor_end)
|
||||
offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_pmt_tree);
|
||||
|
||||
|
||||
while (offset < length) {
|
||||
|
||||
|
||||
pid = tvb_get_ntohs(tvb, offset + 1) & MPEG_PMT_STREAM_ELEMENTARY_PID_MASK;
|
||||
es_info_len = tvb_get_ntohs(tvb, offset + 3) & MPEG_PMT_STREAM_ES_INFO_LENGTH_MASK;
|
||||
|
||||
|
||||
si = proto_tree_add_text(mpeg_pmt_tree, tvb, offset, 5 + es_info_len, "Stream PID=0x%04hx", pid);
|
||||
mpeg_pmt_stream_tree = proto_item_add_subtree(si, ett_mpeg_pmt_stream);
|
||||
|
||||
|
@ -188,7 +187,7 @@ dissect_mpeg_pmt(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_reserved2, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
proto_tree_add_item(mpeg_pmt_stream_tree, hf_mpeg_pmt_stream_es_info_length, tvb, offset, 2, ENC_BIG_ENDIAN);
|
||||
offset += 2;
|
||||
|
||||
|
||||
descriptor_end = offset + es_info_len;
|
||||
while (offset < descriptor_end)
|
||||
offset += proto_mpeg_descriptor_dissect(tvb, offset, mpeg_pmt_stream_tree);
|
||||
|
@ -204,7 +203,7 @@ proto_register_mpeg_pmt(void)
|
|||
{
|
||||
|
||||
static hf_register_info hf[] = {
|
||||
|
||||
|
||||
{ &hf_mpeg_pmt_program_number, {
|
||||
"Program Number", "mpeg_pmt.pg_num",
|
||||
FT_UINT16, BASE_HEX, NULL, 0, NULL, HFILL
|
||||
|
@ -229,7 +228,7 @@ proto_register_mpeg_pmt(void)
|
|||
"Section Number", "mpeg_pmt.sect_num",
|
||||
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
|
||||
} },
|
||||
|
||||
|
||||
{ &hf_mpeg_pmt_last_section_number, {
|
||||
"Last Section Number", "mpeg_pmt.last_sect_num",
|
||||
FT_UINT8, BASE_DEC, NULL, 0, NULL, HFILL
|
||||
|
@ -292,7 +291,7 @@ proto_register_mpeg_pmt(void)
|
|||
|
||||
proto_register_field_array(proto_mpeg_pmt, hf, array_length(hf));
|
||||
proto_register_subtree_array(ett, array_length(ett));
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -66,7 +66,7 @@ enum {
|
|||
TID_TS_DESC,
|
||||
TID_SCENE_DESC,
|
||||
TID_OBJECT_DESC,
|
||||
TID_FORBIDEN = 0xFF,
|
||||
TID_FORBIDEN = 0xFF
|
||||
};
|
||||
|
||||
/* From ETSI EN 300 468 */
|
||||
|
@ -81,9 +81,7 @@ enum {
|
|||
TID_TDT = 0x70,
|
||||
TID_RST,
|
||||
TID_ST,
|
||||
TID_TOT,
|
||||
|
||||
|
||||
TID_TOT
|
||||
};
|
||||
|
||||
/* From ETSI EN 301 790 */
|
||||
|
@ -97,8 +95,7 @@ enum {
|
|||
TID_CMT,
|
||||
TID_TBTP,
|
||||
TID_PCR,
|
||||
TID_TIM = 0xB0,
|
||||
|
||||
TID_TIM = 0xB0
|
||||
};
|
||||
|
||||
/* From ESTI EN 301 192 */
|
||||
|
@ -145,10 +142,10 @@ static const value_string mpeg_sect_table_id_vals[] = {
|
|||
|
||||
guint
|
||||
packet_mpeg_sect_header(tvbuff_t *tvb, guint offset,
|
||||
proto_tree *tree, guint *sect_len, gboolean *ssi)
|
||||
proto_tree *tree, guint *sect_len, gboolean *ssi)
|
||||
{
|
||||
return packet_mpeg_sect_header_extra(tvb, offset, tree, sect_len,
|
||||
NULL, ssi, NULL);
|
||||
NULL, ssi, NULL);
|
||||
}
|
||||
|
||||
guint
|
||||
|
@ -187,14 +184,14 @@ packet_mpeg_sect_header_extra(tvbuff_t *tvb, guint offset, proto_tree *tree,
|
|||
offset + len, 2, ENC_BIG_ENDIAN);
|
||||
}
|
||||
|
||||
tmp = tvb_get_ntohs(tvb, offset + len);
|
||||
tmp = tvb_get_ntohs(tvb, offset + len);
|
||||
|
||||
if (sect_len)
|
||||
*sect_len = MPEG_SECT_LENGTH_MASK & tmp;
|
||||
|
||||
|
||||
if (reserved)
|
||||
*reserved = (MPEG_SECT_RESERVED_MASK & tmp) >> 12;
|
||||
|
||||
|
||||
if (ssi)
|
||||
*ssi = (MPEG_SECT_SYNTAX_INDICATOR_MASK & tmp);
|
||||
|
||||
|
@ -212,7 +209,7 @@ packet_mpeg_sect_header_extra(tvbuff_t *tvb, guint offset, proto_tree *tree,
|
|||
|
||||
void
|
||||
packet_mpeg_sect_crc(tvbuff_t *tvb, packet_info *pinfo,
|
||||
proto_tree *tree, guint start, guint end)
|
||||
proto_tree *tree, guint start, guint end)
|
||||
{
|
||||
guint32 crc, calculated_crc;
|
||||
const char *label;
|
||||
|
@ -243,7 +240,7 @@ packet_mpeg_sect_crc(tvbuff_t *tvb, packet_info *pinfo,
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
static void
|
||||
dissect_mpeg_sect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
||||
{
|
||||
gint offset = 0;
|
||||
|
@ -276,7 +273,7 @@ dissect_mpeg_sect(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
|
||||
}
|
||||
|
||||
if (syntax_indicator)
|
||||
if (syntax_indicator)
|
||||
packet_mpeg_sect_crc(tvb, pinfo, mpeg_sect_tree, 0, (section_length-1));
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue