Hi all,

Work is about to start on a vlan monitoring module for bsnmpd(1) - I'm
attaching the private BEGEMOT MIB that the module will implement. Any
comments or suggestions are very welcome.

Cheers,
Shteryana
--
-- Copyright (C) 2007 Shteryana Shopova <[EMAIL PROTECTED]>
-- All rights reserved.
--
-- Redistribution and use in source and binary forms, with or without
-- modification, are permitted provided that the following conditions
-- are met:
-- 1. Redistributions of source code must retain the above copyright
--    notice, this list of conditions and the following disclaimer.
-- 2. Redistributions in binary form must reproduce the above copyright
--    notice, this list of conditions and the following disclaimer in the
--    documentation and/or other materials provided with the distribution.
--
-- THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND
-- ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-- ARE DISCLAIMED.  IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE
-- FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
-- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
-- OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
-- HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
-- LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
-- OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
-- SUCH DAMAGE.
--
-- $FreeBSD$
--

BEGEMOT-VLAN-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, NOTIFICATION-TYPE,
    Counter32, Integer32, TimeTicks, mib-2
        FROM SNMPv2-SMI
    TEXTUAL-CONVENTION, MacAddress, TruthValue, RowStatus
        FROM SNMPv2-TC
    InterfaceIndex FROM IF-MIB
    Timeout FROM BRIDGE-MIB
    VlanId FROM Q-BRIDGE-MIB
    EnabledStatus FROM P-BRIDGE-MIB
    begemot
        FROM BEGEMOT-MIB;

begemotVlan MODULE-IDENTITY
    LAST-UPDATED        "200701090000Z"
    ORGANIZATION        "Sofia University St. Kliment Ohridski"
    CONTACT-INFO
        "
                        Shteryana Shopova

        Postal:         Faculty of Mathematics and Informatics
                        5 James Bourchier Blvd.
                        1164 Sofia
                        Bulgaria

        Fax:            +359 2 687 180

        E-Mail:         [EMAIL PROTECTED]"
    DESCRIPTION
        "The Begemot MIB for managing vlan interfaces."
    REVISION            "200701090000Z"
    DESCRIPTION
        "Initial revision."
    ::= { begemot 206 }

-- ---------------------------------------------------------- --
BegemotVlanBitMap ::= TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "Each octet within this value specifies a set of eight
        VlanIds, with the first octet specifying VlanIds 1 through
        8, the second octet specifying VlanIds 9 through 16, etc.
        Within each octet, the most significant bit represents
        the smallest VlanId, and the least significant bit
        represents the biggest VlanId. Thus, each VlanId that can
        be represented by a 12-bit Integer is represented by a
        single bit within the value of this object. If that bit
        has a value of '1' then that VlanId is included in the set
        of VlanIds; the VlanId is not included if its bit has a
        value of '0'."
    SYNTAX      OCTET STRING (SIZE(512))

-- ---------------------------------------------------------- --
-- subtrees in the Begemot Vlan MIB
-- ---------------------------------------------------------- --
begemotVlanConfig       OBJECT IDENTIFIER ::= { begemotVlan 1 }

begemotVlanTrunks       OBJECT IDENTIFIER ::= { begemotVlan 2 }

begemotVlanInterfaces   OBJECT IDENTIFIER ::= { begemotVlan 3 }

begemotVlanStatistics   OBJECT IDENTIFIER ::= { begemotVlan 4 }

-- ---------------------------------------------------------- --
-- the begemotVlanConfig objects
-- ---------------------------------------------------------- --

begemotVlanMaxId OBJECT-TYPE
    SYNTAX      VlanId
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The maximum IEEE 802.1Q VLAN ID that the system
        supports."
    ::= { begemotVlanConfig 1 }

begemotVlanNumVlans OBJECT-TYPE
    SYNTAX      INTEGER
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current number of vlan interfaces on the system."
    ::= { begemotVlanConfig 2 }

begemotVlanDataPoll OBJECT-TYPE
    SYNTAX      Timeout (1..3600)
    UNITS       "seconds"
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The polling rate of data when the module is idle."
    DEFVAL      { 300 }
    ::= { begemotVlanConfig 3 }

begemotVlanSoftPad OBJECT-TYPE
    SYNTAX      EnabledStatus
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The value of this object indicates whether padding
        of short frames before tagging them is enabled."
    ::= { begemotVlanConfig 4 }

-- ---------------------------------------------------------- --
-- the begemot Vlan Trunk table
-- ---------------------------------------------------------- --

begemotVlanTrunkTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF BegemotVlanTrunkEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table that contains information about physical
        interfaces that are configured to demultiplex tagged
        frames."
    ::= { begemotVlanTrunks 1 }

begemotVlanTrunkEntry OBJECT-TYPE
    SYNTAX      BegemotVlanTrunkEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A list of information about physical interfaces that
        are configured to demultiplex tagged frames."
    INDEX { begemotVlanTrunkIndex }
    ::= { begemotVlanTrunkTable 1 }

BegemotVlanTrunkEntry ::= SEQUENCE {
    begemotVlanTrunkIndex               InterfaceIndex,
    begemotVlanParentIfName             OCTET STRING,
    begemotVlanParentIfHwTagSupported   TruthValue,
    begemotVlanParentIfHwTagEnabled     EnabledStatus,
    begemotVlanParentIfHwMtuSupported   TruthValue,
    begemotVlanParentIfHwMtuEnabled     EnabledStatus,
    begemotVlanTrunkMembers             INTEGER,
    begemotVlanTrunkMemberVids          BegemotVlanBitMap
}

begemotVlanTrunkIndex OBJECT-TYPE
    SYNTAX      InterfaceIndex
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value of the instance of the ifIndex object, defined
        in IF-MIB, for the parent interface corresponding to this
        vlan trunk."
    ::= { begemotVlanTrunkEntry 1 }

-- begemotVlanParentIfName object is redundant since its value can
-- be obtained by a SNMP client by invoking a GET on the ifName
-- object with an index of the corresponding value of
-- begemotVlanTrunkIndex, but is included for convenience. 

begemotVlanParentIfName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..16))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value of the instance of the ifName object, defined
        in IF-MIB, for the parent interface corresponding to this
        vlan trunk."
    ::= { begemotVlanTrunkEntry 2 }

begemotVlanParentIfHwTagSupported OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value of this object indicates whether the parent
        interface of the vlan trunk supports vlan tagging
        natively."
    ::= { begemotVlanTrunkEntry 3 }

begemotVlanParentIfHwTagEnabled OBJECT-TYPE
    SYNTAX      EnabledStatus
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The value of this object indicates whether the parent
        interface of the vlan trunk is configured to do vlan
        tagging natively."
    ::= { begemotVlanTrunkEntry 4 }

begemotVlanParentIfHwMtuSupported OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value of this object indicates whether the parent
        interface of the vlan trunk supports oversized frames
        natively."
    ::= { begemotVlanTrunkEntry 5 }

begemotVlanParentIfHwMtuEnabled OBJECT-TYPE
    SYNTAX      EnabledStatus
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The value of this object indicates whether the parent
        interface of the vlan trunk is configured to receive
        extended frames in hardware."
    ::= { begemotVlanTrunkEntry 6 }

begemotVlanTrunkMembers OBJECT-TYPE
    SYNTAX      INTEGER (1..4096)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of vlan interfaces currently belonging to
        this trunk."
    ::= { begemotVlanTrunkEntry 7 }

begemotVlanTrunkMemberVids OBJECT-TYPE
    SYNTAX      BegemotVlanBitMap
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The set of VlanIds for which a frame, containing one
        of these is being proccessed rather than discared by the
        parent interface of the vlan trunk."
    ::= { begemotVlanTrunkEntry 8 }

-- ---------------------------------------------------------- --
-- the begemot Vlan interfaces table
-- ---------------------------------------------------------- --

begemotVlanInterfaceTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF BegemotVlanInterfaceEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table containing of information for the vlan
        interfaces on the managed device."
    ::= { begemotVlanInterfaces 1 }

begemotVlanInterfaceEntry OBJECT-TYPE
    SYNTAX      BegemotVlanInterfaceEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A list of information for the vlan interfaces on
        the managed device."
    INDEX       { begemotVlanTrunkIndex, begemotVlanIfName }
    ::= { begemotVlanInterfaceTable 1 }

BegemotVlanInterfaceEntry ::= SEQUENCE {
    begemotVlanIfName           OCTET STRING,
    begemotVlanIfVid            INTEGER,
    begemotVlanIfProto          INTEGER,
    begemotVlanIfStatus         RowStatus,
    begemotVlanIfEncaplen       INTEGER,
    begemotVlanIfMtuFudge       INTEGER,
    begemotVlanIfMinTU          INTEGER   
}

begemotVlanIfName OBJECT-TYPE
    SYNTAX      OCTET STRING (SIZE(1..16))
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The name of the vlan interface."
    ::= { begemotVlanInterfaceEntry 1 }

begemotVlanIfVid OBJECT-TYPE
    SYNTAX      INTEGER (1..4095)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The vlan tag that is applied on packets leaving
        this interface."
    ::= { begemotVlanInterfaceEntry 2 }

begemotVlanIfProto OBJECT-TYPE
    SYNTAX      INTEGER (1..65535)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The encapsulation ethertype that is applied on
        packets leaving this interface."
    ::= { begemotVlanInterfaceEntry 3 }

begemotVlanIfStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "Used to create/destroy vlan interfaces on the
        managed device."
    ::= { begemotVlanInterfaceEntry 4 }

begemotVlanIfEncaplen OBJECT-TYPE
    SYNTAX      INTEGER
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The length of encapsulation data that is applied on
        packets leaving this interface."
    ::= { begemotVlanInterfaceEntry 5 }

begemotVlanIfMtuFudge OBJECT-TYPE
    SYNTAX      INTEGER
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The value by which the MTU is reduced on the parent
        interface of this vlan interface." 
    ::= { begemotVlanInterfaceEntry 6 }

begemotVlanIfMinTU OBJECT-TYPE
    SYNTAX      INTEGER
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "The minumum transmission unit of the vlan interface."
    ::= { begemotVlanInterfaceEntry 7 }

-- ---------------------------------------------------------- --
-- the begemot Vlan interface statistics table
-- ---------------------------------------------------------- --

begemotVlanIfStatsTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF BegemotVlanIfStatsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table containing statistics for the vlan
        interfaces on the managed device."
    ::= { begemotVlanStatistics 1 }

begemotVlanIfStatsEntry OBJECT-TYPE
    SYNTAX      BegemotVlanIfStatsEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A list of statistics for a vlan interface on
        the managed device."
    AUGMENTS { begemotVlanInterfaceEntry }
    ::= { begemotVlanIfStatsTable 1 }

BegemotVlanIfStatsEntry ::= SEQUENCE {
    begemotVlanIfInFrames               Counter32,
    begemotVlanIfOutFrames              Counter32,
    begemotVlanIfInDiscards             Counter32,
    begemotVlanIfInOverflowFrames       Counter32,
    begemotVlanIfOutOverflowFrames      Counter32,
    begemotVlanIfInOverflowDiscards     Counter32
}

begemotVlanIfInFrames OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of valid frames received on this
        vlan interface which were classified as belonging
        to this VLAN."
    ::= { begemotVlanIfStatsEntry 1 }

begemotVlanIfOutFrames OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of valid frames transmitted by this
        vlan interface."
    ::= { begemotVlanIfStatsEntry 2 }

begemotVlanIfInDiscards OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of valid frames received on this
        vlan interface which were classified as belonging
        to this VLAN but were discarded."
    ::= { begemotVlanIfStatsEntry 3 }

begemotVlanIfInOverflowFrames OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of times the associated
        begemotVlanIfInFrames counter has overflowed."
    ::= { begemotVlanIfStatsEntry 4 }

begemotVlanIfOutOverflowFrames OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of times the associated
        begemotVlanIfOutFrames counter has overflowed."
    ::= { begemotVlanIfStatsEntry 5 }

begemotVlanIfInOverflowDiscards OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of times the associated
        begemotVlanIfInDiscards counter has overflowed."
    ::= { begemotVlanIfStatsEntry 6 }

END

_______________________________________________
freebsd-net@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to