PRINTER-PORT-MONITOR-MIB DEFINITIONS ::= BEGIN

IMPORTS
    enterprises, MODULE-IDENTITY, OBJECT-TYPE, Counter32, Integer32
        FROM SNMPv2-SMI                 -- RFC 2578
    TEXTUAL-CONVENTION, DisplayString, TruthValue
        FROM SNMPv2-TC                  -- RFC 2579
    MODULE-COMPLIANCE, OBJECT-GROUP
        FROM SNMPv2-CONF                -- RFC 2580
    PrtChannelTypeTC
        FROM IANA-PRINTER-MIB;          -- RFC 3805 and IANA Registry

ppmMIB MODULE-IDENTITY
    LAST-UPDATED "0412100000Z"
    ORGANIZATION "Printer Working Group, a Program of IEEE/ISTO"
    CONTACT-INFO
        "Editors:

        Ron Bergman (Ricoh)
        Phone: +1-805-578-4421
        Email: Ron.Bergman@rpsa.ricoh.com

        Mike Fenelon (Microsoft)
        Email: mfenelon@windows.microsoft.com

        Ira McDonald (High North)
        Phone: +1-906-494-2434
        Email: imcdonald@sharplabs.com

        Ivan Pavicevic (Microsoft)
        Email: ivanp@windows.microsoft.com

        Send comments using the Printer MIB Project (PMP) Mailing List:

            pmp@pwg.org

        To subscribe, see the PWG web page:

            http://www.pwg.org/"
    DESCRIPTION
        "The MIB module for printer port monitor support.

        Copyright (C) IEEE/ISTO PWG (2004)."

    REVISION        "0412100000Z" -- 10 December 2004 (v0.20)
    DESCRIPTION     "Second draft of PWG Printer Port Monitor MIB.
                    - added Ivan to editors (oversight in v0.10),
                      per request of Mike and Ivan;
                    - added IMPORT of 'PrtChannelTypeTC' from
                      IANA-PRINTER-MIB (first published in RFC 3805)
                      and changed SYNTAX of 'ppmPortProtocolType',
                      per request of Ron Bergman;
                    - renamed 'PpmTextStringTC' textual convention to
                      'PpmLocalizedStringTC' (for clarity);
                    - added 'ppmGeneralNumberOfPorts' to General group,
                      to align with Mike and Ivan's original draft;
                    - revised 'ppmPortProtocolType' to specify the IANA
                      Printer MIB as the authoritative source of values,
                      per request of Ron Bergman;
                    - revised 'ppmPortProtocolPortNumber' to specify
                      that, if zero, then the default port for the
                      current value of 'ppmPortProtocolType' is used,
                      per request of Harry Lewis;
                    - revised 'ppmPortIEEE1284DeviceId' to clarify more
                      format details and restricted characters,
                      per request of Mike and Ivan;
                    - moved 'ppmGeneralCommunityName' and renamed to
                      'ppmPortSnmpCommunityName' (for clarity),
                      to align with Mike and Ivan's original draft;
                    - renamed 'ppmPortStatusQueryEnabled' to
                      'ppmPortSnmpStatusQueryEnabled' (for clarity),
                      to align with Mike and Ivan's original draft;
                    - deleted 'ppmPortDescription' (redundant),
                      per request of Mike and Ivan;
                    - deleted 'ppmPortPrtChannelIndex' and
                      'ppmPortInterfaceIndex' (not necessary),
                      per request of Mike and Ivan."

    REVISION        "0411180000Z" -- 18 November 2004 (v0.10)
    DESCRIPTION     "First draft of PWG Printer Port Monitor MIB.
                    - content from Mike and Ivan's original draft and
                      a few proposed extensions."
    ::= { enterprises pwg(2699) mibs(1) ppmMIB(2) }

ppmMIBObjects       OBJECT IDENTIFIER   ::= { ppmMIB 1 }
ppmMIBNotifications OBJECT IDENTIFIER   ::= { ppmMIB 2 }
ppmMIBConformance   OBJECT IDENTIFIER   ::= { ppmMIB 3 }
ppmMIBObjectGroups  OBJECT IDENTIFIER   ::= { ppmMIBConformance 2 }

--
--  Textual Conventions
--

PpmLocalizedStringTC ::= TEXTUAL-CONVENTION
    DISPLAY-HINT "255a"
    STATUS      current
    DESCRIPTION
        "To facilitate internationalization, this datatype represents
        information represented in the ISO/IEC IS 10646-1 character set
        (encoded as an octet string using the UTF-8 (RFC 3629) character
        encoding scheme) in the natural language currently specified by
        'ppmGeneralNaturalLanguage'."
    REFERENCE
        "See:   'PrtLocalizedDescriptionStringTC' in RFC 3805."
    SYNTAX      OCTET STRING (SIZE (0..255))

--
--  Object Definitions
--

ppmGeneral          OBJECT IDENTIFIER   ::= { ppmMIBObjects 1 }

ppmGeneralNaturalLanguage OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..63))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The natural language tag (RFC 3066), specified in US-ASCII,
        for all localized text string objects defined in this MIB
        (of datatype 'PpmLocalizedStringTC').

        Note:  If this object is empty, then the natural language for
        all text string objects defined in this MIB SHOULD default to
        'en-US' (US English)."
    REFERENCE
        "See:   'prtGeneralCurrentLocalization' in RFC 1759/3805."
    DEFVAL      { ''H }                 -- no natural language tag
    ::= { ppmGeneral 1 }

ppmGeneralNumberOfPorts OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of printer ports supported on this network product,
        i.e., the number of entries in the 'ppmPortTable' below."
--  DEFVAL intentionally omitted - not permitted on Counter32 objects
    ::= { ppmGeneral 2 }

ppmPort             OBJECT IDENTIFIER   ::= { ppmMIBObjects 2 }

ppmPortTable  OBJECT-TYPE
    SYNTAX      SEQUENCE OF PpmPortEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A table containing basic network printer port information,
        especially for use by operating systems to facilitate
        selection and automatic installation of device drivers."
    ::= { ppmPort 1 }

ppmPortEntry  OBJECT-TYPE
    SYNTAX      PpmPortEntry
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A entry containing basic network printer port information for
        one printer port."
    INDEX  { ppmPortIndex }
    ::= { ppmPortTable 1 }

PpmPortEntry ::= SEQUENCE {
        ppmPortIndex                    Integer32,
        ppmPortName                     PpmLocalizedStringTC,
        ppmPortProtocolType             PrtChannelTypeTC,
        ppmPortProtocolPortNumber       Integer32,
        ppmPortIEEE1284DeviceId         DisplayString,
        ppmPortHrDeviceIndex            Integer32,
        ppmPortSnmpCommunityName        DisplayString,
        ppmPortSnmpStatusQueryEnabled   TruthValue,
        ppmPortLprQueueName             DisplayString,
        ppmPortLprByteCountEnabled      TruthValue
    }

ppmPortIndex OBJECT-TYPE
    SYNTAX      Integer32 (1..2147483647)
    MAX-ACCESS  not-accessible
    STATUS      current
    DESCRIPTION
        "A locally unique identifier for this network printer port."
    ::= { ppmPortEntry 1 }

ppmPortName OBJECT-TYPE
    SYNTAX      PpmLocalizedStringTC (SIZE (0..127))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "A user friendly name for this port, in the locale specified by
        'ppmGeneralNaturalLanguage'.  May be used to facilitate user
        selection of a port on a multi-port network product.

        Note:  The charset of this object is UTF-8 (RFC 3629), in order
        to support names that cannot be represented in US-ASCII.

        Note:  Unlike 'ppmPortIEEE1284DeviceId' (US-ASCII only), this
        object can be used to correctly specify non-English names."
    REFERENCE
        "See:   'prtGeneralPrinterName' in Printer MIB v2 (RFC 3805)."
    DEFVAL      { ''H }                 -- no port name
    ::= { ppmPortEntry 2 }

ppmPortProtocolType OBJECT-TYPE
    SYNTAX      PrtChannelTypeTC
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The protocol type of this port, a value from 'PrtChannelTypeTC'
        in the IANA Printer MIB, e.g., 'chLPDServer(8)' for LPR
        (RFC 1179) or 'chPort9100(11)' for Raw.

        Note:  Products that implement Printer MIB v2 (RFC 3805) SHOULD
        use 'chPortTCP(37)' or 'chBidirPortTCP(38)' (as appropriate)
        instead of 'chPort9100(11)', since Raw printing is supported on
        other ports than 9100 on many printers.

        Note:  For products that implement the IETF Host Resources MIB
        (RFC 1514/2790) and the IETF Printer MIB (RFC 1759/3805), a port
        monitor application MAY search 'prtChannelTable' for this value
        in 'prtChannelType' for further channel info and status.

        Note:  If this object is 'other(1)', then the protocol type of
        this port not specified."
    REFERENCE
        "See:   'PrtChannelTypeTC' in IANA Printer MIB (RFC 3805 and
                http://www.iana.org/assignments/ianaprinter-mib).
        See:    'prtChannelType' in IETF Printer MIB RFC 1759/3805."
    DEFVAL      { other }               -- no protocol type specified
    ::= { ppmPortEntry 3 }

ppmPortProtocolPortNumber OBJECT-TYPE
    SYNTAX      Integer32 (0..65535)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The transport layer (TCP, UDP, etc.) port number for this
        protocol, e.g., an alternate port from the protocol default.

        Note:  If this object is zero, then the protocol port number is
        the default port for the specified 'ppmPortProtocolType' (e.g.,
        'chPort9100(11)' uses '9100', 'chLPDServer(8)' uses '515', and
        'chIPP(44)' uses '631')."
    REFERENCE
        "See:   'tcpConnLocalPort' in MIB-II (RFC 1213).
        See:    'udpLocalPort' in MIB-II (RFC 1213)."
    DEFVAL      { 0 }                   -- no protocol port number
    ::= { ppmPortEntry 4 }

ppmPortIEEE1284DeviceId OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The IEEE 1284 device ID for this port, a set of capabilities
        (keys and values) specified in the US-ASCII charset and the
        format 'key1: value {, value }; ... keyN: value {,value };'.

        (a) SPACE (0x20), TAB (0x09), VTAB (0x0B), CR (0x0D), NL (0x0A),
            and FF (0x0C) are allowed, but ignored when parsing
        (b) other control characters (less than 0x20) MUST NOT be used
        (c) COLON (0x3A), COMMA (0x2C), and SEMICOLON (0x3B) are
            delimiters and MUST NOT be included in any key or value
        (d) each key MUST be separated from value(s) using COLON (0x3A)
        (e) multiple values MUST BE separated using COMMA (0x2C)
        (f) each capability MUST BE delimited using SEMICOLON (0x3B)
        (g) all ports MUST include the following capabilities
            - MANUFACTURER (or abbreviation MFG)
            - MODEL (or abbreviation MDL)
        (h) all ports MAY include the following capabilities
            - COMMAND SET (or abbreviation CMD)
            - COMMENT
            - ACTIVE COMMAND SET

        For example (actually all on one line of text):

            MANUFACTURER:ACME Manufacturing;
            COMMAND SET:PCL,PJL,PS,XHTML-Print+xml;
            MODEL:LaserBeam 9;
            COMMENT:Anything you like;
            ACTIVE COMMAND SET:PCL;

        Note:  The value of this object MUST exactly match the IEEE
        1284-2000 Device ID string, except that the length field MUST
        NOT be specified.  The value MUST be assigned by the Printer
        vendor and MUST NOT be localized by the Print Service.

        Note:  If this object is empty, then the current value of
        'ppmPortProtocolType' SHOULD be used to load a generic driver."
    REFERENCE
        "See:   Section 7.6 of IEEE 1284-2000."
    DEFVAL      { ''H }                 -- no IEEE 1284 device ID
    ::= { ppmPortEntry 5 }

ppmPortHrDeviceIndex OBJECT-TYPE
    SYNTAX      Integer32 (0..2147483647)
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The value of 'hrDeviceIndex' in IETF Host Resources MIB
        (RFC 1514/2790) to be used for status queries for this port,
        if the value of 'ppmPortSnmpStatusQueryEnabled' is 'true'.

        Note:  If this object is zero, then status queries cannot be
        performed on this port."
    REFERENCE
        "See:   'hrDeviceStatus', 'hrPrinterStatus', and
                'hrPrinterDetectedErrorState' in RFC 1514/2790."
    DEFVAL      { 0 }                   -- no host device index
    ::= { ppmPortEntry 6 }

ppmPortSnmpCommunityName OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The SNMP read community name, specified in US-ASCII, for access
        to the printer status information in IETF MIB-II (RFC 1213),
        IETF Host Resources MIB (RFC 1514/2790), and IETF Printer MIB
        (RFC 1759/3805) for this port.

        Note:  If this object is empty, then the SNMP read community
        name for this port SHOULD default to 'public'."
    REFERENCE
        "See:   'snmpCommunityName' in SNMP Community MIB (RFC 3584)."
    DEFVAL      { ''H }                 -- no SNMP read community name
    ::= { ppmPortEntry 7 }

ppmPortSnmpStatusQueryEnabled OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current preference for status query for this port.

        Note:  If this object is 'true', then status SHOULD be polled
        by SNMP printer port monitoring programs.
        If this object is 'false', then status SHOULD NOT be polled."
    REFERENCE
        "See:   'hrDeviceStatus', 'hrPrinterStatus', and
                'hrPrinterDetectedErrorState' in RFC 1514/2790."
    DEFVAL      { false }               -- no status monitoring
    ::= { ppmPortEntry 8 }

ppmPortLprQueueName OBJECT-TYPE
    SYNTAX      DisplayString (SIZE (0..255))
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The LPR queue name for this port, specified in US-ASCII.
        Ignored if 'ppmPortProtocolType' is not 'chLPDServer(8)'.

        Note:  If this object is empty, the LPR queue name is unknown."
    REFERENCE
        "See:   IETF Line Printer Daemon Protocol (RFC 1179)."
    DEFVAL      { ''H }                 -- no LPR queue name
    ::= { ppmPortEntry 9 }

ppmPortLprByteCountEnabled OBJECT-TYPE
    SYNTAX      TruthValue
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The current LPR byte counting mode for this port.

        Note:  If this object is 'true', then LPR byte counting enabled.
        If this object is 'false', then LPR byte counting disabled."
    REFERENCE
        "See:   IETF Line Printer Daemon Protocol (RFC 1179)."
    DEFVAL      { false }               -- LPR byte counting disabled
    ::= { ppmPortEntry 10 }

--
--  Conformance
--

ppmMIBCompliance MODULE-COMPLIANCE
    STATUS      current
    DESCRIPTION
        "The compliance statements for SNMP Agents that implement this
        Printer Port Monitor MIB."
    MODULE -- this module
    MANDATORY-GROUPS { ppmGeneralGroup, ppmPortGroup }
    ::= { ppmMIBConformance 1 }

--
--  Conformance Groups
--

ppmGeneralGroup OBJECT-GROUP
    OBJECTS {
        ppmGeneralNaturalLanguage,
        ppmGeneralNumberOfPorts
    }
    STATUS      current
    DESCRIPTION
        "The General object group in the Printer Port Monitor MIB"
    ::= { ppmMIBObjectGroups 1 }

ppmPortGroup OBJECT-GROUP
    OBJECTS {
        ppmPortName,
        ppmPortProtocolType,
        ppmPortProtocolPortNumber,
        ppmPortIEEE1284DeviceId,
        ppmPortHrDeviceIndex,
        ppmPortSnmpCommunityName,
        ppmPortSnmpStatusQueryEnabled,
        ppmPortLprQueueName,
        ppmPortLprByteCountEnabled
    }
    STATUS      current
    DESCRIPTION
        "The Port object group in the Printer Port Monitor MIB"
    ::= { ppmMIBObjectGroups 2 }

END