RFC1316-MIB
上传用户:aonuowh
上传日期:2021-05-23
资源大小:35390k
文件大小:22k
源码类别:

SNMP编程

开发平台:

C/C++

  1. -- Changes for RFC1316 (Character MIB)
  2. --      Added IMPORT for mib-2.
  3. -- dperkins@scruznet.com
  4.                     RFC1316-MIB DEFINITIONS ::= BEGIN
  5.                     IMPORTS
  6.                             Counter, TimeTicks, Gauge
  7.                                     FROM RFC1155-SMI
  8.                             mib-2, DisplayString
  9.                                     FROM RFC1213-MIB
  10.                             OBJECT-TYPE
  11.                                     FROM RFC-1212;
  12.             -- this is the MIB module for character stream devices
  13.             char    OBJECT IDENTIFIER ::= { mib-2 19 }
  14.             -- Textual Conventions
  15.                 AutonomousType    ::= OBJECT IDENTIFIER
  16.             -- The object identifier is an independently extensible type
  17.             -- identification value.  It may, for example indicate a
  18.             -- particular sub-tree with further MIB definitions, or
  19.             -- define something like a protocol type or type of
  20.             -- hardware.
  21.                 InstancePointer   ::= OBJECT IDENTIFIER
  22.             -- The object identifier is a pointer to a specific instance
  23.             -- of a MIB object in this agent's implemented MIB.  By
  24.             -- convention, it is the first object in the conceptual row
  25.             -- for the instance.
  26.             -- the generic Character group
  27.             -- Implementation of this group is mandatory for all
  28.             -- systems that offer character ports
  29.             charNumber OBJECT-TYPE
  30.                 SYNTAX INTEGER
  31.                 ACCESS read-only
  32.                 STATUS mandatory
  33.                 DESCRIPTION
  34.                     "The number of entries in charPortTable, regardless
  35.                     of their current state."
  36.                 ::= { char 1 }
  37.             -- the Character Port table
  38.             charPortTable OBJECT-TYPE
  39.                 SYNTAX SEQUENCE OF CharPortEntry
  40.                 ACCESS not-accessible
  41.                 STATUS mandatory
  42.                 DESCRIPTION
  43.                     "A list of port entries.  The number of entries is
  44.                     given by the value of charNumber."
  45.                 ::= { char 2 }
  46.             charPortEntry OBJECT-TYPE
  47.                 SYNTAX CharPortEntry
  48.                 ACCESS not-accessible
  49.                 STATUS mandatory
  50.                 DESCRIPTION
  51.                     "Status and parameter values for a character port."
  52.                 INDEX { charPortIndex }
  53.                 ::= { charPortTable 1 }
  54.             CharPortEntry ::=
  55.                 SEQUENCE {
  56.                     charPortIndex
  57.                         INTEGER,
  58.                     charPortName
  59.                         DisplayString,
  60.                     charPortType
  61.                         INTEGER,
  62.                     charPortHardware
  63.                         AutonomousType,
  64.                     charPortReset
  65.                         INTEGER,
  66.                     charPortAdminStatus
  67.                         INTEGER,
  68.                     charPortOperStatus
  69.                         INTEGER,
  70.                     charPortLastChange
  71.                         TimeTicks,
  72.                     charPortInFlowType
  73.                         INTEGER,
  74.                     charPortOutFlowType
  75.                         INTEGER,
  76.                     charPortInFlowState
  77.                         INTEGER,
  78.                     charPortOutFlowState
  79.                         INTEGER,
  80.                     charPortInCharacters
  81.                         Counter,
  82.                     charPortOutCharacters
  83.                         Counter,
  84.                     charPortAdminOrigin
  85.                         INTEGER,
  86.                     charPortSessionMaximum
  87.                         INTEGER,
  88.                     charPortSessionNumber
  89.                         Gauge,
  90.                     charPortSessionIndex
  91.                         INTEGER
  92.                 }
  93.             charPortIndex OBJECT-TYPE
  94.                 SYNTAX INTEGER
  95.                 ACCESS read-only
  96.                 STATUS mandatory
  97.                 DESCRIPTION
  98.                     "A unique value for each character port.  Its value
  99.                     ranges between 1 and the value of charNumber.  By
  100.                     convention and if possible, hardware port numbers
  101.                     come first, with a simple, direct mapping.  The
  102.                     value for each port must remain constant at least
  103.                     from one re-initialization of the network management
  104.                     agent to the next."
  105.                 ::= { charPortEntry 1 }
  106.             charPortName OBJECT-TYPE
  107.                 SYNTAX DisplayString (SIZE (0..32))
  108.                 ACCESS read-write
  109.                 STATUS mandatory
  110.                 DESCRIPTION
  111.                     "An administratively assigned name for the port,
  112.                     typically with some local significance."
  113.                 ::= { charPortEntry 2 }
  114.             charPortType OBJECT-TYPE
  115.                 SYNTAX INTEGER { physical(1), virtual(2) }
  116.                 ACCESS read-only
  117.                 STATUS mandatory
  118.                 DESCRIPTION
  119.                     "The port's type, 'physical' if the port represents
  120.                     an external hardware connector, 'virtual' if it does
  121.                     not."
  122.                 ::= { charPortEntry 3 }
  123.             charPortHardware OBJECT-TYPE
  124.                 SYNTAX AutonomousType
  125.                 ACCESS read-only
  126.                 STATUS mandatory
  127.                 DESCRIPTION
  128.                     "A reference to hardware MIB definitions specific to
  129.                     a physical port's external connector.  For example,
  130.                     if the connector is RS-232, then the value of this
  131.                     object refers to a MIB sub-tree defining objects
  132.                     specific to RS-232.  If an agent is not configured
  133.                     to have such values, the agent returns the object
  134.                     identifier:
  135.                         nullHardware OBJECT IDENTIFIER ::= { 0 0 }
  136.                     "
  137.                 ::= { charPortEntry 4 }
  138.             charPortReset OBJECT-TYPE
  139.                 SYNTAX INTEGER { ready(1), execute(2) }
  140.                 ACCESS read-write
  141.                 STATUS mandatory
  142.                 DESCRIPTION
  143.                     "A control to force the port into a clean, initial
  144.                     state, both hardware and software, disconnecting all
  145.                     the port's existing sessions.  In response to a
  146.                     get-request or get-next-request, the agent always
  147.                     returns 'ready' as the value.  Setting the value to
  148.                     'execute' causes a reset."
  149.                 ::= { charPortEntry 5 }
  150.             charPortAdminStatus OBJECT-TYPE
  151.                 SYNTAX INTEGER { enabled(1), disabled(2), off(3),
  152.                                  maintenance(4) }
  153.                 ACCESS read-write
  154.                 STATUS mandatory
  155.                 DESCRIPTION
  156.                     "The port's desired state, independent of flow
  157.                     control.  'enabled' indicates that the port is
  158.                     allowed to pass characters and form new sessions.
  159.                     'disabled' indicates that the port is allowed to
  160.                     pass characters but not form new sessions.  'off'
  161.                     indicates that the port is not allowed to pass
  162.                     characters or have any sessions. 'maintenance'
  163.                     indicates a maintenance mode, exclusive of normal
  164.                     operation, such as running a test."
  165.                 ::= { charPortEntry 6 }
  166.             charPortOperStatus OBJECT-TYPE
  167.                 SYNTAX INTEGER { up(1), down(2),
  168.                                  maintenance(3), absent(4), active(5) }
  169.                 ACCESS read-only
  170.                 STATUS mandatory
  171.                 DESCRIPTION
  172.                     "The port's actual, operational state, independent
  173.                     of flow control.  'up' indicates able to function
  174.                     normally.  'down' indicates inability to function
  175.                     for administrative or operational reasons.
  176.                     'maintenance' indicates a maintenance mode,
  177.                     exclusive of normal operation, such as running a
  178.                     test.  'absent' indicates that port hardware is not
  179.                     present.  'active' indicates up with a user present
  180.                     (e.g. logged in)."
  181.                 ::= { charPortEntry 7 }
  182.             charPortLastChange OBJECT-TYPE
  183.                 SYNTAX TimeTicks
  184.                 ACCESS read-only
  185.                 STATUS mandatory
  186.                 DESCRIPTION
  187.                     "The value of sysUpTime at the time the port entered
  188.                     its current operational state.  If the current state
  189.                     was entered prior to the last reinitialization of
  190.                     the local network management subsystem, then this
  191.                     object contains a zero value."
  192.                 ::= { charPortEntry 8 }
  193.             charPortInFlowType OBJECT-TYPE
  194.                 SYNTAX INTEGER { none(1), xonXoff(2), hardware(3),
  195.                                  ctsRts(4), dsrDtr(5) }
  196.                 ACCESS read-write
  197.                 STATUS mandatory
  198.                 DESCRIPTION
  199.                     "The port's type of input flow control.  'none'
  200.                     indicates no flow control at this level or below.
  201.                     'xonXoff' indicates software flow control by
  202.                     recognizing XON and XOFF characters.  'hardware'
  203.                     indicates flow control delegated to the lower level,
  204.                     for example a parallel port.
  205.                     'ctsRts' and 'dsrDtr' are specific to RS-232-like
  206.                     ports.  Although not architecturally pure, they are
  207.                     included here for simplicity's sake."
  208.                 ::= { charPortEntry 9 }
  209.             charPortOutFlowType OBJECT-TYPE
  210.                 SYNTAX INTEGER { none(1), xonXoff(2), hardware(3),
  211.                                  ctsRts(4), dsrDtr(5) }
  212.                 ACCESS read-write
  213.                 STATUS mandatory
  214.                 DESCRIPTION
  215.                     "The port's type of output flow control.  'none'
  216.                     indicates no flow control at this level or below.
  217.                     'xonXoff' indicates software flow control by
  218.                     recognizing XON and XOFF characters.  'hardware'
  219.                     indicates flow control delegated to the lower level,
  220.                     for example a parallel port.
  221.                     'ctsRts' and 'dsrDtr' are specific to RS-232-like
  222.                     ports.  Although not architecturally pure, they are
  223.                     included here for simplicy's sake."
  224.                 ::= { charPortEntry 10 }
  225.             charPortInFlowState OBJECT-TYPE
  226.                 SYNTAX INTEGER { none(1), unknown(2), stop(3), go(4) }
  227.                 ACCESS read-only
  228.                 STATUS mandatory
  229.                 DESCRIPTION
  230.                     "The current operational state of input flow control
  231.                     on the port.  'none' indicates not applicable.
  232.                     'unknown' indicates this level does not know.
  233.                     'stop' indicates flow not allowed.  'go' indicates
  234.                     flow allowed."
  235.                 ::= { charPortEntry 11 }
  236.             charPortOutFlowState OBJECT-TYPE
  237.                 SYNTAX INTEGER { none(1), unknown(2), stop(3), go(4) }
  238.                 ACCESS read-only
  239.                 STATUS mandatory
  240.                 DESCRIPTION
  241.                     "The current operational state of output flow
  242.                     control on the port.  'none' indicates not
  243.                     applicable.  'unknown' indicates this level does not
  244.                     know.  'stop' indicates flow not allowed.  'go'
  245.                     indicates flow allowed."
  246.                 ::= { charPortEntry 12 }
  247.             charPortInCharacters OBJECT-TYPE
  248.                 SYNTAX Counter
  249.                 ACCESS read-only
  250.                 STATUS mandatory
  251.                 DESCRIPTION
  252.                     "Total number of characters detected as input from
  253.                     the port since system re-initialization and while
  254.                     the port operational state was 'up', 'active', or
  255.                     'maintenance', including, for example, framing, flow
  256.                     control (i.e. XON and XOFF), each occurrence of a
  257.                     BREAK condition, locally-processed input, and input
  258.                     sent to all sessions."
  259.                 ::= { charPortEntry 13 }
  260.             charPortOutCharacters OBJECT-TYPE
  261.                 SYNTAX Counter
  262.                 ACCESS read-only
  263.                 STATUS mandatory
  264.                 DESCRIPTION
  265.                     "Total number of characters detected as output to
  266.                     the port since system re-initialization and while
  267.                     the port operational state was 'up', 'active', or
  268.                     'maintenance', including, for example, framing, flow
  269.                     control (i.e. XON and XOFF), each occurrence of a
  270.                     BREAK condition, locally-created output, and output
  271.                     received from all sessions."
  272.                 ::= { charPortEntry 14 }
  273.             charPortAdminOrigin OBJECT-TYPE
  274.                 SYNTAX INTEGER { dynamic(1), network(2), local(3),
  275.                                  none(4) }
  276.                 ACCESS read-write
  277.                 STATUS mandatory
  278.                 DESCRIPTION
  279.                     "The administratively allowed origin for
  280.                     establishing session on the port.  'dynamic' allows
  281.                     'network' or 'local' session establishment. 'none'
  282.                     disallows session establishment."
  283.                 ::= { charPortEntry 15 }
  284.             charPortSessionMaximum OBJECT-TYPE
  285.                 SYNTAX INTEGER
  286.                 ACCESS read-write
  287.                 STATUS mandatory
  288.                 DESCRIPTION
  289.                     "The maximum number of concurrent sessions allowed
  290.                     on the port.  A value of -1 indicates no maximum.
  291.                     Setting the maximum to less than the current number
  292.                     of sessions has unspecified results."
  293.                 ::= { charPortEntry 16 }
  294.             charPortSessionNumber OBJECT-TYPE
  295.                 SYNTAX Gauge
  296.                 ACCESS read-only
  297.                 STATUS mandatory
  298.                 DESCRIPTION
  299.                     "The number of open sessions on the port that are in
  300.                     the connecting, connected, or disconnecting state."
  301.                 ::= { charPortEntry 17 }
  302.             charPortSessionIndex OBJECT-TYPE
  303.                 SYNTAX INTEGER
  304.                 ACCESS read-only
  305.                 STATUS mandatory
  306.                 DESCRIPTION
  307.                     "The value of charSessIndex for the port's first or
  308.                     only active session.  If the port has no active
  309.                     session, the agent returns the value zero."
  310.                 ::= { charPortEntry 18 }
  311.             -- the Character Session table
  312.             charSessTable OBJECT-TYPE
  313.                 SYNTAX SEQUENCE OF CharSessEntry
  314.                 ACCESS not-accessible
  315.                 STATUS mandatory
  316.                 DESCRIPTION
  317.                     "A list of port session entries."
  318.                 ::= { char 3 }
  319.             charSessEntry OBJECT-TYPE
  320.                 SYNTAX CharSessEntry
  321.                 ACCESS not-accessible
  322.                 STATUS mandatory
  323.                 DESCRIPTION
  324.                     "Status and parameter values for a character port
  325.                     session."
  326.                 INDEX { charSessPortIndex, charSessIndex }
  327.                 ::= { charSessTable 1 }
  328.             CharSessEntry ::=
  329.                 SEQUENCE {
  330.                     charSessPortIndex
  331.                         INTEGER,
  332.                     charSessIndex
  333.                         INTEGER,
  334.                     charSessKill
  335.                         INTEGER,
  336.                     charSessState
  337.                         INTEGER,
  338.                     charSessProtocol
  339.                         AutonomousType,
  340.                     charSessOperOrigin
  341.                         INTEGER,
  342.                     charSessInCharacters
  343.                         Counter,
  344.                     charSessOutCharacters
  345.                         Counter,
  346.                     charSessConnectionId
  347.                         InstancePointer,
  348.                     charSessStartTime
  349.                         TimeTicks
  350.                 }
  351.             charSessPortIndex OBJECT-TYPE
  352.                 SYNTAX INTEGER
  353.                 ACCESS read-only
  354.                 STATUS mandatory
  355.                 DESCRIPTION
  356.                     "The value of charPortIndex for the port to which
  357.                     this session belongs."
  358.                 ::= { charSessEntry 1 }
  359.             charSessIndex OBJECT-TYPE
  360.                 SYNTAX INTEGER
  361.                 ACCESS read-only
  362.                 STATUS mandatory
  363.                 DESCRIPTION
  364.                     "The session index in the context of the port, a
  365.                     non-zero positive integer.  Session indexes within a
  366.                     port need not be sequential.  Session indexes may be
  367.                     reused for different ports.  For example, port 1 and
  368.                     port 3 may both have a session 2 at the same time.
  369.                     Session indexes may have any valid integer value,
  370.                     with any meaning convenient to the agent
  371.                     implementation."
  372.                 ::= { charSessEntry 2 }
  373.             charSessKill OBJECT-TYPE
  374.                 SYNTAX INTEGER { ready(1), execute(2) }
  375.                 ACCESS read-write
  376.                 STATUS mandatory
  377.                 DESCRIPTION
  378.                     "A control to terminate the session.  In response to
  379.                     a get-request or get-next-request, the agent always
  380.                     returns 'ready' as the value.  Setting the value to
  381.                     'execute' causes termination."
  382.                 ::= { charSessEntry 3 }
  383.             charSessState OBJECT-TYPE
  384.                 SYNTAX INTEGER { connecting(1), connected(2),
  385.                                  disconnecting(3) }
  386.                 ACCESS read-only
  387.                 STATUS mandatory
  388.                 DESCRIPTION
  389.                     "The current operational state of the session,
  390.                     disregarding flow control.  'connected' indicates
  391.                     that character data could flow on the network side
  392.                     of session.  'connecting' indicates moving from
  393.                     nonexistent toward 'connected'.  'disconnecting'
  394.                     indicates moving from 'connected' or 'connecting' to
  395.                     nonexistent."
  396.                 ::= { charSessEntry 4 }
  397.             charSessProtocol OBJECT-TYPE
  398.                 SYNTAX AutonomousType
  399.                 ACCESS read-only
  400.                 STATUS mandatory
  401.                 DESCRIPTION
  402.                     "The network protocol over which the session is
  403.                     running.  Other OBJECT IDENTIFIER values may be
  404.                     defined elsewhere, in association with specific
  405.                     protocols.  However, this document assigns those of
  406.                     known interest as of this writing."
  407.                 ::= { charSessEntry 5 }
  408.             wellKnownProtocols OBJECT IDENTIFIER ::= { char 4 }
  409.             protocolOther  OBJECT IDENTIFIER ::= {wellKnownProtocols 1}
  410.             protocolTelnet OBJECT IDENTIFIER ::= {wellKnownProtocols 2}
  411.             protocolRlogin OBJECT IDENTIFIER ::= {wellKnownProtocols 3}
  412.             protocolLat    OBJECT IDENTIFIER ::= {wellKnownProtocols 4}
  413.             protocolX29    OBJECT IDENTIFIER ::= {wellKnownProtocols 5}
  414.             protocolVtp    OBJECT IDENTIFIER ::= {wellKnownProtocols 6}
  415.             charSessOperOrigin OBJECT-TYPE
  416.                 SYNTAX INTEGER { unknown(1), network(2), local(3) }
  417.                 ACCESS read-only
  418.                 STATUS mandatory
  419.                 DESCRIPTION
  420.                     "The session's source of establishment."
  421.                 ::= { charSessEntry 6 }
  422.             charSessInCharacters OBJECT-TYPE
  423.                 SYNTAX Counter
  424.                 ACCESS read-only
  425.                 STATUS mandatory
  426.                 DESCRIPTION
  427.                     "This session's subset of charPortInCharacters."
  428.                 ::= { charSessEntry 7 }
  429.             charSessOutCharacters OBJECT-TYPE
  430.                 SYNTAX Counter
  431.                 ACCESS read-only
  432.                 STATUS mandatory
  433.                 DESCRIPTION
  434.                     "This session's subset of charPortOutCharacters."
  435.                 ::= { charSessEntry 8 }
  436.             charSessConnectionId OBJECT-TYPE
  437.                 SYNTAX InstancePointer
  438.                 ACCESS read-only
  439.                 STATUS mandatory
  440.                 DESCRIPTION
  441.                     "A reference to additional local MIB information.
  442.                     This should be the highest available related MIB,
  443.                     corresponding to charSessProtocol, such as Telnet.
  444.                     For example, the value for a TCP connection (in the
  445.                     absence of a Telnet MIB) is the object identifier of
  446.                     tcpConnState.  If an agent is not configured to have
  447.                     such values, the agent returns the object
  448.                     identifier:
  449.                         nullConnectionId OBJECT IDENTIFIER ::= { 0 0 }
  450.                     "
  451.                 ::= { charSessEntry 9 }
  452.             charSessStartTime OBJECT-TYPE
  453.                 SYNTAX TimeTicks
  454.                 ACCESS read-only
  455.                 STATUS mandatory
  456.                 DESCRIPTION
  457.                     "The value of sysUpTime in MIB-2 when the session
  458.                     entered connecting state."
  459.                 ::= { charSessEntry 10 }
  460.             END