-- =============================================================
-- = DIGI-UDP-MIB : Digi UDP-Serial MIB definition             =
-- =                                                           =
-- =   Digi International Part Number: 40002258_B              =
-- =                                                           =
-- = (c) Copyright 2002 Digi International, Inc.               =
-- =============================================================

DIGI-UDP-SERIAL-MIB DEFINITIONS ::= BEGIN

IMPORTS
digiUdpSerial FROM DIGI-SMI
OBJECT-TYPE FROM RFC-1212
IpAddress FROM RFC1155-SMI;
--   digiEnterprise MODULE-IDENTITY
--       LAST-UPDATED "0203270100Z"
--       ORGANIZATION "Digi International Inc."
--       CONTACT-INFO
--               "        Paul Morein
--                Postal: Digi International Inc.
--		          11001 Bren Road East
--                        Minnetonka, MN 55343
--
--                   Tel: 952-912-3479
--                E-mail: Paul_Morein@digi.com"
--       DESCRIPTION
--               "Digi Structure of UDP-Serial MIB"
--       ::= { digiProtocols 13 }

-- === + Textual Conventions + ===========================================

Switch ::= INTEGER { off(1), on(2) }
UDPOverflow ::= INTEGER { forward(1), flush(2) }
DisplayString ::= OCTET STRING


-- =======================================================================
-- === + UDP-Serial settings table + ======================================
-- =======================================================================

udpSerialSettingsTable OBJECT-TYPE
    SYNTAX SEQUENCE OF UdpSerialSettingsEntry
    ACCESS not-accessible
    STATUS mandatory
    DESCRIPTION
        "Table for UDP serial configuration settings"
::= { digiUdpSerial 11 }

udpSerialSettingsEntry OBJECT-TYPE
    SYNTAX UdpSerialSettingsEntry
    ACCESS not-accessible
    STATUS mandatory
    DESCRIPTION
        "An entry indexed by port number of
         UDP serial settings"
    INDEX { udpSerialPortIndex }
::= { udpSerialSettingsTable 1 }

UdpSerialSettingsEntry ::= SEQUENCE {
udpSerialPortIndex INTEGER,
udpSerialRmax INTEGER,
udpSerialRtime INTEGER,
udpSerialOverflowPolicy UDPOverflow,
udpSerialStripDelimiters Switch,
udpSerialDelimiters DisplayString,
udpSerialRemoveDelimiters INTEGER,
udpSerialValidateNext INTEGER,
udpSerialResetDesinations INTEGER,
udpSerialDestinationsMask DisplayString
}

udpSerialPortIndex OBJECT-TYPE 
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
		"UDP Serial Port Index"
::= { udpSerialSettingsEntry 11 }

udpSerialRmax OBJECT-TYPE
    SYNTAX INTEGER (1..65535)
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
	"UDP Serial Rmax"
::= { udpSerialSettingsEntry 12 }

udpSerialRtime OBJECT-TYPE
    SYNTAX INTEGER (0..65535)
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
	"UDP Serial Rtime"
::= { udpSerialSettingsEntry 13 }

udpSerialOverflowPolicy OBJECT-TYPE 
    SYNTAX UDPOverflow
    ACCESS read-write
    STATUS mandatory
	DESCRIPTION
	"Overflow policy forward or flush"
::= { udpSerialSettingsEntry 14 }

udpSerialStripDelimiters OBJECT-TYPE 
    SYNTAX Switch
    ACCESS read-write
    STATUS mandatory
	DESCRIPTION
	"1 - off, 2 - on"
::= { udpSerialSettingsEntry 15 }

udpSerialDelimiters OBJECT-TYPE 
    SYNTAX DisplayString
    ACCESS read-write
    STATUS mandatory
	DESCRIPTION
	"String starts with number of delimiters,
	 followed by delimiters"
::= { udpSerialSettingsEntry 16 }

udpSerialRemoveDelimiters OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
	"Delimiters will be removed"
::= { udpSerialSettingsEntry 17 }

udpSerialValidateNext OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
	"Valid option of the next unvalid destination
	 for the current serial port will be set to one"
::= { udpSerialSettingsEntry 18 }

udpSerialResetDesinations OBJECT-TYPE
    SYNTAX INTEGER {ready(1), factory(2), nvram(3)}
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
        "Factory(2) : This will reset all destinations
	              for the current serial port referenced by
	              index to its factory default values.
                      
         NVRAM(3)   : This will reset all destinations
	              for the current serial port referenced by
                      index to the settings stored in NVRAM
                      (at boot time)"
::= { udpSerialSettingsEntry 19 }

udpSerialDestinationsMask OBJECT-TYPE 
    SYNTAX DisplayString
    ACCESS read-only
    STATUS mandatory
	DESCRIPTION
	"32 bit mask; 1 - if destination is valid"
::= { udpSerialSettingsEntry 20 }

-- =======================================================================
-- === + UDP-Serial destinations table + ======================================
-- =======================================================================

udpSerialDestinationsTable OBJECT-TYPE
    SYNTAX SEQUENCE OF UdpSerialDestinationsEntry
    ACCESS not-accessible
    STATUS mandatory
    DESCRIPTION
        "Table for UDP destination settings"
::= { digiUdpSerial 12 }

udpSerialDestinationsEntry OBJECT-TYPE
    SYNTAX UdpSerialDestinationsEntry
    ACCESS not-accessible
    STATUS mandatory
    DESCRIPTION
        "An entry indexed by 2 dimentional number -
         port number and destination index"
    INDEX { udpSerialDestinationIndex }
::= { udpSerialDestinationsTable 1 }

UdpSerialDestinationsEntry ::= SEQUENCE {
udpSerialDestinationIndex INTEGER,
udpSerialDestinationIpAddress IpAddress,
udpSerialDestinationIpPort INTEGER,
udpSerialDestinationName DisplayString,
udpSerialDestinationRemove Switch
}

udpSerialDestinationIndex OBJECT-TYPE 
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
		"UDP destination index"
::= { udpSerialDestinationsEntry 11 }

udpSerialDestinationIpAddress OBJECT-TYPE
    SYNTAX IpAddress
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
	"UDP IP Address"
::= { udpSerialDestinationsEntry 12 }

udpSerialDestinationIpPort OBJECT-TYPE
    SYNTAX INTEGER (1..60000)
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
	"UDP IP port number"
::= { udpSerialDestinationsEntry 13 }

udpSerialDestinationName OBJECT-TYPE
    SYNTAX DisplayString
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
	"UDP destination's description,
	 can't be empty or more then 16 chars"
::= { udpSerialDestinationsEntry 14 }

udpSerialDestinationRemove OBJECT-TYPE
    SYNTAX Switch
    ACCESS read-write
    STATUS mandatory
	DESCRIPTION
	"1 - off, 2 - on: destination will be deactivated"
::= { udpSerialDestinationsEntry 15 }

-- =======================================================================
-- === + UDP-Serial statistic table + ======================================
-- =======================================================================

udpSerialStatisticsTable OBJECT-TYPE
    SYNTAX SEQUENCE OF UdpSerialStatisticsEntry
    ACCESS not-accessible
    STATUS mandatory
    DESCRIPTION
        "Table for UDP serial statistic items"
::= { digiUdpSerial 13 }

udpSerialStatisticsEntry OBJECT-TYPE
    SYNTAX UdpSerialStatisticsEntry
    ACCESS not-accessible
    STATUS mandatory
    DESCRIPTION
        "An entry indexed by port number"
    INDEX { udpSerialStatisticIndex }
::= { udpSerialStatisticsTable 1 }

UdpSerialStatisticsEntry ::= SEQUENCE {
udpSerialStatisticIndex INTEGER,
udpSerialStatisticDgramTxCnt INTEGER,
udpSerialStatisticDgramTxBytes INTEGER,
udpSerialStatisticDgramRxCnt INTEGER,
udpSerialStatisticDgramRxBytes INTEGER,
udpSerialStatisticSerialTxBytes INTEGER,
udpSerialStatisticSerialRxBytes INTEGER,
udpSerialStatisticDgramHostUnreach INTEGER,
udpSerialStatisticDgramNetErrors INTEGER,
udpSerialStatisticSerialPortBusy INTEGER,
udpSerialStatisticSerialErrors INTEGER,
udpSerialStatisticDgramBytesLost INTEGER,
udpSerialStatisticSerialBytesLost INTEGER,
udpSerialStatisticPortReconfigured INTEGER,
udpSerialStatisticPortClear INTEGER
}

udpSerialStatisticIndex OBJECT-TYPE 
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
		"UDP statistic index"
::= { udpSerialStatisticsEntry 11 }

udpSerialStatisticDgramTxCnt OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Datagrams transmitted"
::= { udpSerialStatisticsEntry 12 }

udpSerialStatisticDgramTxBytes OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Datagram payload bytes transmitted"
::= { udpSerialStatisticsEntry 13 }

udpSerialStatisticDgramRxCnt OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Datagrams received"
::= { udpSerialStatisticsEntry 14 }

udpSerialStatisticDgramRxBytes OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Datagram payload bytes received"
::= { udpSerialStatisticsEntry 15 }

udpSerialStatisticSerialTxBytes OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Bytes written to serial port"
::= { udpSerialStatisticsEntry 16 }

udpSerialStatisticSerialRxBytes OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Bytes read from serial port"
::= { udpSerialStatisticsEntry 17 }

udpSerialStatisticDgramHostUnreach OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"One of our transmitted datagrams
         caused us to receive a host
         unreachable ICMP packet."
::= { udpSerialStatisticsEntry 18 }

udpSerialStatisticDgramNetErrors OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Generic network errors that aren't
         host unreachable, including receiving
	 unexpected ICMP packets, recvfrom
	 failing, or sendto failing."
::= { udpSerialStatisticsEntry 19 }

udpSerialStatisticSerialPortBusy OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Datagram could not be forwarded because
	 port was in use."
::= { udpSerialStatisticsEntry 20 }

udpSerialStatisticSerialErrors OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Generic serial errors that aren't
	 <Port is busy>"
::= { udpSerialStatisticsEntry 21 }

udpSerialStatisticDgramBytesLost OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Bytes which arrived in datagrams which
	 we threw out on the way to the serial port"
::= { udpSerialStatisticsEntry 22 }

udpSerialStatisticSerialBytesLost OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Bytes which arrived on the serial
	 port which we threw out before they
	 could be transmitted successfully in
	 datagrams."
::= { udpSerialStatisticsEntry 23 }

udpSerialStatisticPortReconfigured OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-only
    STATUS mandatory
    DESCRIPTION
	"Increments whenever config is re-eval'd."
::= { udpSerialStatisticsEntry 24 }

udpSerialStatisticPortClear OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
    "Clears UDP Serial Port Statistics"
::= { udpSerialStatisticsEntry 25 }


-- =======================================================================
-- === + Clear statistic  + ==============================================
-- =======================================================================
udpSerialStatisticsClear OBJECT-TYPE
    SYNTAX INTEGER
    ACCESS read-write
    STATUS mandatory
    DESCRIPTION
    "Clears UDP Serial Statistics"
::= { digiUdpSerial 14 }

END
