-- Copyright 2021 Grandstream Networks, Inc. All Rights Reserved.

GRANDSTREAM-GWN-PRODUCTS-L2-LITE-SWITCH-MIB DEFINITIONS ::= BEGIN

IMPORTS
    gwnProducts
	FROM GRANDSTREAM-GWN-ROOT-MIB
	MODULE-IDENTITY,
	NOTIFICATION-TYPE,
	OBJECT-TYPE,
	Integer32,
	Counter32,
	Unsigned32
			FROM SNMPv2-SMI
	TEXTUAL-CONVENTION,
	DisplayString,
	TimeStamp,
	TruthValue,
	RowStatus,MacAddress
			FROM SNMPv2-TC
	MODULE-COMPLIANCE,
	OBJECT-GROUP,
	NOTIFICATION-GROUP
			FROM SNMPv2-CONF
	SnmpAdminString
			FROM SNMP-FRAMEWORK-MIB;


gwnSwitchMIB MODULE-IDENTITY
        LAST-UPDATED    "202312231201Z"
        ORGANIZATION    "Grandstream Networks, Inc."
        CONTACT-INFO 	""
        DESCRIPTION     "Grandstream product switch mib."
        ::= { gwnProducts 4 }

-- Textual Conventions

ErrDisableFeatureID ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION
        "An integer-value assigned to various features/events
		that can error disable a system entity"
    SYNTAX          INTEGER  {
						selfLoop(3),
						selfloopDetect(12)
                    }

-- 1.3.6.1.4.1.42397.1.4.3
gwnSwitchErrDisableMIB MODULE-IDENTITY
    LAST-UPDATED "202312231201Z"
    ORGANIZATION "Grandstream Networks, Inc."
    CONTACT-INFO ""
    DESCRIPTION
    "Grandstream switch syslog module mib"
    ::= { gwnSwitchMIB 3 }

errDisableIfStatusTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF errDisableIfStatusEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "This table provides interface (port) specific
        error-disable status information. Each conceptual row
        provides status information about a {interface}
        disabled by a feature."
    ::= { gwnSwitchErrDisableMIB 1 }

errDisableIfStatusEntry OBJECT-TYPE
    SYNTAX          errDisableIfStatusEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "A collection of objects that specify the status of an
        error-disabled Interface"
    INDEX           {ifIndex}
    ::= { errDisableIfStatusTable 1 }

errDisableIfStatusEntry ::= SEQUENCE {
        errDisableIfStatusCause        ErrDisableFeatureID,
}

errDisableIfStatusCause OBJECT-TYPE
    SYNTAX          ErrDisableFeatureID
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "This object specifies the feature/event that caused the
        interface to be error-disabled."
    ::= { errDisableIfStatusEntry 1 }

-- notifications

errDisableMIBNotificationPrefix    OBJECT IDENTIFIER
                              ::= { gwnSwitchErrDisableMIB 2 }
errDisableMIBNotifications         OBJECT IDENTIFIER
                              ::= { errDisableMIBNotificationPrefix 0 }

alarmMessageGenerated NOTIFICATION-TYPE
        OBJECTS { errDisableIfStatusCause        }
        STATUS     current
        DESCRIPTION
                ""
        ::= { errDisableMIBNotifications 1 }

-- Textual Conventions

VlanIndex ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION
        "The VLAN-id of a VLAN on ISL or 802.1q trunks."
    SYNTAX          Integer32 (0..4095)

-- 1.3.6.1.4.1.42397.1.4.4
gwnSwitchvlanMIB MODULE-IDENTITY
    LAST-UPDATED "202312231201Z"
    ORGANIZATION "Grandstream Networks, Inc."
    CONTACT-INFO ""
    DESCRIPTION
    "Grandstream switch vlan module mib"
    ::= { gwnSwitchMIB 4 }

vlanTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF vlanEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "This table contains information on the VLANs which
        currently exist."
    ::= { gwnSwitchvlanMIB 1 }

vlanEntry OBJECT-TYPE
    SYNTAX          vlanEntry
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        ""
    INDEX           {vlanIndex}
    ::= { vlanTable 1 }

vlanEntry ::= SEQUENCE {
       vlanIndex              	 VlanIndex,
       vlanName               	DisplayString
}

vlanIndex OBJECT-TYPE
    SYNTAX          VlanIndex
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "The VLAN-id of this VLAN on ISL or 802.1q trunks."
    ::= { vlanEntry 1 }

vlanName OBJECT-TYPE
    SYNTAX          DisplayString (SIZE  (1..32))
    MAX-ACCESS      not-accessible
    STATUS          current
    DESCRIPTION
        "The name of this VLAN."
    ::= { vlanEntry 2 }

-- notifications

vlanMIBNotificationPrefix    OBJECT IDENTIFIER
                              ::= { gwnSwitchvlanMIB 2 }
vlanMIBNotifications         OBJECT IDENTIFIER
                              ::= { vlanMIBNotificationPrefix 0 }

vlanCreated NOTIFICATION-TYPE
        OBJECTS { vlanName       }
        STATUS     current
        DESCRIPTION
                ""
        ::= { vlanMIBNotifications 1 }

vlanDeleted NOTIFICATION-TYPE
        OBJECTS { vlanName       }
        STATUS     current
        DESCRIPTION
                ""
        ::= { vlanMIBNotifications 2 }



-- Textual Conventions

ConfigEventMedium ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION
            "Configuration file distribution.

            import            Configuration Import
            "
    SYNTAX          INTEGER  {
                        import(4)
                    }


-- 1.3.6.1.4.1.42397.1.4.7
gwnSwitchConfigMIB MODULE-IDENTITY
    LAST-UPDATED "202312231201Z"
    ORGANIZATION "Grandstream Networks, Inc."
    CONTACT-INFO ""
    DESCRIPTION
    "Configuration management MIB"
    ::= { gwnSwitchMIB 7}

configBasicObjects     OBJECT IDENTIFIER
    ::= { gwnSwitchConfigMIB 1 }

configEventObjects     OBJECT IDENTIFIER
    ::= { configBasicObjects 1 }


configEventDest OBJECT-TYPE
     SYNTAX          ConfigEventMedium
     MAX-ACCESS      not-accessible
     STATUS          current
     DESCRIPTION
         ""
    ::= { configEventObjects 3 }


-- notifications

configMIBNotificationPrefix    OBJECT IDENTIFIER
                              ::= { gwnSwitchConfigMIB 2 }
configMIBNotifications         OBJECT IDENTIFIER
                              ::= { configMIBNotificationPrefix 0 }

cfgEventNotification NOTIFICATION-TYPE
        OBJECTS {
					configEventDest
				}
        STATUS     current
        DESCRIPTION
                ""
        ::= { configMIBNotifications 1 }


-- Textual Conventions

poePortEventType ::= TEXTUAL-CONVENTION
    STATUS          current
    DESCRIPTION
            "Indicates the type of the event that causes the status of the POE port to change.

				disconnect 		A device disconnect is detected
				disconnect 		The device starts to supply power to PD
				currentOver 	The power supply stops because the port current is too high
				mainPowerOver   If the total device power usage exceeds the threshold,
								power off the port with a lower priority
            "
    SYNTAX          INTEGER  {
                        disconnect(1),
                        powerOn(2),
                        currentOver(3),
						mainPowerOver(4)
                    }

-- 1.3.6.1.4.1.42397.1.4.8
gwnPowerEthernetExtMIB MODULE-IDENTITY
    LAST-UPDATED "202312231201Z"
    ORGANIZATION "Grandstream Networks, Inc."
    CONTACT-INFO ""
    DESCRIPTION
    "A MIB module for extending the POWER-ETHERNET-MIB
	(RFC3621) to add objects which provide additional management
	information about Power Sourcing Equipment (PSE)
	not available in POWER-ETHERNET-MIB."
    ::= { gwnSwitchMIB 8}

poeExtObjects     OBJECT IDENTIFIER
    ::= { gwnPowerEthernetExtMIB 1 }

poeExtPortEventTable OBJECT-TYPE
    SYNTAX          SEQUENCE OF poeExtPortEventEntry
    MAX-ACCESS      not-accessible
	STATUS          current
    DESCRIPTION
            ""
    ::= { poeExtObjects 1 }

poeExtPortEventEntry OBJECT-TYPE
        SYNTAX     poeExtPortEventEntry
        MAX-ACCESS not-accessible
        STATUS     current
        DESCRIPTION
                ""
        INDEX   { ifIndex }
        ::= { poeExtPortEventTable 1 }

poeExtPortEventEntry ::=
    SEQUENCE {
        poeExtPortEventType       poePortEventType,
    }

poeExtPortEventType OBJECT-TYPE
     SYNTAX          poePortEventType
     MAX-ACCESS      not-accessible
     STATUS          current
     DESCRIPTION
         ""
    ::= { poeExtPortEventEntry 1 }

-- notifications

poeMIBNotificationPrefix    OBJECT IDENTIFIER
                              ::= { gwnPowerEthernetExtMIB 2 }
poeMIBNotifications         OBJECT IDENTIFIER
                              ::= { poeMIBNotificationPrefix 0 }

cfgEventNotification NOTIFICATION-TYPE
        OBJECTS {
					poeExtPortEventType
				}
        STATUS     current
        DESCRIPTION
                ""
        ::= { poeMIBNotifications 1 }

END
