CISCOSB-OPC-MIB DEFINITIONS ::= BEGIN
-- Date:                10 JAN 2024

IMPORTS
    OBJECT-TYPE, MODULE-IDENTITY,
    Unsigned32                                  FROM SNMPv2-SMI
    DisplayString, RowStatus                    FROM SNMPv2-TC
    InterfaceIndexOrZero                        FROM IF-MIB
    switch001                                    FROM CISCOSB-MIB;

rlOpc MODULE-IDENTITY
         LAST-UPDATED "202401100000Z"
                ORGANIZATION "Cisco Systems, Inc."
                CONTACT-INFO
                "Postal: 170 West Tasman Drive
                San Jose , CA 95134-1706
                USA

                
                Website:  Cisco Small Business Support Community <http://www.cisco.com/go/smallbizsupport>"


         DESCRIPTION
                "The private MIB module definition for CISCOSB OPC
                 (On-board Packet Capture) feature"
         REVISION "202401100000Z"
         DESCRIPTION
                "Initial revision."
        ::= { switch001 248 }

rlOpcCapturePointTable  OBJECT-TYPE
    SYNTAX        SEQUENCE OF RlOpcCapturePointEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "Table with Capture point configuration entries"
    ::= {rlOpc  1}

rlOpcCapturePointEntry  OBJECT-TYPE
    SYNTAX      RlOpcCapturePointEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The table, listing the Capture Point entries"
    INDEX      { rlOpcName}
    ::= { rlOpcCapturePointTable 1 }

RlOpcCapturePointEntry::=SEQUENCE {
    rlOpcName                   DisplayString,
    rlOpcBufferType             INTEGER,
    rlOpcBufferSize             Unsigned32,
    rlOpcBufferUsed             Unsigned32,
    rlOpcBufferPacketNum        Unsigned32,
    rlOpcBufferPacketsDropped   Unsigned32,
    rlOpcBufferPacketsPerSecond Unsigned32,
    rlOpcFilterType             INTEGER,
    rlOpcFilterAclName          DisplayString,
    rlOpcLimitDuration          Unsigned32,
    rlOpcLimitNumOfPackets      Unsigned32,
    rlOpcLimitMaxPacketLen      Unsigned32,
    rlOpcState                  INTEGER,
    rlOpcCapturePointRowStatus  RowStatus
}

rlOpcName  OBJECT-TYPE
    SYNTAX      DisplayString(SIZE(1..32))
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Name of the Capture Point. Key to the table"
    ::= { rlOpcCapturePointEntry 1 }

rlOpcBufferType OBJECT-TYPE
    SYNTAX INTEGER {
		linear(1),
		circular(2)
	}
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Capture point Buffer Type"
    DEFVAL      { 1 }
    ::= { rlOpcCapturePointEntry 2 }

rlOpcBufferSize OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS read-write
    STATUS      current
    DESCRIPTION
        "Capture point buffer size in MB"
    ::= { rlOpcCapturePointEntry 3 }

rlOpcBufferUsed  OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "The size within the buffer that is actually used.
         The size will be indicated in increments of 128 KB"
    DEFVAL     { 0 }
    ::= { rlOpcCapturePointEntry 4 }

rlOpcBufferPacketNum OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "Number of captured packets in the buffer"
    DEFVAL     { 0 }
    ::= { rlOpcCapturePointEntry 5 }

rlOpcBufferPacketsDropped OBJECT-TYPE
    SYNTAX  Unsigned32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "Number of packets dropped"
    DEFVAL     { 0 }
    ::= { rlOpcCapturePointEntry 6 }

rlOpcBufferPacketsPerSecond OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "Packet capture rate. Number of packets being
         captured per second. Zero if capture point is not active"
    DEFVAL     { 0 }
    ::= { rlOpcCapturePointEntry 7 }

rlOpcFilterType OBJECT-TYPE
    SYNTAX  INTEGER {
        match-none(0),
        match-any(1),
        match-access-list(2)
    }
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "Type of packet capture filter to be applied for capture point"
    DEFVAL     { 0 }
    ::= { rlOpcCapturePointEntry 8 }

rlOpcFilterAclName OBJECT-TYPE
    SYNTAX      DisplayString(SIZE(0..32))
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "ACL as capture filter. Set only if rlOpcFilterType is match_access_list
         ACL must already exist. Length of the string is same as rlQosAclName MIB"
    ::= { rlOpcCapturePointEntry 9 }

rlOpcLimitDuration OBJECT-TYPE
    SYNTAX      Unsigned32(0..1000000)
    UNITS       "seconds"
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Limit capture by duration, zero if no limit is set"
    DEFVAL     { 0 }
    ::= { rlOpcCapturePointEntry 10 }

rlOpcLimitNumOfPackets OBJECT-TYPE
    SYNTAX  Unsigned32(0..1000000)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Limit capture by number of packets, zero if no limit is set"
    DEFVAL     { 0 }
    ::= { rlOpcCapturePointEntry 11 }

rlOpcLimitMaxPacketLen OBJECT-TYPE
    SYNTAX      Unsigned32(64..9500 | 0)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Limit capture by maximum packet length, zero if no limit is set"
    DEFVAL     { 0 }
    ::= { rlOpcCapturePointEntry 12 }

rlOpcState OBJECT-TYPE
    SYNTAX  INTEGER { active(1), inactive(2) }
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "Operating state of the capture point"
    ::= { rlOpcCapturePointEntry 13 }

rlOpcCapturePointRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The status of the entry. It's used to add/delete the entries"
    ::= { rlOpcCapturePointEntry 14 }

rlOpcInterfaceTable  OBJECT-TYPE
    SYNTAX        SEQUENCE OF RlOpcInterfaceEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "Table with capture filter for the capture point"
    ::= {rlOpc 2}

rlOpcInterfaceEntry OBJECT-TYPE
    SYNTAX        RlOpcInterfaceEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The table, listing the Capture Point buffer entries"
    INDEX      { rlOpcInterfaceCaptureName, rlOpcInterfaceIfIndex }
    ::= { rlOpcInterfaceTable 1 }

RlOpcInterfaceEntry::=SEQUENCE {
    rlOpcInterfaceCaptureName       DisplayString,
    rlOpcInterfaceIfIndex           InterfaceIndexOrZero,
    rlOpcInterfaceCaptureDirection  INTEGER,
    rlOpcInterfaceRowStatus         RowStatus
}

rlOpcInterfaceCaptureName  OBJECT-TYPE
    SYNTAX      DisplayString(SIZE(1..32))
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Name of the Capture Point. Key to the table"
    ::= { rlOpcInterfaceEntry 1 }

rlOpcInterfaceIfIndex OBJECT-TYPE
    SYNTAX      InterfaceIndexOrZero
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "IfIndex of the capture point filter source
         Control plane ifindex is 2147483646"
    ::= { rlOpcInterfaceEntry 2 }

rlOpcInterfaceCaptureDirection OBJECT-TYPE
    SYNTAX  INTEGER { none(0), in(1), out(2), both(3) }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Capture direction, indicates which direction of traffic to capture on the interface"
    DEFVAL      { 0 }
    ::= { rlOpcInterfaceEntry 3 }

rlOpcInterfaceRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The status of the entry. It's used to add/delete the entries"
    ::= { rlOpcInterfaceEntry 4 }

rlOpcActionTable  OBJECT-TYPE
    SYNTAX        SEQUENCE OF RlOpcActionEntry
    MAX-ACCESS    not-accessible
    STATUS        current
    DESCRIPTION
        "Table with capture point action"
    ::= {rlOpc  3}

rlOpcActionEntry  OBJECT-TYPE
    SYNTAX      RlOpcActionEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The table, listing the Capture Point buffer entries"
    INDEX      { rlOpcActionCaptureName }
    ::= { rlOpcActionTable 1 }

RlOpcActionEntry::=SEQUENCE {
    rlOpcActionCaptureName        DisplayString,
    rlOpcExportDestLocationType   INTEGER,
    rlOpcExportFileName           OCTET STRING,
    rlOpcAction                   INTEGER,
    rlOpcActionRowStatus          RowStatus
}

rlOpcActionCaptureName OBJECT-TYPE
    SYNTAX       DisplayString(SIZE(1..32))
    MAX-ACCESS   read-write
    STATUS       current
    DESCRIPTION
        "Name of the Capture Point. Key to the table"
    ::= { rlOpcActionEntry 1 }

rlOpcExportDestLocationType OBJECT-TYPE
    SYNTAX      INTEGER { flash(0), usb(1) }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Capture export file destination"
    DEFVAL      { 0 }
    ::=  { rlOpcActionEntry 2 }

rlOpcExportFileName OBJECT-TYPE
    SYNTAX      OCTET STRING(SIZE(0..160))
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The name of the export file"
    DEFVAL      { "" }
    ::=  { rlOpcActionEntry 3 }

rlOpcAction OBJECT-TYPE
    SYNTAX      INTEGER { start(1), stop(2), export(3), clear(4) }
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "Start, stop a capture or export it to a pcap file"
    ::= { rlOpcActionEntry 4 }

rlOpcActionRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "The status of the entry. It's used to add/delete the entries"
    ::= { rlOpcActionEntry 5 }

rlOpcCrashExportDestination OBJECT-TYPE
    SYNTAX  INTEGER { flash(0), usb(1) }
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
        "Set export destination during system crash before reboot"
    DEFVAL     { 0 }
    ::= { rlOpc 5 }

rlOpcOperState OBJECT-TYPE
    SYNTAX  INTEGER { active(1), inactive(2) }
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
        "Global operating state, indicates if any of capture points are active"
    ::= { rlOpc  6 }

END
