-- =================================================================
-- Copyright (c) 2010-2013 Hewlett-Packard Development Company, L.P.
--
-- Description:
-- Reference:
-- Version: V2.7
-- History:
--  V1.0 Initial version 2004-07-13
--  V1.1 2004-10-12 updated by gaolong
--       Remove hyphens from DisplayString definition.
--  V2.0 2004-12-28 updated by huguohua02576
--       Add hpnicfUserState, hpnicfUserInfoRowStatus, hpnicfUserIndex under hpnicfUserInfoTable
--   Change index from hpnicfUserName to hpnicfUserIndex under hpnicfUserInfoTable
--       Modify hpnicfUserName, hpnicfUserPassword, hpnicfAuthMode, hpnicfUserLevel's MAX-ACCESS
--       from read-only to read-create
--       Add hpnicfUserAttributeTable, hpnicfUserMaxNum, hpnicfUserCurrNum and hpnicfUserIndexIndicator
--  V2.1 2006-02-07 updated by sunludong03130
--       Modify hpnicfFtpService, hpnicfLanAccessService, hpnicfSshService, hpnicfTelnetService,
--       hpnicfTerminalService, hpnicfFtpDirectory's description
--  V2.2 2006-12-26 updated by zhangzhancheng02444
--       Modify hpnicfAccessLimit, hpnicfFtpDirectory, hpnicfSlotNum, hpnicfSubSlotNum,
--       and hpnicfPortNum
--  V2.3 2008-03-13 updated by w02260
--       Add hpnicfExpirationDate, hpnicfUserGroup under hpnicfUserAttributeTable,
--       and add hpnicfUserGroupObjects
--  V2.4 2008-12-29 updated by liubo04367
--       Add hpnicfPortalService under hpnicfUserAttributeTable
--  V2.5 2012-02-28 updated by y02965
--       Add hpnicfUserRoleTable
--       Add hpnicfPPPService, hpnicfHttpService and hpnicfHttpsService under hpnicfUserAttributeTable
--  V2.6 2012-05-28 updated by y06401
--       Modify description of hpnicfAuthMode.
--       2012-10-11 updated by l04367
--       Add hpnicfUserIfIndex
--       Modify hpnicfUserRole
--  V2.7 2013-04-25 updated by q04356
--       Modified the description of hpnicfIdleCut
-- =================================================================
HPN-ICF-USER-MIB DEFINITIONS ::= BEGIN
IMPORTS
    hpnicfCommon
        FROM HPN-ICF-OID-MIB
    RowStatus, MacAddress, TEXTUAL-CONVENTION, DateAndTime, DisplayString
        FROM SNMPv2-TC
    IpAddress, Integer32, OBJECT-TYPE, MODULE-IDENTITY
        FROM SNMPv2-SMI;

hpnicfUser MODULE-IDENTITY
    LAST-UPDATED "201210110000Z"            -- October 11, 2012 at 00:00 GMT
    ORGANIZATION
        ""
    CONTACT-INFO
        ""
    DESCRIPTION
        "
        This MIB contains objects to
        Manage configuration and Monitor running state
        for userlog feature.
        "
    ::= { hpnicfCommon 12 }


--
-- type definitions
--

-- ServiceType
ServiceType ::=  TEXTUAL-CONVENTION
    STATUS      current
    DESCRIPTION
        "enable (1)
        disable (2)
        "
    SYNTAX      INTEGER
        {
            enable(1),
            disable(2)
        }
--
-- end of type definitions
--

-- hpnicfUserObjects===============================================================
hpnicfUserObjects OBJECT IDENTIFIER ::= { hpnicfUser 1 }


-- hpnicfUserInfoTable=============================================================
hpnicfUserInfoTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF HpnicfUserInfoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        Local User Info Table
        "
    ::= { hpnicfUserObjects 1 }

hpnicfUserInfoEntry OBJECT-TYPE
    SYNTAX      HpnicfUserInfoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        The entry of hpnicfUserInfoTable
        "
    INDEX
        {
            hpnicfUserIndex
        }
    ::= { hpnicfUserInfoTable 1 }

HpnicfUserInfoEntry ::= SEQUENCE
    {
        hpnicfUserName             DisplayString,
        hpnicfUserPassword         DisplayString,
        hpnicfAuthMode             Integer32,
        hpnicfUserLevel            Integer32,
        hpnicfUserState            INTEGER,
        hpnicfUserInfoRowStatus    RowStatus,
        hpnicfUserIndex            Integer32
    }


hpnicfUserName OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "
        The name of local user, it must be unique.
        "
    ::= { hpnicfUserInfoEntry 1 }

hpnicfUserPassword OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "
        The password of local user, default is null.
        When read, hpnicfUserPassword always returns an Octet String of length zero.
        "
    ::= { hpnicfUserInfoEntry 2 }

hpnicfAuthMode OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "
        The encrypting type of password:
        0 : password simple, means password is entered in clean text and saved in cipher text.
        1 : password hash simple, means password is entered in clean text and saved in hash value.
        7 : password cipher, means password is entered and saved in cipher text.
        8 : password hash cipher, means password is entered and saved in hash value.
        default is 0.
        "
    ::= { hpnicfUserInfoEntry 3 }

hpnicfUserLevel OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "
        The privilege of local user
        the value range is from 0 to 3, and 0 is minimum, 3 is maximum.
        default is 0.
        "
    ::= { hpnicfUserInfoEntry 4 }

hpnicfUserState OBJECT-TYPE
    SYNTAX      INTEGER
        {
            active(0),
            block(1)
        }
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "
        The state of local user
        0: active, means local user can execute any operations that he has
           privilege to do.
        1: block, means local user can not execute any operations.
        default is active.
        "
    ::= { hpnicfUserInfoEntry 5 }

hpnicfUserInfoRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "
        The status of this conceptual row. Now only support CreateAndGo and
        Destroy and Active.
        "
    ::= { hpnicfUserInfoEntry 6 }


hpnicfUserIndex OBJECT-TYPE
    SYNTAX      Integer32(1..2147483646)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        The index of local user
        "
    ::= { hpnicfUserInfoEntry 7 }

-- hpnicfUserAttributeTable========================================================
hpnicfUserAttributeTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF HpnicfUserAttributeEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        Local User Attribute Table.
        if there are data in hpnicfUserInfoTable, this table should have the
        relevant data.
        this table only support query and modify, but not support create and
        delete operations.
        "
    ::= { hpnicfUserObjects 2 }

hpnicfUserAttributeEntry OBJECT-TYPE
    SYNTAX      HpnicfUserAttributeEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The entry of hpnicfUserAttributeTable "
    INDEX
        {
            hpnicfUserIndex
        }
    ::= { hpnicfUserAttributeTable 1 }

HpnicfUserAttributeEntry ::= SEQUENCE
    {
        hpnicfAccessLimit         Integer32,
        hpnicfIdleCut             Integer32,
        hpnicfIPAddress           IpAddress,
        hpnicfNasIPAddress        IpAddress,
        hpnicfSlotNum             Integer32,
        hpnicfSubSlotNum          Integer32,
        hpnicfPortNum             Integer32,
        hpnicfMacAddress          MacAddress,
        hpnicfVlan                Integer32,
        hpnicfFtpService          ServiceType,
        hpnicfFtpDirectory        OCTET STRING,
        hpnicfLanAccessService    ServiceType,
        hpnicfSshService          ServiceType,
        hpnicfTelnetService       ServiceType,
        hpnicfTerminalService     ServiceType,
        hpnicfExpirationDate      DateAndTime,
        hpnicfUserGroup           DisplayString,
        hpnicfPortalService       ServiceType,
        hpnicfPPPService          ServiceType,
        hpnicfHttpService         ServiceType,
        hpnicfHttpsService        ServiceType,
        hpnicfUserIfIndex         Integer32
    }


hpnicfAccessLimit OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        The maximum user number of current user who can access devices.
        default is 0, means no limit.
        "
    ::= { hpnicfUserAttributeEntry 1 }

hpnicfIdleCut OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Valid idle time out(second),
        default is 0, means disable idle time out.
        "
    ::= { hpnicfUserAttributeEntry 2 }

hpnicfIPAddress OBJECT-TYPE
    SYNTAX      IpAddress
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Set local user's ip address.
        default is 0.0.0.0
        "
    ::= { hpnicfUserAttributeEntry 3 }

hpnicfNasIPAddress OBJECT-TYPE
    SYNTAX      IpAddress
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Set local user's ip address of network access server.
        default is 127.0.0.1, means local machine.
        "
    ::= { hpnicfUserAttributeEntry 4 }

hpnicfSlotNum OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Set local user's slot.
        default is 0.
        "
    ::= { hpnicfUserAttributeEntry 5 }

hpnicfSubSlotNum OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Set local user's sub-slot.
        default is 0.
        "
    ::= { hpnicfUserAttributeEntry 6 }

hpnicfPortNum OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Set local user's port number.
        0 is an insignificant value for initial status.
        "
    ::= { hpnicfUserAttributeEntry 7 }

hpnicfMacAddress OBJECT-TYPE
    SYNTAX      MacAddress
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Set local user's mac address.
        default is 0-0-0, means the local user do not bind any mac address.
        "
    ::= { hpnicfUserAttributeEntry 8 }

hpnicfVlan OBJECT-TYPE
    SYNTAX      Integer32(0..4094)
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Set local user's vlan id.
        the value range is from 0 to 4094.
        default is 0, means the local user is not in any vlan.
        "
    ::= { hpnicfUserAttributeEntry 9 }

hpnicfFtpService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        FTP service:
        enable
        Setting this object to the value enable has the
        effect of enabling the FTP service for the corresponding entry in the
        hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the FTP service for the corresponding entry in the
        hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 10 }

hpnicfFtpDirectory OBJECT-TYPE
    SYNTAX      OCTET STRING
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Directory of FTP user.
        default is null, means if local user has the privilege of ftp service.
        "
    ::= { hpnicfUserAttributeEntry 11 }

hpnicfLanAccessService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Lan Access service:
        enable
        Setting this object to the value enable has the
        effect of enabling the lan access service for the corresponding entry
        in the hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the lan access service for the corresponding entry
        in the hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 12 }

hpnicfSshService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        SSH service:
        enable
        Setting this object to the value enable has the
        effect of enabling the SSH service for the corresponding entry in the
        hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the SSH service for the corresponding entry in the
        hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 13 }

hpnicfTelnetService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Telnet service:
        enable
        Setting this object to the value enable has the
        effect of enabling the TELNET service for the corresponding entry in the
        hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the TELNET service for the corresponding entry in the
        hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 14 }

hpnicfTerminalService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Terminal service:
        enable
        Setting this object to the value enable has the
        effect of enabling the terminal service for the corresponding entry
        in the hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the terminal service for the corresponding entry
        in the hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 15 }

hpnicfExpirationDate OBJECT-TYPE
    SYNTAX      DateAndTime(SIZE(8))
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Expired date of user.
        The default value is 0-0-0,0:0:0.0, and means it doesn't expire for
        ever.
        "
    ::= { hpnicfUserAttributeEntry 16 }

hpnicfUserGroup      OBJECT-TYPE
    SYNTAX      DisplayString
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        The user group that user belongs to.
        Any user must belong to a user group.
        The default group is the 'system' group.
        The maximum length of the group name is 80.
        "
    ::= { hpnicfUserAttributeEntry 17 }

hpnicfPortalService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Portal service:
        enable
        Setting this object to the value enable has the
        effect of enabling the portal service for the corresponding entry
        in the hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the portal service for the corresponding entry
        in the hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 18 }

hpnicfPPPService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        PPP service:
        enable
        Setting this object to the value enable has the
        effect of enabling the PPP service for the corresponding entry
        in the hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the PPP service for the corresponding entry
        in the hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 19 }

hpnicfHttpService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Http service:
        enable
        Setting this object to the value enable has the
        effect of enabling the Web service for the corresponding entry
        in the hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the Web service for the corresponding entry
        in the hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 20 }

hpnicfHttpsService OBJECT-TYPE
    SYNTAX      ServiceType
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Https service:
        enable
        Setting this object to the value enable has the
        effect of enabling the Web service for the corresponding entry
        in the hpnicfUserAttributeTable.

        disable
        Setting this object to the value disable has the
        effect of disabling the Web service for the corresponding entry
        in the hpnicfUserAttributeTable.

        The default value is disable.
        "
    ::= { hpnicfUserAttributeEntry 21 }

hpnicfUserIfIndex OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-write
    STATUS      current
    DESCRIPTION
        "
        Set local user's interface index. A value of 0 means that the interface
        index has not been assigned or the interface assigned not exist.
        The default value is 0.
        "
    ::= { hpnicfUserAttributeEntry 22 }

-- hpnicfUserMaxNum================================================================
hpnicfUserMaxNum OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "
        This object contains the maximum number of local users.
        "
    ::= { hpnicfUserObjects 3 }

-- hpnicfUserCurrNum===============================================================
hpnicfUserCurrNum OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "
        This object contains the current number of local users.
        "
    ::= { hpnicfUserObjects 4 }

-- hpnicfUserIndexIndicator========================================================
hpnicfUserIndexIndicator OBJECT-TYPE
    SYNTAX      Integer32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "
        This object contains an appropriate value to
        be used for hpnicfUserIndex when creating entries in the
        hpnicfUserInfoTable. The value 0 indicates that no unassigned
        entries are available. To obtain the
        hpnicfUserIndex value for a new
        entry, the manager issues a management
        protocol retrieval operation to obtain the
        current value of this object.  After each
        retrieval, the agent should modify the value
        to the next unassigned index.
        After a manager retrieves a value the agent will
        determine through its local policy when this index
        value will be made available for reuse.
        "
    ::= { hpnicfUserObjects 5 }


-- hpnicfUserRoleTable========================================================
hpnicfUserRoleTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF HpnicfUserRoleEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        Local User Role Table.
        If there is data in hpnicfUserInfoTable, this table should has the
        relevant data.
        "
    ::= { hpnicfUserObjects 6 }

hpnicfUserRoleEntry OBJECT-TYPE
    SYNTAX      HpnicfUserRoleEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "The entry of hpnicfUserRoleTable."
    INDEX
        {
            hpnicfUserIndex,
            hpnicfUserRole
        }
    ::= { hpnicfUserRoleTable 1 }

HpnicfUserRoleEntry ::= SEQUENCE
    {
        hpnicfUserRole           DisplayString,
        hpnicfUserRoleStatus     RowStatus
    }

hpnicfUserRole      OBJECT-TYPE
    SYNTAX      DisplayString(SIZE(1..63))
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        The user's role determines the user's privilege.
        The user must be authorized one role at least.
        The default user role for a local user created by a network-admin user
        is network-operator, and the default user role for a local user created
        by an mdc-admin or level-15 user is mdc-operator.
        "
    ::= { hpnicfUserRoleEntry 1 }

hpnicfUserRoleStatus   OBJECT-TYPE
    SYNTAX   RowStatus
    MAX-ACCESS  read-create
    STATUS   current
    DESCRIPTION
        "
        This object is responsible for managing the creation, deletion and
        modification of rows, which support active status and CreateAndGo,
        Destroy operation.  To create a new row, hpnicfUserIndex must be specified.
        The number of rows with same hpnicfUserIndex cann't be more than 64.
        If the the number of rows with a hpnicfUserIndex is 1, this row cann't be
        destroyed.
        "
    ::= { hpnicfUserRoleEntry 2 }


-- hpnicfUserGroupObjects==========================================================
hpnicfUserGroupObjects OBJECT IDENTIFIER ::= { hpnicfUser 2 }


-- hpnicfUserGroupInfoTable========================================================
hpnicfUserGroupInfoTable OBJECT-TYPE
    SYNTAX      SEQUENCE OF HpnicfUserGroupInfoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        User group information table.
        "
    ::= { hpnicfUserGroupObjects 1 }

hpnicfUserGroupInfoEntry OBJECT-TYPE
    SYNTAX      HpnicfUserGroupInfoEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        The entry of hpnicfUserGroupInfoTable.
        "
    INDEX
        {
            hpnicfUserGroupName
        }
    ::= { hpnicfUserGroupInfoTable 1 }

HpnicfUserGroupInfoEntry ::= SEQUENCE
    {
        hpnicfUserGroupName             DisplayString,
        hpnicfUserGroupInfoRowStatus    RowStatus
    }

hpnicfUserGroupName OBJECT-TYPE
    SYNTAX      DisplayString(SIZE(1..80))
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "
        The index of user group.
        "
    ::= { hpnicfUserGroupInfoEntry 1 }

hpnicfUserGroupInfoRowStatus OBJECT-TYPE
    SYNTAX      RowStatus
    MAX-ACCESS  read-create
    STATUS      current
    DESCRIPTION
        "
        The status of this conceptual row.  Only support createAndGo, destroy
        and active.
        "
    ::= { hpnicfUserGroupInfoEntry 2 }

END
