svn path=/trunk/; revision=54505
return (counter);
}
+int
+tvb_skip_guint8(tvbuff_t *tvb, int offset, const int maxlength, const guint8 ch)
+{
+ int end, tvb_len;
+
+ /* Get the length remaining */
+ tvb_len = tvb_length(tvb);
+ end = offset + maxlength;
+ if (end >= tvb_len)
+ end = tvb_len;
+
+ while (offset < end) {
+ guint8 tempch = tvb_get_guint8(tvb, offset);
+
+ if (tempch != ch)
+ break;
+ offset++;
+ }
+
+ return offset;
+}
/*
* Format a bunch of data from a tvbuff as bytes, returning a pointer
WS_DLL_PUBLIC gint tvb_skip_wsp_return(tvbuff_t *tvb, const gint offset);
+int tvb_skip_guint8(tvbuff_t *tvb, int offset, const int maxlength, const guint8 ch);
+
/**
* Call strncmp after checking if enough chars left, returning 0 if
* it returns 0 (meaning "equal") and -1 otherwise, otherwise return -1.