aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2005-01-20 07:02:08 +0000
committerGuy Harris <guy@alum.mit.edu>2005-01-20 07:02:08 +0000
commitb799112fdd442eefa8c7faa045631d0dda9ff7ee (patch)
tree46f785d75a84dff975b19d2dd80a10a2bf91129e /epan/dissectors
parentc4c4dd471525e5727717f5c36ce67b5eb85260d0 (diff)
Make some routines static that aren't used outside this module.
Use "guint16" instead of "u_int16_t", "guint8" instead of "u_int8_t", and "guint" instead of "u_int", to handle platforms lacking the latter types. Make "ppp_heuristic_guess()" reeturn a Boolean, as it just returns a "yes or no" answer. svn path=/trunk/; revision=13132
Diffstat (limited to 'epan/dissectors')
-rw-r--r--epan/dissectors/packet-juniper.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/epan/dissectors/packet-juniper.c b/epan/dissectors/packet-juniper.c
index 81e1c28dec..8d6df185b3 100644
--- a/epan/dissectors/packet-juniper.c
+++ b/epan/dissectors/packet-juniper.c
@@ -83,8 +83,8 @@ static dissector_table_t osinl_subdissector_table;
static dissector_table_t osinl_excl_subdissector_table;
static void dissect_juniper_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16 atm_pictype);
-u_int ppp_heuristic_guess(guint16);
-u_int ip_heuristic_guess(guint8);
+static gboolean ppp_heuristic_guess(guint16 proto);
+static guint ip_heuristic_guess(guint8 ip_header_byte);
/* wrapper for passing the PIC type to the generic ATM dissector */
static void
@@ -254,7 +254,7 @@ dissect_juniper_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16
proto = tvb_get_ntohs(tvb, offset); /* second try: 16-Bit guess */
- if ( ppp_heuristic_guess(proto) != 0 &&
+ if ( ppp_heuristic_guess(proto) &&
atm_pictype != JUNIPER_ATM1) { /* VC-MUX PPPoA encaps ? - not supported on ATM1 PICs */
ti = proto_tree_add_text (tree, tvb, offset, 2, "Payload Type: VC-MUX PPP");
subtree = proto_item_add_subtree(ti, ett_juniper);
@@ -298,8 +298,8 @@ dissect_juniper_atm(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, guint16
}
/* list of Juniper supported PPP proto IDs */
-u_int
-ppp_heuristic_guess(const u_int16_t proto) {
+static gboolean
+ppp_heuristic_guess(guint16 proto) {
switch(proto) {
case PPP_IP :
@@ -315,11 +315,11 @@ ppp_heuristic_guess(const u_int16_t proto) {
case PPP_MP :
case PPP_IPV6 :
case PPP_IPV6CP :
- return 1;
+ return TRUE;
break;
default:
- return 0; /* did not find a ppp header */
+ return FALSE; /* did not find a ppp header */
break;
}
}
@@ -328,8 +328,8 @@ ppp_heuristic_guess(const u_int16_t proto) {
* return the IP version number based on the first byte of the IP header
* returns 0 if it does not match a valid first IPv4/IPv6 header byte
*/
-u_int
-ip_heuristic_guess(const u_int8_t ip_header_byte) {
+static guint
+ip_heuristic_guess(guint8 ip_header_byte) {
switch(ip_header_byte) {
case 0x45: