forked from osmocom/wireshark
char -> const char warning fixes
svn path=/trunk/; revision=15126
This commit is contained in:
parent
f5b39c3ef9
commit
34493e8f9e
|
@ -32,7 +32,7 @@
|
|||
/* some necessary forward function prototypes */
|
||||
static guint
|
||||
fApplicationTypesEnumerated (tvbuff_t *tvb, proto_tree *tree, guint offset,
|
||||
guint8 *label, const value_string *vs);
|
||||
const gchar *label, const value_string *vs);
|
||||
|
||||
static const char *bacapp_unknown_service_str = "unknown service";
|
||||
static const char *ASHRAE_Reserved_Fmt = "(%d) Reserved for Use by ASHRAE";
|
||||
|
@ -1473,14 +1473,14 @@ fTagHeader (tvbuff_t *tvb, guint offset, guint8 *tag_no, guint8* class_tag,
|
|||
}
|
||||
|
||||
static guint
|
||||
fNullTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fNullTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint8 tag_no, class_tag;
|
||||
guint32 lvt;
|
||||
proto_item *ti;
|
||||
proto_tree *subtree;
|
||||
|
||||
ti = proto_tree_add_text(tree, tvb, offset, 1, "%sNULL", LABEL(label));
|
||||
ti = proto_tree_add_text(tree, tvb, offset, 1, "%sNULL", label);
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
fTagHeaderTree (tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
|
||||
|
@ -1488,7 +1488,7 @@ fNullTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
}
|
||||
|
||||
static guint
|
||||
fBooleanTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fBooleanTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint8 tag_no, class_tag;
|
||||
guint32 lvt = 0;
|
||||
|
@ -1496,7 +1496,7 @@ fBooleanTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
proto_tree *subtree;
|
||||
|
||||
ti = proto_tree_add_text(tree, tvb, offset, 1,
|
||||
"%s%s", LABEL(label), lvt == 0 ? "FALSE" : "TRUE");
|
||||
"%s%s", label, lvt == 0 ? "FALSE" : "TRUE");
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
fTagHeaderTree (tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
|
||||
|
@ -1504,7 +1504,7 @@ fBooleanTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
}
|
||||
|
||||
static guint
|
||||
fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint64 val = 0;
|
||||
guint8 tag_no, class_tag;
|
||||
|
@ -1517,10 +1517,10 @@ fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
/* only support up to an 8 byte (64-bit) integer */
|
||||
if (fUnsigned64 (tvb, offset + tag_len, lvt, &val))
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s(Unsigned) %" PRIu64, LABEL(label), val);
|
||||
"%s(Unsigned) %" PRIu64, label, val);
|
||||
else
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s - %u octets (Unsigned)", LABEL(label), lvt);
|
||||
"%s - %u octets (Unsigned)", label, lvt);
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
fTagHeaderTree (tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
|
||||
|
@ -1529,7 +1529,7 @@ fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
|
||||
/* set split_val to zero when not needed */
|
||||
static guint
|
||||
fEnumeratedTagSplit (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label,
|
||||
fEnumeratedTagSplit (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label,
|
||||
const value_string *vs, guint32 split_val)
|
||||
{
|
||||
guint32 val = 0;
|
||||
|
@ -1544,14 +1544,14 @@ fEnumeratedTagSplit (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *labe
|
|||
if (fUnsigned32 (tvb, offset+tag_len, lvt, &val)) {
|
||||
if (vs)
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s %s", LABEL(label), val_to_split_str(val, split_val, vs,
|
||||
"%s %s", label, val_to_split_str(val, split_val, vs,
|
||||
ASHRAE_Reserved_Fmt,Vendor_Proprietary_Fmt));
|
||||
else
|
||||
ti =proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s %u", LABEL(label), val);
|
||||
"%s %u", label, val);
|
||||
} else {
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s - %u octets (enumeration)", LABEL(label), lvt);
|
||||
"%s - %u octets (enumeration)", label, lvt);
|
||||
}
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
fTagHeaderTree (tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
|
@ -1560,14 +1560,14 @@ fEnumeratedTagSplit (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *labe
|
|||
}
|
||||
|
||||
static guint
|
||||
fEnumeratedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label,
|
||||
fEnumeratedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label,
|
||||
const value_string *vs)
|
||||
{
|
||||
return fEnumeratedTagSplit (tvb, tree, offset, label, vs, 0);
|
||||
}
|
||||
|
||||
static guint
|
||||
fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint64 val = 0;
|
||||
guint8 tag_no, class_tag;
|
||||
|
@ -1579,10 +1579,10 @@ fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
tag_len = fTagHeader (tvb, offset, &tag_no, &class_tag, &lvt);
|
||||
if (fUnsigned64 (tvb, offset + tag_len, lvt, &val))
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s(Signed) %" PRId64, LABEL(label), (gint64) val);
|
||||
"%s(Signed) %" PRId64, label, (gint64) val);
|
||||
else
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s - %u octets (Signed)", LABEL(label), lvt);
|
||||
"%s - %u octets (Signed)", label, lvt);
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
fTagHeaderTree(tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
|
||||
|
@ -1590,7 +1590,7 @@ fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
}
|
||||
|
||||
static guint
|
||||
fRealTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fRealTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint8 tag_no, class_tag;
|
||||
guint32 lvt;
|
||||
|
@ -1602,7 +1602,7 @@ fRealTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
tag_len = fTagHeader(tvb, offset, &tag_no, &class_tag, &lvt);
|
||||
f_val = tvb_get_ntohieee_float(tvb, offset+tag_len);
|
||||
ti = proto_tree_add_text(tree, tvb, offset, 4+tag_len,
|
||||
"%s%f (Real)", LABEL(label), f_val);
|
||||
"%s%f (Real)", label, f_val);
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
fTagHeaderTree(tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
|
||||
|
@ -1610,7 +1610,7 @@ fRealTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
}
|
||||
|
||||
static guint
|
||||
fDoubleTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fDoubleTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint8 tag_no, class_tag;
|
||||
guint32 lvt;
|
||||
|
@ -1622,7 +1622,7 @@ fDoubleTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
tag_len = fTagHeader(tvb, offset, &tag_no, &class_tag, &lvt);
|
||||
d_val = tvb_get_ntohieee_double(tvb, offset+tag_len);
|
||||
ti = proto_tree_add_text(tree, tvb, offset, 8+tag_len,
|
||||
"%s%lf (Double)", LABEL(label), d_val);
|
||||
"%s%lf (Double)", label, d_val);
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
fTagHeaderTree(tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
|
||||
|
@ -1652,7 +1652,7 @@ fProcessId (tvbuff_t *tvb, proto_tree *tree, guint offset)
|
|||
}
|
||||
|
||||
static guint
|
||||
fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint32 val = 0, lvt;
|
||||
guint8 tag_no, class_tag;
|
||||
|
@ -1664,12 +1664,12 @@ fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
if (fUnsigned32 (tvb, offset+tag_len, lvt, &val))
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s (hh.mm.ss): %d.%02d.%02d%s",
|
||||
LABEL(label),
|
||||
label,
|
||||
(val / 3600), ((val % 3600) / 60), (val % 60),
|
||||
val == 0 ? " (indefinite)" : "");
|
||||
else
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s - %u octets (Signed)", LABEL(label), lvt);
|
||||
"%s - %u octets (Signed)", label, lvt);
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
fTagHeaderTree(tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
|
||||
|
@ -1701,7 +1701,7 @@ fWeekNDay (tvbuff_t *tvb, proto_tree *tree, guint offset)
|
|||
}
|
||||
|
||||
static guint
|
||||
fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint32 year, month, day, weekday;
|
||||
guint8 tag_no, class_tag;
|
||||
|
@ -1717,11 +1717,11 @@ fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
weekday = tvb_get_guint8(tvb, offset+tag_len+3);
|
||||
if ((year == 255) && (day == 255) && (month == 255) && (weekday == 255))
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%sany", LABEL(label));
|
||||
"%sany", label);
|
||||
else
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s%s %d, %d, (Day of Week = %s)",
|
||||
LABEL(label), val_to_str(month,
|
||||
label, val_to_str(month,
|
||||
months,
|
||||
"month (%d) not found"),
|
||||
day, year, val_to_str(weekday,
|
||||
|
@ -1734,7 +1734,7 @@ fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
}
|
||||
|
||||
static guint
|
||||
fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint32 year, month, day, weekday, lvt;
|
||||
guint8 tag_no, class_tag;
|
||||
|
@ -1749,11 +1749,11 @@ fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
weekday = tvb_get_guint8(tvb, offset+tag_len+3);
|
||||
if ((year == 255) && (day == 255) && (month == 255) && (weekday == 255))
|
||||
ti = proto_tree_add_text(tree, tvb, offset,
|
||||
lvt+tag_len, "%sany", LABEL(label));
|
||||
lvt+tag_len, "%sany", label);
|
||||
else
|
||||
ti = proto_tree_add_text(tree, tvb, offset, lvt+tag_len,
|
||||
"%s%d:%02d:%02d.%d %s = %02d:%02d:%02d.%d",
|
||||
LABEL(label),
|
||||
label,
|
||||
year > 12 ? year -12 : year,
|
||||
month, day, weekday,
|
||||
year > 12 ? "P.M." : "A.M.",
|
||||
|
@ -1765,13 +1765,13 @@ fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
}
|
||||
|
||||
static guint
|
||||
fDateTime (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fDateTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
proto_tree *subtree = tree;
|
||||
proto_item *tt;
|
||||
|
||||
if (label != NULL) {
|
||||
tt = proto_tree_add_text (subtree, tvb, offset, 1, "%s", LABEL(label));
|
||||
tt = proto_tree_add_text (subtree, tvb, offset, 1, "%s", label);
|
||||
subtree = proto_item_add_subtree(tt, ett_bacapp_value);
|
||||
}
|
||||
offset = fDate (tvb,subtree,offset,"Date: ");
|
||||
|
@ -1894,7 +1894,7 @@ fDestination (tvbuff_t *tvb, proto_tree *tree, guint offset)
|
|||
}
|
||||
|
||||
static guint
|
||||
fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label, guint32 lvt)
|
||||
fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label, guint32 lvt)
|
||||
{
|
||||
gchar *tmp;
|
||||
|
||||
|
@ -1902,7 +1902,7 @@ fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label, guin
|
|||
return offset;
|
||||
|
||||
tmp = tvb_bytes_to_str(tvb, offset, lvt);
|
||||
proto_tree_add_text(tree, tvb, offset, lvt, "%s %s", LABEL(label), tmp);
|
||||
proto_tree_add_text(tree, tvb, offset, lvt, "%s %s", label, tmp);
|
||||
|
||||
return offset + lvt;
|
||||
}
|
||||
|
@ -2112,7 +2112,7 @@ fPropertyIdentifier (tvbuff_t *tvb, proto_tree *tree, guint offset)
|
|||
}
|
||||
|
||||
static guint
|
||||
fCharacterString (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fCharacterString (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint8 tag_no, class_tag, character_set;
|
||||
guint32 lvt, l;
|
||||
|
@ -2214,7 +2214,7 @@ fCharacterString (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
out = str_val;
|
||||
break;
|
||||
}
|
||||
proto_tree_add_text(tree, tvb, offset, l, "%s'%s'", LABEL(label), out);
|
||||
proto_tree_add_text(tree, tvb, offset, l, "%s'%s'", label, out);
|
||||
lvt-=l;
|
||||
offset+=l;
|
||||
} while (lvt > 0);
|
||||
|
@ -2223,7 +2223,7 @@ fCharacterString (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
}
|
||||
|
||||
static guint
|
||||
fBitStringTagVS (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label,
|
||||
fBitStringTagVS (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label,
|
||||
const value_string *src)
|
||||
{
|
||||
guint8 tag_no, class_tag, tmp;
|
||||
|
@ -2243,7 +2243,7 @@ fBitStringTagVS (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label,
|
|||
proto_tree_add_text(tree, tvb,
|
||||
offset+i+1, 1,
|
||||
"%s%s = TRUE",
|
||||
LABEL(label),
|
||||
label,
|
||||
val_to_str((guint) (i*8 +j),
|
||||
src,
|
||||
ASHRAE_Reserved_Fmt));
|
||||
|
@ -2251,7 +2251,7 @@ fBitStringTagVS (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label,
|
|||
proto_tree_add_text(tree, tvb,
|
||||
offset+i+1, 1,
|
||||
"%s%s = FALSE",
|
||||
LABEL(label),
|
||||
label,
|
||||
val_to_str((guint) (i*8 +j),
|
||||
src,
|
||||
ASHRAE_Reserved_Fmt));
|
||||
|
@ -2268,19 +2268,19 @@ fBitStringTagVS (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label,
|
|||
for (; j < 8; j++)
|
||||
bf_arr[min(255,((lvt-2)*8)+j)] = 'x';
|
||||
bf_arr[min(255,((lvt-2)*8)+j)] = '\0';
|
||||
proto_tree_add_text(tree, tvb, offset, lvt, "%sB'%s'", LABEL(label), bf_arr);
|
||||
proto_tree_add_text(tree, tvb, offset, lvt, "%sB'%s'", label, bf_arr);
|
||||
} else {
|
||||
for (j = 0; j < (int) (8 - unused); j++) {
|
||||
if (tmp & (1 << (7 - j)))
|
||||
proto_tree_add_text(tree, tvb, offset+i+1, 1,
|
||||
"%s%s = TRUE",
|
||||
LABEL(label),
|
||||
label,
|
||||
val_to_str((guint) (i*8 +j),
|
||||
src,
|
||||
ASHRAE_Reserved_Fmt));
|
||||
else
|
||||
proto_tree_add_text(tree, tvb, offset+i+1, 1,
|
||||
"%s%s = FALSE", LABEL(label),
|
||||
"%s%s = FALSE", label,
|
||||
val_to_str((guint) (i*8 +j),
|
||||
src,
|
||||
ASHRAE_Reserved_Fmt));
|
||||
|
@ -2292,7 +2292,7 @@ fBitStringTagVS (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label,
|
|||
}
|
||||
|
||||
static guint
|
||||
fBitStringTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fBitStringTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
return fBitStringTagVS (tvb, tree, offset, label, NULL);
|
||||
}
|
||||
|
@ -2301,7 +2301,7 @@ fBitStringTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
|||
with reserved and proprietarty ranges (split) */
|
||||
static guint
|
||||
fApplicationTypesEnumeratedSplit (tvbuff_t *tvb, proto_tree *tree, guint offset,
|
||||
guint8 *label, const value_string *src, guint32 split_val)
|
||||
const gchar *label, const value_string *src, guint32 split_val)
|
||||
{
|
||||
guint8 tag_no, class_tag;
|
||||
guint32 lvt;
|
||||
|
@ -2333,7 +2333,7 @@ fApplicationTypesEnumeratedSplit (tvbuff_t *tvb, proto_tree *tree, guint offset,
|
|||
offset = fDoubleTag(tvb, tree, offset, label);
|
||||
break;
|
||||
case 6: /** Octet String 20.2.8 */
|
||||
ti = proto_tree_add_text(tree, tvb, offset, tag_len, "%s (%d Characters)", LABEL(label), lvt);
|
||||
ti = proto_tree_add_text(tree, tvb, offset, tag_len, "%s (%d Characters)", label, lvt);
|
||||
subtree = proto_item_add_subtree(ti, ett_bacapp_tag);
|
||||
offset += fTagHeaderTree(tvb, subtree, offset, &tag_no, &class_tag, &lvt);
|
||||
offset = fOctetString (tvb, tree, offset, label, lvt);
|
||||
|
@ -2359,7 +2359,7 @@ fApplicationTypesEnumeratedSplit (tvbuff_t *tvb, proto_tree *tree, guint offset,
|
|||
case 13: /* reserved for ASHRAE */
|
||||
case 14:
|
||||
case 15:
|
||||
proto_tree_add_text(tree, tvb, offset, lvt+tag_len, "%s'reserved for ASHRAE'", LABEL(label));
|
||||
proto_tree_add_text(tree, tvb, offset, lvt+tag_len, "%s'reserved for ASHRAE'", label);
|
||||
offset+=lvt+tag_len;
|
||||
break;
|
||||
default:
|
||||
|
@ -2371,14 +2371,14 @@ fApplicationTypesEnumeratedSplit (tvbuff_t *tvb, proto_tree *tree, guint offset,
|
|||
|
||||
static guint
|
||||
fApplicationTypesEnumerated (tvbuff_t *tvb, proto_tree *tree, guint offset,
|
||||
guint8 *label, const value_string *vs)
|
||||
const gchar *label, const value_string *vs)
|
||||
{
|
||||
return fApplicationTypesEnumeratedSplit(tvb, tree, offset, label, vs, 0);
|
||||
}
|
||||
|
||||
static guint
|
||||
fApplicationTypes (tvbuff_t *tvb, proto_tree *tree, guint offset,
|
||||
guint8 *label)
|
||||
const gchar *label)
|
||||
{
|
||||
return fApplicationTypesEnumeratedSplit(tvb, tree, offset, label, NULL, 0);
|
||||
}
|
||||
|
@ -2770,7 +2770,7 @@ fConfirmedPrivateTransferAck(tvbuff_t *tvb, proto_tree *tree, guint offset)
|
|||
}
|
||||
|
||||
static guint
|
||||
fLifeSafetyOperationRequest(tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label)
|
||||
fLifeSafetyOperationRequest(tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label)
|
||||
{
|
||||
guint lastoffset = 0;
|
||||
guint8 tag_no, class_tag;
|
||||
|
@ -2779,7 +2779,7 @@ fLifeSafetyOperationRequest(tvbuff_t *tvb, proto_tree *tree, guint offset, guint
|
|||
proto_item *tt;
|
||||
|
||||
if (label != NULL) {
|
||||
tt = proto_tree_add_text (subtree, tvb, offset, 1, "%s", LABEL(label));
|
||||
tt = proto_tree_add_text (subtree, tvb, offset, 1, "%s", label);
|
||||
subtree = proto_item_add_subtree(tt, ett_bacapp_value);
|
||||
}
|
||||
|
||||
|
@ -5747,7 +5747,7 @@ proto_reg_handoff_bacapp(void)
|
|||
}
|
||||
|
||||
guint32
|
||||
fConvertXXXtoUTF8 (const guint8 *in, size_t *inbytesleft, guint8 *out, size_t *outbytesleft, guint8 *fromcoding)
|
||||
fConvertXXXtoUTF8 (const guint8 *in, size_t *inbytesleft, guint8 *out, size_t *outbytesleft, const gchar *fromcoding)
|
||||
{ /* I don't want to let in and out be modified */
|
||||
#ifdef HAVE_CONFIG_H
|
||||
#if HAVE_ICONV_H
|
||||
|
@ -5760,7 +5760,7 @@ fConvertXXXtoUTF8 (const guint8 *in, size_t *inbytesleft, guint8 *out, size_t *o
|
|||
|
||||
if ((icd = iconv_open ("UTF-8", fromcoding)) != (iconv_t) -1) {
|
||||
|
||||
i = iconv (icd, (char**) inpp, inbytesleft, (char**) outpp, outbytesleft);
|
||||
i = iconv (icd, inpp, inbytesleft, (char**) outpp, outbytesleft);
|
||||
*outpp[0] = '\0';
|
||||
iconv_close (icd);
|
||||
return i;
|
||||
|
|
|
@ -63,11 +63,6 @@
|
|||
#define true 1
|
||||
#endif
|
||||
|
||||
#ifndef LABEL
|
||||
#define LABEL(lbl) (lbl==NULL ? (guint8 *) "Value: " : lbl)
|
||||
#endif
|
||||
|
||||
|
||||
/* BACnet PDU Types */
|
||||
#define BACAPP_TYPE_CONFIRMED_SERVICE_REQUEST 0
|
||||
#define BACAPP_TYPE_UNCONFIRMED_SERVICE_REQUEST 1
|
||||
|
@ -252,7 +247,7 @@ fAbortPDU(tvbuff_t *tvb, proto_tree *tree, guint offset);
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||
fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
|
||||
|
||||
/**
|
||||
* 20.2.5, adds the label with max 64Bit signed Integer Value to tree
|
||||
|
@ -263,7 +258,7 @@ fUnsignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||
fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
|
||||
|
||||
/**
|
||||
* 20.2.8, adds the label with Octet String to tree; if lvt == 0 then lvt = restOfFrame
|
||||
|
@ -275,7 +270,7 @@ fSignedTag (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label, guint32 lvt);
|
||||
fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label, guint32 lvt);
|
||||
|
||||
/**
|
||||
* 20.2.12, adds the label with Date Value to tree
|
||||
|
@ -286,7 +281,7 @@ fOctetString (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label, guin
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||
fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
|
||||
|
||||
/**
|
||||
* 20.2.13, adds the label with Time Value to tree
|
||||
|
@ -297,7 +292,7 @@ fDate (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||
fTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
|
||||
|
||||
/**
|
||||
* 20.2.14, adds Object Identifier to tree
|
||||
|
@ -489,7 +484,7 @@ fGetEventInformationACK (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fLifeSafetyOperationRequest(tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||
fLifeSafetyOperationRequest(tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
|
||||
|
||||
/**
|
||||
* SubscribeCOV-Request ::= SEQUENCE {
|
||||
|
@ -1289,7 +1284,7 @@ fVTCloseError(tvbuff_t *tvb, proto_tree *tree, guint offset);
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fApplicationTypes (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||
fApplicationTypes (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
|
||||
|
||||
/**
|
||||
* BACnetActionCommand ::= SEQUENCE {
|
||||
|
@ -1415,7 +1410,7 @@ fDateRange (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fDateTime (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||
fDateTime (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
|
||||
|
||||
/**
|
||||
* BACnetDestination ::= SEQUENCE {
|
||||
|
@ -1893,7 +1888,7 @@ fProcessId (tvbuff_t *tvb, proto_tree *tree, guint offset);
|
|||
* @return modified offset
|
||||
*/
|
||||
static guint
|
||||
fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, guint8 *label);
|
||||
fTimeSpan (tvbuff_t *tvb, proto_tree *tree, guint offset, const gchar *label);
|
||||
|
||||
/**
|
||||
* BACnet Application PDUs chapter 21
|
||||
|
@ -2016,7 +2011,7 @@ proto_reg_handoff_bacapp(void);
|
|||
* @return count of modified characters of returned string, -1 for errors
|
||||
*/
|
||||
guint32
|
||||
fConvertXXXtoUTF8(const guint8 *in, size_t *inbytesleft,guint8 *out, size_t *outbytesleft, guint8 *fromcoding);
|
||||
fConvertXXXtoUTF8(const guint8 *in, size_t *inbytesleft,guint8 *out, size_t *outbytesleft, const gchar *fromcoding);
|
||||
|
||||
#endif /* __BACAPP_H__ */
|
||||
|
||||
|
|
|
@ -547,7 +547,7 @@ dissect_beep_tree(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
int st_offset, msgno, ansno, seqno, size, channel, ackno, window, cc,
|
||||
more;
|
||||
|
||||
char * cmd_temp = NULL;
|
||||
const char * cmd_temp = NULL;
|
||||
int is_ANS = 0;
|
||||
st_offset = offset;
|
||||
|
||||
|
|
|
@ -156,14 +156,14 @@ dissect_ber_oid_NULL_callback(tvbuff_t *tvb _U_, packet_info *pinfo _U_, proto_t
|
|||
|
||||
|
||||
void
|
||||
register_ber_oid_dissector_handle(char *oid, dissector_handle_t dissector, int proto _U_, char *name)
|
||||
register_ber_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto _U_, const char *name)
|
||||
{
|
||||
dissector_add_string("ber.oid", oid, dissector);
|
||||
g_hash_table_insert(oid_table, oid, name);
|
||||
}
|
||||
|
||||
void
|
||||
register_ber_oid_dissector(char *oid, dissector_t dissector, int proto, char *name)
|
||||
register_ber_oid_dissector(const char *oid, dissector_t dissector, int proto, const char *name)
|
||||
{
|
||||
dissector_handle_t dissector_handle;
|
||||
|
||||
|
@ -174,7 +174,7 @@ register_ber_oid_dissector(char *oid, dissector_t dissector, int proto, char *na
|
|||
|
||||
/* Register the oid name to get translation in proto dissection */
|
||||
void
|
||||
register_ber_oid_name(char *oid, char *name)
|
||||
register_ber_oid_name(const char *oid, const char *name)
|
||||
{
|
||||
g_hash_table_insert(oid_table, oid, name);
|
||||
}
|
||||
|
@ -1731,7 +1731,7 @@ int dissect_ber_bitstring(gboolean implicit_tag, packet_info *pinfo, proto_tree
|
|||
proto_item *item = NULL;
|
||||
proto_tree *tree = NULL;
|
||||
const asn_namedbit *nb;
|
||||
char *sep;
|
||||
const char *sep;
|
||||
gboolean term;
|
||||
|
||||
if(!implicit_tag){
|
||||
|
@ -1828,7 +1828,7 @@ int dissect_ber_bitstring32(gboolean implicit_tag, packet_info *pinfo, proto_tre
|
|||
guint32 val;
|
||||
int **bf;
|
||||
header_field_info *hfi;
|
||||
char *sep;
|
||||
const char *sep;
|
||||
gboolean term;
|
||||
unsigned int i, tvb_len;
|
||||
|
||||
|
|
|
@ -153,8 +153,8 @@ typedef struct _asn_namedbit {
|
|||
int *p_id;
|
||||
gint32 gb0; /* the 1st bit of "bit group", -1 = the 1st bit of current byte */
|
||||
gint32 gb1; /* last bit of "bit group", -1 = last bit of current byte */
|
||||
gchar *tstr; /* true string */
|
||||
gchar *fstr; /* false string */
|
||||
const gchar *tstr; /* true string */
|
||||
const gchar *fstr; /* false string */
|
||||
} asn_namedbit;
|
||||
/* this function dissects a BER BIT-STRING
|
||||
*/
|
||||
|
@ -166,9 +166,9 @@ extern proto_item *ber_last_created_item;
|
|||
extern proto_item *get_ber_last_created_item(void);
|
||||
|
||||
int call_ber_oid_callback(char *oid, tvbuff_t *tvb, int offset, packet_info *pinfo, proto_tree *tree);
|
||||
void register_ber_oid_dissector_handle(char *oid, dissector_handle_t dissector, int proto, char *name);
|
||||
void register_ber_oid_dissector(char *oid, dissector_t dissector, int proto, char *name);
|
||||
void register_ber_oid_name(char *oid, char *name);
|
||||
void register_ber_oid_dissector_handle(const char *oid, dissector_handle_t dissector, int proto, const char *name);
|
||||
void register_ber_oid_dissector(const char *oid, dissector_t dissector, int proto, const char *name);
|
||||
void register_ber_oid_name(const char *oid, const char *name);
|
||||
void dissect_ber_oid_NULL_callback(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree);
|
||||
char * get_ber_oid_name(char *str);
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ static gint bgp_asn_len = 0;
|
|||
*/
|
||||
static int
|
||||
decode_prefix4(proto_tree *tree, int hf_addr, tvbuff_t *tvb, gint offset,
|
||||
guint16 tlen, char *tag)
|
||||
guint16 tlen, const char *tag)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *prefix_tree;
|
||||
|
@ -423,7 +423,7 @@ decode_prefix4(proto_tree *tree, int hf_addr, tvbuff_t *tvb, gint offset,
|
|||
*/
|
||||
static int
|
||||
decode_prefix6(proto_tree *tree, int hf_addr, tvbuff_t *tvb, gint offset,
|
||||
guint16 tlen, char *tag)
|
||||
guint16 tlen, const char *tag)
|
||||
{
|
||||
proto_item *ti;
|
||||
proto_tree *prefix_tree;
|
||||
|
@ -635,7 +635,7 @@ mp_addr_to_str (guint16 afi, guint8 safi, tvbuff_t *tvb, gint offset, GString *b
|
|||
*/
|
||||
static int
|
||||
decode_prefix_MP(proto_tree *tree, int hf_addr4, int hf_addr6,
|
||||
guint16 afi, guint8 safi, tvbuff_t *tvb, gint offset, char *tag)
|
||||
guint16 afi, guint8 safi, tvbuff_t *tvb, gint offset, const char *tag)
|
||||
{
|
||||
int start_offset = offset;
|
||||
proto_item *ti;
|
||||
|
|
|
@ -382,7 +382,7 @@ static const value_string tab_bssgp_ie_types[] = {
|
|||
|
||||
typedef struct {
|
||||
guint8 iei;
|
||||
char *name;
|
||||
const char *name;
|
||||
guint8 presence_req;
|
||||
int format;
|
||||
gint16 value_length; /* in bytes (read from capture)*/
|
||||
|
@ -574,15 +574,15 @@ tvb_get_bits8(tvbuff_t *tvb, guint64 bo, guint8 num_bits) {
|
|||
return (data & mask) >> (16 - shift_value - num_bits);
|
||||
}
|
||||
|
||||
proto_item *
|
||||
static proto_item *
|
||||
bit_proto_tree_add_text(proto_tree *tree, tvbuff_t *tvb,
|
||||
guint64 bo, guint8 bl, char *value) {
|
||||
guint64 bo, guint8 bl, const char *value) {
|
||||
/* XXX: Use varargs */
|
||||
return proto_tree_add_text(tree, tvb, get_start_octet(bo),
|
||||
get_num_octets_spanned(bo, bl), value);
|
||||
}
|
||||
|
||||
proto_item *
|
||||
static proto_item *
|
||||
bit_proto_tree_add_bit_field8(proto_tree *tree, tvbuff_t *tvb,
|
||||
guint64 bo, guint8 bl) {
|
||||
/* XXX: Use varargs */
|
||||
|
@ -610,7 +610,7 @@ bit_proto_tree_add_bit_field8(proto_tree *tree, tvbuff_t *tvb,
|
|||
return pi;
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_reliability_class(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -636,7 +636,7 @@ translate_abqp_reliability_class(guint8 value, build_info_t *bi) {
|
|||
return "Unacknowledged GTP and LLC; Acknowledged RLC, Protected data";
|
||||
}
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_delay_class(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -655,7 +655,7 @@ translate_abqp_delay_class(guint8 value, build_info_t *bi) {
|
|||
return "Delay class 4 (best effort)";
|
||||
}
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_peak_throughput(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -679,7 +679,7 @@ translate_abqp_peak_throughput(guint8 value, build_info_t *bi) {
|
|||
return "Up to 1 000 octets/s";
|
||||
}
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_precedence_class(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -697,7 +697,7 @@ translate_abqp_precedence_class(guint8 value, build_info_t *bi) {
|
|||
return "Normal priority";
|
||||
}
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_mean_throughput(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -731,7 +731,7 @@ translate_abqp_mean_throughput(guint8 value, build_info_t *bi) {
|
|||
return "Best effort";
|
||||
}
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_traffic_class(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -757,7 +757,7 @@ translate_abqp_traffic_class(guint8 value, build_info_t *bi) {
|
|||
}
|
||||
}
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_delivery_order(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -774,7 +774,7 @@ translate_abqp_delivery_order(guint8 value, build_info_t *bi) {
|
|||
return "Error in BSSGP dissector";
|
||||
}
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_delivery_of_erroneous_sdu(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -799,7 +799,7 @@ translate_abqp_delivery_of_erroneous_sdu(guint8 value, build_info_t *bi) {
|
|||
}
|
||||
}
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_max_sdu_size(guint8 value, build_info_t *bi) {
|
||||
static char result[BSSGP_TRANSLATION_MAX_LEN];
|
||||
|
||||
|
@ -836,7 +836,7 @@ translate_abqp_max_sdu_size(guint8 value, build_info_t *bi) {
|
|||
}
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_max_bit_rate_for_ul(guint8 value, build_info_t *bi) {
|
||||
static char result[BSSGP_TRANSLATION_MAX_LEN];
|
||||
|
||||
|
@ -863,12 +863,12 @@ translate_abqp_max_bit_rate_for_ul(guint8 value, build_info_t *bi) {
|
|||
return "0 kbps";
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_max_bit_rate_for_dl(guint8 value, build_info_t *bi) {
|
||||
return translate_abqp_max_bit_rate_for_ul(value, bi);
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_residual_ber(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -899,7 +899,7 @@ translate_abqp_residual_ber(guint8 value, build_info_t *bi) {
|
|||
}
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_sdu_error_ratio(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -928,7 +928,7 @@ translate_abqp_sdu_error_ratio(guint8 value, build_info_t *bi) {
|
|||
}
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_transfer_delay(guint8 value, build_info_t *bi) {
|
||||
static char result[BSSGP_TRANSLATION_MAX_LEN];
|
||||
|
||||
|
@ -955,7 +955,7 @@ translate_abqp_transfer_delay(guint8 value, build_info_t *bi) {
|
|||
return "Reserved";
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_traffic_handling_priority(guint8 value, build_info_t *bi) {
|
||||
switch (value) {
|
||||
case 0:
|
||||
|
@ -972,16 +972,16 @@ translate_abqp_traffic_handling_priority(guint8 value, build_info_t *bi) {
|
|||
}
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_guaranteed_bit_rate_for_ul(guint8 value, build_info_t *bi) {
|
||||
return translate_abqp_max_bit_rate_for_ul(value, bi);
|
||||
}
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_guaranteed_bit_rate_for_dl(guint8 value, build_info_t *bi) {
|
||||
return translate_abqp_max_bit_rate_for_ul(value, bi);
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_source_statistics_descriptor(guint8 value, build_info_t *bi) {
|
||||
if (bi->ul_data) {
|
||||
switch (value) {
|
||||
|
@ -995,7 +995,7 @@ translate_abqp_source_statistics_descriptor(guint8 value, build_info_t *bi) {
|
|||
}
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_max_bit_rate_for_dl_extended(guint8 value, build_info_t *bi _U_) {
|
||||
static char result[BSSGP_TRANSLATION_MAX_LEN];
|
||||
|
||||
|
@ -1010,7 +1010,7 @@ translate_abqp_max_bit_rate_for_dl_extended(guint8 value, build_info_t *bi _U_)
|
|||
return "";
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_abqp_guaranteed_bit_rate_for_dl_extended(guint8 value, build_info_t *bi _U_) {
|
||||
static char result[BSSGP_TRANSLATION_MAX_LEN];
|
||||
|
||||
|
@ -1060,7 +1060,7 @@ translate_msrac_dtm_gprs_multislot_class(guint8 value) {
|
|||
return val_to_str(value, tab_values, "");
|
||||
}
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_msrac_extended_dtm_gprs_multislot_class(guint8 value, guint8 dgmsc) {
|
||||
switch (dgmsc) {
|
||||
case 0: return "Unused, interpreted as Multislot class 5 supported";
|
||||
|
@ -1191,7 +1191,7 @@ translate_msrac_high_multislot_capability(guint8 capability, guint8 class) {
|
|||
}
|
||||
#endif
|
||||
|
||||
static char*
|
||||
static const char*
|
||||
translate_channel_needed(guint8 value) {
|
||||
switch (value) {
|
||||
case 0: return "Any channel";
|
||||
|
@ -1610,7 +1610,7 @@ get_value_length(bssgp_ie_t *ie, build_info_t *bi) {
|
|||
|
||||
static void
|
||||
decode_simple_ie(bssgp_ie_t *ie, build_info_t *bi, int ie_start_offset,
|
||||
char *pre_str, char *post_str,
|
||||
const char *pre_str, const char *post_str,
|
||||
gboolean show_as_dec) {
|
||||
/* XXX: Allow mask? */
|
||||
proto_item *ti;
|
||||
|
|
|
@ -656,7 +656,7 @@ dissect_address_tlv(tvbuff_t *tvb, int offset, int length, proto_tree *tree)
|
|||
int nlpid;
|
||||
const char *protocol_str;
|
||||
guint16 address_length;
|
||||
char *address_type_str;
|
||||
const char *address_type_str;
|
||||
char *address_str;
|
||||
|
||||
if (length < 1)
|
||||
|
|
|
@ -156,7 +156,7 @@ struct _COPS_CNV
|
|||
guint class;
|
||||
guint tag;
|
||||
gint syntax;
|
||||
gchar *name;
|
||||
const gchar *name;
|
||||
};
|
||||
|
||||
static COPS_CNV CopsCnv [] =
|
||||
|
@ -174,7 +174,7 @@ static COPS_CNV CopsCnv [] =
|
|||
{0, 0, -1, NULL}
|
||||
};
|
||||
|
||||
static gchar *
|
||||
static const gchar *
|
||||
cops_tag_cls2syntax ( guint tag, guint cls, gushort *syntax)
|
||||
{
|
||||
COPS_CNV *cnv;
|
||||
|
@ -796,8 +796,8 @@ static int dissect_cops_pr_object_data(tvbuff_t *tvb, guint32 offset, proto_tree
|
|||
guint8 s_num, guint8 s_type, int len);
|
||||
|
||||
/* Added for PacketCable */
|
||||
static proto_tree *info_to_cops_subtree(tvbuff_t *, proto_tree *, int, int, char *);
|
||||
static proto_item *info_to_display(tvbuff_t *, proto_item *, int, int, char *, const value_string *, int, gint *);
|
||||
static proto_tree *info_to_cops_subtree(tvbuff_t *, proto_tree *, int, int, const char *);
|
||||
static proto_item *info_to_display(tvbuff_t *, proto_item *, int, int, const char *, const value_string *, int, gint *);
|
||||
|
||||
static void cops_transaction_id(tvbuff_t *, packet_info *, proto_tree *, guint8, guint, guint32);
|
||||
static void cops_subscriber_id_v4(tvbuff_t *, proto_tree *, guint, guint32);
|
||||
|
@ -906,7 +906,7 @@ dissect_cops_pdu(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
}
|
||||
}
|
||||
|
||||
static char *cops_c_type_to_str(guint8 c_num, guint8 c_type)
|
||||
static const char *cops_c_type_to_str(guint8 c_num, guint8 c_type)
|
||||
{
|
||||
switch (c_num) {
|
||||
case COPS_OBJ_HANDLE:
|
||||
|
@ -969,7 +969,7 @@ static int dissect_cops_object(tvbuff_t *tvb, packet_info *pinfo, guint8 op_code
|
|||
guint8 c_num, c_type;
|
||||
proto_item *ti;
|
||||
proto_tree *obj_tree;
|
||||
char *type_str;
|
||||
const char *type_str;
|
||||
|
||||
object_len = tvb_get_ntohs(tvb, offset);
|
||||
if (object_len < COPS_OBJECT_HDR_SIZE) {
|
||||
|
@ -1329,7 +1329,7 @@ static int decode_cops_pr_asn1_data(tvbuff_t *tvb, guint32 offset,
|
|||
|
||||
guint vb_length;
|
||||
gushort vb_type;
|
||||
gchar *vb_type_name;
|
||||
const gchar *vb_type_name;
|
||||
|
||||
int ret;
|
||||
guint cls, con, tag;
|
||||
|
@ -2498,7 +2498,7 @@ void proto_reg_handoff_cops(void)
|
|||
*/
|
||||
|
||||
static proto_item *
|
||||
info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, char *str, const value_string *vsp, int mode,gint *hf_proto_parameter)
|
||||
info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, const char *str, const value_string *vsp, int mode,gint *hf_proto_parameter)
|
||||
{
|
||||
proto_item *pi = NULL;
|
||||
guint8 code8 = 0;
|
||||
|
@ -2627,7 +2627,7 @@ info_to_display(tvbuff_t *tvb, proto_item *stt, int offset, int octets, char *st
|
|||
|
||||
/* Print the subtree information for cops */
|
||||
static proto_tree *
|
||||
info_to_cops_subtree(tvbuff_t *tvb, proto_tree *st, int n, int offset, char *str) {
|
||||
info_to_cops_subtree(tvbuff_t *tvb, proto_tree *st, int n, int offset, const char *str) {
|
||||
proto_item *tv;
|
||||
|
||||
tv = proto_tree_add_uint_format( st, hf_cops_subtree, tvb, offset, n, (guint)NULL, str);
|
||||
|
|
|
@ -65,8 +65,8 @@ enum /* Not a typedef'd enum so we can OR */
|
|||
|
||||
typedef struct {
|
||||
guint32 bit;
|
||||
char *on_string;
|
||||
char *off_string;
|
||||
const char *on_string;
|
||||
const char *off_string;
|
||||
} cups_ptype_bit_info;
|
||||
|
||||
static const cups_ptype_bit_info cups_ptype_bits[] = {
|
||||
|
|
|
@ -3056,7 +3056,7 @@ netlogon_dissect_CIPHER_VALUE_DATA(tvbuff_t *tvb, int offset,
|
|||
static int
|
||||
netlogon_dissect_CIPHER_VALUE(tvbuff_t *tvb, int offset,
|
||||
packet_info *pinfo, proto_tree *parent_tree,
|
||||
guint8 *drep, char *name, int hf_index)
|
||||
guint8 *drep, const char *name, int hf_index)
|
||||
{
|
||||
proto_item *item=NULL;
|
||||
proto_tree *tree=NULL;
|
||||
|
|
|
@ -163,8 +163,8 @@ struct dcmItem {
|
|||
struct dcmItem *next, *prev;
|
||||
int valid;
|
||||
guint8 id; /* 0x20 Presentation Context */
|
||||
guint8 *abs; /* 0x30 Abstract syntax */
|
||||
char *xfer; /* 0x40 Transfer syntax */
|
||||
const guint8 *abs; /* 0x30 Abstract syntax */
|
||||
const char *xfer; /* 0x40 Transfer syntax */
|
||||
guint8 syntax;
|
||||
#define DCM_ILE 0x01 /* implicit, little endian */
|
||||
#define DCM_EBE 0x02 /* explicit, big endian */
|
||||
|
@ -172,7 +172,7 @@ struct dcmItem {
|
|||
#define DCM_UNK 0xf0
|
||||
};
|
||||
typedef struct dcmItem dcmItem_t;
|
||||
static char *dcm_xfer_unk = "not found - click on ASSOC Request";
|
||||
static const char *dcm_xfer_unk = "not found - click on ASSOC Request";
|
||||
|
||||
struct dcmState {
|
||||
dcmItem_t *first, *last;
|
||||
|
@ -189,7 +189,7 @@ typedef struct dcmState dcmState_t;
|
|||
struct dcmTag {
|
||||
int tag;
|
||||
int dtype;
|
||||
char *desc;
|
||||
const char *desc;
|
||||
#define DCM_TSTR 1
|
||||
#define DCM_TINT2 2
|
||||
#define DCM_TINT4 3
|
||||
|
@ -316,10 +316,10 @@ mkds(void)
|
|||
return ds;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_pdu2str(guint8 item)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
switch (item) {
|
||||
case 1: s = "ASSOC Request"; break;
|
||||
case 2: s = "ASSOC Accept"; break;
|
||||
|
@ -340,10 +340,10 @@ dcm_pdu2str(guint8 item)
|
|||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_result2str(guint8 result)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
switch (result) {
|
||||
case 1: s = "Reject Permanent"; break;
|
||||
case 2: s = "Reject Transient"; break;
|
||||
|
@ -352,10 +352,10 @@ dcm_result2str(guint8 result)
|
|||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_source2str(guint8 source)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
switch (source) {
|
||||
case 1: s = "User"; break;
|
||||
case 2: s = "Provider (ACSE)"; break;
|
||||
|
@ -365,10 +365,10 @@ dcm_source2str(guint8 source)
|
|||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_reason2str(guint8 source, guint8 reason)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
if (1 == source) switch (reason) {
|
||||
case 1: s = "No reason"; break;
|
||||
case 2: s = "App Name not supported"; break;
|
||||
|
@ -387,10 +387,10 @@ dcm_reason2str(guint8 source, guint8 reason)
|
|||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_abort2str(guint8 reason)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
switch (reason) {
|
||||
case 0: s = "not specified"; break;
|
||||
case 1: s = "unrecognized"; break;
|
||||
|
@ -403,10 +403,10 @@ dcm_abort2str(guint8 reason)
|
|||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_PCresult2str(guint8 result)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
switch (result) {
|
||||
case 0: s = "accept"; break;
|
||||
case 1: s = "user-reject"; break;
|
||||
|
@ -418,10 +418,10 @@ dcm_PCresult2str(guint8 result)
|
|||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_flags2str(guint8 flags)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
switch (flags) {
|
||||
case 0: s = "Data, more Fragments"; break; /* 00 */
|
||||
case 1: s = "Command, more Fragments"; break; /* 01 */
|
||||
|
@ -432,10 +432,10 @@ dcm_flags2str(guint8 flags)
|
|||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_cmd2str(guint16 us)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
/* there should be a better way to do this */
|
||||
switch (us) {
|
||||
case 0x0001: s = "C-STORE-RQ"; break;
|
||||
|
@ -466,10 +466,10 @@ dcm_cmd2str(guint16 us)
|
|||
return s;
|
||||
}
|
||||
|
||||
char *
|
||||
const char *
|
||||
dcm_rsp2str(guint16 us)
|
||||
{
|
||||
char *s = "";
|
||||
const char *s = "";
|
||||
switch (us) {
|
||||
case 0x0000: s = "Success"; break;
|
||||
case 0xa701:
|
||||
|
|
|
@ -130,7 +130,7 @@ typedef struct value_name {
|
|||
|
||||
typedef struct old_avp_info {
|
||||
guint32 code;
|
||||
gchar *name;
|
||||
const gchar *name;
|
||||
diameterDataType type;
|
||||
const value_string *values;
|
||||
} oldAvpInfo;
|
||||
|
@ -1076,7 +1076,7 @@ diameter_avp_get_name(guint32 avpCode, guint32 vendorId)
|
|||
sprintf(buffer, "Unknown AVP:0x%08x", avpCode);
|
||||
return buffer;
|
||||
} /* diameter_avp_get_name */
|
||||
static gchar *
|
||||
static const gchar *
|
||||
diameter_avp_get_value(guint32 avpCode, guint32 vendorId, guint32 avpValue)
|
||||
{
|
||||
avpInfo *probe;
|
||||
|
@ -1158,7 +1158,7 @@ dissect_diameter_common(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree)
|
|||
guint32 commandCode=0, pktLength=0;
|
||||
guint8 version=0, flags=0;
|
||||
gchar flagstr[64] = "<None>";
|
||||
gchar *fstr[] = {"RSVD7", "RSVD6", "RSVD5", "RSVD4", "RSVD3", "Error", "Proxyable", "Request" };
|
||||
const gchar *fstr[] = {"RSVD7", "RSVD6", "RSVD5", "RSVD4", "RSVD3", "Error", "Proxyable", "Request" };
|
||||
gchar commandString[64], vendorName[64], applicationName[64];
|
||||
gint i;
|
||||
guint bpos;
|
||||
|
@ -1536,7 +1536,7 @@ static void dissect_avps(tvbuff_t *tvb, packet_info *pinfo, proto_tree *avp_tree
|
|||
size_t avpDataLength;
|
||||
int avpType;
|
||||
gchar flagstr[64] = "<None>";
|
||||
gchar *fstr[] = {"RSVD7", "RSVD6", "RSVD5", "RSVD4", "RSVD3", "Protected", "Mandatory", "Vendor-Specific" };
|
||||
const gchar *fstr[] = {"RSVD7", "RSVD6", "RSVD5", "RSVD4", "RSVD3", "Protected", "Mandatory", "Vendor-Specific" };
|
||||
gint i;
|
||||
guint bpos;
|
||||
|
||||
|
|
|
@ -199,7 +199,7 @@ static GHashTable *oui_info_table = NULL;
|
|||
* Add an entry for a new OUI.
|
||||
*/
|
||||
void
|
||||
llc_add_oui(guint32 oui, const char *table_name, char *table_ui_name,
|
||||
llc_add_oui(guint32 oui, const char *table_name, const char *table_ui_name,
|
||||
hf_register_info *hf_item)
|
||||
{
|
||||
oui_info_t *new_info;
|
||||
|
|
|
@ -33,7 +33,7 @@ void dissect_snap(tvbuff_t *, int, packet_info *, proto_tree *,
|
|||
/*
|
||||
* Add an entry for a new OUI.
|
||||
*/
|
||||
void llc_add_oui(guint32, const char *, char *, hf_register_info *);
|
||||
void llc_add_oui(guint32, const char *, const char *, hf_register_info *);
|
||||
|
||||
extern const value_string sap_vals[];
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ typedef int (dissect_function_t)(tvbuff_t *tvb, int offset, packet_info *pinfo,
|
|||
|
||||
typedef struct _vsff {
|
||||
guint32 value;
|
||||
gchar *strptr;
|
||||
const gchar *strptr;
|
||||
dissect_function_t *dissect_call;
|
||||
dissect_function_t *dissect_reply;
|
||||
} vsff;
|
||||
|
|
Loading…
Reference in New Issue