aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-olsr.c
diff options
context:
space:
mode:
authorwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2011-10-10 00:39:31 +0000
committerwmeier <wmeier@f5534014-38df-0310-8fa8-9805f1628bb7>2011-10-10 00:39:31 +0000
commita22559941fee1c629c118c45c98358c121937ffd (patch)
tree279279f3db0b5f366362166344c1cc92c0d44b38 /epan/dissectors/packet-olsr.c
parent909a1add4166b5347444d494a2f258aec6a258a2 (diff)
Convert 'encoding' parameter of certain proto_tree_add_item() calls in non-autogenerated epan/dissectors:
Specifically: Replace FALSE|0 and TRUE|1 by ENC_BIG_ENDIAN|ENC_LITTLE_ENDIAN as the encoding parameter for proto_tree_add_item() calls which directly reference an item in hf[] which has a type of: FT_BOOLEAN FT_IPv4 FT_EUI64 FT_GUID FT_UINT_STRING Also: For type FT_ITv6 use ENC_NA. (This was missed in SVN #39260) git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@39328 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'epan/dissectors/packet-olsr.c')
-rw-r--r--epan/dissectors/packet-olsr.c40
1 files changed, 20 insertions, 20 deletions
diff --git a/epan/dissectors/packet-olsr.c b/epan/dissectors/packet-olsr.c
index 8543cebadb..e1d46452c8 100644
--- a/epan/dissectors/packet-olsr.c
+++ b/epan/dissectors/packet-olsr.c
@@ -186,10 +186,10 @@ static int dissect_olsr_tc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *olsr_t
return message_end;
}
if (pinfo->src.type == AT_IPv4) {
- proto_tree_add_item(olsr_tree, hf_olsr_neighbor_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_neighbor_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else if (pinfo->src.type == AT_IPv6) {
- proto_tree_add_item(olsr_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, ENC_NA);
offset += 16;
} else {
break; /* unknown address type should be handled in dissect_olsr, just be sure */
@@ -227,7 +227,7 @@ static int dissect_olsrorg_lq_tc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
address_tree = proto_item_add_subtree(address_group, ett_olsr_message_neigh);
- proto_tree_add_item(address_tree, hf_olsr_neighbor_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(address_tree, hf_olsr_neighbor_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else if (pinfo->src.type == AT_IPv6) {
if (message_end - offset < 20) {
@@ -243,7 +243,7 @@ static int dissect_olsrorg_lq_tc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
address_tree = proto_item_add_subtree(address_group, ett_olsr_message_neigh);
- proto_tree_add_item(address_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, FALSE);
+ proto_tree_add_item(address_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, ENC_NA);
offset += 16;
} else {
break; /* unknown address type should be handled in dissect_olsr, just be sure */
@@ -273,10 +273,10 @@ static int dissect_nrlolsr_tc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *ols
saneEnd = message_end - ((message_end - offset) % (pinfo->src.len + 2));
while (field2Ptr < saneEnd) {
if (pinfo->src.type == AT_IPv4) {
- proto_tree_add_item(olsr_tree, hf_olsr_neighbor_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_neighbor_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else if (pinfo->src.type == AT_IPv6) {
- proto_tree_add_item(olsr_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, ENC_NA);
offset += 16;
} else {
break; /* unknown address type should be handled in dissect_olsr, just be sure */
@@ -352,10 +352,10 @@ static int handle_olsr_hello_rfc(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
return link_message_end;
}
if (pinfo->src.type == AT_IPv4) {
- proto_tree_add_item(olsr_tree, hf_olsr_neighbor_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_neighbor_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else if (pinfo->src.type == AT_IPv6) {
- proto_tree_add_item(olsr_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, ENC_NA);
offset += 16;
} else {
break; /* unknown address type should be handled in dissect_olsr, just be sure */
@@ -388,7 +388,7 @@ static int handle_olsr_hello_olsrorg(tvbuff_t *tvb, packet_info *pinfo, proto_tr
address_tree = proto_item_add_subtree(address_group, ett_olsr_message_neigh);
- proto_tree_add_item(address_tree, hf_olsr_neighbor_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(address_tree, hf_olsr_neighbor_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else if (pinfo->src.type == AT_IPv6) {
lq = tvb_get_guint8(tvb, offset + 16);
@@ -399,7 +399,7 @@ static int handle_olsr_hello_olsrorg(tvbuff_t *tvb, packet_info *pinfo, proto_tr
address_tree = proto_item_add_subtree(address_group, ett_olsr_message_neigh);
- proto_tree_add_item(address_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, FALSE);
+ proto_tree_add_item(address_tree, hf_olsr_neighbor6_addr, tvb, offset, 16, ENC_NA);
offset += 16;
} else {
break; /* unknown address type should be handled in dissect_olsr, just be sure */
@@ -421,10 +421,10 @@ static int dissect_olsr_mid(tvbuff_t *tvb, packet_info *pinfo, proto_tree *olsr_
return message_end;
}
if (pinfo->src.type == AT_IPv4) {
- proto_tree_add_item(olsr_tree, hf_olsr_interface_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_interface_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else if (pinfo->src.type == AT_IPv6) {
- proto_tree_add_item(olsr_tree, hf_olsr_interface6_addr, tvb, offset, 16, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_interface6_addr, tvb, offset, 16, ENC_NA);
offset += 16;
} else {
break; /* unknown address type should be handled in dissect_olsr, just be sure */
@@ -443,14 +443,14 @@ static int dissect_olsr_hna(tvbuff_t *tvb, packet_info *pinfo, proto_tree *olsr_
}
if (pinfo->src.type == AT_IPv4) {
- proto_tree_add_item(olsr_tree, hf_olsr_network_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_network_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
- proto_tree_add_item(olsr_tree, hf_olsr_netmask, tvb, offset, 4, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_netmask, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else if (pinfo->src.type == AT_IPv6) {
- proto_tree_add_item(olsr_tree, hf_olsr_network6_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_network6_addr, tvb, offset, 4, ENC_NA);
offset += 16;
- proto_tree_add_item(olsr_tree, hf_olsr_netmask6, tvb, offset, 4, FALSE);
+ proto_tree_add_item(olsr_tree, hf_olsr_netmask6, tvb, offset, 4, ENC_NA);
offset += 16;
} else {
break; /* unknown address type should be handled in dissect_olsr, just be sure */
@@ -511,9 +511,9 @@ static int dissect_olsrorg_nameservice(tvbuff_t *tvb, packet_info *pinfo, proto_
proto_tree_add_uint(olsr_ns_tree, hf_olsrorg_ns_length, tvb, offset + 2, 2, length);
if (pinfo->src.type == AT_IPv4) {
- proto_tree_add_item(olsr_ns_tree, hf_olsrorg_ns_ip, tvb, offset + 4, 4, FALSE);
+ proto_tree_add_item(olsr_ns_tree, hf_olsrorg_ns_ip, tvb, offset + 4, 4, ENC_BIG_ENDIAN);
} else if (pinfo->src.type == AT_IPv6) {
- proto_tree_add_item(olsr_ns_tree, hf_olsrorg_ns_ip6, tvb, offset + 4, 16, FALSE);
+ proto_tree_add_item(olsr_ns_tree, hf_olsrorg_ns_ip6, tvb, offset + 4, 16, ENC_NA);
} else {
break; /* unknown address type should be handled in dissect_olsr, just be sure */
}
@@ -625,10 +625,10 @@ static int dissect_olsr(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree) {
/*-----------------Dissecting: Origin Addr, TTL, Hop Count, and Message Seq Number*/
if (pinfo->src.type == AT_IPv4) {
- proto_tree_add_item(message_tree, hf_olsr_origin_addr, tvb, offset, 4, FALSE);
+ proto_tree_add_item(message_tree, hf_olsr_origin_addr, tvb, offset, 4, ENC_BIG_ENDIAN);
offset += 4;
} else if (pinfo->src.type == AT_IPv6) {
- proto_tree_add_item(message_tree, hf_olsr_origin6_addr, tvb, offset, 16, FALSE);
+ proto_tree_add_item(message_tree, hf_olsr_origin6_addr, tvb, offset, 16, ENC_NA);
offset += 16;
} else {
break; /* unknown address type should be handled before this loop, just be sure */