diff options
author | Bill Meier <wmeier@newsguy.com> | 2009-03-29 22:16:26 +0000 |
---|---|---|
committer | Bill Meier <wmeier@newsguy.com> | 2009-03-29 22:16:26 +0000 |
commit | 808a4e2c3c5d80d6451ed8cce85e302d96225437 (patch) | |
tree | adb75ac439ef8b2b6bdc2fe40bbbaa97d1b8d2eb /epan | |
parent | f77b5f8d775c532ba1cb7ba75738ee392873345f (diff) |
Define certain fcns as static (if not used externally).
Also: whiule we're at it:
- fix hf[] blurbs as appropriate to use NULL;
- fix some indentation
svn path=/trunk/; revision=27890
Diffstat (limited to 'epan')
-rw-r--r-- | epan/dissectors/packet-arp.c | 652 | ||||
-rw-r--r-- | epan/dissectors/packet-bfd.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-catapult-dct2000.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-cpha.c | 57 | ||||
-rw-r--r-- | epan/dissectors/packet-csm-encaps.c | 23 | ||||
-rw-r--r-- | epan/dissectors/packet-iuup.c | 242 | ||||
-rw-r--r-- | epan/dissectors/packet-lapd.c | 83 | ||||
-rw-r--r-- | epan/dissectors/packet-megaco.c | 55 | ||||
-rw-r--r-- | epan/dissectors/packet-mp2t.c | 14 | ||||
-rw-r--r-- | epan/dissectors/packet-mtp2.c | 36 | ||||
-rw-r--r-- | epan/dissectors/packet-mtp3.c | 64 | ||||
-rw-r--r-- | epan/dissectors/packet-multipart.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-rtps2.c | 4 | ||||
-rw-r--r-- | epan/dissectors/packet-sdp.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-sita.c | 3 | ||||
-rw-r--r-- | epan/dissectors/packet-t30.c | 251 |
16 files changed, 754 insertions, 745 deletions
diff --git a/epan/dissectors/packet-arp.c b/epan/dissectors/packet-arp.c index 937139ae41..b1d4841fac 100644 --- a/epan/dissectors/packet-arp.c +++ b/epan/dissectors/packet-arp.c @@ -105,17 +105,17 @@ static nstime_t time_at_start_of_count; static GHashTable *address_hash_table = NULL; struct address_hash_value { - guint8 mac[6]; - guint frame_num; - time_t time_of_entry; + guint8 mac[6]; + guint frame_num; + time_t time_of_entry; }; /* Definitions taken from Linux "linux/if_arp.h" header file, and from - http://www.iana.org/assignments/arp-parameters + http://www.iana.org/assignments/arp-parameters - */ +*/ /* ARP / RARP structs and definitions */ #ifndef ARPOP_REQUEST @@ -166,17 +166,17 @@ static const value_string atmop_vals[] = { * is an Ethernet address - the address must be of type "Ethernet" or * "IEEE 802.x", and the length must be 6 bytes. */ -#define ARP_HW_IS_ETHER(ar_hrd, ar_hln) \ - (((ar_hrd) == ARPHRD_ETHER || (ar_hrd) == ARPHRD_IEEE802) \ - && (ar_hln) == 6) +#define ARP_HW_IS_ETHER(ar_hrd, ar_hln) \ + (((ar_hrd) == ARPHRD_ETHER || (ar_hrd) == ARPHRD_IEEE802) \ + && (ar_hln) == 6) /* * Given the protocol address type and length, check whether an address * is an IPv4 address - the address must be of type "IP", and the length * must be 4 bytes. */ -#define ARP_PRO_IS_IPv4(ar_pro, ar_pln) \ - ((ar_pro) == ETHERTYPE_IP && (ar_pln) == 4) +#define ARP_PRO_IS_IPv4(ar_pro, ar_pln) \ + ((ar_pro) == ETHERTYPE_IP && (ar_pln) == 4) const gchar * arphrdaddr_to_str(const guint8 *ad, int ad_len, guint16 type) @@ -299,7 +299,7 @@ static const value_string hrd_vals[] = { const gchar * arphrdtype_to_str(guint16 hwtype, const char *fmt) { - return val_to_str(hwtype, hrd_vals, fmt); + return val_to_str(hwtype, hrd_vals, fmt); } /* Offsets of fields within an ARP packet. */ @@ -324,21 +324,21 @@ arphrdtype_to_str(guint16 hwtype, const char *fmt) { static void dissect_atm_number(tvbuff_t *tvb, int offset, int tl, int hf_e164, - int hf_nsap, proto_tree *tree) + int hf_nsap, proto_tree *tree) { - int len = tl & ATMARP_LEN_MASK; - proto_item *ti; - proto_tree *nsap_tree; - - if (tl & ATMARP_IS_E164) - proto_tree_add_item(tree, hf_e164, tvb, offset, len, FALSE); - else { - ti = proto_tree_add_item(tree, hf_nsap, tvb, offset, len, FALSE); - if (len >= 20) { - nsap_tree = proto_item_add_subtree(ti, ett_atmarp_nsap); - dissect_atm_nsap(tvb, offset, len, nsap_tree); - } - } + int len = tl & ATMARP_LEN_MASK; + proto_item *ti; + proto_tree *nsap_tree; + + if (tl & ATMARP_IS_E164) + proto_tree_add_item(tree, hf_e164, tvb, offset, len, FALSE); + else { + ti = proto_tree_add_item(tree, hf_nsap, tvb, offset, len, FALSE); + if (len >= 20) { + nsap_tree = proto_item_add_subtree(ti, ett_atmarp_nsap); + dissect_atm_nsap(tvb, offset, len, nsap_tree); + } + } } /* @@ -349,79 +349,79 @@ dissect_atm_number(tvbuff_t *tvb, int offset, int tl, int hf_e164, void dissect_atm_nsap(tvbuff_t *tvb, int offset, int len, proto_tree *tree) { - guint8 afi; - - afi = tvb_get_guint8(tvb, offset); - switch (afi) { - - case 0x39: /* DCC ATM format */ - case 0xBD: /* DCC ATM group format */ - proto_tree_add_text(tree, tvb, offset + 0, 3, - "Data Country Code%s: 0x%04X", - (afi == 0xBD) ? " (group)" : "", - tvb_get_ntohs(tvb, offset + 1)); - proto_tree_add_text(tree, tvb, offset + 3, 10, - "High Order DSP: %s", - tvb_bytes_to_str(tvb, offset + 3, 10)); - proto_tree_add_text(tree, tvb, offset + 13, 6, - "End System Identifier: %s", - tvb_bytes_to_str(tvb, offset + 13, 6)); - proto_tree_add_text(tree, tvb, offset + 19, 1, - "Selector: 0x%02X", tvb_get_guint8(tvb, offset + 19)); - break; - - case 0x47: /* ICD ATM format */ - case 0xC5: /* ICD ATM group format */ - proto_tree_add_text(tree, tvb, offset + 0, 3, - "International Code Designator%s: 0x%04X", - (afi == 0xC5) ? " (group)" : "", - tvb_get_ntohs(tvb, offset + 1)); - proto_tree_add_text(tree, tvb, offset + 3, 10, - "High Order DSP: %s", - tvb_bytes_to_str(tvb, offset + 3, 10)); - proto_tree_add_text(tree, tvb, offset + 13, 6, - "End System Identifier: %s", - tvb_bytes_to_str(tvb, offset + 13, 6)); - proto_tree_add_text(tree, tvb, offset + 19, 1, - "Selector: 0x%02X", tvb_get_guint8(tvb, offset + 19)); - break; - - case 0x45: /* E.164 ATM format */ - case 0xC3: /* E.164 ATM group format */ - proto_tree_add_text(tree, tvb, offset + 0, 9, - "E.164 ISDN%s: %s", - (afi == 0xC3) ? " (group)" : "", - tvb_bytes_to_str(tvb, offset + 1, 8)); - proto_tree_add_text(tree, tvb, offset + 9, 4, - "High Order DSP: %s", - tvb_bytes_to_str(tvb, offset + 3, 10)); - proto_tree_add_text(tree, tvb, offset + 13, 6, - "End System Identifier: %s", - tvb_bytes_to_str(tvb, offset + 13, 6)); - proto_tree_add_text(tree, tvb, offset + 19, 1, - "Selector: 0x%02X", tvb_get_guint8(tvb, offset + 19)); - break; - - default: - proto_tree_add_text(tree, tvb, offset, 1, - "Unknown AFI: 0x%02X", afi); - proto_tree_add_text(tree, tvb, offset + 1, len - 1, - "Rest of address: %s", - tvb_bytes_to_str(tvb, offset + 1, len - 1)); - break; - } + guint8 afi; + + afi = tvb_get_guint8(tvb, offset); + switch (afi) { + + case 0x39: /* DCC ATM format */ + case 0xBD: /* DCC ATM group format */ + proto_tree_add_text(tree, tvb, offset + 0, 3, + "Data Country Code%s: 0x%04X", + (afi == 0xBD) ? " (group)" : "", + tvb_get_ntohs(tvb, offset + 1)); + proto_tree_add_text(tree, tvb, offset + 3, 10, + "High Order DSP: %s", + tvb_bytes_to_str(tvb, offset + 3, 10)); + proto_tree_add_text(tree, tvb, offset + 13, 6, + "End System Identifier: %s", + tvb_bytes_to_str(tvb, offset + 13, 6)); + proto_tree_add_text(tree, tvb, offset + 19, 1, + "Selector: 0x%02X", tvb_get_guint8(tvb, offset + 19)); + break; + + case 0x47: /* ICD ATM format */ + case 0xC5: /* ICD ATM group format */ + proto_tree_add_text(tree, tvb, offset + 0, 3, + "International Code Designator%s: 0x%04X", + (afi == 0xC5) ? " (group)" : "", + tvb_get_ntohs(tvb, offset + 1)); + proto_tree_add_text(tree, tvb, offset + 3, 10, + "High Order DSP: %s", + tvb_bytes_to_str(tvb, offset + 3, 10)); + proto_tree_add_text(tree, tvb, offset + 13, 6, + "End System Identifier: %s", + tvb_bytes_to_str(tvb, offset + 13, 6)); + proto_tree_add_text(tree, tvb, offset + 19, 1, + "Selector: 0x%02X", tvb_get_guint8(tvb, offset + 19)); + break; + + case 0x45: /* E.164 ATM format */ + case 0xC3: /* E.164 ATM group format */ + proto_tree_add_text(tree, tvb, offset + 0, 9, + "E.164 ISDN%s: %s", + (afi == 0xC3) ? " (group)" : "", + tvb_bytes_to_str(tvb, offset + 1, 8)); + proto_tree_add_text(tree, tvb, offset + 9, 4, + "High Order DSP: %s", + tvb_bytes_to_str(tvb, offset + 3, 10)); + proto_tree_add_text(tree, tvb, offset + 13, 6, + "End System Identifier: %s", + tvb_bytes_to_str(tvb, offset + 13, 6)); + proto_tree_add_text(tree, tvb, offset + 19, 1, + "Selector: 0x%02X", tvb_get_guint8(tvb, offset + 19)); + break; + + default: + proto_tree_add_text(tree, tvb, offset, 1, + "Unknown AFI: 0x%02X", afi); + proto_tree_add_text(tree, tvb, offset + 1, len - 1, + "Rest of address: %s", + tvb_bytes_to_str(tvb, offset + 1, len - 1)); + break; + } } /* l.s. 32 bits are ipv4 address */ static guint address_hash_func(gconstpointer v) { - return GPOINTER_TO_UINT(v); + return GPOINTER_TO_UINT(v); } /* Compare 2 ipv4 addresses */ static gint address_equal_func(gconstpointer v, gconstpointer v2) { - return v == v2; + return v == v2; } /* Check to see if this mac & ip pair represent 2 devices trying to share @@ -431,73 +431,73 @@ static gboolean check_for_duplicate_addresses(packet_info *pinfo, proto_tree *tr const guint8 *mac, guint32 ip, guint32 *duplicate_ip) { - struct address_hash_value *value; - gboolean return_value = FALSE; + struct address_hash_value *value; + gboolean return_value = FALSE; - /* Look up any existing entries */ - value = g_hash_table_lookup(address_hash_table, GUINT_TO_POINTER(ip)); + /* Look up any existing entries */ + value = g_hash_table_lookup(address_hash_table, GUINT_TO_POINTER(ip)); - /* If MAC matches table, just update details */ - if (value != NULL) - { - if (pinfo->fd->num > value->frame_num) - { - if ((memcmp(value->mac, mac, 6) == 0)) - { - /* Same MAC as before - update existing entry */ - value->frame_num = pinfo->fd->num; - value->time_of_entry = pinfo->fd->abs_ts.secs; - } - else - { - /* Doesn't match earlier MAC - report! */ - proto_tree *duplicate_tree; - - /* Create subtree */ - proto_item *ti = proto_tree_add_none_format(tree, hf_arp_duplicate_ip_address, - tvb, 0, 0, - "Duplicate IP address detected for %s (%s) - also in use by %s (frame %u)", - arpproaddr_to_str((guint8*)&ip, 4, ETHERTYPE_IP), - ether_to_str(mac), - ether_to_str(value->mac), - value->frame_num); - PROTO_ITEM_SET_GENERATED(ti); - duplicate_tree = proto_item_add_subtree(ti, ett_arp_duplicate_address); - - /* Add item for navigating to earlier frame */ - ti = proto_tree_add_uint(duplicate_tree, hf_arp_duplicate_ip_address_earlier_frame, - tvb, 0, 0, value->frame_num); - PROTO_ITEM_SET_GENERATED(ti); - expert_add_info_format(pinfo, ti, - PI_SEQUENCE, PI_WARN, - "Duplicate IP address configured (%s)", - arpproaddr_to_str((guint8*)&ip, 4, ETHERTYPE_IP)); - - /* Time since that frame was seen */ - ti = proto_tree_add_uint(duplicate_tree, - hf_arp_duplicate_ip_address_seconds_since_earlier_frame, - tvb, 0, 0, - (guint32)(pinfo->fd->abs_ts.secs - value->time_of_entry)); - PROTO_ITEM_SET_GENERATED(ti); - - *duplicate_ip = ip; - return_value = TRUE; - } - } - } - else + /* If MAC matches table, just update details */ + if (value != NULL) + { + if (pinfo->fd->num > value->frame_num) { - /* No existing entry. Prepare one */ - value = se_alloc(sizeof(struct address_hash_value)); - memcpy(value->mac, mac, 6); + if ((memcmp(value->mac, mac, 6) == 0)) + { + /* Same MAC as before - update existing entry */ value->frame_num = pinfo->fd->num; value->time_of_entry = pinfo->fd->abs_ts.secs; - - /* Add it */ - g_hash_table_insert(address_hash_table, GUINT_TO_POINTER(ip), value); + } + else + { + /* Doesn't match earlier MAC - report! */ + proto_tree *duplicate_tree; + + /* Create subtree */ + proto_item *ti = proto_tree_add_none_format(tree, hf_arp_duplicate_ip_address, + tvb, 0, 0, + "Duplicate IP address detected for %s (%s) - also in use by %s (frame %u)", + arpproaddr_to_str((guint8*)&ip, 4, ETHERTYPE_IP), + ether_to_str(mac), + ether_to_str(value->mac), + value->frame_num); + PROTO_ITEM_SET_GENERATED(ti); + duplicate_tree = proto_item_add_subtree(ti, ett_arp_duplicate_address); + + /* Add item for navigating to earlier frame */ + ti = proto_tree_add_uint(duplicate_tree, hf_arp_duplicate_ip_address_earlier_frame, + tvb, 0, 0, value->frame_num); + PROTO_ITEM_SET_GENERATED(ti); + expert_add_info_format(pinfo, ti, + PI_SEQUENCE, PI_WARN, + "Duplicate IP address configured (%s)", + arpproaddr_to_str((guint8*)&ip, 4, ETHERTYPE_IP)); + + /* Time since that frame was seen */ + ti = proto_tree_add_uint(duplicate_tree, + hf_arp_duplicate_ip_address_seconds_since_earlier_frame, + tvb, 0, 0, + (guint32)(pinfo->fd->abs_ts.secs - value->time_of_entry)); + PROTO_ITEM_SET_GENERATED(ti); + + *duplicate_ip = ip; + return_value = TRUE; + } } + } + else + { + /* No existing entry. Prepare one */ + value = se_alloc(sizeof(struct address_hash_value)); + memcpy(value->mac, mac, 6); + value->frame_num = pinfo->fd->num; + value->time_of_entry = pinfo->fd->abs_ts.secs; + + /* Add it */ + g_hash_table_insert(address_hash_table, GUINT_TO_POINTER(ip), value); + } - return return_value; + return return_value; } @@ -507,85 +507,85 @@ static gboolean check_for_duplicate_addresses(packet_info *pinfo, proto_tree *tr static void arp_init_protocol(void) { - /* Destroy any existing hashes. */ - if (address_hash_table) - g_hash_table_destroy(address_hash_table); + /* Destroy any existing hashes. */ + if (address_hash_table) + g_hash_table_destroy(address_hash_table); - /* Now create it over */ - address_hash_table = g_hash_table_new(address_hash_func, address_equal_func); + /* Now create it over */ + address_hash_table = g_hash_table_new(address_hash_func, address_equal_func); } /* Take note that a request has been seen */ -void request_seen(packet_info *pinfo) +static void request_seen(packet_info *pinfo) { - /* Don't count frame again after already recording first time around. */ - if (p_get_proto_data(pinfo->fd, proto_arp) == 0) - { - arp_request_count++; - } + /* Don't count frame again after already recording first time around. */ + if (p_get_proto_data(pinfo->fd, proto_arp) == 0) + { + arp_request_count++; + } } /* Has storm request rate been exceeded with this request? */ -void check_for_storm_count(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) +static void check_for_storm_count(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - gboolean report_storm = FALSE; + gboolean report_storm = FALSE; - if (p_get_proto_data(pinfo->fd, proto_arp) != 0) + if (p_get_proto_data(pinfo->fd, proto_arp) != 0) + { + /* Read any previous stored packet setting */ + report_storm = (p_get_proto_data(pinfo->fd, proto_arp) == (void*)STORM); + } + else + { + /* Seeing packet for first time - check against preference settings */ + gint seconds_delta = (gint) (pinfo->fd->abs_ts.secs - time_at_start_of_count.secs); + gint nseconds_delta = pinfo->fd->abs_ts.nsecs - time_at_start_of_count.nsecs; + gint gap = (seconds_delta*1000) + (nseconds_delta / 1000000); + + /* Reset if gap exceeds period or -ve gap (indicates we're rescanning from start) */ + if ((gap > (gint)global_arp_detect_request_storm_period) || + (gap < 0)) { - /* Read any previous stored packet setting */ - report_storm = (p_get_proto_data(pinfo->fd, proto_arp) == (void*)STORM); + /* Time period elapsed without threshold being exceeded */ + arp_request_count = 1; + time_at_start_of_count = pinfo->fd->abs_ts; + p_add_proto_data(pinfo->fd, proto_arp, (void*)NO_STORM); + return; } else - { - /* Seeing packet for first time - check against preference settings */ - gint seconds_delta = (gint) (pinfo->fd->abs_ts.secs - time_at_start_of_count.secs); - gint nseconds_delta = pinfo->fd->abs_ts.nsecs - time_at_start_of_count.nsecs; - gint gap = (seconds_delta*1000) + (nseconds_delta / 1000000); - - /* Reset if gap exceeds period or -ve gap (indicates we're rescanning from start) */ - if ((gap > (gint)global_arp_detect_request_storm_period) || - (gap < 0)) - { - /* Time period elapsed without threshold being exceeded */ - arp_request_count = 1; - time_at_start_of_count = pinfo->fd->abs_ts; - p_add_proto_data(pinfo->fd, proto_arp, (void*)NO_STORM); - return; - } - else - if (arp_request_count > global_arp_detect_request_storm_packets) - { - /* Storm detected, record and reset start time. */ - report_storm = TRUE; - p_add_proto_data(pinfo->fd, proto_arp, (void*)STORM); - time_at_start_of_count = pinfo->fd->abs_ts; - } - else - { - /* Threshold not exceeded yet - no storm */ - p_add_proto_data(pinfo->fd, proto_arp, (void*)NO_STORM); - } - } - - if (report_storm) - { - /* Report storm and reset counter */ - proto_item *ti = proto_tree_add_none_format(tree, hf_arp_packet_storm, tvb, 0, 0, - "Packet storm detected (%u packets in < %u ms)", - global_arp_detect_request_storm_packets, - global_arp_detect_request_storm_period); - PROTO_ITEM_SET_GENERATED(ti); + if (arp_request_count > global_arp_detect_request_storm_packets) + { + /* Storm detected, record and reset start time. */ + report_storm = TRUE; + p_add_proto_data(pinfo->fd, proto_arp, (void*)STORM); + time_at_start_of_count = pinfo->fd->abs_ts; + } + else + { + /* Threshold not exceeded yet - no storm */ + p_add_proto_data(pinfo->fd, proto_arp, (void*)NO_STORM); + } + } - expert_add_info_format(pinfo, ti, - PI_SEQUENCE, PI_NOTE, - "ARP packet storm detected (%u packets in < %u ms)", - global_arp_detect_request_storm_packets, - global_arp_detect_request_storm_period); - arp_request_count = 0; - } + if (report_storm) + { + /* Report storm and reset counter */ + proto_item *ti = proto_tree_add_none_format(tree, hf_arp_packet_storm, tvb, 0, 0, + "Packet storm detected (%u packets in < %u ms)", + global_arp_detect_request_storm_packets, + global_arp_detect_request_storm_period); + PROTO_ITEM_SET_GENERATED(ti); + + expert_add_info_format(pinfo, ti, + PI_SEQUENCE, PI_NOTE, + "ARP packet storm detected (%u packets in < %u ms)", + global_arp_detect_request_storm_packets, + global_arp_detect_request_storm_period); + arp_request_count = 0; + } } @@ -639,7 +639,7 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) ar_tpln = tvb_get_guint8(tvb, ATM_AR_TPLN); tot_len = MIN_ATMARP_HEADER_SIZE + ar_shl + ar_ssl + ar_spln + - ar_thl + ar_tsl + ar_tpln; + ar_thl + ar_tsl + ar_tpln; /* Adjust the length of this tvbuff to include only the ARP datagram. Our caller may use that to determine how much of its packet @@ -694,22 +694,22 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (check_col(pinfo->cinfo, COL_PROTOCOL)) { switch (ar_op) { - case ARPOP_REQUEST: - case ARPOP_REPLY: - case ATMARPOP_NAK: - default: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMARP"); - break; + case ARPOP_REQUEST: + case ARPOP_REPLY: + case ATMARPOP_NAK: + default: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMARP"); + break; - case ARPOP_RREQUEST: - case ARPOP_RREPLY: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMRARP"); - break; + case ARPOP_RREQUEST: + case ARPOP_RREPLY: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ATMRARP"); + break; - case ARPOP_IREQUEST: - case ARPOP_IREPLY: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ATMARP"); - break; + case ARPOP_IREQUEST: + case ARPOP_IREPLY: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ATMARP"); + break; } } @@ -717,28 +717,28 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) switch (ar_op) { case ARPOP_REQUEST: col_add_fstr(pinfo->cinfo, COL_INFO, "Who has %s? Tell %s", - tpa_str, spa_str); + tpa_str, spa_str); break; case ARPOP_REPLY: col_add_fstr(pinfo->cinfo, COL_INFO, "%s is at %s%s%s", spa_str, sha_str, - ((ssa_str != NULL) ? "," : ""), - ((ssa_str != NULL) ? ssa_str : "")); + ((ssa_str != NULL) ? "," : ""), + ((ssa_str != NULL) ? ssa_str : "")); break; case ARPOP_IREQUEST: col_add_fstr(pinfo->cinfo, COL_INFO, "Who is %s%s%s? Tell %s%s%s", - tha_str, - ((tsa_str != NULL) ? "," : ""), - ((tsa_str != NULL) ? tsa_str : ""), - sha_str, - ((ssa_str != NULL) ? "," : ""), - ((ssa_str != NULL) ? ssa_str : "")); + tha_str, + ((tsa_str != NULL) ? "," : ""), + ((tsa_str != NULL) ? tsa_str : ""), + sha_str, + ((ssa_str != NULL) ? "," : ""), + ((ssa_str != NULL) ? ssa_str : "")); break; case ARPOP_IREPLY: col_add_fstr(pinfo->cinfo, COL_INFO, "%s%s%s is at %s", - sha_str, - ((ssa_str != NULL) ? "," : ""), - ((ssa_str != NULL) ? ssa_str : ""), - spa_str); + sha_str, + ((ssa_str != NULL) ? "," : ""), + ((ssa_str != NULL) ? ssa_str : ""), + spa_str); break; case ATMARPOP_NAK: col_add_fstr(pinfo->cinfo, COL_INFO, "I don't know where %s is", spa_str); @@ -752,11 +752,11 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (tree) { if ((op_str = match_strval(ar_op, atmop_vals))) ti = proto_tree_add_protocol_format(tree, proto_arp, tvb, 0, tot_len, - "ATM Address Resolution Protocol (%s)", - op_str); + "ATM Address Resolution Protocol (%s)", + op_str); else ti = proto_tree_add_protocol_format(tree, proto_arp, tvb, 0, tot_len, - "ATM Address Resolution Protocol (opcode 0x%04x)", ar_op); + "ATM Address Resolution Protocol (opcode 0x%04x)", ar_op); arp_tree = proto_item_add_subtree(ti, ett_arp); proto_tree_add_uint(arp_tree, hf_arp_hard_type, tvb, ATM_AR_HRD, 2, ar_hrd); @@ -764,21 +764,21 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(arp_tree, hf_arp_proto_type, tvb, ATM_AR_PRO, 2,ar_pro); tl = proto_tree_add_text(arp_tree, tvb, ATM_AR_SHTL, 1, - "Sender ATM number type/length: %s/%u", - (ar_shtl & ATMARP_IS_E164 ? - "E.164" : - "ATM Forum NSAPA"), - ar_shl); + "Sender ATM number type/length: %s/%u", + (ar_shtl & ATMARP_IS_E164 ? + "E.164" : + "ATM Forum NSAPA"), + ar_shl); tl_tree = proto_item_add_subtree(tl, ett_atmarp_tl); proto_tree_add_boolean(tl_tree, hf_atmarp_sht, tvb, ATM_AR_SHTL, 1, ar_shtl); proto_tree_add_uint(tl_tree, hf_atmarp_shl, tvb, ATM_AR_SHTL, 1, ar_shtl); tl = proto_tree_add_text(arp_tree, tvb, ATM_AR_SSTL, 1, - "Sender ATM subaddress type/length: %s/%u", - (ar_sstl & ATMARP_IS_E164 ? - "E.164" : - "ATM Forum NSAPA"), - ar_ssl); + "Sender ATM subaddress type/length: %s/%u", + (ar_sstl & ATMARP_IS_E164 ? + "E.164" : + "ATM Forum NSAPA"), + ar_ssl); tl_tree = proto_item_add_subtree(tl, ett_atmarp_tl); proto_tree_add_boolean(tl_tree, hf_atmarp_sst, tvb, ATM_AR_SSTL, 1, ar_sstl); proto_tree_add_uint(tl_tree, hf_atmarp_ssl, tvb, ATM_AR_SSTL, 1, ar_sstl); @@ -788,21 +788,21 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) proto_tree_add_uint(arp_tree, hf_atmarp_spln, tvb, ATM_AR_SPLN, 1, ar_spln); tl = proto_tree_add_text(arp_tree, tvb, ATM_AR_THTL, 1, - "Target ATM number type/length: %s/%u", - (ar_thtl & ATMARP_IS_E164 ? - "E.164" : - "ATM Forum NSAPA"), - ar_thl); + "Target ATM number type/length: %s/%u", + (ar_thtl & ATMARP_IS_E164 ? + "E.164" : + "ATM Forum NSAPA"), + ar_thl); tl_tree = proto_item_add_subtree(tl, ett_atmarp_tl); proto_tree_add_boolean(tl_tree, hf_atmarp_tht, tvb, ATM_AR_THTL, 1, ar_thtl); proto_tree_add_uint(tl_tree, hf_atmarp_thl, tvb, ATM_AR_THTL, 1, ar_thtl); tl = proto_tree_add_text(arp_tree, tvb, ATM_AR_TSTL, 1, - "Target ATM subaddress type/length: %s/%u", - (ar_tstl & ATMARP_IS_E164 ? - "E.164" : - "ATM Forum NSAPA"), - ar_tsl); + "Target ATM subaddress type/length: %s/%u", + (ar_tstl & ATMARP_IS_E164 ? + "E.164" : + "ATM Forum NSAPA"), + ar_tsl); tl_tree = proto_item_add_subtree(tl, ett_atmarp_tl); proto_tree_add_boolean(tl_tree, hf_atmarp_tst, tvb, ATM_AR_TSTL, 1, ar_tstl); proto_tree_add_uint(tl_tree, hf_atmarp_tsl, tvb, ATM_AR_TSTL, 1, ar_tstl); @@ -811,36 +811,36 @@ dissect_atmarp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (ar_shl != 0) dissect_atm_number(tvb, sha_offset, ar_shtl, hf_atmarp_src_atm_num_e164, - hf_atmarp_src_atm_num_nsap, arp_tree); + hf_atmarp_src_atm_num_nsap, arp_tree); if (ar_ssl != 0) proto_tree_add_bytes_format(arp_tree, hf_atmarp_src_atm_subaddr, tvb, ssa_offset, - ar_ssl, - ssa_val, - "Sender ATM subaddress: %s", ssa_str); + ar_ssl, + ssa_val, + "Sender ATM subaddress: %s", ssa_str); if (ar_spln != 0) { proto_tree_add_item(arp_tree, - ARP_PRO_IS_IPv4(ar_pro, ar_spln) ? hf_arp_src_proto_ipv4 - : hf_arp_src_proto, - tvb, spa_offset, ar_spln, FALSE); + ARP_PRO_IS_IPv4(ar_pro, ar_spln) ? hf_arp_src_proto_ipv4 + : hf_arp_src_proto, + tvb, spa_offset, ar_spln, FALSE); } if (ar_thl != 0) dissect_atm_number(tvb, tha_offset, ar_thtl, hf_atmarp_dst_atm_num_e164, - hf_atmarp_dst_atm_num_nsap, arp_tree); + hf_atmarp_dst_atm_num_nsap, arp_tree); if (ar_tsl != 0) proto_tree_add_bytes_format(arp_tree, hf_atmarp_dst_atm_subaddr, tvb, tsa_offset, - ar_tsl, - tsa_val, - "Target ATM subaddress: %s", tsa_str); + ar_tsl, + tsa_val, + "Target ATM subaddress: %s", tsa_str); if (ar_tpln != 0) { proto_tree_add_item(arp_tree, - ARP_PRO_IS_IPv4(ar_pro, ar_tpln) ? hf_arp_dst_proto_ipv4 - : hf_arp_dst_proto, - tvb, tpa_offset, ar_tpln, FALSE); + ARP_PRO_IS_IPv4(ar_pro, ar_tpln) ? hf_arp_dst_proto_ipv4 + : hf_arp_dst_proto, + tvb, tpa_offset, ar_tpln, FALSE); } } } @@ -872,9 +872,9 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) Clear the Info column so that, if we throw an exception, it shows up as a short or malformed ARP frame. */ if (check_col(pinfo->cinfo, COL_PROTOCOL)) - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP"); + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP"); if (check_col(pinfo->cinfo, COL_INFO)) - col_clear(pinfo->cinfo, COL_INFO); + col_clear(pinfo->cinfo, COL_INFO); /* Hardware Address Type */ ar_hrd = tvb_get_ntohs(tvb, AR_HRD); @@ -901,25 +901,25 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (check_col(pinfo->cinfo, COL_PROTOCOL)) { switch (ar_op) { - case ARPOP_REQUEST: - if (global_arp_detect_request_storm) - { - request_seen(pinfo); - } - case ARPOP_REPLY: - default: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP"); - break; + case ARPOP_REQUEST: + if (global_arp_detect_request_storm) + { + request_seen(pinfo); + } + case ARPOP_REPLY: + default: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "ARP"); + break; - case ARPOP_RREQUEST: - case ARPOP_RREPLY: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "RARP"); - break; + case ARPOP_RREQUEST: + case ARPOP_RREPLY: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "RARP"); + break; - case ARPOP_IREQUEST: - case ARPOP_IREPLY: - col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ARP"); - break; + case ARPOP_IREQUEST: + case ARPOP_IREPLY: + col_set_str(pinfo->cinfo, COL_PROTOCOL, "Inverse ARP"); + break; } } @@ -953,8 +953,8 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (global_arp_detect_duplicate_ip_addresses) { duplicate_detected = - check_for_duplicate_addresses(pinfo, tree, tvb, mac, ip, - &duplicate_ip); + check_for_duplicate_addresses(pinfo, tree, tvb, mac, ip, + &duplicate_ip); } } @@ -974,8 +974,8 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (global_arp_detect_duplicate_ip_addresses) { duplicate_detected = - check_for_duplicate_addresses(pinfo, tree, tvb, mac, ip, - &duplicate_ip); + check_for_duplicate_addresses(pinfo, tree, tvb, mac, ip, + &duplicate_ip); } } } @@ -1052,10 +1052,10 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (is_gratuitous && (ar_op == ARPOP_REPLY)) op_str = "reply/gratuitous ARP"; ti = proto_tree_add_protocol_format(tree, proto_arp, tvb, 0, tot_len, - "Address Resolution Protocol (%s)", op_str); + "Address Resolution Protocol (%s)", op_str); } else ti = proto_tree_add_protocol_format(tree, proto_arp, tvb, 0, tot_len, - "Address Resolution Protocol (opcode 0x%04x)", ar_op); + "Address Resolution Protocol (opcode 0x%04x)", ar_op); arp_tree = proto_item_add_subtree(ti, ett_arp); proto_tree_add_uint(arp_tree, hf_arp_hard_type, tvb, AR_HRD, 2, ar_hrd); proto_tree_add_uint(arp_tree, hf_arp_proto_type, tvb, AR_PRO, 2, ar_pro); @@ -1065,29 +1065,29 @@ dissect_arp(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) if (ar_hln != 0) { proto_tree_add_item(arp_tree, ARP_HW_IS_ETHER(ar_hrd, ar_hln) ? - hf_arp_src_hw_mac : - hf_arp_src_hw, + hf_arp_src_hw_mac : + hf_arp_src_hw, tvb, sha_offset, ar_hln, FALSE); } if (ar_pln != 0) { proto_tree_add_item(arp_tree, ARP_PRO_IS_IPv4(ar_pro, ar_pln) ? - hf_arp_src_proto_ipv4 : - hf_arp_src_proto, + hf_arp_src_proto_ipv4 : + hf_arp_src_proto, tvb, spa_offset, ar_pln, FALSE); } if (ar_hln != 0) { proto_tree_add_item(arp_tree, ARP_HW_IS_ETHER(ar_hrd, ar_hln) ? - hf_arp_dst_hw_mac : - hf_arp_dst_hw, + hf_arp_dst_hw_mac : + hf_arp_dst_hw, tvb, tha_offset, ar_hln, FALSE); } if (ar_pln != 0) { proto_tree_add_item(arp_tree, ARP_PRO_IS_IPv4(ar_pro, ar_pln) ? - hf_arp_dst_proto_ipv4 : - hf_arp_dst_proto, + hf_arp_dst_proto_ipv4 : + hf_arp_dst_proto, tvb, tpa_offset, ar_pln, FALSE); } } @@ -1252,32 +1252,32 @@ proto_register_arp(void) { &hf_arp_dst_proto, { "Target protocol address", "arp.dst.proto", FT_BYTES, BASE_NONE, NULL, 0x0, - "", HFILL }}, + "", HFILL }}, { &hf_arp_dst_proto_ipv4, { "Target IP address", "arp.dst.proto_ipv4", FT_IPv4, BASE_NONE, NULL, 0x0, - "", HFILL }}, + "", HFILL }}, { &hf_arp_packet_storm, { "Packet storm detected", "arp.packet-storm-detected", FT_NONE, BASE_NONE, NULL, 0x0, - "", HFILL }}, + "", HFILL }}, { &hf_arp_duplicate_ip_address, { "Duplicate IP address detected", "arp.duplicate-address-detected", FT_NONE, BASE_NONE, NULL, 0x0, - "", HFILL }}, + "", HFILL }}, { &hf_arp_duplicate_ip_address_earlier_frame, { "Frame showing earlier use of IP address", "arp.duplicate-address-frame", FT_FRAMENUM, BASE_NONE, NULL, 0x0, - "", HFILL }}, + "", HFILL }}, { &hf_arp_duplicate_ip_address_seconds_since_earlier_frame, { "Seconds since earlier frame seen", "arp.seconds-since-duplicate-address-frame", FT_UINT32, BASE_DEC, NULL, 0x0, - "", HFILL }}, + "", HFILL }}, }; @@ -1303,24 +1303,24 @@ proto_register_arp(void) arp_module = prefs_register_protocol(proto_arp, NULL); prefs_register_bool_preference(arp_module, "detect_request_storms", - "Detect ARP request storms", - "Attempt to detect excessive rate of ARP requests", - &global_arp_detect_request_storm); + "Detect ARP request storms", + "Attempt to detect excessive rate of ARP requests", + &global_arp_detect_request_storm); prefs_register_uint_preference(arp_module, "detect_storm_number_of_packets", - "Number of requests to detect during period", - "Number of requests needed within period to indicate a storm", - 10, &global_arp_detect_request_storm_packets); + "Number of requests to detect during period", + "Number of requests needed within period to indicate a storm", + 10, &global_arp_detect_request_storm_packets); prefs_register_uint_preference(arp_module, "detect_storm_period", - "Detection period (in ms)", - "Period in milliseconds during which a packet storm may be detected", - 10, &global_arp_detect_request_storm_period); + "Detection period (in ms)", + "Period in milliseconds during which a packet storm may be detected", + 10, &global_arp_detect_request_storm_period); prefs_register_bool_preference(arp_module, "detect_duplicate_ips", - "Detect duplicate IP address configuration", - "Attempt to detect duplicate use of IP addresses", - &global_arp_detect_duplicate_ip_addresses); + "Detect duplicate IP address configuration", + "Attempt to detect duplicate use of IP addresses", + &global_arp_detect_duplicate_ip_addresses); /* TODO: define a minimum time between sightings that is worth reporting? */ diff --git a/epan/dissectors/packet-bfd.c b/epan/dissectors/packet-bfd.c index c68b96b4cb..3eea5393fd 100644 --- a/epan/dissectors/packet-bfd.c +++ b/epan/dissectors/packet-bfd.c @@ -239,7 +239,7 @@ static gint ett_bfd_auth = -1; /* Given the type of authentication being used, return the required length of * the authentication header */ -guint8 get_bfd_required_auth_len(guint8 auth_type) +static guint8 get_bfd_required_auth_len(guint8 auth_type) { guint8 auth_len = 0; switch (auth_type) { @@ -260,7 +260,7 @@ guint8 get_bfd_required_auth_len(guint8 auth_type) /* Given the type of authentication being used, return the length of * checksum field */ -guint8 get_bfd_checksum_len(guint8 auth_type) +static guint8 get_bfd_checksum_len(guint8 auth_type) { guint8 checksum_len = 0; switch (auth_type) { diff --git a/epan/dissectors/packet-catapult-dct2000.c b/epan/dissectors/packet-catapult-dct2000.c index 610dbb3b3b..97e7d0802f 100644 --- a/epan/dissectors/packet-catapult-dct2000.c +++ b/epan/dissectors/packet-catapult-dct2000.c @@ -95,8 +95,8 @@ static int hf_catapult_dct2000_lte_rlc_discard_req = -1; /* Variables used for preferences */ -gboolean catapult_dct2000_try_ipprim_heuristic = TRUE; -gboolean catapult_dct2000_try_sctpprim_heuristic = TRUE; +static gboolean catapult_dct2000_try_ipprim_heuristic = TRUE; +static gboolean catapult_dct2000_try_sctpprim_heuristic = TRUE; /* Protocol subtree. */ static int ett_catapult_dct2000 = -1; diff --git a/epan/dissectors/packet-cpha.c b/epan/dissectors/packet-cpha.c index 129c171f46..6831fef488 100644 --- a/epan/dissectors/packet-cpha.c +++ b/epan/dissectors/packet-cpha.c @@ -183,7 +183,7 @@ static void dissect_lb_conf(tvbuff_t *, int, proto_tree *); static void dissect_policy_change(tvbuff_t *, int, proto_tree *); static void dissect_probe(tvbuff_t *, int, proto_tree *); static void dissect_conf_reply(tvbuff_t *, int, proto_tree *); -int is_report_ifs(guint16); +static int is_report_ifs(guint16); static const char *report_code2str(guint16); static const char *ha_mode2str(guint16); static const char *state2str(guint8); @@ -416,7 +416,8 @@ static void dissect_conf_reply(tvbuff_t * tvb, int offset, proto_tree * tree) { offset += 4; } -int is_report_ifs(guint16 report_code) { +static int +is_report_ifs(guint16 report_code) { if(report_code & 2) return 1; return 0; @@ -485,61 +486,61 @@ proto_register_cpha(void) { static hf_register_info hf[] = { { &hf_magic_number, - { "CPHAP Magic Number", "cpha.magic_number", FT_UINT16, BASE_HEX, NULL, 0x0, "CPHAP Magic Number", HFILL}}, + { "CPHAP Magic Number", "cpha.magic_number", FT_UINT16, BASE_HEX, NULL, 0x0, NULL, HFILL}}, { &hf_cpha_protocol_ver, { "Protocol Version", "cpha.version", FT_UINT16, BASE_DEC, NULL, 0x0, "CPHAP Version", HFILL}}, { &hf_cluster_number, - { "Cluster Number", "cpha.cluster_number", FT_UINT16, BASE_DEC, NULL, 0x0, "Cluster Number", HFILL}}, + { "Cluster Number", "cpha.cluster_number", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_opcode, - { "OpCode", "cpha.opcode", FT_UINT16, BASE_DEC, NULL, 0x0, "OpCode", HFILL}}, + { "OpCode", "cpha.opcode", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_src_if_num, - { "Source Interface", "cpha.src_if", FT_UINT16, BASE_DEC, NULL, 0x0, "Source Interface", HFILL}}, + { "Source Interface", "cpha.src_if", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_random_id, - { "Random ID", "cpha.random_id", FT_UINT16, BASE_DEC, NULL, 0x0, "Random ID", HFILL}}, + { "Random ID", "cpha.random_id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_src_machine_id, - { "Source Machine ID", "cpha.src_id", FT_UINT16, BASE_DEC, NULL, 0x0, "Source Machine ID", HFILL}}, + { "Source Machine ID", "cpha.src_id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_dst_machine_id, - { "Destination Machine ID", "cpha.dst_id", FT_UINT16, BASE_DEC, NULL, 0x0, "Destination Machine ID", HFILL}}, + { "Destination Machine ID", "cpha.dst_id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_policy_id, - { "Policy ID", "cpha.policy_id", FT_UINT16, BASE_DEC, NULL, 0x0, "Policy ID", HFILL}}, + { "Policy ID", "cpha.policy_id", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_filler, - { "Filler", "cpha.filler", FT_UINT16, BASE_DEC, NULL, 0x0, "", HFILL}}, + { "Filler", "cpha.filler", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_id_num, - { "Number of IDs reported", "cpha.id_num", FT_UINT16, BASE_DEC, NULL, 0x0, "Number of IDs reported", HFILL}}, + { "Number of IDs reported", "cpha.id_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_report_code, - { "Report code", "cpha.id_num", FT_UINT16, BASE_DEC, NULL, 0x0, "Report Code", HFILL}}, + { "Report code", "cpha.id_num", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_ha_mode, - { "HA mode", "cpha.ha_mode", FT_UINT16, BASE_DEC, NULL, 0x0, "HA Mode", HFILL}}, + { "HA mode", "cpha.ha_mode", FT_UINT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_ha_time_unit, { "HA Time unit", "cpha.ha_time_unit", FT_UINT16, BASE_DEC, NULL, 0x0, "HA Time unit (ms)", HFILL}}, { &hf_num_reported_ifs, - { "Reported Interfaces", "cpha.reported_ifs", FT_UINT32, BASE_DEC, NULL, 0x0, "Reported Interfaces", HFILL}}, + { "Reported Interfaces", "cpha.reported_ifs", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_ethernet_add, - { "Ethernet Address", "cpha.ethernet_addr", FT_ETHER, BASE_HEX, NULL, 0x0, "Ethernet Address", HFILL}}, + { "Ethernet Address", "cpha.ethernet_addr", FT_ETHER, BASE_HEX, NULL, 0x0, NULL, HFILL}}, { &hf_is_if_trusted, - { "Interface Trusted", "cpha.if_trusted", FT_BOOLEAN, BASE_DEC, NULL, 0x0, "Interface Trusted", HFILL}}, + { "Interface Trusted", "cpha.if_trusted", FT_BOOLEAN, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_ip, - { "IP Address", "cpha.ip", FT_IPv4, BASE_DEC, NULL, 0x0, "IP Address", HFILL}}, + { "IP Address", "cpha.ip", FT_IPv4, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_slot_num, - { "Slot Number", "cpha.slot_num", FT_INT16, BASE_DEC, NULL, 0x0, "Slot Number", HFILL}}, + { "Slot Number", "cpha.slot_num", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_machine_num, - { "Machine Number", "cpha.machine_num", FT_INT16, BASE_DEC, NULL, 0x0, "Machine Number", HFILL}}, + { "Machine Number", "cpha.machine_num", FT_INT16, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_seed, - { "Seed", "cpha.seed", FT_UINT32, BASE_DEC, NULL, 0x0, "Seed", HFILL}}, + { "Seed", "cpha.seed", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_hash_len, - { "Hash list length", "cpha.hash_len", FT_INT32, BASE_DEC, NULL, 0x0, "Hash list length", HFILL}}, + { "Hash list length", "cpha.hash_len", FT_INT32, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_in_up_num, - { "Interfaces up in the Inbound", "cpha.in_up", FT_INT8, BASE_DEC, NULL, 0x0, "Interfaces up in the Inbound", HFILL}}, + { "Interfaces up in the Inbound", "cpha.in_up", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_in_assumed_up_num, - { "Interfaces assumed up in the Inbound", "cpha.in_assume_up", FT_INT8, BASE_DEC, NULL, 0x0, "", HFILL}}, + { "Interfaces assumed up in the Inbound", "cpha.in_assume_up", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_out_up_num, - { "Interfaces up in the Outbound", "cpha.out_up", FT_INT8, BASE_DEC, NULL, 0x0, "", HFILL}}, + { "Interfaces up in the Outbound", "cpha.out_up", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_out_assumed_up_num, - { "Interfaces assumed up in the Outbound", "cpha.out_assume_up", FT_INT8, BASE_DEC, NULL, 0x0, "", HFILL}}, + { "Interfaces assumed up in the Outbound", "cpha.out_assume_up", FT_INT8, BASE_DEC, NULL, 0x0, NULL, HFILL}}, { &hf_status, - { "Status", "cpha.status", FT_UINT32, BASE_DEC, VALS(status_vals), 0x0, "", HFILL}}, + { "Status", "cpha.status", FT_UINT32, BASE_DEC, VALS(status_vals), 0x0, NULL, HFILL}}, { &hf_ifn, - { "Interface Number", "cpha.ifn", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL}}, + { "Interface Number", "cpha.ifn", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL}}, }; static gint *ett[] = { &ett_cphap, diff --git a/epan/dissectors/packet-csm-encaps.c b/epan/dissectors/packet-csm-encaps.c index db68037d41..1004640199 100644 --- a/epan/dissectors/packet-csm-encaps.c +++ b/epan/dissectors/packet-csm-encaps.c @@ -170,26 +170,25 @@ static int hf_csm_encaps_param = -1; static gint ett_csm_encaps = -1; static gint ett_csm_encaps_control = -1; -gchar *csm_fc(guint16 fc, guint16 ct); -gboolean csm_to_host(guint16 fc, guint16 ct); - /* returns the command name */ -gchar *csm_fc(guint16 fc, guint16 ct) +static gchar * +csm_fc(guint16 fc, guint16 ct) { - if (fc == 0x0000) { - return g_strdup(val_to_str(ct, class_type_vals, - "0x%04x")); - } else { - return g_strdup(val_to_str(fc, function_code_vals, - "0x%04x")); - } + if (fc == 0x0000) { + return g_strdup(val_to_str(ct, class_type_vals, + "0x%04x")); + } else { + return g_strdup(val_to_str(fc, function_code_vals, + "0x%04x")); + } } /* check to see if the message is an exclusive message send to host */ -gboolean csm_to_host(guint16 fc, guint16 ct) +static gboolean +csm_to_host(guint16 fc, guint16 ct) { if (fc == 0x0000) { diff --git a/epan/dissectors/packet-iuup.c b/epan/dissectors/packet-iuup.c index 062754c225..84220f455e 100644 --- a/epan/dissectors/packet-iuup.c +++ b/epan/dissectors/packet-iuup.c @@ -563,31 +563,31 @@ static void dissect_iuup_ratectl(tvbuff_t* tvb, packet_info* pinfo _U_, proto_tr } -proto_item *add_hdr_crc(tvbuff_t* tvb, packet_info* pinfo, proto_item* iuup_tree, guint16 crccheck) +static proto_item *add_hdr_crc(tvbuff_t* tvb, packet_info* pinfo, proto_item* iuup_tree, guint16 crccheck) { - proto_item *crc_item; - if (crccheck) { - crc_item = proto_tree_add_item(iuup_tree,hf_iuup_hdr_crc_error,tvb,2,1,FALSE); - expert_add_info_format(pinfo, crc_item, PI_CHECKSUM, PI_ERROR, "Bad checksum"); - } else { - crc_item = proto_tree_add_item(iuup_tree,hf_iuup_hdr_crc,tvb,2,1,FALSE); - } - return crc_item; + proto_item *crc_item; + if (crccheck) { + crc_item = proto_tree_add_item(iuup_tree,hf_iuup_hdr_crc_error,tvb,2,1,FALSE); + expert_add_info_format(pinfo, crc_item, PI_CHECKSUM, PI_ERROR, "Bad checksum"); + } else { + crc_item = proto_tree_add_item(iuup_tree,hf_iuup_hdr_crc,tvb,2,1,FALSE); + } + return crc_item; } -proto_item *add_payload_crc(tvbuff_t* tvb, packet_info* pinfo, proto_item* iuup_tree) +static proto_item *add_payload_crc(tvbuff_t* tvb, packet_info* pinfo, proto_item* iuup_tree) { - proto_item *crc_item; - int length = tvb_length(tvb); - guint16 crc10 = tvb_get_ntohs(tvb, 2) & 0x3FF; - guint16 crccheck = update_crc10_by_bytes(crc10, tvb_get_ptr(tvb, 4, length - 4), length - 4); - if (crccheck) { - crc_item = proto_tree_add_item(iuup_tree,hf_iuup_payload_crc_error,tvb,2,2,FALSE); - expert_add_info_format(pinfo, crc_item, PI_CHECKSUM, PI_ERROR, "Bad checksum"); - } else { - crc_item = proto_tree_add_item(iuup_tree,hf_iuup_payload_crc,tvb,2,2,FALSE); - } - return crc_item; + proto_item *crc_item; + int length = tvb_length(tvb); + guint16 crc10 = tvb_get_ntohs(tvb, 2) & 0x3FF; + guint16 crccheck = update_crc10_by_bytes(crc10, tvb_get_ptr(tvb, 4, length - 4), length - 4); + if (crccheck) { + crc_item = proto_tree_add_item(iuup_tree,hf_iuup_payload_crc_error,tvb,2,2,FALSE); + expert_add_info_format(pinfo, crc_item, PI_CHECKSUM, PI_ERROR, "Bad checksum"); + } else { + crc_item = proto_tree_add_item(iuup_tree,hf_iuup_payload_crc,tvb,2,2,FALSE); + } + return crc_item; } #define ACKNACK_MASK 0x0c @@ -800,49 +800,49 @@ static void dissect_iuup(tvbuff_t* tvb_in, packet_info* pinfo, proto_tree* tree) static gboolean dissect_iuup_heur(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - int len = tvb_length(tvb); + int len = tvb_length(tvb); - guint8 first_octet = tvb_get_guint8(tvb,0); - guint8 second_octet = tvb_get_guint8(tvb,1); - guint16 hdrcrc6 = tvb_get_guint8(tvb, 2) >> 2; + guint8 first_octet = tvb_get_guint8(tvb,0); + guint8 second_octet = tvb_get_guint8(tvb,1); + guint16 hdrcrc6 = tvb_get_guint8(tvb, 2) >> 2; - if (update_crc6_by_bytes(hdrcrc6, first_octet, second_octet)) return FALSE; + if (update_crc6_by_bytes(hdrcrc6, first_octet, second_octet)) return FALSE; - switch ( first_octet & 0xf0 ) { - case 0x00: { - if (len<7) return FALSE; - if (update_crc10_by_bytes((guint16)(tvb_get_ntohs(tvb, 4) & 0x3FF), tvb_get_ptr(tvb, 6, len-4), len-4) ) return FALSE; - break; - } - case 0x10: - /* a FALSE positive factory */ - if (len<5) return FALSE; - break; - case 0xe0: - if (len<5) return FALSE; - if( (second_octet & 0x0f) > 3) return FALSE; - default: - return FALSE; - } + switch ( first_octet & 0xf0 ) { + case 0x00: { + if (len<7) return FALSE; + if (update_crc10_by_bytes((guint16)(tvb_get_ntohs(tvb, 4) & 0x3FF), tvb_get_ptr(tvb, 6, len-4), len-4) ) return FALSE; + break; + } + case 0x10: + /* a FALSE positive factory */ + if (len<5) return FALSE; + break; + case 0xe0: + if (len<5) return FALSE; + if( (second_octet & 0x0f) > 3) return FALSE; + default: + return FALSE; + } - dissect_iuup(tvb, pinfo, tree); - return TRUE; + dissect_iuup(tvb, pinfo, tree); + return TRUE; } static void find_iuup(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) { - int len = tvb_length(tvb); - int offset = 0; + int len = tvb_length(tvb); + int offset = 0; - while (len > 3) { - if ( dissect_iuup_heur(tvb_new_subset(tvb,offset,-1,-1), pinfo, tree) ) - return; + while (len > 3) { + if ( dissect_iuup_heur(tvb_new_subset(tvb,offset,-1,-1), pinfo, tree) ) + return; - offset++; - len--; - } + offset++; + len--; + } - call_dissector(data_handle, tvb, pinfo, tree); + call_dissector(data_handle, tvb, pinfo, tree); } static void init_iuup(void) { @@ -877,90 +877,90 @@ void proto_reg_handoff_iuup(void) { #define HFS_RFCI(i) \ -{ &hf_iuup_rfci_ratectl[i], { "RFCI " #i, "iuup.rfci." #i, FT_UINT8, BASE_DEC, VALS(iuup_rfci_indicator),0x80>>(i%8),"",HFILL}}, \ -{ &hf_iuup_init_rfci[i], { "RFCI " #i, "iuup.rfci." #i, FT_UINT8, BASE_DEC, NULL,0x3f,"",HFILL}}, \ -{ &hf_iuup_init_rfci_flow_len[i][0], { "RFCI " #i " Flow 0 Len", "iuup.rfci."#i".flow.0.len", FT_UINT16, BASE_DEC, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_init_rfci_flow_len[i][1], { "RFCI " #i " Flow 1 Len", "iuup.rfci."#i".flow.1.len", FT_UINT16, BASE_DEC, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_init_rfci_flow_len[i][2], { "RFCI " #i " Flow 2 Len", "iuup.rfci."#i".flow.2.len", FT_UINT16, BASE_DEC, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_init_rfci_flow_len[i][3], { "RFCI " #i " Flow 3 Len", "iuup.rfci."#i".flow.3.len", FT_UINT16, BASE_DEC, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_init_rfci_flow_len[i][4], { "RFCI " #i " Flow 4 Len", "iuup.rfci."#i".flow.4.len", FT_UINT16, BASE_DEC, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_init_rfci_flow_len[i][5], { "RFCI " #i " Flow 5 Len", "iuup.rfci."#i".flow.5.len", FT_UINT16, BASE_DEC, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_init_rfci_flow_len[i][6], { "RFCI " #i " Flow 6 Len", "iuup.rfci."#i".flow.6.len", FT_UINT16, BASE_DEC, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_init_rfci_flow_len[i][7], { "RFCI " #i " Flow 7 Len", "iuup.rfci."#i".flow.7.len", FT_UINT16, BASE_DEC, NULL,0x0,"",HFILL}}, \ +{ &hf_iuup_rfci_ratectl[i], { "RFCI " #i, "iuup.rfci." #i, FT_UINT8, BASE_DEC, VALS(iuup_rfci_indicator),0x80>>(i%8),NULL,HFILL}}, \ +{ &hf_iuup_init_rfci[i], { "RFCI " #i, "iuup.rfci." #i, FT_UINT8, BASE_DEC, NULL,0x3f,NULL,HFILL}}, \ +{ &hf_iuup_init_rfci_flow_len[i][0], { "RFCI " #i " Flow 0 Len", "iuup.rfci."#i".flow.0.len", FT_UINT16, BASE_DEC, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_init_rfci_flow_len[i][1], { "RFCI " #i " Flow 1 Len", "iuup.rfci."#i".flow.1.len", FT_UINT16, BASE_DEC, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_init_rfci_flow_len[i][2], { "RFCI " #i " Flow 2 Len", "iuup.rfci."#i".flow.2.len", FT_UINT16, BASE_DEC, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_init_rfci_flow_len[i][3], { "RFCI " #i " Flow 3 Len", "iuup.rfci."#i".flow.3.len", FT_UINT16, BASE_DEC, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_init_rfci_flow_len[i][4], { "RFCI " #i " Flow 4 Len", "iuup.rfci."#i".flow.4.len", FT_UINT16, BASE_DEC, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_init_rfci_flow_len[i][5], { "RFCI " #i " Flow 5 Len", "iuup.rfci."#i".flow.5.len", FT_UINT16, BASE_DEC, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_init_rfci_flow_len[i][6], { "RFCI " #i " Flow 6 Len", "iuup.rfci."#i".flow.6.len", FT_UINT16, BASE_DEC, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_init_rfci_flow_len[i][7], { "RFCI " #i " Flow 7 Len", "iuup.rfci."#i".flow.7.len", FT_UINT16, BASE_DEC, NULL,0x0,NULL,HFILL}}, \ { &hf_iuup_init_rfci_li[i], { "RFCI " #i " LI", "iuup.rfci."#i".li", FT_UINT8, BASE_HEX, VALS(iuup_init_rfci_li_vals),0x40,"Length Indicator",HFILL}}, \ { &hf_iuup_init_rfci_lri[i], { "RFCI " #i " LRI", "iuup.rfci."#i".lri", FT_UINT8, BASE_HEX, VALS(iuup_init_lri_vals),0x80,"Last Record Indicator",HFILL}}, \ -{ &hf_iuup_rfci_subflow[i][0], { "RFCI " #i " Flow 0", "iuup.rfci."#i".flow.0", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_rfci_subflow[i][1], { "RFCI " #i " Flow 1", "iuup.rfci."#i".flow.1", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_rfci_subflow[i][2], { "RFCI " #i " Flow 2", "iuup.rfci."#i".flow.2", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_rfci_subflow[i][3], { "RFCI " #i " Flow 3", "iuup.rfci."#i".flow.3", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_rfci_subflow[i][4], { "RFCI " #i " Flow 4", "iuup.rfci."#i".flow.4", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_rfci_subflow[i][5], { "RFCI " #i " Flow 5", "iuup.rfci."#i".flow.5", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_rfci_subflow[i][6], { "RFCI " #i " Flow 6", "iuup.rfci."#i".flow.6", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_rfci_subflow[i][7], { "RFCI " #i " Flow 7", "iuup.rfci."#i".flow.7", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, \ -{ &hf_iuup_init_ipti[i], { "RFCI " #i " IPTI", "iuup.rfci."#i".ipti", FT_UINT8, BASE_HEX, NULL,i%2 ? 0x0F : 0xF0,"",HFILL}} +{ &hf_iuup_rfci_subflow[i][0], { "RFCI " #i " Flow 0", "iuup.rfci."#i".flow.0", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_rfci_subflow[i][1], { "RFCI " #i " Flow 1", "iuup.rfci."#i".flow.1", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_rfci_subflow[i][2], { "RFCI " #i " Flow 2", "iuup.rfci."#i".flow.2", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_rfci_subflow[i][3], { "RFCI " #i " Flow 3", "iuup.rfci."#i".flow.3", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_rfci_subflow[i][4], { "RFCI " #i " Flow 4", "iuup.rfci."#i".flow.4", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_rfci_subflow[i][5], { "RFCI " #i " Flow 5", "iuup.rfci."#i".flow.5", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_rfci_subflow[i][6], { "RFCI " #i " Flow 6", "iuup.rfci."#i".flow.6", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_rfci_subflow[i][7], { "RFCI " #i " Flow 7", "iuup.rfci."#i".flow.7", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, \ +{ &hf_iuup_init_ipti[i], { "RFCI " #i " IPTI", "iuup.rfci."#i".ipti", FT_UINT8, BASE_HEX, NULL,i%2 ? 0x0F : 0xF0,NULL,HFILL}} void proto_register_iuup(void) { static hf_register_info hf[] = { - { &hf_iuup_direction, { "Frame Direction", "iuup.direction", FT_UINT16, BASE_DEC, NULL,0x8000,"",HFILL}}, - { &hf_iuup_circuit_id, { "Circuit ID", "iuup.circuit_id", FT_UINT16, BASE_DEC, NULL,0x7fff,"",HFILL}}, - { &hf_iuup_pdu_type, { "PDU Type", "iuup.pdu_type", FT_UINT8, BASE_DEC, VALS(iuup_pdu_types),0xf0,"",HFILL}}, - { &hf_iuup_frame_number, { "Frame Number", "iuup.framenum", FT_UINT8, BASE_DEC, NULL,0x0F,"",HFILL}}, + { &hf_iuup_direction, { "Frame Direction", "iuup.direction", FT_UINT16, BASE_DEC, NULL,0x8000,NULL,HFILL}}, + { &hf_iuup_circuit_id, { "Circuit ID", "iuup.circuit_id", FT_UINT16, BASE_DEC, NULL,0x7fff,NULL,HFILL}}, + { &hf_iuup_pdu_type, { "PDU Type", "iuup.pdu_type", FT_UINT8, BASE_DEC, VALS(iuup_pdu_types),0xf0,NULL,HFILL}}, + { &hf_iuup_frame_number, { "Frame Number", "iuup.framenum", FT_UINT8, BASE_DEC, NULL,0x0F,NULL,HFILL}}, { &hf_iuup_fqc, { "FQC", "iuup.fqc", FT_UINT8, BASE_DEC, VALS(iuup_fqcs),0xc0,"Frame Quality Classification",HFILL}}, { &hf_iuup_rfci, { "RFCI", "iuup.rfci", FT_UINT8, BASE_HEX, NULL, 0x3f, "RAB sub-Flow Combination Indicator",HFILL}}, - { &hf_iuup_hdr_crc, { "Header CRC", "iuup.header_crc", FT_UINT8, BASE_HEX, NULL,0xfc,"",HFILL}}, - { &hf_iuup_hdr_crc_error, { "Header CRC [incorrect]", "iuup.header_crc", FT_UINT8, BASE_HEX, NULL,0xfc,"",HFILL}}, - { &hf_iuup_payload_crc, { "Payload CRC", "iuup.payload_crc", FT_UINT16, BASE_HEX, NULL,0x03FF,"",HFILL}}, - { &hf_iuup_payload_crc_error, { "Payload CRC [incorrect]", "iuup.payload_crc", FT_UINT16, BASE_HEX, NULL,0x03FF,"",HFILL}}, - { &hf_iuup_ack_nack, { "Ack/Nack", "iuup.ack", FT_UINT8, BASE_DEC, VALS(iuup_acknack_vals),0x0c,"Ack/Nack",HFILL}}, - { &hf_iuup_frame_number_t14, { "Frame Number", "iuup.framenum", FT_UINT8, BASE_DEC, NULL,0x03,"",HFILL}}, - { &hf_iuup_mode_version, { "Mode Version", "iuup.mode", FT_UINT8, BASE_HEX, NULL,0xf0,"",HFILL}}, - { &hf_iuup_procedure_indicator, { "Procedure", "iuup.procedure", FT_UINT8, BASE_DEC, VALS(iuup_procedures),0x0f,"",HFILL}}, - { &hf_iuup_error_cause_val, { "Error Cause", "iuup.error_cause", FT_UINT8, BASE_DEC, VALS(iuup_error_causes),0xfc,"",HFILL}}, - { &hf_iuup_error_distance, { "Error DISTANCE", "iuup.error_distance", FT_UINT8, BASE_DEC, VALS(iuup_error_distances),0xc0,"",HFILL}}, - { &hf_iuup_errorevt_cause_val, { "Error Cause", "iuup.error_cause", FT_UINT8, BASE_DEC, NULL,0x3f,"",HFILL}}, - { &hf_iuup_time_align, { "Time Align", "iuup.time_align", FT_UINT8, BASE_HEX, NULL,0x0,"",HFILL}}, - { &hf_iuup_data_pdu_type, { "RFCI Data Pdu Type", "iuup.data_pdu_type", FT_UINT8, BASE_HEX, VALS(iuup_payload_pdu_type),0xF0,"",HFILL}}, - - { &hf_iuup_spare_03, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0x03,"",HFILL}}, - { &hf_iuup_spare_0f, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0x0f,"",HFILL}}, - { &hf_iuup_spare_c0, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0xc0,"",HFILL}}, - { &hf_iuup_spare_e0, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0xe0,"",HFILL}}, - { &hf_iuup_spare_ff, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0xff,"",HFILL}}, - { &hf_iuup_spare_bytes, { "Spare", "iuup.spare", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, + { &hf_iuup_hdr_crc, { "Header CRC", "iuup.header_crc", FT_UINT8, BASE_HEX, NULL,0xfc,NULL,HFILL}}, + { &hf_iuup_hdr_crc_error, { "Header CRC [incorrect]", "iuup.header_crc", FT_UINT8, BASE_HEX, NULL,0xfc,NULL,HFILL}}, + { &hf_iuup_payload_crc, { "Payload CRC", "iuup.payload_crc", FT_UINT16, BASE_HEX, NULL,0x03FF,NULL,HFILL}}, + { &hf_iuup_payload_crc_error, { "Payload CRC [incorrect]", "iuup.payload_crc", FT_UINT16, BASE_HEX, NULL,0x03FF,NULL,HFILL}}, + { &hf_iuup_ack_nack, { "Ack/Nack", "iuup.ack", FT_UINT8, BASE_DEC, VALS(iuup_acknack_vals),0x0c,NULL,HFILL}}, + { &hf_iuup_frame_number_t14, { "Frame Number", "iuup.framenum", FT_UINT8, BASE_DEC, NULL,0x03,NULL,HFILL}}, + { &hf_iuup_mode_version, { "Mode Version", "iuup.mode", FT_UINT8, BASE_HEX, NULL,0xf0,NULL,HFILL}}, + { &hf_iuup_procedure_indicator, { "Procedure", "iuup.procedure", FT_UINT8, BASE_DEC, VALS(iuup_procedures),0x0f,NULL,HFILL}}, + { &hf_iuup_error_cause_val, { "Error Cause", "iuup.error_cause", FT_UINT8, BASE_DEC, VALS(iuup_error_causes),0xfc,NULL,HFILL}}, + { &hf_iuup_error_distance, { "Error DISTANCE", "iuup.error_distance", FT_UINT8, BASE_DEC, VALS(iuup_error_distances),0xc0,NULL,HFILL}}, + { &hf_iuup_errorevt_cause_val, { "Error Cause", "iuup.error_cause", FT_UINT8, BASE_DEC, NULL,0x3f,NULL,HFILL}}, + { &hf_iuup_time_align, { "Time Align", "iuup.time_align", FT_UINT8, BASE_HEX, NULL,0x0,NULL,HFILL}}, + { &hf_iuup_data_pdu_type, { "RFCI Data Pdu Type", "iuup.data_pdu_type", FT_UINT8, BASE_HEX, VALS(iuup_payload_pdu_type),0xF0,NULL,HFILL}}, + + { &hf_iuup_spare_03, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0x03,NULL,HFILL}}, + { &hf_iuup_spare_0f, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0x0f,NULL,HFILL}}, + { &hf_iuup_spare_c0, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0xc0,NULL,HFILL}}, + { &hf_iuup_spare_e0, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0xe0,NULL,HFILL}}, + { &hf_iuup_spare_ff, { "Spare", "iuup.spare", FT_UINT8, BASE_HEX, NULL,0xff,NULL,HFILL}}, + { &hf_iuup_spare_bytes, { "Spare", "iuup.spare", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, - { &hf_iuup_delay, { "Delay", "iuup.delay", FT_UINT32, BASE_HEX, NULL,0x0,"",HFILL}}, - { &hf_iuup_advance, { "Advance", "iuup.advance", FT_UINT32, BASE_HEX, NULL,0x0,"",HFILL}}, - { &hf_iuup_delta, { "Delta Time", "iuup.delta", FT_FLOAT, BASE_DEC, NULL,0x0,"",HFILL}}, + { &hf_iuup_delay, { "Delay", "iuup.delay", FT_UINT32, BASE_HEX, NULL,0x0,NULL,HFILL}}, + { &hf_iuup_advance, { "Advance", "iuup.advance", FT_UINT32, BASE_HEX, NULL,0x0,NULL,HFILL}}, + { &hf_iuup_delta, { "Delta Time", "iuup.delta", FT_FLOAT, BASE_DEC, NULL,0x0,NULL,HFILL}}, { &hf_iuup_init_ti, { "TI", "iuup.ti", FT_UINT8, BASE_DEC, VALS(iuup_ti_vals),0x10,"Timing Information",HFILL}}, { &hf_iuup_init_subflows_per_rfci, { "Subflows", "iuup.subflows", FT_UINT8, BASE_DEC, NULL,0x0e,"Number of Subflows",HFILL}}, - { &hf_iuup_init_chain_ind, { "Chain Indicator", "iuup.chain_ind", FT_UINT8, BASE_DEC, VALS(iuup_init_chain_ind_vals),0x01,"",HFILL}}, - { &hf_iuup_payload, { "Payload Data", "iuup.payload_data", FT_BYTES, BASE_HEX, NULL,0x00,"",HFILL}}, + { &hf_iuup_init_chain_ind, { "Chain Indicator", "iuup.chain_ind", FT_UINT8, BASE_DEC, VALS(iuup_init_chain_ind_vals),0x01,NULL,HFILL}}, + { &hf_iuup_payload, { "Payload Data", "iuup.payload_data", FT_BYTES, BASE_HEX, NULL,0x00,NULL,HFILL}}, - { &hf_iuup_mode_versions, { "Iu UP Mode Versions Supported", "iuup.support_mode", FT_UINT16, BASE_HEX, NULL,0x0,"",HFILL}}, + { &hf_iuup_mode_versions, { "Iu UP Mode Versions Supported", "iuup.support_mode", FT_UINT16, BASE_HEX, NULL,0x0,NULL,HFILL}}, - { &hf_iuup_mode_versions_a[ 0], { "Version 16", "iuup.support_mode.version16", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x8000,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 1], { "Version 15", "iuup.support_mode.version15", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x4000,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 2], { "Version 14", "iuup.support_mode.version14", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x2000,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 3], { "Version 13", "iuup.support_mode.version13", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x1000,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 4], { "Version 12", "iuup.support_mode.version12", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0800,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 5], { "Version 11", "iuup.support_mode.version11", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0400,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 6], { "Version 10", "iuup.support_mode.version10", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0200,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 7], { "Version 9", "iuup.support_mode.version9", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0100,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 8], { "Version 8", "iuup.support_mode.version8", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0080,"",HFILL}}, - { &hf_iuup_mode_versions_a[ 9], { "Version 7", "iuup.support_mode.version7", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0040,"",HFILL}}, - { &hf_iuup_mode_versions_a[10], { "Version 6", "iuup.support_mode.version6", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0020,"",HFILL}}, - { &hf_iuup_mode_versions_a[11], { "Version 5", "iuup.support_mode.version5", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0010,"",HFILL}}, - { &hf_iuup_mode_versions_a[12], { "Version 4", "iuup.support_mode.version4", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0008,"",HFILL}}, - { &hf_iuup_mode_versions_a[13], { "Version 3", "iuup.support_mode.version3", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0004,"",HFILL}}, - { &hf_iuup_mode_versions_a[14], { "Version 2", "iuup.support_mode.version2", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0002,"",HFILL}}, - { &hf_iuup_mode_versions_a[15], { "Version 1", "iuup.support_mode.version1", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0001,"",HFILL}}, - - { &hf_iuup_num_rfci_ind, { "Number of RFCI Indicators", "iuup.p", FT_UINT8, BASE_HEX, NULL,0x3f,"",HFILL}}, - { &hf_iuup_init_rfci_ind, { "RFCI Initialization", "iuup.rfci.init", FT_BYTES, BASE_HEX, NULL,0x0,"",HFILL}}, + { &hf_iuup_mode_versions_a[ 0], { "Version 16", "iuup.support_mode.version16", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x8000,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 1], { "Version 15", "iuup.support_mode.version15", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x4000,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 2], { "Version 14", "iuup.support_mode.version14", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x2000,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 3], { "Version 13", "iuup.support_mode.version13", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x1000,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 4], { "Version 12", "iuup.support_mode.version12", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0800,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 5], { "Version 11", "iuup.support_mode.version11", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0400,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 6], { "Version 10", "iuup.support_mode.version10", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0200,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 7], { "Version 9", "iuup.support_mode.version9", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0100,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 8], { "Version 8", "iuup.support_mode.version8", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0080,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[ 9], { "Version 7", "iuup.support_mode.version7", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0040,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[10], { "Version 6", "iuup.support_mode.version6", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0020,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[11], { "Version 5", "iuup.support_mode.version5", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0010,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[12], { "Version 4", "iuup.support_mode.version4", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0008,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[13], { "Version 3", "iuup.support_mode.version3", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0004,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[14], { "Version 2", "iuup.support_mode.version2", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0002,NULL,HFILL}}, + { &hf_iuup_mode_versions_a[15], { "Version 1", "iuup.support_mode.version1", FT_UINT16, BASE_HEX, VALS(iuup_mode_version_support),0x0001,NULL,HFILL}}, + + { &hf_iuup_num_rfci_ind, { "Number of RFCI Indicators", "iuup.p", FT_UINT8, BASE_HEX, NULL,0x3f,NULL,HFILL}}, + { &hf_iuup_init_rfci_ind, { "RFCI Initialization", "iuup.rfci.init", FT_BYTES, BASE_HEX, NULL,0x0,NULL,HFILL}}, HFS_RFCI(0),HFS_RFCI(1),HFS_RFCI(2),HFS_RFCI(3),HFS_RFCI(4),HFS_RFCI(5),HFS_RFCI(6),HFS_RFCI(7), HFS_RFCI(8),HFS_RFCI(9),HFS_RFCI(10),HFS_RFCI(11),HFS_RFCI(12),HFS_RFCI(13),HFS_RFCI(14),HFS_RFCI(15), diff --git a/epan/dissectors/packet-lapd.c b/epan/dissectors/packet-lapd.c index b0d80b6c9f..434b67000a 100644 --- a/epan/dissectors/packet-lapd.c +++ b/epan/dissectors/packet-lapd.c @@ -168,7 +168,8 @@ typedef struct lapd_ppi { } lapd_ppi_t; /* Fill values in lapd_byte_state struct */ -void fill_lapd_byte_state(lapd_byte_state_t *ptr, enum lapd_bitstream_states state, char full_byte, char bit_offset, int ones) +static void +fill_lapd_byte_state(lapd_byte_state_t *ptr, enum lapd_bitstream_states state, char full_byte, char bit_offset, int ones) { ptr->state = state; ptr->full_byte = full_byte; @@ -548,31 +549,7 @@ dissect_lapd(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) } void -proto_reg_handoff_lapd(void) -{ - static gboolean init = FALSE; - static dissector_handle_t lapd_bitstream_handle; - static gint lapd_rtp_payload_type; - - if (!init) { - dissector_handle_t lapd_handle; - - lapd_handle = find_dissector("lapd"); - dissector_add("wtap_encap", WTAP_ENCAP_LINUX_LAPD, lapd_handle); - - lapd_bitstream_handle = create_dissector_handle(dissect_lapd_bitstream, proto_lapd); - data_handle = find_dissector("data"); - - init = TRUE; - } else { - if ((lapd_rtp_payload_type > 95) && (lapd_rtp_payload_type < 128)) - dissector_delete("rtp.pt", lapd_rtp_payload_type, lapd_bitstream_handle); - } - - lapd_rtp_payload_type = pref_lapd_rtp_payload_type; - if ((lapd_rtp_payload_type > 95) && (lapd_rtp_payload_type < 128)) - dissector_add("rtp.pt", lapd_rtp_payload_type, lapd_bitstream_handle); -} +proto_reg_handoff_lapd(void); void proto_register_lapd(void) @@ -581,7 +558,7 @@ proto_register_lapd(void) { &hf_lapd_direction, { "Direction", "lapd.direction", FT_UINT8, BASE_DEC, VALS(lapd_direction_vals), 0x0, - "Direction", HFILL }}, + NULL, HFILL }}, { &hf_lapd_address, { "Address Field", "lapd.address", FT_UINT16, BASE_HEX, NULL, 0x0, @@ -617,51 +594,51 @@ proto_register_lapd(void) { &hf_lapd_n_r, { "N(R)", "lapd.control.n_r", FT_UINT16, BASE_DEC, - NULL, XDLC_N_R_EXT_MASK, "", HFILL }}, + NULL, XDLC_N_R_EXT_MASK, NULL, HFILL }}, { &hf_lapd_n_s, { "N(S)", "lapd.control.n_s", FT_UINT16, BASE_DEC, - NULL, XDLC_N_S_EXT_MASK, "", HFILL }}, + NULL, XDLC_N_S_EXT_MASK, NULL, HFILL }}, { &hf_lapd_p, { "Poll", "lapd.control.p", FT_BOOLEAN, 8, - TFS(&flags_set_truth), XDLC_P_F, "", HFILL }}, + TFS(&flags_set_truth), XDLC_P_F, NULL, HFILL }}, { &hf_lapd_p_ext, { "Poll", "lapd.control.p", FT_BOOLEAN, 16, - TFS(&flags_set_truth), XDLC_P_F_EXT, "", HFILL }}, + TFS(&flags_set_truth), XDLC_P_F_EXT, NULL, HFILL }}, { &hf_lapd_f, { "Final", "lapd.control.f", FT_BOOLEAN, 8, - TFS(&flags_set_truth), XDLC_P_F, "", HFILL }}, + TFS(&flags_set_truth), XDLC_P_F, NULL, HFILL }}, { &hf_lapd_f_ext, { "Final", "lapd.control.f", FT_BOOLEAN, 16, - TFS(&flags_set_truth), XDLC_P_F_EXT, "", HFILL }}, + TFS(&flags_set_truth), XDLC_P_F_EXT, NULL, HFILL }}, { &hf_lapd_s_ftype, { "Supervisory frame type", "lapd.control.s_ftype", FT_UINT16, BASE_HEX, - VALS(stype_vals), XDLC_S_FTYPE_MASK, "", HFILL }}, + VALS(stype_vals), XDLC_S_FTYPE_MASK, NULL, HFILL }}, { &hf_lapd_u_modifier_cmd, { "Command", "lapd.control.u_modifier_cmd", FT_UINT8, BASE_HEX, - VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, "", HFILL }}, + VALS(modifier_vals_cmd), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, { &hf_lapd_u_modifier_resp, { "Response", "lapd.control.u_modifier_resp", FT_UINT8, BASE_HEX, - VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, "", HFILL }}, + VALS(modifier_vals_resp), XDLC_U_MODIFIER_MASK, NULL, HFILL }}, { &hf_lapd_ftype_i, { "Frame type", "lapd.control.ftype", FT_UINT16, BASE_HEX, - VALS(ftype_vals), XDLC_I_MASK, "", HFILL }}, + VALS(ftype_vals), XDLC_I_MASK, NULL, HFILL }}, { &hf_lapd_ftype_s_u, { "Frame type", "lapd.control.ftype", FT_UINT8, BASE_HEX, - VALS(ftype_vals), XDLC_S_U_MASK, "", HFILL }}, + VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, { &hf_lapd_ftype_s_u_ext, { "Frame type", "lapd.control.ftype", FT_UINT16, BASE_HEX, - VALS(ftype_vals), XDLC_S_U_MASK, "", HFILL }}, + VALS(ftype_vals), XDLC_S_U_MASK, NULL, HFILL }}, { &hf_lapd_checksum, { "Checksum", "lapd.checksum", FT_UINT16, BASE_HEX, @@ -711,3 +688,31 @@ proto_register_lapd(void) 10, &pref_lapd_rtp_payload_type); } + +void +proto_reg_handoff_lapd(void) +{ + static gboolean init = FALSE; + static dissector_handle_t lapd_bitstream_handle; + static gint lapd_rtp_payload_type; + + if (!init) { + dissector_handle_t lapd_handle; + + lapd_handle = find_dissector("lapd"); + dissector_add("wtap_encap", WTAP_ENCAP_LINUX_LAPD, lapd_handle); + + lapd_bitstream_handle = create_dissector_handle(dissect_lapd_bitstream, proto_lapd); + data_handle = find_dissector("data"); + + init = TRUE; + } else { + if ((lapd_rtp_payload_type > 95) && (lapd_rtp_payload_type < 128)) + dissector_delete("rtp.pt", lapd_rtp_payload_type, lapd_bitstream_handle); + } + + lapd_rtp_payload_type = pref_lapd_rtp_payload_type; + if ((lapd_rtp_payload_type > 95) && (lapd_rtp_payload_type < 128)) + dissector_add("rtp.pt", lapd_rtp_payload_type, lapd_bitstream_handle); +} + diff --git a/epan/dissectors/packet-megaco.c b/epan/dissectors/packet-megaco.c index bb90f425e9..3248d3f721 100644 --- a/epan/dissectors/packet-megaco.c +++ b/epan/dissectors/packet-megaco.c @@ -277,22 +277,22 @@ static const megaco_tokens_t megaco_messageBody_names[] = { /* Returns index of megaco_tokens_t */ static gint find_megaco_messageBody_names(tvbuff_t *tvb, int offset, guint header_len) { - guint i; - - for (i = 1; i < array_length(megaco_messageBody_names); i++) { - if (header_len == strlen(megaco_messageBody_names[i].name) && - tvb_strncaseeql(tvb, offset, megaco_messageBody_names[i].name, header_len) == 0) - return i; - if (megaco_messageBody_names[i].compact_name != NULL && - header_len == strlen(megaco_messageBody_names[i].compact_name) && - tvb_strncaseeql(tvb, offset, megaco_messageBody_names[i].compact_name, header_len) == 0) - return i; - } + guint i; + + for (i = 1; i < array_length(megaco_messageBody_names); i++) { + if (header_len == strlen(megaco_messageBody_names[i].name) && + tvb_strncaseeql(tvb, offset, megaco_messageBody_names[i].name, header_len) == 0) + return i; + if (megaco_messageBody_names[i].compact_name != NULL && + header_len == strlen(megaco_messageBody_names[i].compact_name) && + tvb_strncaseeql(tvb, offset, megaco_messageBody_names[i].compact_name, header_len) == 0) + return i; + } - return -1; + return -1; } -proto_item * +static proto_item * my_proto_tree_add_string(proto_tree *tree, int hfindex, tvbuff_t *tvb, gint start, gint length, const char *value) { @@ -548,7 +548,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) return; /* transactionResponseAck * transactionResponseAck = ResponseAckToken LBRKT transactionAck - * *(COMMA transactionAck) RBRKT + * *(COMMA transactionAck) RBRKT * transactionAck = transactionID / (transactionID "-" transactionID) */ case RESPONSEACKTOKEN: @@ -684,7 +684,7 @@ dissect_megaco_text(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) megaco_tree = proto_item_add_subtree(ti, ett_megaco); proto_tree_add_text(megaco_tree, tvb, 0, -1, "Sorry, can't understand errorDescriptor / transactionList = %s, can't parse it pos %u", - tvb_format_text(tvb,tvb_previous_offset,2),tvb_previous_offset); + tvb_format_text(tvb,tvb_previous_offset,2),tvb_previous_offset); return; } /* end switch */ /* Only these remains now @@ -1393,19 +1393,18 @@ static const megaco_tokens_t megaco_descriptors_names[] = { /* note - also called by dissect_megaco_auditdescriptor */ static gint find_megaco_descriptors_names(tvbuff_t *tvb, int offset, guint header_len) { - guint i; - - for (i = 1; i < array_length(megaco_descriptors_names); i++) { - if (header_len == strlen(megaco_descriptors_names[i].name) && - tvb_strncaseeql(tvb, offset, megaco_descriptors_names[i].name, header_len) == 0) - return i; - if (megaco_descriptors_names[i].compact_name != NULL && - header_len == strlen(megaco_descriptors_names[i].compact_name) && - tvb_strncaseeql(tvb, offset, megaco_descriptors_names[i].compact_name, header_len) == 0) - return i; - } - - return -1; + guint i; + + for (i = 1; i < array_length(megaco_descriptors_names); i++) { + if (header_len == strlen(megaco_descriptors_names[i].name) && + tvb_strncaseeql(tvb, offset, megaco_descriptors_names[i].name, header_len) == 0) + return i; + if (megaco_descriptors_names[i].compact_name != NULL && + header_len == strlen(megaco_descriptors_names[i].compact_name) && + tvb_strncaseeql(tvb, offset, megaco_descriptors_names[i].compact_name, header_len) == 0) + return i; + } + return -1; } static void diff --git a/epan/dissectors/packet-mp2t.c b/epan/dissectors/packet-mp2t.c index dd07587ddd..40e9243533 100644 --- a/epan/dissectors/packet-mp2t.c +++ b/epan/dissectors/packet-mp2t.c @@ -250,7 +250,7 @@ typedef struct frame_analysis_data { } frame_analysis_data_t; -conversation_t * +static conversation_t * get_the_conversation(packet_info *pinfo) { conversation_t *conv = NULL; @@ -267,7 +267,7 @@ get_the_conversation(packet_info *pinfo) return conv; } -mp2t_analysis_data_t * +static mp2t_analysis_data_t * init_mp2t_conversation_data() { mp2t_analysis_data_t *mp2t_data = NULL; @@ -285,7 +285,7 @@ init_mp2t_conversation_data() return mp2t_data; } -mp2t_analysis_data_t * +static mp2t_analysis_data_t * get_mp2t_conversation_data(conversation_t *conv) { mp2t_analysis_data_t *mp2t_data = NULL; @@ -299,7 +299,7 @@ get_mp2t_conversation_data(conversation_t *conv) return mp2t_data; } -frame_analysis_data_t * +static frame_analysis_data_t * init_frame_analysis_data(mp2t_analysis_data_t *mp2t_data, packet_info *pinfo) { frame_analysis_data_t *frame_data = NULL; @@ -316,7 +316,7 @@ init_frame_analysis_data(mp2t_analysis_data_t *mp2t_data, packet_info *pinfo) } -frame_analysis_data_t * +static frame_analysis_data_t * get_frame_analysis_data(mp2t_analysis_data_t *mp2t_data, packet_info *pinfo) { frame_analysis_data_t *frame_data = NULL; @@ -324,7 +324,7 @@ get_frame_analysis_data(mp2t_analysis_data_t *mp2t_data, packet_info *pinfo) return frame_data; } -pid_analysis_data_t * +static pid_analysis_data_t * get_pid_analysis(guint32 pid, conversation_t *conv) { @@ -345,7 +345,7 @@ get_pid_analysis(guint32 pid, conversation_t *conv) #define KEY(pid, cc) ((pid << 4)|cc) -void +static void detect_cc_drops(tvbuff_t *tvb, proto_tree *tree, packet_info *pinfo, guint32 pid, gint32 cc_curr, conversation_t *conv) { diff --git a/epan/dissectors/packet-mtp2.c b/epan/dissectors/packet-mtp2.c index 134e106c90..cac7d49f8b 100644 --- a/epan/dissectors/packet-mtp2.c +++ b/epan/dissectors/packet-mtp2.c @@ -128,7 +128,8 @@ dissect_mtp2_header(tvbuff_t *su_tvb, proto_item *mtp2_tree) * DETAILS : Calculate a new FCS-16 given the current FCS-16 and the new data. ******************************************************************************* */ -static guint16 mtp2_fcs16(tvbuff_t * tvbuff) +static guint16 +mtp2_fcs16(tvbuff_t * tvbuff) { guint len = tvb_length(tvbuff)-2; @@ -141,7 +142,8 @@ static guint16 mtp2_fcs16(tvbuff_t * tvbuff) /* * This function for CRC16 only is based on the decode_fcs of packet_ppp.c */ -tvbuff_t * mtp2_decode_crc16(tvbuff_t *tvb, proto_tree *fh_tree, packet_info *pinfo) +static tvbuff_t * +mtp2_decode_crc16(tvbuff_t *tvb, proto_tree *fh_tree, packet_info *pinfo) { tvbuff_t *next_tvb; gint len, reported_len; @@ -373,21 +375,21 @@ proto_register_mtp2(void) { static hf_register_info hf[] = { - { &hf_mtp2_bsn, { "Backward sequence number", "mtp2.bsn", FT_UINT8, BASE_DEC, NULL, BSN_MASK, "", HFILL } }, - { &hf_mtp2_ext_bsn, { "Backward sequence number", "mtp2.bsn", FT_UINT16, BASE_DEC, NULL, EXTENDED_BSN_MASK, "", HFILL } }, - { &hf_mtp2_ext_res, { "Reserved", "mtp2.res", FT_UINT16, BASE_DEC, NULL, EXTENDED_RES_MASK, "", HFILL } }, - { &hf_mtp2_bib, { "Backward indicator bit", "mtp2.bib", FT_UINT8, BASE_DEC, NULL, BIB_MASK, "", HFILL } }, - { &hf_mtp2_ext_bib, { "Backward indicator bit", "mtp2.bib", FT_UINT16, BASE_DEC, NULL, EXTENDED_BIB_MASK, "", HFILL } }, - { &hf_mtp2_fsn, { "Forward sequence number", "mtp2.fsn", FT_UINT8, BASE_DEC, NULL, FSN_MASK, "", HFILL } }, - { &hf_mtp2_ext_fsn, { "Forward sequence number", "mtp2.fsn", FT_UINT16, BASE_DEC, NULL, EXTENDED_FSN_MASK, "", HFILL } }, - { &hf_mtp2_fib, { "Forward indicator bit", "mtp2.fib", FT_UINT8, BASE_DEC, NULL, FIB_MASK, "", HFILL } }, - { &hf_mtp2_ext_fib, { "Forward indicator bit", "mtp2.fib", FT_UINT16, BASE_DEC, NULL, EXTENDED_FIB_MASK, "", HFILL } }, - { &hf_mtp2_li, { "Length Indicator", "mtp2.li", FT_UINT8, BASE_DEC, NULL, LI_MASK, "", HFILL } }, - { &hf_mtp2_ext_li, { "Length Indicator", "mtp2.li", FT_UINT16, BASE_DEC, NULL, EXTENDED_LI_MASK, "", HFILL } }, - { &hf_mtp2_spare, { "Spare", "mtp2.spare", FT_UINT8, BASE_DEC, NULL, SPARE_MASK, "", HFILL } }, - { &hf_mtp2_ext_spare, { "Spare", "mtp2.spare", FT_UINT16, BASE_DEC, NULL, EXTENDED_SPARE_MASK, "", HFILL } }, - { &hf_mtp2_sf, { "Status field", "mtp2.sf", FT_UINT8, BASE_DEC, VALS(status_field_vals), 0x0, "", HFILL } }, - { &hf_mtp2_sf_extra, { "Status field extra octet", "mtp2.sf_extra", FT_UINT8, BASE_HEX, NULL, 0x0, "", HFILL } } + { &hf_mtp2_bsn, { "Backward sequence number", "mtp2.bsn", FT_UINT8, BASE_DEC, NULL, BSN_MASK, NULL, HFILL } }, + { &hf_mtp2_ext_bsn, { "Backward sequence number", "mtp2.bsn", FT_UINT16, BASE_DEC, NULL, EXTENDED_BSN_MASK, NULL, HFILL } }, + { &hf_mtp2_ext_res, { "Reserved", "mtp2.res", FT_UINT16, BASE_DEC, NULL, EXTENDED_RES_MASK, NULL, HFILL } }, + { &hf_mtp2_bib, { "Backward indicator bit", "mtp2.bib", FT_UINT8, BASE_DEC, NULL, BIB_MASK, NULL, HFILL } }, + { &hf_mtp2_ext_bib, { "Backward indicator bit", "mtp2.bib", FT_UINT16, BASE_DEC, NULL, EXTENDED_BIB_MASK, NULL, HFILL } }, + { &hf_mtp2_fsn, { "Forward sequence number", "mtp2.fsn", FT_UINT8, BASE_DEC, NULL, FSN_MASK, NULL, HFILL } }, + { &hf_mtp2_ext_fsn, { "Forward sequence number", "mtp2.fsn", FT_UINT16, BASE_DEC, NULL, EXTENDED_FSN_MASK, NULL, HFILL } }, + { &hf_mtp2_fib, { "Forward indicator bit", "mtp2.fib", FT_UINT8, BASE_DEC, NULL, FIB_MASK, NULL, HFILL } }, + { &hf_mtp2_ext_fib, { "Forward indicator bit", "mtp2.fib", FT_UINT16, BASE_DEC, NULL, EXTENDED_FIB_MASK, NULL, HFILL } }, + { &hf_mtp2_li, { "Length Indicator", "mtp2.li", FT_UINT8, BASE_DEC, NULL, LI_MASK, NULL, HFILL } }, + { &hf_mtp2_ext_li, { "Length Indicator", "mtp2.li", FT_UINT16, BASE_DEC, NULL, EXTENDED_LI_MASK, NULL, HFILL } }, + { &hf_mtp2_spare, { "Spare", "mtp2.spare", FT_UINT8, BASE_DEC, NULL, SPARE_MASK, NULL, HFILL } }, + { &hf_mtp2_ext_spare, { "Spare", "mtp2.spare", FT_UINT16, BASE_DEC, NULL, EXTENDED_SPARE_MASK, NULL, HFILL } }, + { &hf_mtp2_sf, { "Status field", "mtp2.sf", FT_UINT8, BASE_DEC, VALS(status_field_vals), 0x0, NULL, HFILL } }, + { &hf_mtp2_sf_extra, { "Status field extra octet", "mtp2.sf_extra", FT_UINT8, BASE_HEX, NULL, 0x0, NULL, HFILL } } }; static gint *ett[] = { diff --git a/epan/dissectors/packet-mtp3.c b/epan/dissectors/packet-mtp3.c index bf14d054eb..3a59049dfa 100644 --- a/epan/dissectors/packet-mtp3.c +++ b/epan/dissectors/packet-mtp3.c @@ -702,38 +702,38 @@ proto_register_mtp3(void) /* Setup list of header fields See Section 1.6.1 for details*/ static hf_register_info hf[] = { - { &hf_mtp3_service_indicator, { "Service indicator", "mtp3.service_indicator", FT_UINT8, BASE_HEX, VALS(mtp3_service_indicator_code_vals), SERVICE_INDICATOR_MASK, "", HFILL }}, - { &hf_mtp3_network_indicator, { "Network indicator", "mtp3.network_indicator", FT_UINT8, BASE_HEX, VALS(network_indicator_vals), NETWORK_INDICATOR_MASK, "", HFILL }}, - { &hf_mtp3_itu_spare, { "Spare", "mtp3.spare", FT_UINT8, BASE_HEX, NULL, SPARE_MASK, "", HFILL }}, - { &hf_mtp3_itu_priority, { "ITU priority", "mtp3.priority", FT_UINT8, BASE_DEC, NULL, SPARE_MASK, "", HFILL }}, - { &hf_mtp3_ansi_priority, { "ANSI Priority", "mtp3.priority", FT_UINT8, BASE_DEC, NULL, ANSI_PRIORITY_MASK, "", HFILL }}, - { &hf_mtp3_itu_opc, { "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, ITU_OPC_MASK, "", HFILL }}, - { &hf_mtp3_itu_pc, { "PC", "mtp3.pc", FT_UINT32, BASE_DEC, NULL, 0x0, "", HFILL }}, - { &hf_mtp3_24bit_pc, { "PC", "mtp3.pc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, "", HFILL }}, - { &hf_mtp3_24bit_opc, { "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, "", HFILL }}, - { &hf_mtp3_ansi_opc, { "OPC", "mtp3.ansi_opc", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }}, - { &hf_mtp3_chinese_opc, { "OPC", "mtp3.chinese_opc", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }}, - { &hf_mtp3_opc_network, { "OPC Network", "mtp3.opc.network", FT_UINT24, BASE_DEC, NULL, ANSI_NETWORK_MASK, "", HFILL }}, - { &hf_mtp3_opc_cluster, { "OPC Cluster", "mtp3.opc.cluster", FT_UINT24, BASE_DEC, NULL, ANSI_CLUSTER_MASK, "", HFILL }}, - { &hf_mtp3_opc_member, { "OPC Member", "mtp3.opc.member", FT_UINT24, BASE_DEC, NULL, ANSI_MEMBER_MASK, "", HFILL }}, - { &hf_mtp3_japan_opc, { "OPC", "mtp3.opc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, "", HFILL }}, - { &hf_mtp3_japan_pc, { "PC", "mtp3.pc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, "", HFILL }}, - { &hf_mtp3_itu_dpc, { "DPC", "mtp3.dpc", FT_UINT32, BASE_DEC, NULL, ITU_DPC_MASK, "", HFILL }}, - { &hf_mtp3_24bit_dpc, { "DPC", "mtp3.dpc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, "", HFILL }}, - { &hf_mtp3_ansi_dpc, { "DPC", "mtp3.ansi_dpc", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }}, - { &hf_mtp3_chinese_dpc, { "DPC", "mtp3.chinese_dpc", FT_STRING, BASE_NONE, NULL, 0x0, "", HFILL }}, - { &hf_mtp3_dpc_network, { "DPC Network", "mtp3.dpc.network", FT_UINT24, BASE_DEC, NULL, ANSI_NETWORK_MASK, "", HFILL }}, - { &hf_mtp3_dpc_cluster, { "DPC Cluster", "mtp3.dpc.cluster", FT_UINT24, BASE_DEC, NULL, ANSI_CLUSTER_MASK, "", HFILL }}, - { &hf_mtp3_dpc_member, { "DPC Member", "mtp3.dpc.member", FT_UINT24, BASE_DEC, NULL, ANSI_MEMBER_MASK, "", HFILL }}, - { &hf_mtp3_japan_dpc, { "DPC", "mtp3.dpc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, "", HFILL }}, - { &hf_mtp3_itu_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT32, BASE_DEC, NULL, ITU_SLS_MASK, "", HFILL }}, - { &hf_mtp3_japan_4_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, JAPAN_4_BIT_SLS_MASK, "", HFILL }}, - { &hf_mtp3_japan_4_bit_sls_spare, { "SLS Spare", "mtp3.sls_spare", FT_UINT8, BASE_HEX, NULL, JAPAN_4_BIT_SLS_SPARE_MASK, "", HFILL }}, - { &hf_mtp3_japan_5_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, JAPAN_5_BIT_SLS_MASK, "", HFILL }}, - { &hf_mtp3_japan_5_bit_sls_spare, { "SLS Spare", "mtp3.sls_spare", FT_UINT8, BASE_HEX, NULL, JAPAN_5_BIT_SLS_SPARE_MASK, "", HFILL }}, - { &hf_mtp3_ansi_5_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, ANSI_5BIT_SLS_MASK, "", HFILL }}, - { &hf_mtp3_ansi_8_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, ANSI_8BIT_SLS_MASK, "", HFILL }}, - { &hf_mtp3_chinese_itu_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, CHINESE_ITU_SLS_MASK, "", HFILL }} + { &hf_mtp3_service_indicator, { "Service indicator", "mtp3.service_indicator", FT_UINT8, BASE_HEX, VALS(mtp3_service_indicator_code_vals), SERVICE_INDICATOR_MASK, NULL, HFILL }}, + { &hf_mtp3_network_indicator, { "Network indicator", "mtp3.network_indicator", FT_UINT8, BASE_HEX, VALS(network_indicator_vals), NETWORK_INDICATOR_MASK, NULL, HFILL }}, + { &hf_mtp3_itu_spare, { "Spare", "mtp3.spare", FT_UINT8, BASE_HEX, NULL, SPARE_MASK, NULL, HFILL }}, + { &hf_mtp3_itu_priority, { "ITU priority", "mtp3.priority", FT_UINT8, BASE_DEC, NULL, SPARE_MASK, NULL, HFILL }}, + { &hf_mtp3_ansi_priority, { "ANSI Priority", "mtp3.priority", FT_UINT8, BASE_DEC, NULL, ANSI_PRIORITY_MASK, NULL, HFILL }}, + { &hf_mtp3_itu_opc, { "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, ITU_OPC_MASK, NULL, HFILL }}, + { &hf_mtp3_itu_pc, { "PC", "mtp3.pc", FT_UINT32, BASE_DEC, NULL, 0x0, NULL, HFILL }}, + { &hf_mtp3_24bit_pc, { "PC", "mtp3.pc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, NULL, HFILL }}, + { &hf_mtp3_24bit_opc, { "OPC", "mtp3.opc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, NULL, HFILL }}, + { &hf_mtp3_ansi_opc, { "OPC", "mtp3.ansi_opc", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_mtp3_chinese_opc, { "OPC", "mtp3.chinese_opc", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_mtp3_opc_network, { "OPC Network", "mtp3.opc.network", FT_UINT24, BASE_DEC, NULL, ANSI_NETWORK_MASK, NULL, HFILL }}, + { &hf_mtp3_opc_cluster, { "OPC Cluster", "mtp3.opc.cluster", FT_UINT24, BASE_DEC, NULL, ANSI_CLUSTER_MASK, NULL, HFILL }}, + { &hf_mtp3_opc_member, { "OPC Member", "mtp3.opc.member", FT_UINT24, BASE_DEC, NULL, ANSI_MEMBER_MASK, NULL, HFILL }}, + { &hf_mtp3_japan_opc, { "OPC", "mtp3.opc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, NULL, HFILL }}, + { &hf_mtp3_japan_pc, { "PC", "mtp3.pc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, NULL, HFILL }}, + { &hf_mtp3_itu_dpc, { "DPC", "mtp3.dpc", FT_UINT32, BASE_DEC, NULL, ITU_DPC_MASK, NULL, HFILL }}, + { &hf_mtp3_24bit_dpc, { "DPC", "mtp3.dpc", FT_UINT32, BASE_DEC, NULL, ANSI_PC_MASK, NULL, HFILL }}, + { &hf_mtp3_ansi_dpc, { "DPC", "mtp3.ansi_dpc", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_mtp3_chinese_dpc, { "DPC", "mtp3.chinese_dpc", FT_STRING, BASE_NONE, NULL, 0x0, NULL, HFILL }}, + { &hf_mtp3_dpc_network, { "DPC Network", "mtp3.dpc.network", FT_UINT24, BASE_DEC, NULL, ANSI_NETWORK_MASK, NULL, HFILL }}, + { &hf_mtp3_dpc_cluster, { "DPC Cluster", "mtp3.dpc.cluster", FT_UINT24, BASE_DEC, NULL, ANSI_CLUSTER_MASK, NULL, HFILL }}, + { &hf_mtp3_dpc_member, { "DPC Member", "mtp3.dpc.member", FT_UINT24, BASE_DEC, NULL, ANSI_MEMBER_MASK, NULL, HFILL }}, + { &hf_mtp3_japan_dpc, { "DPC", "mtp3.dpc", FT_UINT16, BASE_DEC, NULL, JAPAN_PC_MASK, NULL, HFILL }}, + { &hf_mtp3_itu_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT32, BASE_DEC, NULL, ITU_SLS_MASK, NULL, HFILL }}, + { &hf_mtp3_japan_4_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, JAPAN_4_BIT_SLS_MASK, NULL, HFILL }}, + { &hf_mtp3_japan_4_bit_sls_spare, { "SLS Spare", "mtp3.sls_spare", FT_UINT8, BASE_HEX, NULL, JAPAN_4_BIT_SLS_SPARE_MASK, NULL, HFILL }}, + { &hf_mtp3_japan_5_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, JAPAN_5_BIT_SLS_MASK, NULL, HFILL }}, + { &hf_mtp3_japan_5_bit_sls_spare, { "SLS Spare", "mtp3.sls_spare", FT_UINT8, BASE_HEX, NULL, JAPAN_5_BIT_SLS_SPARE_MASK, NULL, HFILL }}, + { &hf_mtp3_ansi_5_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, ANSI_5BIT_SLS_MASK, NULL, HFILL }}, + { &hf_mtp3_ansi_8_bit_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, ANSI_8BIT_SLS_MASK, NULL, HFILL }}, + { &hf_mtp3_chinese_itu_sls, { "Signalling Link Selector", "mtp3.sls", FT_UINT8, BASE_DEC, NULL, CHINESE_ITU_SLS_MASK, NULL, HFILL }} }; /* Setup protocol subtree array */ diff --git a/epan/dissectors/packet-multipart.c b/epan/dissectors/packet-multipart.c index b41bfdd594..2278ce7b6d 100644 --- a/epan/dissectors/packet-multipart.c +++ b/epan/dissectors/packet-multipart.c @@ -168,7 +168,7 @@ static gint is_known_multipart_header(const char *header_str, guint len); static gint index_of_char(const char *str, const char c); -char * +static char * unfold_and_compact_mime_header(const char *lines, gint *first_colon_offset); @@ -197,7 +197,7 @@ base64_decode(packet_info *pinfo, tvbuff_t *b64_tvb, char *name) * Set value to the start of the value * Return the cleaned-up RFC2822 header (buffer must be freed). */ -char * +static char * unfold_and_compact_mime_header(const char *lines, gint *first_colon_offset) { const char *p = lines; diff --git a/epan/dissectors/packet-rtps2.c b/epan/dissectors/packet-rtps2.c index 5e2eec8155..d5986df16c 100644 --- a/epan/dissectors/packet-rtps2.c +++ b/epan/dissectors/packet-rtps2.c @@ -833,7 +833,7 @@ static guint rtps_max_batch_samples_dissected = 16; /* *********************************************************************** */ /* Appends a submessage description to the info summary text */ -void info_summary_append(char *summaryText, int submessageId, const char * extra_text) { +static void info_summary_append(char *summaryText, int submessageId, const char * extra_text) { gint len = strlen(summaryText); if (extra_text == NULL) { extra_text=""; @@ -853,7 +853,7 @@ void info_summary_append(char *summaryText, int submessageId, const char * extra /* Appends a submessage description to the info summary text, with * extra formatting for those submessages that has a status info */ -void info_summary_append_ex(char *info_summary_text, +static void info_summary_append_ex(char *info_summary_text, int submessageId, guint32 writer_id, guint32 status_info) { diff --git a/epan/dissectors/packet-sdp.c b/epan/dissectors/packet-sdp.c index 572f2b5483..8e13027d03 100644 --- a/epan/dissectors/packet-sdp.c +++ b/epan/dissectors/packet-sdp.c @@ -1144,7 +1144,8 @@ dissect_sdp_media(tvbuff_t *tvb, proto_item *ti, } -tvbuff_t *ascii_bytes_to_tvb(tvbuff_t *tvb, packet_info *pinfo, gint len, gchar *msg) +static tvbuff_t * +ascii_bytes_to_tvb(tvbuff_t *tvb, packet_info *pinfo, gint len, gchar *msg) { guint8 *buf = ep_alloc(10240); diff --git a/epan/dissectors/packet-sita.c b/epan/dissectors/packet-sita.c index 2d2ba13dd5..6ec84d7539 100644 --- a/epan/dissectors/packet-sita.c +++ b/epan/dissectors/packet-sita.c @@ -77,7 +77,8 @@ static int hf_dcd = -1; #define IOP "Local" #define REMOTE "Remote" -gchar *format_flags_string(guchar value, const gchar *array[]) +static gchar * +format_flags_string(guchar value, const gchar *array[]) { int i; guint bpos; diff --git a/epan/dissectors/packet-t30.c b/epan/dissectors/packet-t30.c index 391c67f795..2b3fda09e1 100644 --- a/epan/dissectors/packet-t30.c +++ b/epan/dissectors/packet-t30.c @@ -433,41 +433,42 @@ static const value_string t30_SharedDataMemory_capacity_vals[] = { }; static const true_false_string t30_octets_preferred_value = { - "64 octets preferred", - "256 octets preferred", + "64 octets preferred", + "256 octets preferred", }; static const true_false_string t30_extension_ind_value = { - "information continues through the next octet", - "last octet", + "information continues through the next octet", + "last octet", }; static const true_false_string t30_compress_value = { - "Uncompressed mode", - "Compressed mode", + "Uncompressed mode", + "Compressed mode", }; static const true_false_string t30_minimum_scan_value = { - "T15.4 = 1/2 T7.7", - "T15.4 = T7.7", + "T15.4 = 1/2 T7.7", + "T15.4 = T7.7", }; static const true_false_string t30_duplex_operation_value = { - "Duplex and half duplex operation", - "Half duplex operation only", + "Duplex and half duplex operation", + "Half duplex operation only", }; static const true_false_string t30_frame_size_dcs_value = { - "64 octets", - "256 octets", + "64 octets", + "256 octets", }; static const true_false_string t30_res_type_sel_value = { - "inch based resolution", - "metric based resolution", + "inch based resolution", + "metric based resolution", }; -guint8 reverse_byte(guint8 val) +static guint8 +reverse_byte(guint8 val) { return ( ((val & 0x80)>>7) | ((val & 0x40)>>5) | ((val & 0x20)>>3) | ((val & 0x10)>>1) | @@ -476,7 +477,7 @@ guint8 reverse_byte(guint8 val) } #define LENGTH_T30_NUM 20 -gchar * +static gchar * t30_get_string_numbers(tvbuff_t *tvb, int offset, int len) { gchar *buf; @@ -510,7 +511,7 @@ dissect_t30_numbers(tvbuff_t *tvb, int offset, packet_info *pinfo, int len, prot col_append_fstr(pinfo->cinfo, COL_INFO, " - Number:%s", str_num ); if (pinfo->private_data) - g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "Num: %s", str_num); + g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "Num: %s", str_num); } else { proto_tree_add_text(tree, tvb, offset, tvb_reported_length_remaining(tvb, offset), "[MALFORMED OR SHORT PACKET: number of digits must be 20]"); @@ -542,7 +543,7 @@ dissect_t30_facsimile_coded_data(tvbuff_t *tvb, int offset, packet_info *pinfo, col_append_fstr(pinfo->cinfo, COL_INFO, " - Frame num:%d", reverse_byte(octet)); if (pinfo->private_data) - g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "Frm num: %d", reverse_byte(octet)); + g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "Frm num: %d", reverse_byte(octet)); t4_data = ep_alloc(len-1); tvb_memcpy(tvb, t4_data, offset, len-1); @@ -609,7 +610,7 @@ dissect_t30_partial_page_signal(tvbuff_t *tvb, int offset, packet_info *pinfo, i col_append_fstr(pinfo->cinfo, COL_INFO, " - PC:%d BC:%d FC:%d", page_count, block_count, frame_count); if (pinfo->private_data) - g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "PC:%d BC:%d FC:%d", page_count, block_count, frame_count); + g_snprintf(((t38_packet_info*)pinfo->private_data)->desc, MAX_T38_DESC, "PC:%d BC:%d FC:%d", page_count, block_count, frame_count); } @@ -964,330 +965,330 @@ proto_register_t30(void) NULL, 0, "Address Field", HFILL }}, { &hf_t30_Control, { "Control", "t30.Control", FT_UINT8, BASE_HEX, - VALS(t30_control_vals), 0, "Address Field", HFILL }}, + VALS(t30_control_vals), 0, "Control Field", HFILL }}, { &hf_t30_Facsimile_Control, { "Facsimile Control", "t30.FacsimileControl", FT_UINT8, BASE_DEC, - VALS(t30_facsimile_control_field_vals), 0, "Facsimile Control", HFILL }}, + VALS(t30_facsimile_control_field_vals), 0, NULL, HFILL }}, { &hf_t30_fif_sm, { "Store and forward Internet fax- Simple mode (ITU-T T.37)", "t30.fif.sm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_rtif, { "Real-time Internet fax (ITU T T.38)", "t30.fif.rtif", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_3gmn, { "3rd Generation Mobile Network", "t30.fif.3gmn", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_v8c, { "V.8 capabilities", "t30.fif.v8c", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_op, { "Octets preferred", "t30.fif.op", FT_BOOLEAN, 8, - TFS(&t30_octets_preferred_value), 0x02, "", HFILL }}, + TFS(&t30_octets_preferred_value), 0x02, NULL, HFILL }}, { &hf_t30_fif_rtfc, { "Ready to transmit a facsimile document (polling)", "t30.fif.rtfc", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_rfo, { "Receiver fax operation", "t30.fif.rfo", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_dsr, { "Data signalling rate", "t30.fif.dsr", FT_UINT8, BASE_HEX, - VALS(t30_data_signalling_rate_vals), 0x3C, "", HFILL }}, + VALS(t30_data_signalling_rate_vals), 0x3C, NULL, HFILL }}, { &hf_t30_fif_dsr_dcs, { "Data signalling rate", "t30.fif.dsr_dcs", FT_UINT8, BASE_HEX, - VALS(t30_data_signalling_rate_dcs_vals), 0x3C, "", HFILL }}, + VALS(t30_data_signalling_rate_dcs_vals), 0x3C, NULL, HFILL }}, { &hf_t30_fif_res, { "R8x7.7 lines/mm and/or 200x200 pels/25.4 mm", "t30.fif.res", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_tdcc, { "Two dimensional coding capability", "t30.fif.tdcc", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x01, "", HFILL }}, + TFS(&flags_set_truth), 0x01, NULL, HFILL }}, { &hf_t30_fif_rwc, { "Recording width capabilities", "t30.fif.rwc", FT_UINT8, BASE_HEX, - VALS(t30_recording_width_capabilities_vals), 0xC0, "", HFILL }}, + VALS(t30_recording_width_capabilities_vals), 0xC0, NULL, HFILL }}, { &hf_t30_fif_rw_dcs, { "Recording width", "t30.fif.rw_dcs", FT_UINT8, BASE_HEX, - VALS(t30_recording_width_dcs_vals), 0xC0, "", HFILL }}, + VALS(t30_recording_width_dcs_vals), 0xC0, NULL, HFILL }}, { &hf_t30_fif_rlc, { "Recording length capability", "t30.fif.rlc", FT_UINT8, BASE_HEX, - VALS(t30_recording_length_capability_vals), 0x30, "", HFILL }}, + VALS(t30_recording_length_capability_vals), 0x30, NULL, HFILL }}, { &hf_t30_fif_rl_dcs, { "Recording length capability", "t30.fif.rl_dcs", FT_UINT8, BASE_HEX, - VALS(t30_recording_length_dcs_vals), 0x30, "", HFILL }}, + VALS(t30_recording_length_dcs_vals), 0x30, NULL, HFILL }}, { &hf_t30_fif_msltcr, { "Minimum scan line time capability at the receiver", "t30.fif.msltcr", FT_UINT8, BASE_HEX, - VALS(t30_minimum_scan_line_time_rec_vals), 0x0E, "", HFILL }}, + VALS(t30_minimum_scan_line_time_rec_vals), 0x0E, NULL, HFILL }}, { &hf_t30_fif_mslt_dcs, { "Minimum scan line time", "t30.fif.mslt_dcs", FT_UINT8, BASE_HEX, - VALS(t30_minimum_scan_line_time_dcs_vals), 0x0E, "", HFILL }}, + VALS(t30_minimum_scan_line_time_dcs_vals), 0x0E, NULL, HFILL }}, { &hf_t30_fif_ext, { "Extension indicator", "t30.fif.ext", FT_BOOLEAN, 8, - TFS(&t30_extension_ind_value), 0x01, "", HFILL }}, + TFS(&t30_extension_ind_value), 0x01, NULL, HFILL }}, { &hf_t30_fif_cm, { "Compress/Uncompress mode", "t30.fif.cm", FT_BOOLEAN, 8, - TFS(&t30_compress_value), 0x40, "", HFILL }}, + TFS(&t30_compress_value), 0x40, NULL, HFILL }}, { &hf_t30_fif_ecm, { "Error correction mode", "t30.fif.ecm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_fs_dcs, { "Frame size", "t30.fif.fs_dcm", FT_BOOLEAN, 8, - TFS(&t30_frame_size_dcs_value), 0x10, "", HFILL }}, + TFS(&t30_frame_size_dcs_value), 0x10, NULL, HFILL }}, { &hf_t30_fif_t6, { "T.6 coding capability", "t30.fif.t6", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_fvc, { "Field valid capability", "t30.fif.fvc", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_mspc, { "Multiple selective polling capability", "t30.fif.mspc", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_ps, { "Polled Subaddress", "t30.fif.ps", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_t43, { "T.43 coding", "t30.fif.t43", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_pi, { "Plane interleave", "t30.fif.pi", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_vc32k, { "Voice coding with 32k ADPCM (ITU T G.726)", "t30.fif.vc32k", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_r8x15, { "R8x15.4 lines/mm", "t30.fif.r8x15", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_300x300, { "300x300 pels/25.4 mm", "t30.fif.300x300", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_r16x15, { "R16x15.4 lines/mm and/or 400x400 pels/25.4 mm", "t30.fif.r16x15", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_ibrp, { "Inch based resolution preferred", "t30.fif.ibrp", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_mbrp, { "Metric based resolution preferred", "t30.fif.mbrp", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_msltchr, { "Minimum scan line time capability for higher resolutions", "t30.fif.msltchr", FT_BOOLEAN, 8, - TFS(&t30_minimum_scan_value), 0x04, "", HFILL }}, + TFS(&t30_minimum_scan_value), 0x04, NULL, HFILL }}, { &hf_t30_fif_rts, { "Resolution type selection", "t30.fif.rts", FT_BOOLEAN, 8, - TFS(&t30_res_type_sel_value), 0x10, "", HFILL }}, + TFS(&t30_res_type_sel_value), 0x10, NULL, HFILL }}, { &hf_t30_fif_sp, { "Selective polling", "t30.fif.sp", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_sc, { "Subaddressing capability", "t30.fif.sc", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_passw, { "Password", "t30.fif.passw", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_sit, { "Sender Identification transmission", "t30.fif.sit", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_rttd, { "Ready to transmit a data file (polling)", "t30.fif.rttd", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_bft, { "Binary File Transfer (BFT)", "t30.fif.bft", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_dtm, { "Document Transfer Mode (DTM)", "t30.fif.dtm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_edi, { "Electronic Data Interchange (EDI)", "t30.fif.edi", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_btm, { "Basic Transfer Mode (BTM)", "t30.fif.btm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_rttcmmd, { "Ready to transmit a character or mixed mode document (polling)", "t30.fif.rttcmmd", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_chrm, { "Character mode", "t30.fif.cm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_mm, { "Mixed mode (Annex E/T.4)", "t30.fif.mm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_pm26, { "Processable mode 26 (ITU T T.505)", "t30.fif.pm26", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_dnc, { "Digital network capability", "t30.fif.dnc", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_do, { "Duplex operation", "t30.fif.do", FT_BOOLEAN, 8, - TFS(&t30_duplex_operation_value), 0x20, "", HFILL }}, + TFS(&t30_duplex_operation_value), 0x20, NULL, HFILL }}, { &hf_t30_fif_jpeg, { "JPEG coding", "t30.fif.jpeg", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_fcm, { "Full colour mode", "t30.fif.fcm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_pht, { "Preferred Huffman tables", "t30.fif.pht", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_12c, { "12 bits/pel component", "t30.fif.12c", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_ns, { "No subsampling (1:1:1)", "t30.fif.ns", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_ci, { "Custom illuminant", "t30.fif.ci", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_cgr, { "Custom gamut range", "t30.fif.cgr", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_nalet, { "North American Letter (215.9 x 279.4 mm) capability", "t30.fif.nalet", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_naleg, { "North American Legal (215.9 x 355.6 mm) capability", "t30.fif.naleg", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_spscb, { "Single-progression sequential coding (ITU-T T.85) basic capability", "t30.fif.spscb", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_spsco, { "Single-progression sequential coding (ITU-T T.85) optional L0 capability", "t30.fif.spsco", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_hkm, { "HKM key management capability", "t30.fif.hkm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_rsa, { "RSA key management capability", "t30.fif.rsa", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_oc, { "Override capability", "t30.fif.oc", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_hfx40, { "HFX40 cipher capability", "t30.fif.hfx40", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_acn2c, { "Alternative cipher number 2 capability", "t30.fif.acn2c", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_acn3c, { "Alternative cipher number 3 capability", "t30.fif.acn3c", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_hfx40i, { "HFX40-I hashing capability", "t30.fif.hfx40i", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_ahsn2, { "Alternative hashing system number 2 capability", "t30.fif.ahsn2", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_ahsn3, { "Alternative hashing system number 3 capability", "t30.fif.ahsn3", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_t441, { "T.44 (Mixed Raster Content)", "t30.fif.t441", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_t442, { "T.44 (Mixed Raster Content)", "t30.fif.t442", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_t443, { "T.44 (Mixed Raster Content)", "t30.fif.t443", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_plmss, { "Page length maximum strip size for T.44 (Mixed Raster Content)", "t30.fif.plmss", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_cg300, { "Colour/gray-scale 300 pels/25.4 mm x 300 lines/25.4 mm or 400 pels/25.4 mm x 400 lines/25.4 mm resolution", "t30.fif.cg300", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_100x100cg, { "100 pels/25.4 mm x 100 lines/25.4 mm for colour/gray scale", "t30.fif.100x100cg", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_spcbft, { "Simple Phase C BFT Negotiations capability", "t30.fif.spcbft", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_ebft, { "Extended BFT Negotiations capability", "t30.fif.ebft", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_isp, { "Internet Selective Polling Address (ISP)", "t30.fif.isp", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_ira, { "Internet Routing Address (IRA)", "t30.fif.ira", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_600x600, { "600 pels/25.4 mm x 600 lines/25.4 mm", "t30.fif.600x600", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_1200x1200, { "1200 pels/25.4 mm x 1200 lines/25.4 mm", "t30.fif.1200x1200", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_300x600, { "300 pels/25.4 mm x 600 lines/25.4 mm", "t30.fif.300x600", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_400x800, { "400 pels/25.4 mm x 800 lines/25.4 mm", "t30.fif.400x800", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_600x1200, { "600 pels/25.4 mm x 1200 lines/25.4 mm", "t30.fif.600x1200", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x08, "", HFILL }}, + TFS(&flags_set_truth), 0x08, NULL, HFILL }}, { &hf_t30_fif_cg600x600, { "Colour/gray scale 600 pels/25.4 mm x 600 lines/25.4 mm resolution", "t30.fif.cg600x600", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x04, "", HFILL }}, + TFS(&flags_set_truth), 0x04, NULL, HFILL }}, { &hf_t30_fif_cg1200x1200, { "Colour/gray scale 1200 pels/25.4 mm x 1200 lines/25.4 mm resolution", "t30.fif.cg1200x1200", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x02, "", HFILL }}, + TFS(&flags_set_truth), 0x02, NULL, HFILL }}, { &hf_t30_fif_dspcam, { "Double sided printing capability (alternate mode)", "t30.fif.dspcam", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x80, "", HFILL }}, + TFS(&flags_set_truth), 0x80, NULL, HFILL }}, { &hf_t30_fif_dspccm, { "Double sided printing capability (continuous mode)", "t30.fif.dspccm", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x40, "", HFILL }}, + TFS(&flags_set_truth), 0x40, NULL, HFILL }}, { &hf_t30_fif_bwmrcp, { "Black and white mixed raster content profile (MRCbw)", "t30.fif.bwmrcp", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x20, "", HFILL }}, + TFS(&flags_set_truth), 0x20, NULL, HFILL }}, { &hf_t30_fif_t45, { "T.45 (run length colour encoding)", "t30.fif.t45", FT_BOOLEAN, 8, - TFS(&flags_set_truth), 0x10, "", HFILL }}, + TFS(&flags_set_truth), 0x10, NULL, HFILL }}, { &hf_t30_fif_sdmc, { "SharedDataMemory capacity", "t30.fif.sdmc", FT_UINT8, BASE_HEX, - VALS(t30_SharedDataMemory_capacity_vals), 0x0C, "", HFILL }}, - - { &hf_t30_fif_number, - { "Number", "t30.fif.number", FT_STRING, BASE_NONE, NULL, 0x0, - "", HFILL }}, + VALS(t30_SharedDataMemory_capacity_vals), 0x0C, NULL, HFILL }}, + { &hf_t30_fif_number, + { "Number", "t30.fif.number", FT_STRING, BASE_NONE, + NULL, 0x0, NULL, HFILL }}, + { &hf_t30_fif_country_code, { "ITU-T Country code", "t30.fif.country_code", FT_UINT8, BASE_DEC, - NULL, 0, "ITU-T Country code", HFILL }}, + NULL, 0, NULL, HFILL }}, { &hf_t30_fif_non_stand_bytes, { "Non-standard capabilities", "t30.fif.non_standard_cap", FT_BYTES, BASE_HEX, - NULL, 0, "Non-standard capabilities", HFILL }}, + NULL, 0, NULL, HFILL }}, { &hf_t30_t4_frame_num, { "T.4 Frame number", "t30.t4.frame_num", FT_UINT8, BASE_DEC, - NULL, 0, "T.4 Frame number", HFILL }}, + NULL, 0, NULL, HFILL }}, { &hf_t30_t4_data, { "T.4 Facsimile data field", "t30.t4.data", FT_BYTES, BASE_HEX, - NULL, 0, "T.4 Facsimile data field", HFILL }}, + NULL, 0, NULL, HFILL }}, { &hf_t30_partial_page_fcf2, { "Post-message command", "t30.pps.fcf2", FT_UINT8, BASE_DEC, - VALS(t30_partial_page_fcf2_vals), 0, "Post-message command", HFILL }}, + VALS(t30_partial_page_fcf2_vals), 0, NULL, HFILL }}, { &hf_t30_partial_page_i1, { "Page counter", "t30.t4.page_count", FT_UINT8, BASE_DEC, - NULL, 0, "Page counter", HFILL }}, + NULL, 0, NULL, HFILL }}, { &hf_t30_partial_page_i2, { "Block counter", "t30.t4.block_count", FT_UINT8, BASE_DEC, - NULL, 0, "Block counter", HFILL }}, + NULL, 0, NULL, HFILL }}, { &hf_t30_partial_page_i3, { "Frame counter", "t30.t4.frame_count", FT_UINT8, BASE_DEC, - NULL, 0, "Frame counter", HFILL }}, + NULL, 0, NULL, HFILL }}, }; static gint *t30_ett[] = |