/*
 * $Id: gxsnmp_util.h,v 1.1 2000/04/04 20:14:16 jochen Exp $
 * GXSNMP - An snmp managment application
 * Copyright (C) 1998 Gregory McLean
 *
 * 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, Cambridge, MA 02139, USA.
 *
 * Helper functions
 */
#ifndef __GXSNMP_UTIL_H__
#define __GXSNMP_UTIL_H__

typedef struct _value_string {
  guint32  value;
  gchar   *strptr;
} value_string;
/****************************************************************************
 * Utility macros
 **/
#ifndef ELEMENTS
#define ELEMENTS(x)    (sizeof (x) / sizeof(x[0]))
#endif

/****************************************************************************
 * Utility functions.
 **/
gchar                *match_strval                    (guint32            val, 
						       const value_string *vs);

#endif /* __GXSNMP_UTIL_H__ */
/* EOF */
