--  *****************************************************************
--  DLINKPV2-DOS-PREVENT-MIB.mib : DoS (Denial of Service) Prevention MIB
-- 
--  Copyright (c) 2014 D-Link Corporation, all rights reserved.
--   
--  *****************************************************************

    DLINKPV2-DOS-PREVENT-MIB DEFINITIONS ::= BEGIN

    IMPORTS
        TEXTUAL-CONVENTION
            FROM SNMPv2-TC
        MODULE-IDENTITY,OBJECT-TYPE,Unsigned32,Counter64,IpAddress
            FROM SNMPv2-SMI
        TruthValue
            FROM SNMPv2-TC
        MODULE-COMPLIANCE, OBJECT-GROUP
            FROM SNMPv2-CONF   
        InterfaceIndexOrZero
            FROM IF-MIB
        dlinkDGS1100CommonV2
            FROM DGS1100SERMGMT-MIB;  

    primeV2DosPrevMIB MODULE-IDENTITY
		LAST-UPDATED "201404260000Z"
        ORGANIZATION "D-Link Corp."
        CONTACT-INFO
            "        D-Link Corporation

             Postal: No. 289, Sinhu 3rd Rd., Neihu District,
                     Taipei City 114, Taiwan, R.O.C
             Tel:     +886-2-66000123
             E-mail: tsd@dlink.com.tw
            "
        DESCRIPTION
           "This MIB contains managed objects for the DOS Protection 
            application of the device."
	    REVISION        "201404260000Z"
        DESCRIPTION
            "Initial version of this MIB module."
        ::= { dlinkDGS1100CommonV2 4 }

--
-- Textual conventions
--

    DosAttackType ::= TEXTUAL-CONVENTION
        STATUS current
        DESCRIPTION 
            "This data type indicates a well-known DoS type which can be detected.
            Note that a particular agent may support only certain DoS attack
            types. Thus, the valid values of this object are project
            dependent. An agent may respond with an error 
            (e.g., 'inconsistentValue ') to a management SET operation which
            attempts to modify the value to one which is not supported by the
            managed device."
            SYNTAX INTEGER{   
            landAttack(1),
            blatAttack(2),
            tcpNullScan(3),
            tcpXmasScan(4),
            tcpSynFin(5),
            tcpSynSrcPortLess1024(6),
            pingDeathAttack(7),
            all(99) }

-- ***************************************************************************
-- Node definitions
-- ***************************************************************************
    v2DosPrevMIBNotifications OBJECT IDENTIFIER ::= { primeV2DosPrevMIB 0 }
    v2DosPrevMIBObjects       OBJECT IDENTIFIER ::= { primeV2DosPrevMIB 1 }
    v2DosPrevMIBConformance   OBJECT IDENTIFIER ::= { primeV2DosPrevMIB 2 }
        
-- ***************************************************************************
-- v2DosPrevMIBObjects
-- ***************************************************************************
    v2DosPrevCtrlTable  OBJECT-TYPE
        SYNTAX  SEQUENCE OF V2DosPrevCtrlEntry
        MAX-ACCESS  not-accessible
        STATUS  current
        DESCRIPTION
            "A table includes the settings of all DoS prevention 
            types supported by the Switch.             
            Note: the special attack type 'all' is not included
            in this table."             
        ::= { v2DosPrevMIBObjects 1 }
           
    v2DosPrevCtrlEntry OBJECT-TYPE
        SYNTAX          V2DosPrevCtrlEntry                         
        MAX-ACCESS      not-accessible
        STATUS          current
        DESCRIPTION
            "A single entry in the DoS prevention control table."             
        INDEX   { v2DosPrevCtrlAttackType }
        ::= { v2DosPrevCtrlTable 1 }
               
    V2DosPrevCtrlEntry ::=   SEQUENCE {
        v2DosPrevCtrlAttackType          DosAttackType,
        v2DosPrevCtrlEnabled             TruthValue,
        v2DosPrevCtrlActionType          INTEGER
    }
        
    v2DosPrevCtrlAttackType OBJECT-TYPE
        SYNTAX          DosAttackType
        MAX-ACCESS      not-accessible
        STATUS          current
        DESCRIPTION
            "This object indicates the DoS attack type."
        ::= { v2DosPrevCtrlEntry 1 }
    
    v2DosPrevCtrlEnabled OBJECT-TYPE
        SYNTAX TruthValue 
        MAX-ACCESS  read-write
        STATUS  current
        DESCRIPTION
            "This object indicates the state of the DoS attack type.
            Setting this object to 'false' will reset other columnar
            objects in the same row."
        DEFVAL      { false }      
        ::= { v2DosPrevCtrlEntry 2 }
       
    v2DosPrevCtrlActionType OBJECT-TYPE
        SYNTAX  INTEGER    {   
            drop(1)    
        }
        MAX-ACCESS      read-write
        STATUS          current
        DESCRIPTION
            "This object indicates the action for the DoS prevention type."
        DEFVAL      { drop }    
        ::= { v2DosPrevCtrlEntry 3 }     
        
--  ***************************************************************************	
--  Conformance
--  ***************************************************************************
    v2DosPrevMIBCompliances 
        OBJECT IDENTIFIER ::= { v2DosPrevMIBConformance 1 }
    v2DosPrevMIBGroups
        OBJECT IDENTIFIER ::= { v2DosPrevMIBConformance 2 }

    v2DosPrevMIBCompliance MODULE-COMPLIANCE
        STATUS          current   
        DESCRIPTION
            "The compliance statement for the DoS Prevention MIB."
        MODULE -- this module
        MANDATORY-GROUPS { 
            v2DosPrevBasicGroup
        }                       
        GROUP v2DosPrevActionRedirectCtrlGroup
        DESCRIPTION
            "This group need not be implemented if only support 'drop' for DoS
            attack."
        ::= { v2DosPrevMIBCompliances 1 }
        
    v2DosPrevBasicGroup OBJECT-GROUP
        OBJECTS    {                       
            v2DosPrevCtrlEnabled
        }
        STATUS          current
        DESCRIPTION
            "The collection of objects provides basic control for DoS
            Prevention."
        ::= { v2DosPrevMIBGroups 1 }
    
END

