/*
 * Copyright Notice:
 * Copyright Treck Incorporated  1997 - 2004
 * Copyright Elmic Systems Japan 1997 - 2004
 * No portions or the complete contents of this file may be copied or
 * distributed in any form (including but not limited to printed or electronic
 * forms) without the expressed written consent of Treck Incorporated OR
 * Elmic Systems.  Copyright laws and International Treaties protect the
 * contents of this file.  Unauthorized use is prohibited.
 * All rights reserved.
 *
 * Description:  MIB-II constant definitions and structs
 * Filename:     trconsts.h
 * Author:       Leonard
 * Date Created: 12/04/01
 * $Source: /cvs_tick/treck_stack/snmpd/trconsts.h,v $
 *
 * Modification History
 * $Revision: 1.9.36.1 $
 * $Date: 2006/11/28 15:00:53 $
 * $Author: jrakhval $
 * $ProjectName: /home/mks/proj/snmpdprj $
 * $ProjectRevision: 4.0.2.53 $
 */
/***********************************************************
    Copyright 1988, 1989 by Carnegie Mellon University
    Copyright 1989  TGV, Incorporated

              All Rights Reserved

Permission to use, copy, modify, and distribute this software and its
documentation for any purpose and without fee is hereby granted,
provided that the above copyright notice appear in all copies and that
both that copyright notice and this permission notice appear in
supporting documentation, and that the name of CMU and TGV not be used
in advertising or publicity pertaining to distribution of the software
without specific, written prior permission.

CMU AND TGV DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
EVENT SHALL CMU OR TGV BE LIABLE FOR ANY SPECIAL, INDIRECT OR
CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF
USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
******************************************************************/

#ifndef _TRCONSTS_H_
#define _TRCONSTS_H_

#ifdef __cplusplus
extern "C" {
#endif

#ifndef _TRIMPL_H_
#include "trimpl.h"
#endif /* _TRIMPL_H_ */

/*
 * These are unit magic numbers for each variable.
 */

#define TM_MIB_VERSION_DESCR    0
#define TM_MIB_VERSION_ID       1
#define TM_MIB_IFNUMBER         2
#define TM_MIB_UPTIME           3
#define TM_MIB_SYSCONTACT       4
#define TM_MIB_SYSNAME          5
#define TM_MIB_SYSLOCATION      6
#define TM_MIB_SYSSERVICES      7


#define TM_MIB_SYSORLASTCHANGE  8

#define TM_MIB_SYSORID           1
#define TM_MIB_SYSORDESCR        2
#define TM_MIB_SYSORUPTIME       3



#define TM_MIB_IFINDEX                  1
#define TM_MIB_IFDESCR                  2
#define TM_MIB_IFTYPE                   3
#define TM_MIB_IFMTU                    4
#define TM_MIB_IFSPEED                  5
#define TM_MIB_IFPHYSADDR               6
#define TM_MIB_IFADMINSTATUS            7
#define TM_MIB_IFOPERSTATUS             8
#define TM_MIB_IFLASTCHANGE             9
#define TM_MIB_IFINOCTETS               10
#define TM_MIB_IFINUCASTPKTS            11
#define TM_MIB_IFINNUCASTPKTS           12
#define TM_MIB_IFINDISCARDS             13
#define TM_MIB_IFINERRORS               14
#define TM_MIB_IFINUNKNOWNPROTOS        15
#define TM_MIB_IFOUTOCTETS              16
#define TM_MIB_IFOUTUCASTPKTS           17
#define TM_MIB_IFOUTNUCASTPKTS          18
#define TM_MIB_IFOUTDISCARDS            19
#define TM_MIB_IFOUTERRORS              20
#define TM_MIB_IFOUTQLEN                21
#define TM_MIB_IFSPECIFIC               22

#define TM_MIB_ATIFINDEX        80
#define TM_MIB_ATPHYSADDR       81
#define TM_MIB_ATNETADDR        82

#define TM_MIB_IPFORWARDING             0
#define TM_MIB_IPDEFAULTTTL             1
#define TM_MIB_IPINRECEIVES             2
#define TM_MIB_IPINHDRERRORS            3
#define TM_MIB_IPINADDRERRORS           4
#define TM_MIB_IPFORWDATAGRAMS          5
#define TM_MIB_IPINUNKNOWNPROTOS        6
#define TM_MIB_IPINDISCARDS             7
#define TM_MIB_IPINDELIVERS             8
#define TM_MIB_IPOUTREQUESTS            9
#define TM_MIB_IPOUTDISCARDS            10
#define TM_MIB_IPOUTNOROUTES            11
#define TM_MIB_IPREASMTIMEOUT           12
#define TM_MIB_IPREASMREQDS             13
#define TM_MIB_IPREASMOKS               14
#define TM_MIB_IPREASMFAILS             15
#define TM_MIB_IPFRAGOKS                16
#define TM_MIB_IPFRAGFAILS              17
#define TM_MIB_IPFRAGCREATES            18
#define TM_MIB_IPROUTINGDISCARDS        19
#define TM_MIB_IPV6ROUTERADVERTSPINLOCK 37

#define TM_MIB_IPADADDR         1
#define TM_MIB_IPADIFINDEX      2
#define TM_MIB_IPADNETMASK      3
#define TM_MIB_IPADBCASTADDR    4
#define TM_MIB_IPADREASMMAXSIZE 5

#define TM_MIB_IPADDRESSADDRTYPE    1
#define TM_MIB_IPADDRESSADDR        2
#define TM_MIB_IPADDRESSIFINDEX     3
#define TM_MIB_IPADDRESSTYPE        4
#define TM_MIB_IPADDRESSPREFIX      5
#define TM_MIB_IPADDRESSORIGIN      6
#define TM_MIB_IPADDRESSSTATUS      7
#define TM_MIB_IPADDRESSCREATED     8
#define TM_MIB_IPADDRESSLASTCHANGED 9

#define TM_MIB_IPROUTEDEST      0
#define TM_MIB_IPROUTEIFINDEX   1
#define TM_MIB_IPROUTEMETRIC1   2
#define TM_MIB_IPROUTEMETRIC2   3
#define TM_MIB_IPROUTEMETRIC3   4
#define TM_MIB_IPROUTEMETRIC4   5
#define TM_MIB_IPROUTENEXTHOP   6
#define TM_MIB_IPROUTETYPE      7
#define TM_MIB_IPROUTEPROTO     8
#define TM_MIB_IPROUTEAGE       9

#define TM_MIB_IPROUTEMASK      10
#define TM_MIB_IPROUTEMETRIC5   11
#define TM_MIB_IPROUTEINFO      12

/* NG MIB2 inetCidrRouteEntry */
#define TM_MIB_INETCIDRROUTEDESTTYPE     1
#define TM_MIB_INETCIDRROUTEDEST         2
#define TM_MIB_INETCIDRROUTEPFXLEN       3
#define TM_MIB_INETCIDRROUTEPOLICY       4
#define TM_MIB_INETCIDRROUTENEXTHOPTYPE  5
#define TM_MIB_INETCIDRROUTENEXTHOP      6
#define TM_MIB_INETCIDRROUTEIFINDEX      7
#define TM_MIB_INETCIDRROUTETYPE         8
#define TM_MIB_INETCIDRROUTEPROTO        9
#define TM_MIB_INETCIDRROUTEAGE         10
#define TM_MIB_INETCIDRROUTENEXTHOPAS   11
#define TM_MIB_INETCIDRROUTEMETRIC1     12
#define TM_MIB_INETCIDRROUTEMETRIC2     13
#define TM_MIB_INETCIDRROUTEMETRIC3     14
#define TM_MIB_INETCIDRROUTEMETRIC4     15
#define TM_MIB_INETCIDRROUTEMETRIC5     16
#define TM_MIB_INETCIDRROUTESTATUS      17

/* RFC1213 ipNetToMediaTable constants */
#define TM_MIB_IPNETTOMEDIAIFINDEX  0
#define TM_MIB_IPNETTOMEDIAPHYSADDR 4
#define TM_MIB_IPNETTOMEDIAIPADDR   16
#define TM_MIB_IPNETTOMEDIATYPE     20

/* NG MIB2 inetNetToMediaTable constants : */
#define TM_MIB_INETNETTOMEDIAIFINDEX           1
#define TM_MIB_INETNETTOMEDIANETADDRESSTYPE    2
#define TM_MIB_INETNETTOMEDIANETADDRESS        3
#define TM_MIB_INETNETTOMEDIAPHYSADDRESS       4
#define TM_MIB_INETNETTOMEDIALASTUPDATED       5
#define TM_MIB_INETNETTOMEDIATYPE              6
#define TM_MIB_INETNETTOMEDIASTATE             7

/* NG MIB2 ipv6ScoepZoneIndexTable */
#define TM_MIB_IPV6SCOPEZONEINDEXIFINDEX            1
#define TM_MIB_IPV6SCOPEZONEINDEXLINKLOCAL          2
#define TM_MIB_IPV6SCOPEZONEINDEXSUBNETLOCAL        3
#define TM_MIB_IPV6SCOPEZONEINDEXADMINLOCAL         4
#define TM_MIB_IPV6SCOPEZONEINDEXSITELOCAL          5
#define TM_MIB_IPV6SCOPEZONEINDEX6                  6
#define TM_MIB_IPV6SCOPEZONEINDEX7                  7
#define TM_MIB_IPV6SCOPEZONEINDEXORGANIZATIONLOCAL  8
#define TM_MIB_IPV6SCOPEZONEINDEX9                  9
#define TM_MIB_IPV6SCOPEZONEINDEXA                 10
#define TM_MIB_IPV6SCOPEZONEINDEXB                 11
#define TM_MIB_IPV6SCOPEZONEINDEXC                 12
#define TM_MIB_IPV6SCOPEZONEINDEXD                 13

/* NG MIB2 ipDefaultRouterTable  */
#define TM_MIB_IPDEFAULTROUTERAFTYPE        1
#define TM_MIB_IPDEFAULTROUTERADDRESS       2
#define TM_MIB_IPDEFAULTROUTERIFINDEX       3
#define TM_MIB_IPDEFAULTROUTERLIFETIME      4
#define TM_MIB_IPDEFAULTROUTERPREFERENCE    5

/* NG MIB2 ipv6RouterAdvertTable */
#define TM_MIB_IPV6ROUTERADVERTIFINDEX           1
#define TM_MIB_IPV6ROUTERADVERTSENDADVERTS       2
#define TM_MIB_IPV6ROUTERADVERTMAXINTERVAL       3
#define TM_MIB_IPV6ROUTERADVERTMININTERVAL       4
#define TM_MIB_IPV6ROUTERADVERTMANAGEDFLAG       5
#define TM_MIB_IPV6ROUTERADVERTOTHERCONFIGFLAG   6
#define TM_MIB_IPV6ROUTERADVERTLINKMTU           7
#define TM_MIB_IPV6ROUTERADVERTREACHABLETIME     8
#define TM_MIB_IPV6ROUTERADVERTRETRANSMITTIME    9
#define TM_MIB_IPV6ROUTERADVERTCURHOPLIMIT      10
#define TM_MIB_IPV6ROUTERADVERTDEFAULTLIFETIME  11
#define TM_MIB_IPV6ROUTERADVERTROWSTATUS        12

/* NG MIB2 ipv4InterfaceTable */
#define TM_MIB_IPV4INTERFACEIFINDEX         1
#define TM_MIB_IPV4INTERFACEREASMMAXSIZE    2
#define TM_MIB_IPV4INTERFACEADMINSTATUS     3

/* NG MIB2 ipv6InterfaceTable */
#define TM_MIB_IPV6INTERFACEIFINDEX         1
#define TM_MIB_IPV6INTERFACEREASMMAXSIZE    2
#define TM_MIB_IPV6INTERFACEIDENTIFIER      3
#define TM_MIB_IPV6INTERFACEPHYSICALADDRESS 4
#define TM_MIB_IPV6INTERFACEADMINSTATUS     5
#define TM_MIB_IPV6INTERFACEREACHABLETIME   6
#define TM_MIB_IPV6INTERFACERETRANSMITTIME  7

/* NG MIB2 ipSystemStatsTable */
#define TM_MIB_IPSYSTEMSTATSAFTYPE               1
#define TM_MIB_IPSYSTEMSTATSINRECEIVES           3
#define TM_MIB_IPSYSTEMSTATSHCINRECEIVES         4
#define TM_MIB_IPSYSTEMSTATSINOCTETS             5
#define TM_MIB_IPSYSTEMSTATSHCINOCTETS           6
#define TM_MIB_IPSYSTEMSTATSINHDRERRORS          7
#define TM_MIB_IPSYSTEMSTATSINNOROUTES           8
#define TM_MIB_IPSYSTEMSTATSINADDRERRORS         9
#define TM_MIB_IPSYSTEMSTATSINUNKNOWNPROTOS     10
#define TM_MIB_IPSYSTEMSTATSINTRUNCATEDPKTS     11
#define TM_MIB_IPSYSTEMSTATSINFORWDATAGRAMS     12
#define TM_MIB_IPSYSTEMSTATSREASMREQDS          13
#define TM_MIB_IPSYSTEMSTATSREASMOKS            14
#define TM_MIB_IPSYSTEMSTATSREASMFAILS          15
#define TM_MIB_IPSYSTEMSTATSINDISCARDS          16
#define TM_MIB_IPSYSTEMSTATSINDELIVERS          17
#define TM_MIB_IPSYSTEMSTATSOUTREQUESTS         18
#define TM_MIB_IPSYSTEMSTATSOUTNOROUTES         19
#define TM_MIB_IPSYSTEMSTATSOUTFORWDATAGRAMS    20
#define TM_MIB_IPSYSTEMSTATSOUTDISCARDS         21
#define TM_MIB_IPSYSTEMSTATSOUTFRAGREQDS        22
#define TM_MIB_IPSYSTEMSTATSOUTFRAGOKS          23
#define TM_MIB_IPSYSTEMSTATSOUTFRAGFAILS        24
#define TM_MIB_IPSYSTEMSTATSOUTFRAGCREATES      25
#define TM_MIB_IPSYSTEMSTATSOUTTRANSMITS        26
#define TM_MIB_IPSYSTEMSTATSHCOUTTRANSMITS      27
#define TM_MIB_IPSYSTEMSTATSOUTOCTETS           28
#define TM_MIB_IPSYSTEMSTATSHCOUTOCTETS         29
#define TM_MIB_IPSYSTEMSTATSINMCASTPKTS         30
#define TM_MIB_IPSYSTEMSTATSHCINMCASTPKTS       31
#define TM_MIB_IPSYSTEMSTATSINMCASTOCTETS       32
#define TM_MIB_IPSYSTEMSTATSHCINMCASTOCTETS     33
#define TM_MIB_IPSYSTEMSTATSOUTMCASTPKTS        34
#define TM_MIB_IPSYSTEMSTATSHCOUTMCASTPKTS      35
#define TM_MIB_IPSYSTEMSTATSOUTMCASTOCTETS      36
#define TM_MIB_IPSYSTEMSTATSHCOUTMCASTOCTETS    37
#define TM_MIB_IPSYSTEMSTATSINBCASTPKTS         38
#define TM_MIB_IPSYSTEMSTATSHCINBCASTPKTS       39
#define TM_MIB_IPSYSTEMSTATSOUTBCASTPKTS        40
#define TM_MIB_IPSYSTEMSTATSHCOUTBCASTPKTS      41
#define TM_MIB_IPSYSTEMSTATSDISCONTINUITYTIME   42
#define TM_MIB_IPSYSTEMSTATSREFRESHRATE         43

/* NG MIB2 ipIfStatsTable */
#define TM_MIB_IPIFSTATSAFTYPE               1
#define TM_MIB_IPIFSTATSIFINDEX              2
#define TM_MIB_IPIFSTATSINRECEIVES           3
#define TM_MIB_IPIFSTATSHCINRECEIVES         4
#define TM_MIB_IPIFSTATSINOCTETS             5
#define TM_MIB_IPIFSTATSHCINOCTETS           6
#define TM_MIB_IPIFSTATSINHDRERRORS          7
#define TM_MIB_IPIFSTATSINNOROUTES           8
#define TM_MIB_IPIFSTATSINADDRERRORS         9
#define TM_MIB_IPIFSTATSINUNKNOWNPROTOS     10
#define TM_MIB_IPIFSTATSINTRUNCATEDPKTS     11
#define TM_MIB_IPIFSTATSINFORWDATAGRAMS     12
#define TM_MIB_IPIFSTATSREASMREQDS          13
#define TM_MIB_IPIFSTATSREASMOKS            14
#define TM_MIB_IPIFSTATSREASMFAILS          15
#define TM_MIB_IPIFSTATSINDISCARDS          16
#define TM_MIB_IPIFSTATSINDELIVERS          17
#define TM_MIB_IPIFSTATSOUTREQUESTS         18
#define TM_MIB_IPIFSTATSOUTNOROUTES         19
#define TM_MIB_IPIFSTATSOUTFORWDATAGRAMS    20
#define TM_MIB_IPIFSTATSOUTDISCARDS         21
#define TM_MIB_IPIFSTATSOUTFRAGREQDS        22
#define TM_MIB_IPIFSTATSOUTFRAGOKS          23
#define TM_MIB_IPIFSTATSOUTFRAGFAILS        24
#define TM_MIB_IPIFSTATSOUTFRAGCREATES      25
#define TM_MIB_IPIFSTATSOUTTRANSMITS        26
#define TM_MIB_IPIFSTATSHCOUTTRANSMITS      27
#define TM_MIB_IPIFSTATSOUTOCTETS           28
#define TM_MIB_IPIFSTATSHCOUTOCTETS         29
#define TM_MIB_IPIFSTATSINMCASTPKTS         30
#define TM_MIB_IPIFSTATSHCINMCASTPKTS       31
#define TM_MIB_IPIFSTATSINMCASTOCTETS       32
#define TM_MIB_IPIFSTATSHCINMCASTOCTETS     33
#define TM_MIB_IPIFSTATSOUTMCASTPKTS        34
#define TM_MIB_IPIFSTATSHCOUTMCASTPKTS      35
#define TM_MIB_IPIFSTATSOUTMCASTOCTETS      36
#define TM_MIB_IPIFSTATSHCOUTMCASTOCTETS    37
#define TM_MIB_IPIFSTATSINBCASTPKTS         38
#define TM_MIB_IPIFSTATSHCINBCASTPKTS       39
#define TM_MIB_IPIFSTATSOUTBCASTPKTS        40
#define TM_MIB_IPIFSTATSHCOUTBCASTPKTS      41
#define TM_MIB_IPIFSTATSDISCONTINUITYTIME   42
#define TM_MIB_IPIFSTATSREFRESHRATE         43


#define TM_MIB_INETICMPAFTYPE       1
#define TM_MIB_INETICMPINMSGS       2
#define TM_MIB_INETICMPINERRORS     3
#define TM_MIB_INETICMPOUTMSGS      4
#define TM_MIB_INETICMPOUTERRORS    5

#define TM_MIB_INETICMPMSGAFTYPE    1
#define TM_MIB_INETICMPMSGTYPE      2
#define TM_MIB_INETICMPMSGINPKTS    3
#define TM_MIB_INETICMPMSGOUTPKTS   4

#define TM_MIB_ICMPINMSGS               0
#define TM_MIB_ICMPINERRORS             1
#define TM_MIB_ICMPINDESTUNREACHS       2
#define TM_MIB_ICMPINTIMEEXCDS          3
#define TM_MIB_ICMPINPARMPROBS          4
#define TM_MIB_ICMPINSRCQUENCHS         5
#define TM_MIB_ICMPINREDIRECTS          6
#define TM_MIB_ICMPINECHOS              7
#define TM_MIB_ICMPINECHOREPS           8
#define TM_MIB_ICMPINTIMESTAMPS         9
#define TM_MIB_ICMPINTIMESTAMPREPS      10
#define TM_MIB_ICMPINADDRMASKS          11
#define TM_MIB_ICMPINADDRMASKREPS       12
#define TM_MIB_ICMPOUTMSGS              13
#define TM_MIB_ICMPOUTERRORS            14
#define TM_MIB_ICMPOUTDESTUNREACHS      15
#define TM_MIB_ICMPOUTTIMEEXCDS         16
#define TM_MIB_ICMPOUTPARMPROBS         17
#define TM_MIB_ICMPOUTSRCQUENCHS        18
#define TM_MIB_ICMPOUTREDIRECTS         19
#define TM_MIB_ICMPOUTECHOS             20
#define TM_MIB_ICMPOUTECHOREPS          21
#define TM_MIB_ICMPOUTTIMESTAMPS        22
#define TM_MIB_ICMPOUTTIMESTAMPREPS     23
#define TM_MIB_ICMPOUTADDRMASKS         24
#define TM_MIB_ICMPOUTADDRMASKREPS      25

#define TM_MIB_TCPRTOALGORITHM  0
#define TM_MIB_TCPRTOMIN        4
#define TM_MIB_TCPRTOMAX        8
#define TM_MIB_TCPMAXCONN       12
#define TM_MIB_TCPACTIVEOPENS   16
#define TM_MIB_TCPPASSIVEOPENS  20
#define TM_MIB_TCPATTEMPTFAILS  24
#define TM_MIB_TCPESTABRESETS   28
#define TM_MIB_TCPCURRESTAB     32
#define TM_MIB_TCPINSEGS        36
#define TM_MIB_TCPOUTSEGS       40
#define TM_MIB_TCPRETRANSSEGS   44
#define TM_MIB_TCPINERRS        48
#define TM_MIB_TCPOUTRSTS       52
#define TM_MIB_TCPHCINSEGS      56
#define TM_MIB_TCPHCOUTSEGS     60

#define TM_MIB_TCPCONNSTATE     7
#define TM_MIB_TCPCONNPROCESS   8

#define TM_MIB_TCPCONNLOCALADDR 14
#define TM_MIB_TCPCONNLOCALPORT 15
#define TM_MIB_TCPCONNREMADDR   16
#define TM_MIB_TCPCONNREMPORT   17

#define TM_MIB_TCPLISTENERPROCESS 4

#define TM_MIB_UDPLOCALADDR     0
#define TM_MIB_UDPLOCALPORT     1

#define TM_MIB_UDPINDATAGRAMS       0
#define TM_MIB_UDPNOPORTS           4
#define TM_MIB_UDPINERRORS          8
#define TM_MIB_UDPOUTDATAGRAMS      12
#define TM_MIB_UDPHCINDATAGRAMS     32
#define TM_MIB_UDPHCOUTDATAGRAMS    36

#define TM_MIB_UDPENDPOINTLOCALADDRESSTYPE  1
#define TM_MIB_UDPENDPOINTLOCALADDRESS      2
#define TM_MIB_UDPENDPOINTLOCALPORT         3
#define TM_MIB_UDPENDPOINTREMOTEADDRESS     4
#define TM_MIB_UDPENDPOINTREMOTEPORT        5
#define TM_MIB_UDPENDPOINTINSTANCE          6
#define TM_MIB_UDPENDPOINTINDATAGRAMS       7
#define TM_MIB_UDPENDPOINTHCINDATAGRAMS     8
#define TM_MIB_UDPENDPOINTOUTDATAGRAMS      9
#define TM_MIB_UDPENDPOINTHCOUTDATAGRAMS    10
#define TM_MIB_UDPENDPOINTINOCTETS          11
#define TM_MIB_UDPENDPOINTHCINOCTETS        12
#define TM_MIB_UDPENDPOINTOUTOCTETS         13
#define TM_MIB_UDPENDPOINTHCOUTOCTETS       14
#define TM_MIB_UDPENDPOINTSTARTTIME         15
#define TM_MIB_UDPENDPOINTPROCESS           16



#define TM_MIB_SNMPINPKTS               0
#define TM_MIB_SNMPOUTPKTS              4
#define TM_MIB_SNMPINBADVERSIONS        8
#define TM_MIB_SNMPINBADCOMMUNITYNAMES  12
#define TM_MIB_SNMPINBADCOMMUNITYUSES   16
#define TM_MIB_SNMPINASNPARSEERRS       20
#define TM_MIB_SNMPINTOOBIGS            24
#define TM_MIB_SNMPINNOSUCHNAMES        28
#define TM_MIB_SNMPINBADVALUES          32
#define TM_MIB_SNMPINREADONLYS          36
#define TM_MIB_SNMPINGENERRS            40
#define TM_MIB_SNMPINTOTALREQVARS       44
#define TM_MIB_SNMPINTOTALSETVARS       48
#define TM_MIB_SNMPINGETREQUESTS        52
#define TM_MIB_SNMPINGETNEXTS           56
#define TM_MIB_SNMPINSETREQUESTS        60
#define TM_MIB_SNMPINGETRESPONSES       64
#define TM_MIB_SNMPINTRAPS              68
#define TM_MIB_SNMPOUTTOOBIGS           72
#define TM_MIB_SNMPOUTNOSUCHNAMES       76
#define TM_MIB_SNMPOUTBADVALUES         80
#define TM_MIB_SNMPOUTGENERRS           84
#define TM_MIB_SNMPOUTGETREQUESTS       88
#define TM_MIB_SNMPOUTGETNEXTS          92
#define TM_MIB_SNMPOUTSETREQUESTS       96
#define TM_MIB_SNMPOUTGETRESPONSES      100
#define TM_MIB_SNMPOUTTRAPS             104
#define TM_MIB_SNMPENABLEAUTHTRAPS      108

#define TM_MIB_SNMPSILENTDROPS          112
#define TM_MIB_SNMPPROXYDROPS           116


#define TM_MIB_SNMPENGINEID             1
#define TM_MIB_SNMPENGINEBOOTS          2
#define TM_MIB_SNMPENGINETIME           3
#define TM_MIB_SNMPENGINEMAXMSGSIZE     4

#define TM_MIB_SNMPSETSERIALNO             1

#define TM_MIB_SNMPUNKNOWNSECURITYMODELS    1
#define TM_MIB_SNMPINVALIDMESSAGES          2
#define TM_MIB_SNMPUNKNOWNPDUHANDLERS       3


#define TM_MIB_USMUNSUPPORTEDSECLEVELS  1
#define TM_MIB_USMNOTINTIMEWINDOWS      2
#define TM_MIB_USMUNKNOWNUSERNAMES      3
#define TM_MIB_USMUNKNOWNENGINEIDS      4
#define TM_MIB_USMWRONGDIGESTS          5
#define TM_MIB_USMDECRYPTIONERRORS      6

#define TM_MIB_USMUSERSPINLOCK          7

#define TM_MIB_USERENGINEID             1
#define TM_MIB_USERNAME                 2
#define TM_MIB_USERSECURITYNAME         3
#define TM_MIB_USERCLONEFROM            4
#define TM_MIB_USERAUTHPROTOCOL         5
#define TM_MIB_USERAUTHKEYCHANGE        6
#define TM_MIB_USEROWNAUTHKEYCHANGE     7
#define TM_MIB_USERPRIVPROTOCOL         8
#define TM_MIB_USERPRIVKEYCHANGE        9
#define TM_MIB_USEROWNPRIVKEYCHANGE     10
#define TM_MIB_USERPUBLIC               11
#define TM_MIB_USERSTORAGETYPE          12
#define TM_MIB_USERSTATUS               13

#define TM_MIB_VACMCONTEXTNAME          1

#define TM_MIB_VACMS2GGROUPNAME         1
#define TM_MIB_VACMS2GSTORAGETYPE       2
#define TM_MIB_VACMS2GSTATUS            3

#define TM_MIB_VACMACCCONTEXTMATCH      1
#define TM_MIB_VACMACCREADVIEWNAME      2
#define TM_MIB_VACMACCWRITEVIEWNAME     3
#define TM_MIB_VACMACCNOTFVIEWNAME      4
#define TM_MIB_VACMACCSTORAGETYPE       5
#define TM_MIB_VACMACCSTATUS            6

#define TM_MIB_VACMVIEWSPINLOCK         1

#define TM_MIB_VACMVIEWFAMILYMASK       1
#define TM_MIB_VACMVIEWFAMILYTYPE       2
#define TM_MIB_VACMVFSTORAGETYPE        3
#define TM_MIB_VACMVFSTATUS             4

#define TM_MIB_SNMPCOMMUNITYINDEX           1
#define TM_MIB_SNMPCOMMUNITYNAME            2
#define TM_MIB_SNMPCOMMUNITYSECURITYNAME    3
#define TM_MIB_SNMPCOMMUNITYCONTEXTENGINEID 4
#define TM_MIB_SNMPCOMMUNITYCONTEXTNAME     5
#define TM_MIB_SNMPCOMMUNITYTRANSPORTTAG    6
#define TM_MIB_SNMPCOMMUNITYSTORAGETYPE     7
#define TM_MIB_SNMPCOMMUNITYSTATUS          8

#define TM_MIB_SNMPNOTIFYNAME           1
#define TM_MIB_SNMPNOTIFYTAG            2
#define TM_MIB_SNMPNOTIFYTYPE           3
#define TM_MIB_SNMPNOTIFYSTORAGETYPE    4
#define TM_MIB_SNMPNOTIFYROWSTATUS      5

#define TM_MIB_SNMPNOTIFYFILTERPROFILENAME      1
#define TM_MIB_SNMPNOTIFYFILTERPROFILESTORTYPE  2
#define TM_MIB_SNMPNOTIFYFILTERPROFILEROWSTATUS 3

#define TM_MIB_SNMPNOTIFYFILTERSUBTREE      1
#define TM_MIB_SNMPNOTIFYFILTERMASK         2
#define TM_MIB_SNMPNOTIFYFILTERTYPE         3
#define TM_MIB_SNMPNOTIFYFILTERSTORAGETYPE  4
#define TM_MIB_SNMPNOTIFYFILTERROWSTATUS    5

#define TM_MIB_SNMPTARGETSPINLOCK      1
#define TM_MIB_SNMPUNAVAILABLECONTEXTS 4
#define TM_MIB_SNMPUNKNOWNCONTEXTS     5

#define TM_MIB_SNMPTARGETADDRNAME          1
#define TM_MIB_SNMPTARGETADDRTDOMAIN       2
#define TM_MIB_SNMPTARGETADDRTADDRESS      3
#define TM_MIB_SNMPTARGETADDRTIMEOUT       4
#define TM_MIB_SNMPTARGETADDRRETRYCOUNT    5
#define TM_MIB_SNMPTARGETADDRTAGLIST       6
#define TM_MIB_SNMPTARGETADDRPARAMS        7
#define TM_MIB_SNMPTARGETADDRSTORAGETYPE   8
#define TM_MIB_SNMPTARGETADDRROWSTATUS     9

#define TM_MIB_SNMPTARGETPARAMSNAME            1
#define TM_MIB_SNMPTARGETPARAMSMPMODEL         2
#define TM_MIB_SNMPTARGETPARAMSSECURITYMODEL   3
#define TM_MIB_SNMPTARGETPARAMSSECURITYNAME    4
#define TM_MIB_SNMPTARGETPARAMSSECURITYLEVEL   5
#define TM_MIB_SNMPTARGETPARAMSSTORAGETYPE     6
#define TM_MIB_SNMPTARGETPARAMSROWSTATUS       7

/* possible values for flags parameter in tsSnmpSubtree */
#define TM_SPLIT_GROUP                  1


#define tm_snmp_write_null_method \
( (int (TM_CODE_FAR *)(int action, tt8BitPtr var_val, \
            tt8Bit var_val_type, \
            int var_val_len, ttOidPtr name, int length)) 0)

#define tm_snmp_create_null_method \
    ((int (TM_CODE_FAR *)(ttOidPtr index, int index_length, oid status)) 0)
#define tm_snmp_delete_null_method \
    ((int (TM_CODE_FAR *)(ttOidPtr index, int index_length)) 0)

typedef struct tsSnmpVariable
{
/* function that finds variable */
    tt8BitPtr (TM_CODE_FAR * svarFindVar)
        (struct tsSnmpVariable TM_FAR * vp, ttOidPtr  name, ttIntPtr lenPtr,
         int exact, ttIntPtr var_lenPtr,
         int (TM_FAR * TM_CODE_FAR *write_method) (
             int action, tt8BitPtr var_val,
             tt8Bit var_val_type, int var_val_len,
             ttOidPtr  name, int length),
         int (TM_FAR * TM_CODE_FAR *create_method) (
             ttOidPtr  index, int index_length, oid status),
         int (TM_FAR * TM_CODE_FAR *delete_method) (
             ttOidPtr  index, int index_length));
/* See important comment in snmp_vars.c relating to acl */
    tt16Bit svarAcl;     /* access control list for variable */
    short svarPad;       /* pad to 32-bit address boundary */
    tt8Bit svarNameLen;  /* length of svarName OID */
    tt8Bit svarMagic;    /* passed to function as a hint */
    char svarType;       /* type of variable */
    tt8Bit svarIsDefaulted;

/* the following field must be last in this structure, since this structure
   is used to map the types ttSnmpVariable2, ttSnmpVariable4, etc. */
    oid svarName[32];           /* object identifier of variable */
} ttSnmpVariable;
typedef ttSnmpVariable     TM_FAR * ttSnmpVariablePtr;
typedef const ttSnmpVariable TM_FAR * ttConstSnmpVariablePtr;

typedef struct tsSnmpTrapVarBind
{
    struct tsSnmpTrapVarBind TM_FAR *next;
    ttOidPtr stvbObjId;
    ttVoidPtr stvbSetting;
    ttPktLen stvbOidLen;
    int      stvbType;
    ttPktLen stvbValLen;
} ttSnmpTrapVarBind;
typedef ttSnmpTrapVarBind     TM_FAR * ttSnmpTrapVarBindPtr;
typedef const ttSnmpTrapVarBind TM_FAR * ttConstSnmpTrapVarBindPtr;

/* Deprecated trap param structure. Use tsNgSnmpTrapParms instead.
 */
typedef struct tsSnmpTrapParms
{
    tt32Bit stpDestIp;           /* trap manager's IPv4 address */

/* IPv4 address of the agent/entity on behalf of it the trap is issued */
    tt32Bit stpSourceIp;

/* enterprise number assigned to the organization by IETF */
	oid     stpEnterpriseNum;
#ifdef TM_SNMP_8BIT_SUBIDS
	tt8Bit  oidPad[3];
#elif defined(TM_SNMP_16BIT_SUBIDS)
	tt16Bit oidPad[2];
#endif
    tt32Bit stpEnterpriseLen;  /* length of stpEnterprise OID */

/* trap enterprise field of SNMPv1 trap. It can be of any length between 8
   and TM_SNMP_MAX_NAME_LEN. The sub-oids 0 to 6 are pre-defined as
   1.3.6.1.4.1.stpEnterpriseNum */
    oid stpEnterprise[TM_SNMP_MAX_NAME_LEN];

    int stpCommunityLen;        /* community string length */
    int stpSocket;              /* agent's trap socket (assigned by system) */

    tt16Bit stpRemotePort;   /* trap manager's port */
    short stPad;                    /* pad to 32-bit address boundary */

/* the community string sent with SNMPv1 and SNMPv2 traps */
    tt8Bit stpCommunity[((TM_SNMP_MAX_NAME_LEN + 3) / 4) * 4];
} ttSnmpTrapParms;
typedef ttSnmpTrapParms     TM_FAR * ttSnmpTrapParmsPtr;
typedef const ttSnmpTrapParms TM_FAR * ttConstSnmpTrapParmsPtr;

typedef struct tsNgSnmpTrapParms
{
	struct ttSockaddrStorage stpDestIp;		 /* trap manager's IP address */
	struct ttSockaddrStorage stpSrcIp;	     /* Agent IP address          */

/* enterprise number assigned to the organization by IETF */
    oid           stpEnterpriseNum;
#ifdef TM_SNMP_8BIT_SUBIDS
	tt8Bit oidPad[3];
#elif defined(TM_SNMP_16BIT_SUBIDS)
	tt16Bit oidPad[2];
#endif /* TM_SNMP_16BIT_SUBIDS */
    tt32Bit stpEnterpriseLen;  /* length of stpEnterprise OID */

/* trap enterprise field of SNMPv1 trap. It can be of any length between 8
   and TM_SNMP_TYP_NAME_LEN. The sub-oids 0 to 6 are pre-defined as
   1.3.6.1.4.1.stpEnterpriseNum */
    oid stpEnterprise[TM_SNMP_TYP_NAME_LEN];

    int stpCommunityLen;        /* community string length */
    int stpSocket;              /* agent's trap socket (assigned by system) */

/* the community string sent with SNMPv1 and SNMPv2 traps */
    tt8Bit stpCommunity[TM_SNMP_COMMUNITY_MAX_LEN];
#ifdef NET_OS_SPECIFIC
    tt16Bit  stpVersionFilter;
#endif
} ttNgSnmpTrapParms;
typedef ttNgSnmpTrapParms     TM_FAR * ttNgSnmpTrapParmsPtr;
typedef const ttNgSnmpTrapParms TM_FAR * ttConstNgSnmpTrapParmsPtr;

typedef struct tsSnmpSetValue
{
    ttVoidPtr value;
    int type;
    ttPktLen length;
} ttSnmpSetValue;
typedef ttSnmpSetValue     TM_FAR * ttSnmpSetValuePtr;
typedef const ttSnmpSetValue TM_FAR * ttConstSnmpSetValuePtr;
    
typedef struct tsSnmpSetHandling
{
    struct tsSnmpSetHandling TM_FAR *next;
    ttOidPtr incoming_oid;
    int (TM_CODE_FAR *create_method) (
        ttOidPtr  index, int index_length, oid status);
    int (TM_CODE_FAR *write_method) (
        int action, tt8BitPtr var_val, tt8Bit var_val_type, 
        int var_val_len, ttOidPtr name, int length);
    int (TM_CODE_FAR *delete_method) (ttOidPtr  index, int index_length);
    tt32Bit order;
    ttSnmpSetValue incoming;
    ttSnmpSetValue existing;
    ttPktLen incoming_oid_len;
    tt8Bit value_exists;
    tt8Bit permission;
    char pad[2];
} ttSnmpSetHandling;
typedef ttSnmpSetHandling     TM_FAR * ttSnmpSetHandlingPtr;
typedef const ttSnmpSetHandling TM_FAR * ttConstSnmpSetHandlingPtr;
typedef ttSnmpSetHandlingPtr  TM_FAR * ttSnmpSetHandlingPtrPtr;

#ifdef TM_SNMP_AGENT_V2C
typedef struct tsSnmpRepeater
{
    oid name[TM_SNMP_TYP_NAME_LEN];
    ttPktLen length;
} ttSnmpRepeater;
typedef ttSnmpRepeater     TM_FAR * ttSnmpRepeaterPtr;
typedef const ttSnmpRepeater TM_FAR * ttConstSnmpRepeaterPtr;
#endif  /* TM_SNMP_AGENT_V2C */

typedef union
{
    tt32BitPtr valInteger;
    tt8BitPtr string;
    ttOidPtr objid;
} ttSnmpValue;
typedef ttSnmpValue     TM_FAR * ttSnmpValuePtr;
typedef const ttSnmpValue TM_FAR * ttConstSnmpValuePtr;

/***
#define TM_SNMP_PSI_ENTERPRISE      4484
#define TM_SNMP_SNMP_ENTERPRISE     TM_SNMP_PSI_ENTERPRISE
***/
#define TM_SNMP_DO_NOT_EXIST_ERR        31

#define TM_SNMP_ASCII_STRING            1
#define TM_SNMP_HEX_STRING              2

#define TM_SNMP_NO_MIB2_SYSTEM_GROUP    -1
#define TM_SNMP_NO_MIB2_IP_GROUP        -2
#define TM_SNMP_NO_MIB2_ICMP_GROUP      -3
#define TM_SNMP_NO_MIB2_TCP_GROUP       -4
#define TM_SNMP_NO_MIB2_UDP_GROUP       -5
#define TM_SNMP_NO_MIB2_SNMP_GROUP      -6

#define TM_SNMP_NO_MIB2_GROUPS          -16

#ifdef __cplusplus
}
#endif

#endif /* #ifndef _TRCONSTS_H_ */

/* Processed by Treck Shipping Tool v2.48 
 * 2005/11/16 15:13:14      For: Digi
 * File Name: trconsts.h    File Revision: 4.0.2.9 
 * Project Name: snmpdprj   Project Release: 4.0.2.53
 * Input checksum: 15892    Output checksum: 48984
 */
