diff options
author | Guy Harris <guy@alum.mit.edu> | 2004-09-04 01:32:13 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2004-09-04 01:32:13 +0000 |
commit | 3c7631aa32de7a630bd48eec5ef5b67f3c6cdb10 (patch) | |
tree | ad801a014e03217ed71f957d22ad55b8bc00c9ac /epan/range.h | |
parent | 22c088b8ab19622f935953ab6e12456025564c4b (diff) | |
download | wireshark-3c7631aa32de7a630bd48eec5ef5b67f3c6cdb10.tar.gz wireshark-3c7631aa32de7a630bd48eec5ef5b67f3c6cdb10.tar.bz2 wireshark-3c7631aa32de7a630bd48eec5ef5b67f3c6cdb10.zip |
Split the pure range stuff out into separate files, exporting their own
functions.
svn path=/trunk/; revision=11892
Diffstat (limited to 'epan/range.h')
-rw-r--r-- | epan/range.h | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/epan/range.h b/epan/range.h new file mode 100644 index 0000000000..7dc46eb0cf --- /dev/null +++ b/epan/range.h @@ -0,0 +1,56 @@ +/* range.h + * Range routines + * + * $Id$ + * + * Dick Gooris <gooris@lucent.com> + * Ulf Lamping <ulf.lamping@web.de> + * + * Ethereal - Network traffic analyzer + * By Gerald Combs <gerald@ethereal.com> + * Copyright 1998 Gerald Combs + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#ifndef __RANGE_H__ +#define __RANGE_H__ + +#include <glib.h> + +#include <epan/frame_data.h> + +/* Range parser variables */ +#define MaxRange 30 + +typedef struct range_admin_tag { + guint32 low; + guint32 high; +} range_admin_t; + +typedef struct range { + /* user specified range(s) */ + guint nranges; /* number of entries in ranges (0 based) */ + range_admin_t ranges[MaxRange]; +} range_t; + +extern void range_init(range_t *range); + +extern void range_convert_str(range_t *range, const gchar *es, + guint32 max_value); + +extern gboolean value_is_in_range(range_t *range, guint32 val); + +#endif /* __RANGE_H__ */ |