aboutsummaryrefslogtreecommitdiffstats
path: root/packet-wsp.c
diff options
context:
space:
mode:
authorGuy Harris <guy@alum.mit.edu>2003-11-19 09:43:29 +0000
committerGuy Harris <guy@alum.mit.edu>2003-11-19 09:43:29 +0000
commit3fe5ef9396513bf08f1924f83a17e2f49cc15a50 (patch)
tree688e6004a0356a7a16fee866b9bb2861f6145216 /packet-wsp.c
parenta07a627e3f5f632d93ff4bb41fb99e4b9953354d (diff)
From Olivier Biot: get rid of no-longer-used routines.
svn path=/trunk/; revision=9035
Diffstat (limited to 'packet-wsp.c')
-rw-r--r--packet-wsp.c126
1 files changed, 2 insertions, 124 deletions
diff --git a/packet-wsp.c b/packet-wsp.c
index f76a87f93a..2a3ccb12a4 100644
--- a/packet-wsp.c
+++ b/packet-wsp.c
@@ -2,7 +2,7 @@
*
* Routines to dissect WSP component of WAP traffic.
*
- * $Id: packet-wsp.c,v 1.88 2003/11/19 01:45:26 guy Exp $
+ * $Id: packet-wsp.c,v 1.89 2003/11/19 09:43:29 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@ethereal.com>
@@ -1158,9 +1158,7 @@ static void add_multipart_data (proto_tree *, tvbuff_t *);
static void add_capabilities (proto_tree *tree, tvbuff_t *tvb, int type);
static void add_capability_vals(tvbuff_t *, gboolean, int, guint, guint, char *, size_t);
-static value_type_t get_value_type_len (tvbuff_t *, int, guint *, int *, int *);
static guint get_uintvar (tvbuff_t *, guint, guint);
-static gint get_integer (tvbuff_t *, guint, guint, value_type_t, guint *);
@@ -4964,82 +4962,6 @@ add_capability_vals(tvbuff_t *tvb, gboolean add_string, int offsetStr,
valString[i] = '\0';
}
-static value_type_t
-get_value_type_len (tvbuff_t *tvb, int offset, guint *valueLen,
- int *valueOffset, int *nextOffset)
-{
- guint8 peek;
- guint32 len;
- guint count;
-
- /* Get value part of header */
- peek = tvb_get_guint8 (tvb, offset);
- if (peek <= 30)
- {
- /*
- * The value follows "peek", and is "peek" octets long.
- */
-#ifdef DEBUG
- fprintf (stderr, "dissect_wsp: Looking for %d octets\n", peek);
-#endif
- len = peek;
- *valueLen = len; /* Length of value */
- offset++; /* Skip the length */
- *valueOffset = offset; /* Offset of value */
- offset += len; /* Skip the value */
- *nextOffset = offset; /* Offset after value */
- return VALUE_LEN_SUPPLIED;
- }
- else if (peek == 31)
- {
- /*
- * A uintvar giving the length of the value follows
- * "peek", and the value follows that.
- */
-#ifdef DEBUG
- fprintf (stderr, "dissect_wsp: Looking for uintvar octets\n");
-#endif
- offset++; /* Skip the uintvar indicator */
- count = 0; /* Initialise count */
- len = tvb_get_guintvar (tvb, offset, &count);
- *valueLen = len; /* Length of value */
- offset += count; /* Skip the length */
- *valueOffset = offset; /* Offset of value */
- offset += len; /* Skip the value */
- *nextOffset = offset; /* Offset after value */
- return VALUE_LEN_SUPPLIED;
- }
- else if (peek <= 127)
- {
- /*
- * The value is a NUL-terminated string, and "peek"
- * is the first octet of the string.
- */
-#ifdef DEBUG
- fprintf (stderr, "dissect_wsp: Looking for NUL-terminated string\n");
-#endif
- len = tvb_strsize (tvb, offset);
- *valueLen = len; /* Length of value */
- *valueOffset = offset; /* Offset of value */
- offset += len; /* Skip the value */
- *nextOffset = offset; /* Offset after value */
- return VALUE_IS_TEXT_STRING;
- }
- else
- {
- /*
- * "peek", with the 8th bit stripped off, is the value.
- */
-#ifdef DEBUG
- fprintf (stderr, "dissect_wsp: Value is %d\n", (peek & 0x7F));
-#endif
- *valueLen = peek & 0x7F; /* Return the value itself */
- *valueOffset = offset; /* Offset of value */
- offset++; /* Skip the value */
- *nextOffset = offset; /* Offset after value */
- return VALUE_IN_LEN;
- }
-}
static guint
get_uintvar (tvbuff_t *tvb, guint offset, guint offsetEnd)
@@ -5049,7 +4971,7 @@ get_uintvar (tvbuff_t *tvb, guint offset, guint offsetEnd)
do
{
- octet = tvb_get_guint8 (tvb, offset);
+ octet = tvb_get_guint8 (tvb, offset);
offset++;
value <<= 7;
value += octet & 0x7f;
@@ -5221,50 +5143,6 @@ add_multipart_data (proto_tree *tree, tvbuff_t *tvb)
}
}
-static gint
-get_integer (tvbuff_t *tvb, guint offset, guint valueLength,
- value_type_t valueType, guint *value)
-{
- if (valueType == VALUE_IS_TEXT_STRING) {
- /*
- * Not valid.
- */
- return -1;
- }
-
- if (valueType == VALUE_IN_LEN) {
- /*
- * Short-integer.
- */
- *value = valueLength;
- return 0;
- }
-
- /*
- * Long-integer.
- */
- switch (valueLength)
- {
- case 1:
- *value = tvb_get_guint8(tvb, offset);
- break;
- case 2:
- *value = tvb_get_ntohs(tvb, offset);
- break;
- case 3:
- *value = tvb_get_ntoh24(tvb, offset);
- break;
- case 4:
- *value = tvb_get_ntohl(tvb, offset);
- break;
- default:
- /* TODO: Need to read peek octets */
- *value = 0;
- fprintf (stderr, "dissect_wsp: get_integer size %u NYI\n", valueLength);
- break;
- }
- return 0;
-}
/* Register the protocol with Ethereal */
void