-- -----------------------------------------------------------------------------
-- MIB NAME : IGMP V3 Common mib
-- FILE NAME: IGMPv3.mib
-- DATE     : 2010/11/08
-- VERSION  : 2.04
-- PURPOSE  : To construct the MIB structure of IGMPv3
--            for proprietary enterprise
--            (base on draft-ietf-magma-mgmd-mib-03)
-- -----------------------------------------------------------------------------
-- MODIFICTION HISTORY:
-- -----------------------------------------------------------------------------
-- Version, Date, Author
-- Description:
--  [New Object]
--  [Modification]
-- Notes: (Requested by who and which project)
--
-- Version 2.04, 2010/11/08, Bruce Ge
-- Description:
-- [New Object]
-- 1. Add object mgmdRouterSrcListExpire to support source timer.
-- Notes: Requested by Bruce Ge for DGS3620 R1.0.
-- 
-- Version 2.03, 2010/05/11, Wesley Wang
-- Description:
-- [New Object]
-- 1. Add mgmdRouterIGMPStaticGroupTable to support IGMP static group function.
-- [Modification]
-- Notes: Requested by Wesley Wang for DGS3600 R2.81.
--
-- Version 2.02, 2009/07/09, bruce ge
-- Description:
-- [Modification]
-- 1. Add mgmdRouterChkSubSrcNetTable to dispaying the state of whether to check
-- subscriber source IP when receive IGMP report/leave. 
-- Notes: requested by bruce ge for dgs3600-r2.52.
--
-- Version 2.01, 2007/4/6, yedda
-- Description:
--  [Modification]
--    to change the index MAX-ACCESS from not-accessible to read-only of
--    mgmdRouterSrcListTable.(it will cause D-view compiling error)
-- Notes: reported from Yan Zhang
--
-- Version 2.00, 2007/03/27, Yedda
-- This is the first formal version for universal MIB definition.
-- -----------------------------------------------------------------------------

IGMPV3-MIB DEFINITIONS ::= BEGIN

IMPORTS
    MODULE-IDENTITY, OBJECT-TYPE, mib-2, Counter32, Gauge32, IpAddress,
    Unsigned32, Integer32, TimeTicks FROM SNMPv2-SMI
    InetAddress, InetAddressType     FROM INET-ADDRESS-MIB
    RowStatus, TruthValue            FROM SNMPv2-TC
    MODULE-COMPLIANCE, OBJECT-GROUP  FROM SNMPv2-CONF
    InterfaceIndexOrZero,
    InterfaceIndex                   FROM IF-MIB
    dlink-common-mgmt			     FROM DLINK-ID-REC-MIB;

swIgmpMIB MODULE-IDENTITY
    LAST-UPDATED "201011080000Z"
    ORGANIZATION "D-Link Corp"
    CONTACT-INFO
            "http://support.dlink.com"

    DESCRIPTION
            "New version of MGMD combining RFC 2933 and RFC 3019.
            Includes IGMPv3 and MLDv2 source filtering changes."
    ::= { dlink-common-mgmt 18 }


swIgmpMIBObjects     OBJECT IDENTIFIER ::= { swIgmpMIB 1 }

-- -----------------------------------------------------------------------------
-- The MGMD Router Interface Table
-- -----------------------------------------------------------------------------
mgmdRouterInterfaceTable OBJECT-TYPE
    SYNTAX     SEQUENCE OF MgmdRouterInterfaceEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The (conceptual) table listing the interfaces on which
             IGMP or MLD is enabled."
    ::= { swIgmpMIBObjects 4 }

mgmdRouterInterfaceEntry OBJECT-TYPE
    SYNTAX     MgmdRouterInterfaceEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "An entry (conceptual row) representing an interface on
            which IGMP or MLD is enabled."
    INDEX      { mgmdRouterInterfaceIfIndex, mgmdRouterInterfaceQuerierType }
    ::= { mgmdRouterInterfaceTable 1 }

MgmdRouterInterfaceEntry ::= SEQUENCE {
    mgmdRouterInterfaceIfIndex               InterfaceIndex,
    mgmdRouterInterfaceQuerierType           InetAddressType,
    mgmdRouterInterfaceQuerier               InetAddress,
    mgmdRouterInterfaceQueryInterval         Unsigned32,
    mgmdRouterInterfaceStatus                RowStatus,
    mgmdRouterInterfaceVersion               Unsigned32,
    mgmdRouterInterfaceQueryMaxResponseTime  Unsigned32,
    mgmdRouterInterfaceQuerierUpTime         TimeTicks,
    mgmdRouterInterfaceQuerierExpiryTime     TimeTicks,
    mgmdRouterInterfaceRobustness            Unsigned32,
    mgmdRouterInterfaceLastMembQueryIntvl    Unsigned32
}


mgmdRouterInterfaceIfIndex OBJECT-TYPE
    SYNTAX     InterfaceIndex
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The ifIndex value of the interface for which IGMP or MLD
            is enabled. The table is indexed by the ifIndex value and
            the InetAddressType to allow for interfaces which may be
            configured in both IPv4 and IPv6 modes."
    ::= { mgmdRouterInterfaceEntry 1 }


mgmdRouterInterfaceQuerierType OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The address type of this interface. This entry along with
             the ifIndex value acts as the index to the mgmdRouterInterface
             table. A physical interface may be configured in multiple
             modes concurrently, e.g. in IPv4 and IPv6 modes connected
             to the same interface, however the traffic is considered to
             be logically separate."
    ::= { mgmdRouterInterfaceEntry 2 }

mgmdRouterInterfaceQuerier OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The address of the IGMP or MLD Querier on the IP subnet to
            which this interface is attached. The InetAddressType, e.g.
            IPv4 or IPv6, is identified by the mgmdRouterInterfaceQuerierType
            variable in the mgmdRouterInterface table."
    ::= { mgmdRouterInterfaceEntry 3 }

mgmdRouterInterfaceQueryInterval OBJECT-TYPE
    SYNTAX     Unsigned32
    UNITS      "seconds"
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
            "The frequency at which IGMP or MLD Host-Query packets are
            transmitted on this interface."
    DEFVAL     { 125 }
    ::= { mgmdRouterInterfaceEntry 4 }

mgmdRouterInterfaceStatus OBJECT-TYPE
    SYNTAX     RowStatus
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
            "The activation of a row enables the router side of IGMP or MLD
            on the interface.  The destruction of a row disables the router
            side of IGMP or MLD  on the interface."
    ::= { mgmdRouterInterfaceEntry 5 }

mgmdRouterInterfaceVersion OBJECT-TYPE
    SYNTAX     Unsigned32
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
            "The version of MGMD which is running on this interface.
            Value 1 applies to IGMPv1 routers only. Value 2 applies
            To IGMPv2 and MLDv1 routers, and value 3 applies to IGMPv3
            and MLDv2 routers.
            This object can be used to configure a router capable of
            running either version.  For IGMP and MLD to function
            correctly, all routers on a LAN must be configured to run
            the same version on that LAN."
    DEFVAL     { 3 }
    ::= { mgmdRouterInterfaceEntry 6 }

mgmdRouterInterfaceQueryMaxResponseTime OBJECT-TYPE
    SYNTAX     Unsigned32 (0..255)
    UNITS      "tenths of seconds"
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
            "The maximum query response time advertised in MGMDv2 or v3
            queries on this interface."
    DEFVAL     { 100 }
    ::= { mgmdRouterInterfaceEntry 7 }

mgmdRouterInterfaceQuerierUpTime OBJECT-TYPE
    SYNTAX     TimeTicks
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The time since mgmdRouterInterfaceQuerier was last changed."
    ::= { mgmdRouterInterfaceEntry 8 }

mgmdRouterInterfaceQuerierExpiryTime OBJECT-TYPE
    SYNTAX     TimeTicks
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The amount of time remaining before the Other Querier
            Present Timer expires.  If the local system is the querier,
            the value of this object is zero."
    ::= { mgmdRouterInterfaceEntry 9 }

mgmdRouterInterfaceRobustness OBJECT-TYPE
    SYNTAX     Unsigned32 (1..255)
    MAX-ACCESS read-create

    STATUS     current
    DESCRIPTION
            "The Robustness Variable allows tuning for the expected
            packet loss on a subnet.  If a subnet is expected to be
            lossy, the Robustness Variable may be increased.  IGMP and
            MLD is robust to (Robustness Variable-1) packet losses."
    DEFVAL     { 2 }
    ::= { mgmdRouterInterfaceEntry 14 }

mgmdRouterInterfaceLastMembQueryIntvl OBJECT-TYPE
    SYNTAX     Unsigned32 (0..255)
    UNITS      "tenths of seconds"
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
            "The Last Member Query Interval is the Max Response Time
            inserted into Group-Specific Queries sent in response to
            Leave Group messages, and is also the amount of time
            Between Group-Specific Query messages.  This value may be
            tuned to modify the leave latency of the network.  A
            reduced value results in reduced time to detect the loss of
            the last member of a group.  The value of this object is
            irrelevant if mgmdRouterInterfaceVersion is 1."
    DEFVAL     { 10 }
    ::= { mgmdRouterInterfaceEntry 15 }

-- -----------------------------------------------------------------------------
-- The MGMD Router Cache Table
-- -----------------------------------------------------------------------------

mgmdRouterCacheTable OBJECT-TYPE
    SYNTAX     SEQUENCE OF MgmdRouterCacheEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The (conceptual) table listing the IP multicast groups for
              which there are members on a particular router interface."
    ::= { swIgmpMIBObjects 6 }

mgmdRouterCacheEntry OBJECT-TYPE
    SYNTAX     MgmdRouterCacheEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "An entry (conceptual row) in the mgmdRouterCacheTable."
    INDEX      { mgmdRouterCacheAddressType, mgmdRouterCacheIfIndex,
                  mgmdRouterCacheAddress}
    ::= { mgmdRouterCacheTable 1 }


MgmdRouterCacheEntry ::= SEQUENCE {
    mgmdRouterCacheAddressType        InetAddressType,
    mgmdRouterCacheIfIndex            InterfaceIndex,
    mgmdRouterCacheAddress            InetAddress,
    mgmdRouterCacheLastReporter       InetAddress,
    mgmdRouterCacheExpiryTime         TimeTicks,
    mgmdRouterCacheStatus             RowStatus,
    mgmdRouterCacheVersion1HostTimer  TimeTicks,
    mgmdRouterCacheVersion2HostTimer  TimeTicks,
    mgmdRouterCacheSourceFilterMode   INTEGER
}

mgmdRouterCacheAddressType OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The address type of the mgmdRouterCacheTable entry. This value
            applies to both the mgmdRouterCacheAddress and the
            mgmdRouterCacheLastReporter entries."
    ::= { mgmdRouterCacheEntry 1 }

mgmdRouterCacheIfIndex OBJECT-TYPE
    SYNTAX     InterfaceIndex
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The interface for which this entry contains information
            for an IP multicast group address."
    ::= { mgmdRouterCacheEntry 2 }

mgmdRouterCacheAddress OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The IP multicast group address for which this entry
            contains information. The InetAddressType, e.g.
            IPv4 or IPv6, is identified by the mgmdRouterCacheAddresType
            variable in the mgmdRouterCache table."
    ::= { mgmdRouterCacheEntry 3 }

mgmdRouterCacheLastReporter OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The IP address of the source of the last membership report
            received for this IP Multicast group address on this
            interface.  If no membership report has been received, this
            object has the value 0::0. The InetAddressType, e.g.
            IPv4 or IPv6, is identified by the mgmdRouterCacheAddresType
            variable in the mgmdRouterCache table."
    ::= { mgmdRouterCacheEntry 4 }

mgmdRouterCacheExpiryTime OBJECT-TYPE
    SYNTAX     TimeTicks
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "In IGMPv2, this object represent minimum amount of time remaining before
             this entry will be aged out.  The value must always be greater than 0.
             In IGMPv3, this obbject represent minimum amount of time remaining before
             the object mgmdRouterCacheSourceFilterMode will change from exclude(2) to
             include(1). If value of the object mgmdRouterCacheSourceFilterMode is
             include(1), the value must be 0."
    ::= { mgmdRouterCacheEntry 6 }

mgmdRouterCacheStatus OBJECT-TYPE
    SYNTAX     RowStatus
    MAX-ACCESS read-create
    STATUS     current
    DESCRIPTION
            "The status of this row. Enabling the entry makes this router
          an active member of the group on the interface defined by
          mgmdRouterCacheIfIndex. Disabling the entry forces the
          router interface to leave the group."
    ::= { mgmdRouterCacheEntry 7 }

mgmdRouterCacheVersion1HostTimer OBJECT-TYPE
    SYNTAX     TimeTicks
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The time remaining until the local router will assume that
            there are no longer any MGMD version 1 members on the IP
            subnet attached to this interface.  This entry only applies
            to IGMPv1 hosts, and is not implemented for MLD. Upon
            hearing any MGMDv1 Membership Report (IGMPv1 only), this
            value is reset to the group membership timer.  While this
            time remaining is non-zero, the local router ignores any
            MGMDv2 Leave messages (IGMPv2 only) for this group that it
            receives on this interface."
    ::= { mgmdRouterCacheEntry 8 }

mgmdRouterCacheVersion2HostTimer OBJECT-TYPE
    SYNTAX     TimeTicks
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The time remaining until the local router will assume that
            there are no longer any MGMD version 2 members on the IP
            subnet attached to this interface.  This entry applies to
            both IGMP and MLD hosts. Upon hearing any MGMDv2
            Membership Report, this value is reset to the group
            membership timer.  Assuming no MGMDv1 hosts have been
            detected, the local router does not ignore any MGMDv2 Leave
            messages for this group that it receives on this
            interface."
    ::= { mgmdRouterCacheEntry 9 }

mgmdRouterCacheSourceFilterMode OBJECT-TYPE
    SYNTAX     INTEGER {include (1),
                          exclude (2) }
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The state in which the interface is currently set. The
            value indicates the relevance of the corresponding source
            list entries in the RouterSrcList Table for MGMDv3 interfaces."
    ::= { mgmdRouterCacheEntry 10 }

--
--  The MGMD Router Source list Table
--

mgmdRouterSrcListTable OBJECT-TYPE
    SYNTAX     SEQUENCE OF MgmdRouterSrcListEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The (conceptual) table listing the Source List entries
             corresponding to each Interface filter mode record on a Router."
    ::= { swIgmpMIBObjects 10 }

mgmdRouterSrcListEntry OBJECT-TYPE
    SYNTAX     MgmdRouterSrcListEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "An entry (conceptual row) in the mgmdRouterSrcListTable."
    INDEX      { mgmdRouterSrcListAddressType, 
                 mgmdRouterSrcListIfIndex,
                 mgmdRouterSrcListAddress, 
                 mgmdRouterSrcListHostAddress }
    ::= { mgmdRouterSrcListTable 1 }


MgmdRouterSrcListEntry ::= SEQUENCE {
    mgmdRouterSrcListAddressType      InetAddressType,
    mgmdRouterSrcListIfIndex          InterfaceIndex,
    mgmdRouterSrcListAddress          InetAddress,
    mgmdRouterSrcListHostAddress      InetAddress,
    mgmdRouterSrcListExpire           TimeTicks
}

mgmdRouterSrcListAddressType OBJECT-TYPE
    SYNTAX     InetAddressType
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The address type of the InetAddress variables in this
            table. This value applies to the mgmdRouterSrcListHostAddress and
            mgmdRouterSrcListAddress entries."
    ::= { mgmdRouterSrcListEntry 1 }

mgmdRouterSrcListIfIndex OBJECT-TYPE
    SYNTAX     InterfaceIndex
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The interface for which this entry contains information
            for an IP multicast group address."
    ::= { mgmdRouterSrcListEntry 2 }

mgmdRouterSrcListAddress OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The IP multicast group address for which this entry
            contains information."
    ::= { mgmdRouterSrcListEntry 3 }

mgmdRouterSrcListHostAddress OBJECT-TYPE
    SYNTAX     InetAddress
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The host address to which this entry
            corresponds. The mgmdRouterCacheSourceFilterMode value for this Group
            address and interface indicates whether this Host address
            is included or excluded."
    ::= { mgmdRouterSrcListEntry 4 }
 
mgmdRouterSrcListExpire OBJECT-TYPE
    SYNTAX     TimeTicks
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "This value indicates the relevance of the SrcList entry,
            whereby a non-zero value indicates this is an INCLUDE state
            value, and a zero value indicates this to be an EXCLUDE
            state value."
    ::= { mgmdRouterSrcListEntry 5 }

--  -----------------------------------------------------------------------------
--  The MGMD Router Check Subscriber Srouce Network Table
--  -----------------------------------------------------------------------------

mgmdRouterChkSubSrcNetTable OBJECT-TYPE
    SYNTAX     SEQUENCE OF MgmdRouterChkSubSrcNetEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The (conceptual) table listing the interfaces whether to check
             subscriber source network when receive IGMP report/leave."
    ::= { swIgmpMIBObjects 11 }

mgmdRouterChkSubSrcNetEntry OBJECT-TYPE
    SYNTAX     MgmdRouterChkSubSrcNetEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "An entry (conceptual row) in the mgmdRouterChkSubSrcNetTable."
    INDEX      { mgmdRouterChkSubSrcNetIfIndex }
    ::= { mgmdRouterChkSubSrcNetTable 1 }

MgmdRouterChkSubSrcNetEntry ::= SEQUENCE {
    mgmdRouterChkSubSrcNetIfIndex          InterfaceIndex,
    mgmdRouterChkSubSrcNetIpAddr           IpAddress,
    mgmdRouterChkSubSrcNetIpNetMask        IpAddress,
    mgmdRouterChkSubSrcNetState            INTEGER
}

mgmdRouterChkSubSrcNetIfIndex OBJECT-TYPE
    SYNTAX     InterfaceIndex
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "A unique value for the specified interface."
    ::= { mgmdRouterChkSubSrcNetEntry 1 }

mgmdRouterChkSubSrcNetIpAddr OBJECT-TYPE
    SYNTAX     IpAddress
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The IP address of the interface."
    ::= { mgmdRouterChkSubSrcNetEntry 2 }

mgmdRouterChkSubSrcNetIpNetMask OBJECT-TYPE
    SYNTAX     IpAddress
    MAX-ACCESS read-only
    STATUS     current
    DESCRIPTION
            "The subnet mask of the interface."
    ::= { mgmdRouterChkSubSrcNetEntry 3 }

mgmdRouterChkSubSrcNetState OBJECT-TYPE
    SYNTAX     INTEGER{
    			enabled(1),
    			disabled(2)
    			}   
    MAX-ACCESS read-write
    STATUS     current
    DESCRIPTION
            "The state of the specified interface whether to check subscriber 
            source IP when receive IGMP report/leave."  
    ::= { mgmdRouterChkSubSrcNetEntry 4 }
    
--  -----------------------------------------------------------------------------
--  The MGMD Router IGMP Static Group Table
--  -----------------------------------------------------------------------------
mgmdRouterIGMPStaticGroupTable OBJECT-TYPE
    SYNTAX     SEQUENCE OF MgmdRouterIGMPStaticGroupEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The (conceptual) table listing the static IP multicast groups 
             for which there are members on a particular router interface."
    ::= { swIgmpMIBObjects 12 }

mgmdRouterIGMPStaticGroupEntry OBJECT-TYPE
    SYNTAX     MgmdRouterIGMPStaticGroupEntry
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "An entry (conceptual row) in the mgmdRouterIGMPStaticGroupTable."
    INDEX      { mgmdRouterIGMPStaticGroupIfIndex, mgmdRouterIGMPStaticGroupIpAddr}
    ::= { mgmdRouterIGMPStaticGroupTable 1 }
    
MgmdRouterIGMPStaticGroupEntry ::= SEQUENCE {
    mgmdRouterIGMPStaticGroupIfIndex          InterfaceIndex,
    mgmdRouterIGMPStaticGroupIpAddr           IpAddress,
    mgmdRouterIGMPStaticGroupRowStatus        RowStatus
}

mgmdRouterIGMPStaticGroupIfIndex OBJECT-TYPE
    SYNTAX     InterfaceIndex
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The interface for which this entry contains information
             for a static IP multicast group address."
    ::= { mgmdRouterIGMPStaticGroupEntry 1 }

mgmdRouterIGMPStaticGroupIpAddr OBJECT-TYPE
    SYNTAX     IpAddress
    MAX-ACCESS not-accessible
    STATUS     current
    DESCRIPTION
            "The IP multicast group address for which this entry
             contains information."
    ::= { mgmdRouterIGMPStaticGroupEntry 2 }

mgmdRouterIGMPStaticGroupRowStatus OBJECT-TYPE
    SYNTAX   RowStatus
    MAX-ACCESS read-create
    STATUS   current 
    DESCRIPTION
	    "This object indicates the status of this static IP multicast
	     entry."		
    ::= { mgmdRouterIGMPStaticGroupEntry 3 }

END
