/***************************************************************************/ /* Module: $Id: snmpcli.h,v 1.2 1999/05/07 04:15:27 maf Exp $ /* Description: snmp client defines /* Author: Shamim Ahmed /* Notes: /***************************************************************************/ /* FIXME -- needs cleanup */ /* $Log: snmpcli.h,v $ Revision 1.2 1999/05/07 04:15:27 maf pr -e2 Revision 1.1 1997/02/23 18:05:11 maf Initial revision * Revision 2.2 1994/02/04 21:26:25 maf * *** empty log message *** * * Revision 2.1 1993/10/19 19:37:30 maf * kbconfig 1.7+ * * Revision 1.1 1993/08/29 01:43:31 maf * Initial revision * */ #ifndef SNMP_CLI_H #define SNMP_CLI_H #include "osusnmp.h" /* A general definition of an object used for ASN encoding/decoding. */ typedef struct cliReqTag{ /* OidEleType *oid; /* pointer to OID */ OidEleType oid[MAX_OID_LEN]; short oidLen; /* OID length */ u_char *obj; /* pointer to object */ short objLen; /* object length */ PCTypes objType; /* object type */ } CliReqObjType; /* Definition for SNMP packet used for SNMP encoding/decoding */ typedef struct { SnmpRequestType command; /* SNMP command */ u_char *communityName; /* community name */ short communityLen; long id; /* snmp Packet ID */ SnmpErrorType errorStatus; /* error status */ SnmpErrorType errorIndex; /* error index */ short reqCount; /* number of objects */ u_char *wkBuffer; /* Decode buffer */ /* (initialized by snmpDecodeNew, snmpEncodeNew)*/ short wkBufferSize; /* wkBufferSize /* (initialized by snmpDecodeNew, snmpEncodeNew */ short maxObj; /* max number of objects allowed */ /* (initialized by snmpDecodeNew, snmpEncodeNew */ CliReqObjType *list; /* list of objects */ } CliRequestType; /* in snmpcli.c */ CliRequestType *snmpEncodeNew(); CliRequestType *snmpDecodeNew(); int snmpEncodePkt(); int snmpDecodePkt(); int snmpDecodeIdOnly(); #endif