merge in the pvl-dns repo, with all of its history
authorTero Marttila <tero.marttila@aalto.fi>
Thu, 26 Feb 2015 19:49:10 +0200
changeset 626 5cd99761fe4d
parent 522 6bc714379a13 (diff)
parent 625 57e4f48a7140 (current diff)
child 627 a81206440be2
merge in the pvl-dns repo, with all of its history
.hgignore
README
--- a/.hgignore	Thu Sep 18 21:15:30 2014 +0300
+++ b/.hgignore	Thu Feb 26 19:49:10 2015 +0200
@@ -1,9 +1,23 @@
 syntax:glob
 
-.*.swo
-.*.swp
+# snmp
+usr/mibs/
 
-etc/
+# tempfiles
+*.pyc
+.*.sw[op]
+
+# generated files
+var/
+dist/
+MANIFEST
+log/
+ssl/
+
+# testing
+tmp/
+test/
+var/
 opt/
-var/
-
+htmlcov/
+.coverage
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.hgtags	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,3 @@
+b3778c190aa576a9392aba5efa46d1c38ef307c1 0.6.0
+edaa5d0aa57d47cc3b471903e9d1816cd252ec38 0.6.1
+56ba4bef5016394977fa04df1d9508f2008f663f 0.7.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/LICENSE	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,19 @@
+Copyright (c) 2013 Tero Marttila <terom@paivola.fi>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
--- a/README	Thu Sep 18 21:15:30 2014 +0300
+++ b/README	Thu Feb 26 19:49:10 2015 +0200
@@ -1,9 +1,243 @@
-Manage DNS/bind9 zonefiles.
+= pvl-hosts =
 
-update:
-    ./bin/update reads data from settings/, and generates zonefiles under var/zones/.
+DNS/DHCP hosts management/integration for ISC bind9 and dhcpd.
 
-    `update` also shows and commits changes in settings/ data.
+== Hosts ==
+The `pvl.hosts-*` tools read hosts files as input, which have an ini format, using section names as hostnames to configure attributes for that host:
+
+    [foo]
+        ip          = 192.0.2.1
+        ethernet    = 00:11:22:33:44:55
+
+    [bar]
+        ip          = 192.0.2.2
+        ethernet    = 01:23:45:67:89:ab
+
+The domain name for a host is determined from the basename of the config file, so this example file would generate something like the following output for use in a `zone "example.com" { ... }` zonefile:
+    
+    $ bin/pvl.hosts-forward etc/hosts/example.com 
+    foo                               A     192.0.2.1
+    bar                               A     192.0.2.2
+
+And correspondingly, the reverse zone for `2.0.192.in-addr.arpa`:
+
+    $ bin/pvl.hosts-reverse --zone-prefix=192.0.2.0/24 etc/hosts/example.com
+    1                                 PTR   foo.example.com.
+    2                                 PTR   bar.example.com.
+
+And the associated DHCP hosts:
+
+    $ bin/pvl.hosts-dhcp etc/hosts/example.com 
+    host foo {
+        option host-name foo;
+        hardware ethernet 00:11:22:33:44:55;
+        fixed-address 192.0.2.1;
+    }
+
+    host bar {
+        option host-name bar;
+        hardware ethernet 01:23:45:67:89:ab;
+        fixed-address 192.0.2.2;
+    }
+
+=== Include directories ===
+Host configs can be included:
+
+    $ cat etc/hosts/test
+    include = test.d/
+
+    $ cat etc/hosts/test.d/foo 
+    ip = 192.0.2.1
+
+    $ cat etc/hosts/test.d/bar 
+    ip = 192.0.2.2
+
+    $ bin/pvl.hosts-forward etc/hosts/test
+    foo                               A     192.0.2.1
+    bar                               A     192.0.2.2
+
+Including a directory of files is equivalent to substituiting each file as a named section at the level of the include = statement. Note that this means that included files are treated directly as host definitions, IOW, you should NOT include a section name in an included host file unless you want to declare an additional subdomain:
+
+    $ cat etc/hosts/wrong.test 
+    include = wrong.d/
+    
+    $ etc/hosts/wrong.d/host
+    [host]
+        ip  = 192.0.2.6
+
+Using the --root-zone option to generate the full FQDN for the host:
+
+    $ bin/pvl.hosts-forward --root-zone etc/hosts/wrong.test 
+    host.host.wrong.test              A     192.0.2.6
+
+=== Host aliases ===
+Hosts can specify DNS aliases:
+
+    [foo]
+        ip          = 127.0.0.1
+        alias       = test1
+
+    [bar]
+        ip          = 127.0.0.2
+        alias       = test2
+
+    $ bin/pvl.hosts-forward --forward-zone alias.test etc/hosts/alias.test 
+    foo                               A     127.0.0.1
+    test1                             CNAME foo
+    bar                               A     127.0.0.2
+    test2                             CNAME bar
+
+=== Generated hosts ===
+The hosts file format supports something similar to bind9's $GENERATE directive for hosts:
+
+    [asdf{1-3}]
+        ip  = 10.100.100.$
+
+    $ bin/pvl.hosts-dns --forward-zone=asdf etc/hosts/asdf 
+    asdf1@asdf                        A     10.100.100.1
+    asdf2@asdf                        A     10.100.100.2
+    asdf3@asdf                        A     10.100.100.3
+
+Note that the generate directives are interpreted and compiled directly by pvl.hosts. 
+
+Most of the $GENERATE options should be supported, with a little clever hackery:
+
+    [asdf{1-5/2}{0,2}]
+       ip  = 10.100.100.$${10}
+
+    $ bin/pvl.hosts-dns --forward-zone=asdf2 etc/hosts/asdf2
+    asdf01@asdf2                      A     10.100.100.11
+    asdf03@asdf2                      A     10.100.100.13
+    asdf05@asdf2                      A     10.100.100.15
+
+This feature can be used for generating reverse delegations:
+
+    [foo-{240-247}]
+        forward =
+        reverse = $.240/29.0.0.10.in-addr.arpa
+        ip      = 10.0.0.$
+    
+    $ bin/pvl.hosts-dns --reverse-zone=10 etc/hosts/reverse 
+    240.0.0                           CNAME 240.240/29.0.0.10.in-addr.arpa.
+    241.0.0                           CNAME 241.240/29.0.0.10.in-addr.arpa.
+    242.0.0                           CNAME 242.240/29.0.0.10.in-addr.arpa.
+    243.0.0                           CNAME 243.240/29.0.0.10.in-addr.arpa.
+    244.0.0                           CNAME 244.240/29.0.0.10.in-addr.arpa.
+    245.0.0                           CNAME 245.240/29.0.0.10.in-addr.arpa.
+    246.0.0                           CNAME 246.240/29.0.0.10.in-addr.arpa.
+    247.0.0                           CNAME 247.240/29.0.0.10.in-addr.arpa.
+
+=== DHCP Options ===
+The hosts need not specify any fixed ip address, leaving IP address allocation to dhcpd:
+
+    [foo]
+        ethernet    = 00:11:22:33:44:55 
+    
+    $ bin/pvl.hosts-dhcp etc/hosts/dhcp1 
+    host foo {
+        option host-name foo;
+        hardware ethernet 00:11:22:33:44:55;
+    }
+
+=== DHCP Boot options ===
+The hosts can specify DHCP boot server/file options:
+
+    [foo]
+        ethernet    = 00:11:22:33:44:55
+        boot        = boot.lan:debian/wheezy/pxelinux.0
+
+    $ bin/pvl.hosts-dhcp etc/hosts/boot.dhcp 
+    host foo {
+        option host-name foo;
+        hardware ethernet 00:11:22:33:44:55;
+        next-server boot.lan;
+        filename debian/wheezy/pxelinux.0;
+    }
+
+=== DHCP hosts in multiple subnets/domains ===
+A host with different interfaces in multiple domains must specify unique interface names:
+
+    [foo.dhcp]
+        [[asdf]]
+            ip              = 10.1.0.1
+            ethernet.eth1   = 00:11:22:33:44:55
+
+    [bar.dhcp]
+        [[asdf]]
+            ip              = 10.2.0.1
+            ethernet.eth2   = 55:44:33:22:11:00
+
+    $ bin/pvl.hosts-dhcp etc/hosts/dhcp2 
+    host asdf-eth1 {
+        option host-name asdf;
+        hardware ethernet 00:11:22:33:44:55;
+        fixed-address 10.1.0.1;
+    }
+
+    host asdf-eth2 {
+        option host-name asdf;
+        hardware ethernet 55:44:33:22:11:00;
+        fixed-address 10.2.0.1;
+    }
+
+= `update` =
+A script to drive the *pvl.hosts* tools for maintaing a set of zone/host files for a DNS/DHCP server.
+
+== Source host files ==
+
+Creating a tree of symlinks for managing split zonefile domains can be useful:
+
+    $ tree etc/zones/
+    etc/zones/
+    ├── forward
+    │   └── test
+    │       ├── asdf.test -> ../../../hosts/asdf.test
+    │       └── test -> ../../../hosts/test
+    └── reverse
+        └── 192.0.2
+            ├── asdf.test -> ../../../hosts/asdf.test
+            └── test -> ../../../hosts/test
+
+Given a structure like above, the `pvl.hosts-forward` can generate a single forward zone containing all sub-domains:
+
+    $ bin/pvl.hosts-forward --hosts-include etc/hosts/ etc/zones/forward/test/
+    foo                               A     192.0.2.1
+    bar                               A     192.0.2.2
+    quux.asdf                         A     192.0.2.5
+
+Note that the directory name is treated separately as a zone origin; the file names within the domain are still treated as a flat namespace independent of the directory name (which is different than *pvl.hosts* would behave for `include = etc/zones/forward/test/`).
+
+The same trick also works for `pvl.hosts-reverse`:
+
+    $ bin/pvl.hosts-reverse --hosts-include etc/hosts/ etc/zones/reverse/192.0.2/
+    1                                 PTR   foo.test.
+    2                                 PTR   bar.test.
+    5                                 PTR   quux.asdf.test.
+
+== Usage ==
+
+=== `bin/update` ===
+*update* reads host/zone file sources from `etc/`, and generates zonefiles/dhcp configs under `var/`.
+
+`update` will also shows and commits changes to `etc/` in any supported version-control system, and use commit timestamps for stable zone serials.
+
+    -d DIR
+        Do data operations under given dir-root, as opposed to CWD.
+
+    -q
+        Quiet. No log messages except errors.
+
+    -vDV
+        Increasing logging verbosity.
+
+    -p
+        Show diffs for changed output on stdout.
+
+    -F
+        Force-update output files, even if newer than input files.
+
+    -S
+        Do not generate new serials for zones.
 
     -d DIR
         Do data operations under given dir-root, as opposed to CWD.
@@ -40,82 +274,18 @@
     -m MSG
         Commit message for source changes; optional
 
-bin/update-serial:
-    Increment DNS SOA record serials in the given .serial files.
-
-    Uses a YYYYMMDDXX format, but supports XX overflow.
-
-bin/process-zone:
-    Read zonefile containing records, and generate any of:
-
-    --check-hosts:
-        Check for duplicate host names/IPs.
-
-    --forward-zone:
-        Generate additional TXT/MX records to supplement A/CNAME records.
-
-    --reverse-zone=NET
-        Generate PTR records for all matching A records.
-
-    --meta-zone:
-        Generate additional TXT records from zonefile metadata, read from:
-
-            hg annotate -q --date | ./bin/process-zone --input-line-date ...
-
-bin/expand-zone:
-    Expand template vars in a zone textfile; does not parse records, just passes through lines.
-
-    Used to substitute e.g. `--serial .../foo.serial` values into SOA '{serial}' fields.
-
-bin/update:
-    Runs update-serial/process-zone/expand-zone to keep various generated zones/views up-to-date with respect to
-    source files under settings/.
-
-    Also supports hg diff/commit/annotate integration with settings.
-
-    Acts as our configuration file, determining the data/zones layout below.
-
-settings/:
-    Input files, fed through update to generate files under zones/
+== Output structure ==
+Generated file structure.
 
-    *.zone:
-        Zone header, passed through process-zone with `--serial *.serial` and any appropriate `--expand view=...`.
-
-        May include a view-based $INCLUDE to include different zone data for different views.
-
-    *.zone.*:
-        Include zonefiles, $INCLUDE'd from *.zone
-
-    *.txt:
-        Hosts zone data, used to generate forwards/reverse -hosts zones
-
-var/
-    Generated files.
-
-    zones/:
-        Generated zonefiles, loaded by bind.
-
-        common/*
-            Common zone files shared across views.
+=== `var/dhcp/` ===
+Generated dhcpd.conf fragments, loaded by dhcpd.
 
-        hosts/*:$view
-            View-variant hosts zones generated from settings/*.txt
-
-        hosts/*
-            Host zones generated from settings/*.txt, may be used in some views but not others.
-
-        includes/*:$view
-            View-specific zone includes used from view/*.
+=== `var/zones/` ===
+Generated zonefiles, loaded by bind.
 
-        includes/*.*
-            Zone includes used from view/*.
-
-        $view/*
-            Zone data for given zone/domain in given view
+= Experimental features = 
 
-        $view/* -> ...:
-            Symlinked generic-zone data for some specific zone; either to common/* or $view/*.
+Features that are still under development
 
-    serials/*.serial
-        Zone serial numbers for corresponding zones/*/*.zone
-
+* DHCP host status tracking from syslog/dhcpd.leases into a database 
+* SNMP network topology discovery
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.SNMP	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,17 @@
+# Compiling mibs for pysnmp:
+    ./opt/bin/build-pysnmp-mib -o usr/mibs/HP-ENTITY-POWER-MIB.py tmp/hp-mibs/hpEntityPower.mib
+
+# Running with pysnmp mibs:
+
+    PYSNMP_MIB_DIRS=usr/mibs/ .../pvl.hosts-snmp ...
+
+# Switch MIBs
+## Procurve 2848:
+
+            SNMPv2-SMI::mib-2.16.1      RMON-MIB
+            SNMPv2-SMI::mib-2.16.9      RMON-MIB
+            SNMPv2-SMI::mib-2.16.22     SMON-MIB
+            SNMPv2-SMI::mib-2.17        BRIDGE-MIB  
+            SNMPv2-SMI::mib-2.26        MAU-MIBA
+            SNMPv2-SMI::mib-2.47        ENTITY-MIB
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.dhcp-conf	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,130 @@
+#!/usr/bin/env python
+
+"""
+    Process dhcpd configs.
+
+    Takes a conf file as input, and gives a conf file as output.
+"""
+
+import pvl.args
+import pvl.dhcp.config
+
+import os.path
+import optparse
+import logging; log = logging.getLogger('pvl.dhcp-conf')
+
+def apply_input (options, conf) :
+    """
+        Parse (items, blocks) from given dhcp.conf path.
+    """
+
+    file = pvl.args.apply_file(conf, 'r')
+    return pvl.dhcp.config.DHCPConfigParser.load(file)
+
+QUOTE_ITEMS = set((
+    'filename',
+))
+
+def process_dhcp_items (options, block, items) :
+    """
+        Yield items for output from given input items
+    """
+
+    for item in items :
+        name, args = item[0], item[1:]
+
+        log.debug("%s: %s: %s", block, name, args)
+
+        if name == 'include' :
+            include, = args
+            
+            if options.include_path :
+                include = os.path.join(options.include_path, include)
+                log.info("include: %s", include)
+
+            yield 'include', '"{include}"'.format(include=include)
+
+        elif name in QUOTE_ITEMS :
+            yield name, ' '.join('"{arg}"'.format(arg=arg) for arg in args)
+
+        else :
+            yield item
+
+def process_dhcp_block (options, block, items, blocks) :
+    """
+        Yield block for output for given input block.
+    """
+
+    log.debug("%s -> %s %s", block, items, blocks)
+
+    items = list(process_dhcp_items(options, block, items))
+    blocks = [process_dhcp_block(options, subblock, subitems, subblocks) for subblock, subitems, subblocks in blocks]
+
+    log.debug("%s <- %s %s", block, items, blocks)
+    
+    return block, items, blocks
+
+def process_dhcp_conf (options, conf) :
+    """
+        Yield (items, blocks) for output for given input (items, blocks).
+    """
+    items, blocks = conf
+    
+    log.debug("-> %s %s", items, blocks)
+
+    _, items, blocks = process_dhcp_block(options, None, items, blocks)
+    
+    log.debug("<- %s %s", items, blocks)
+    
+    return items, blocks
+
+def process_output (options, items, blocks) :
+    """
+        Generate output lines from given (items, blocks).
+    """
+
+    for item in items :
+        yield '\t'.join(item) + ';'
+
+    for block, subitems, subblocks in blocks :
+        yield ' '.join(block) + ' {'
+        for line in process_output(options, subitems, subblocks) :
+            yield '\t' + line
+        yield '}'
+
+def apply_output (options, conf) :
+    """
+        Write output line for given (items, blocks) to --output-conf.
+    """
+
+    file = pvl.args.apply_file(options.output_conf, 'w')
+
+    items, blocks = conf
+
+    for line in process_output(options, items, blocks) :
+        print >>file, line
+
+def main (argv) :
+    parser = optparse.OptionParser(__doc__)
+    parser.add_option_group(pvl.args.parser(parser))
+
+    parser.add_option('--output-conf',          metavar='FILE',
+            help="Output conf to file; default stdout")
+    parser.add_option('--include-path',         metavar='PATH',
+            help="Adjust includes to use given path prefix")
+
+    options, args = parser.parse_args(argv[1:])
+    pvl.args.apply(options)
+
+    for conf in args :
+        # input
+        conf = apply_input(options, conf)
+
+        # process
+        conf = process_dhcp_conf(options, conf)
+        
+        # output
+        apply_output(options, conf)
+
+if __name__ == '__main__':
+    pvl.args.main(main)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.dhcp-leases	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,116 @@
+#!/usr/bin/env python
+
+"""
+    Monitor dhcpd leases -> database.
+"""
+
+__version__ = '0.0'
+
+import pvl.args
+import pvl.syslog.args
+
+import pvl.verkko.db as db
+import pvl.dhcp.leases
+
+import logging, optparse
+
+log = logging.getLogger('main')
+
+def parse_options (argv) :
+    """
+        Parse command-line arguments.
+    """
+
+    prog = argv[0]
+
+    parser = optparse.OptionParser(
+            prog        = prog,
+            usage       = '%prog: [options]',
+            version     = __version__,
+
+            # module docstring
+            description = __doc__,
+    )
+    
+    # options
+    parser.add_option_group(pvl.args.parser(parser))
+
+    ## leases
+    parser.add_option('--leases',               metavar='FILE', default='/var/lib/dhcp/dhcpd.leases',
+            help="Synchronize dhcpd leases from given file")
+
+    parser.add_option('--leases-tail',          type='float', metavar='POLL',
+            help="Continuously poll leases file with given timeout")
+
+    ## database
+    parser.add_option('--database',             metavar='URI',
+            help="Track hosts in given database")
+
+    parser.add_option('--create',               action='store_true',
+            help="Initialize database")
+
+    # defaults
+    parser.set_defaults(
+
+    )
+    
+    # parse
+    options, args = parser.parse_args(argv[1:])
+    
+    # apply
+    pvl.args.apply(options, prog)
+
+    if not options.database :
+        parser.error("Missing required option: --database")
+
+    return options, args
+
+import time 
+
+def mainloop (leases, db, poll) :
+    while True :
+        log.debug("tick")
+
+        for lease in leases :
+            db(lease)
+        
+        log.debug("tock")
+
+        if poll :
+            time.sleep(poll)
+        else :
+            return 0
+
+def main (argv) :
+    options, args = parse_options(argv)
+
+    # db
+    if not options.database :
+        log.error("No database given")
+        return 1
+
+    log.info("Open up database: %s", options.database)
+    db = pvl.verkko.db.Database(options.database)
+    leases_db = pvl.dhcp.leases.DHCPLeasesDatabase(db)
+   
+    if options.create :
+        leases_db.create()
+
+    # leases
+    log.info("Open up DHCP leases...")
+    leases = pvl.dhcp.leases.DHCPLeases(options.leases)
+
+    # polling interval?
+    if options.leases_tail :
+        poll = options.leases_tail
+    else :
+        poll = None
+
+    # mainloop
+    log.info("Enter mainloop...")
+    return mainloop(leases, leases_db, poll)
+
+if __name__ == '__main__':
+    import sys
+
+    sys.exit(main(sys.argv))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.dhcp-syslog	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,109 @@
+#!/usr/bin/env python
+
+"""
+    Monitor DHCP use.
+"""
+
+__version__ = '0.1'
+
+import pvl.args
+import pvl.syslog.args
+
+import pvl.verkko.db as db
+import pvl.dhcp.syslog
+import pvl.dhcp.hosts
+
+import logging, optparse
+
+log = logging.getLogger('main')
+
+# name of process in syslog
+DHCP_SYSLOG_PROG = 'dhcpd'
+
+def parse_options (argv) :
+    """
+        Parse command-line arguments.
+    """
+
+    prog = argv[0]
+
+    parser = optparse.OptionParser(
+            prog        = prog,
+            usage       = '%prog: [options]',
+            version     = __version__,
+
+            # module docstring
+            description = __doc__,
+    )
+    
+    # options
+    parser.add_option_group(pvl.args.parser(parser))
+
+    ## syslog
+    parser.add_option_group(pvl.syslog.args.parser(parser, prog=DHCP_SYSLOG_PROG))
+
+    ## XXX: networks
+    parser.add_option('--network',              metavar='NET', action='append',
+            help="Filter leases by network prefix as plugin instance")
+
+    parser.add_option('--gateway',              metavar='GW/IFACE', action='append',
+            help="Filter messages by gateway/interface as plugin instance")
+
+    ## hosts
+    parser.add_option('--database',             metavar='URI',
+            help="Track hosts in given database")
+
+    parser.add_option('--create',               action='store_true',
+            help="Initialize database")
+
+    # defaults
+    parser.set_defaults(
+
+    )
+    
+    # parse
+    options, args = parser.parse_args(argv[1:])
+    
+    # apply
+    pvl.args.apply(options, prog)
+
+    if not options.database :
+        parser.error("Missing required option: --database")
+
+    return options, args
+
+def main (argv) :
+    options, args = parse_options(argv)
+
+    # db
+    if not options.database :
+        log.error("No database given")
+        return 1
+
+    log.info("Open up database: %s", options.database)
+    db = pvl.verkko.db.Database(options.database)
+    hosts_db = pvl.dhcp.hosts.DHCPHostsDatabase(db)
+
+    if options.create :
+        hosts_db.create()
+  
+    # syslog
+    log.info("Open up syslog...")
+    syslog = pvl.syslog.args.apply(options)
+    parser = pvl.dhcp.syslog.DHCPSyslogParser()
+
+    log.info("Enter mainloop...")
+    for source in syslog.main() :
+        # parse dhcp messages from syslog
+        for host in parser(source) :
+            log.debug("%s: %s", source, host)
+
+            hosts_db(host)
+    
+    # done
+    return 0
+
+if __name__ == '__main__':
+    import sys
+
+    sys.exit(main(sys.argv))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.dns-serial	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+
+"""
+    Update zone serials.
+"""
+
+from pvl.dns import __version__
+import pvl.dns.serial
+
+import os.path
+
+import pvl.args
+import optparse
+import logging; log = logging.getLogger('main')
+
+def parse_options (argv) :
+    """
+        Parse command-line arguments.
+    """
+
+    prog = argv[0]
+
+    parser = optparse.OptionParser(
+            prog        = prog,
+            usage       = '%prog: [options] <serial-path> ...',
+            version     = __version__,
+
+            # module docstring
+            description = __doc__,
+    )
+    
+    # options
+    parser.add_option_group(pvl.args.parser(parser))
+
+    parser.add_option('-n', '--noop',       action='store_true',
+            help="Do not actually update serial")
+
+    # defaults
+    parser.set_defaults(
+
+    )
+    
+    # parse
+    options, args = parser.parse_args(argv[1:])
+    
+    # apply
+    pvl.args.apply(options, prog)
+
+    return options, args
+
+def process_serial (options, path) :
+    """
+        Read old serial, generate new one, and update file.
+    """
+
+    # read
+    if os.path.exists(path) :
+        serial = open(path).read().strip()
+        log.debug("%s: current: %s", path, serial)
+
+    else :
+        log.warn("%s: Given .serial does not yet exist", path)
+        serial = None
+
+    # update
+    serial = pvl.dns.serial.update_serial(serial)
+    
+    if options.noop :
+        log.warn("%s: %s", path, serial)
+    else :
+        # write
+        open(path, 'w').write(serial + '\n')
+
+    return serial
+
+def main (argv) :
+    options, args = parse_options(argv)
+
+    # serial files to update
+    for path in args :
+        process_serial(options, path)
+    
+    return 0
+
+if __name__ == '__main__':
+    import sys
+
+    sys.exit(main(sys.argv))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.dns-zone	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,358 @@
+#!/usr/bin/env python
+
+"""
+    Process bind zonefiles.
+
+    Takes a zonefile as input, and gives a zonefile as output.
+"""
+
+import pvl.args
+import pvl.dns.zone
+from pvl.dns import __version__
+from pvl.dns.zone import ZoneRecord, reverse_ipv4, reverse_ipv6, fqdn
+
+import optparse
+import os.path
+import logging; log = logging.getLogger('main')
+
+def parse_options (argv) :
+    """
+        Parse command-line arguments.
+    """
+
+    prog = argv[0]
+
+    parser = optparse.OptionParser(
+            prog        = prog,
+            usage       = '%prog: [options]',
+            version     = __version__,
+
+            # module docstring
+            description = __doc__,
+    )
+
+    # logging
+    parser.add_option_group(pvl.args.parser(parser))
+
+    # input/output
+    parser.add_option('--input-charset',        metavar='CHARSET',  default='utf-8', 
+            help="Encoding used for input files")
+
+    parser.add_option('-o', '--output',         metavar='FILE',     default=None,
+            help="Write to output file; default stdout")
+
+    parser.add_option('--output-charset',       metavar='CHARSET',  default='utf-8', 
+            help="Encoding used for output files")
+
+    # check stage
+    parser.add_option('--check-hosts',          action='store_true',
+            help="Check that host/IPs are unique. Use --quiet to silence warnings, and test exit status")
+
+    parser.add_option('--check-exempt',         metavar='HOST', action='append',
+            help="Allow given names to have multiple records")
+
+    # meta stage
+    parser.add_option('--meta-zone',            action='store_true',
+            help="Generate host metadata zone; requires --input-line-date")
+
+    parser.add_option('--meta-ignore',          metavar='HOST', action='append',
+            help="Ignore given hostnames in metadata output")
+
+    parser.add_option('--input-line-date',      action='store_true',
+            help="Parse timestamp prefix from each input line (e.g. `hg blame | ...`)")
+
+    # forward stage
+    parser.add_option('--forward-zone',         action='store_true', 
+            help="Generate forward zone")
+
+    parser.add_option('--forward-txt',          action='store_true',
+            help="Generate TXT records for forward zone")
+
+    parser.add_option('--forward-mx',           metavar='MX',
+            help="Generate MX records for forward zone")
+
+    # reverse stage
+    parser.add_option('--reverse-domain',       metavar='DOMAIN',
+            help="Domain to use for hosts in reverse zone")
+
+    parser.add_option('--reverse-zone',         metavar='NET',
+            help="Generate forward zone for given subnet (x.z.y | a:b:c:d)")
+
+    # other
+    parser.add_option('--serial',               metavar='YYMMDDXX',
+            help="Set serial for SOA record")
+
+    parser.add_option('--include-path',         metavar='PATH',
+            help="Rewrite includes to given absolute path")
+
+    # defaults
+    parser.set_defaults(
+        # XXX: combine
+        check_exempt        = [],
+        meta_ignore         = [],
+    )
+    
+    # parse
+    options, args = parser.parse_args(argv[1:])
+
+    # apply
+    pvl.args.apply(options, prog)
+
+    return options, args
+
+def apply_zone_input (options, args) :
+    """
+        Yield ZoneLine, ZoneRecord pairs from files.
+    """
+
+    for file in pvl.args.apply_files(args, 'r', options.input_charset) :
+        log.info("Reading zone: %s", file)
+
+        for line, record in pvl.dns.zone.ZoneLine.load(file, 
+                line_timestamp_prefix   = options.input_line_date,
+        ) :
+            yield line, record
+
+# TODO: --check-types to limit this to A/AAAA/CNAME etc
+def check_zone_hosts (zone, whitelist=None, whitelist_types=set(['TXT'])) :
+    """
+        Parse host/IP pairs from the zone, and verify that they are unique.
+
+        As an exception, names listed in the given whitelist may have multiple IPs.
+    """
+
+    by_name = {}
+    by_ip = {}
+
+    fail = None
+
+    last_name = None
+
+    for l, r in zone :
+        if r :
+            name = r.name or last_name
+
+            name = (r.origin, name)
+
+            # name
+            if r.type not in whitelist_types :
+                if name not in by_name :
+                    by_name[name] = r
+
+                elif r.name in whitelist :
+                    log.debug("Duplicate whitelist entry: %s", r)
+
+                else :
+                    # fail!
+                    log.warn("%s: Duplicate name: %s <-> %s", r.line, r, by_name[name])
+                    fail = True
+
+            # ip
+            if r.type == 'A' :
+                ip, = r.data
+
+                if ip not in by_ip :
+                    by_ip[ip] = r
+
+                else :
+                    # fail!
+                    log.warn("%s: Duplicate IP: %s <-> %s", r.line, r, by_ip[ip])
+                    fail = True
+    
+    if fail :
+        log.error("Check failed, see warnings")
+        sys.exit(2)
+
+    yield l, r
+
+def process_zone_serial (zone, serial) :
+    """
+        Update the serial in the SOA record.
+    """
+
+    for line, rr in zone :
+        if rr and rr.type == 'SOA' :
+            # XXX: as SOA record..
+            try :
+                soa = pvl.dns.zone.SOA.parse(line)
+            except TypeError as error :
+                log.exception("%s: unable to parse SOA: %s", rr.name, rr)
+                sys.exit(2)
+
+            yield line, pvl.dns.zone.SOA(
+                    soa.master, soa.contact,
+                    serial, soa.refresh, soa.retry, soa.expire, soa.nxttl
+            )
+        else :
+            yield line, rr
+
+def process_zone_forwards (zone, txt=False, mx=False) :
+    """
+        Process zone data -> forward zone data.
+    """
+
+    for line, r in zone :
+        yield line, r
+
+        if r and r.type == 'A' :
+            if txt :
+                # comment?
+                comment = r.line.comment
+
+                if comment :
+                    yield line, ZoneRecord.TXT(None, comment, ttl=r.ttl)
+
+           
+            # XXX: RP, do we need it?
+
+            if mx :
+                # XXX: is this even a good idea?
+                yield line, ZoneRecord.MX(None, 10, mx, ttl=r.ttl)
+
+def process_zone_meta (zone, ignore=None) :
+    """
+        Process zone metadata -> output.
+    """
+    
+    TIMESTAMP_FORMAT = '%Y/%m/%d'
+    
+    for line, r in zone :
+        if ignore and r.name in ignore :
+            # skip
+            log.debug("Ignore record: %s", r)
+            continue
+
+        # for hosts..
+        if r.type == 'A' :
+            # timestamp?
+            timestamp = r.line.timestamp
+
+            if timestamp :
+                yield line, ZoneRecord.TXT(r.name, timestamp.strftime(TIMESTAMP_FORMAT), ttl=r.ttl)
+     
+def process_zone_reverse (zone, origin, domain) :
+    """
+        Process zone data -> reverse zone data.
+    """
+
+    for line, r in zone :
+        if r and r.type == 'A' :
+            ip, = r.data
+            ptr = reverse_ipv4(ip)
+
+        elif r and r.type == 'AAAA' :
+            ip, = r.data
+            ptr = reverse_ipv6(ip)
+            
+        else :
+            yield line, r
+            continue
+
+        # verify
+        if zone and ptr.endswith(origin) :
+            ptr = ptr[:-(len(origin) + 1)]
+
+        else :
+            log.warning("Reverse does not match zone origin, skipping: (%s) -> %s <-> %s", ip, ptr, origin)
+            continue
+
+        # domain to use
+        host_domain = r.origin or domain
+        host_fqdn = fqdn(name, host_domain)
+
+        yield line, ZoneRecord.PTR(ptr, host_fqdn)
+
+def process_zone_includes (options, zone, path) :
+    """
+        Rewrite include paths in zones.
+    """
+
+    for line, rr in zone :
+        if line.parts[0] == '$INCLUDE' :
+            _, include = line.parts
+
+            yield pvl.dns.zone.ZoneLine(
+                    line.file,
+                    line.lineno, 
+                    line.line,
+                    line.indent,
+                    ['$INCLUDE', '"{path}"'.format(path=os.path.join(path, include))],
+            ), rr
+        else :
+            yield line, rr
+
+
+def apply_zone_output (options, zone) :
+    """
+        Write out the resulting zonefile.
+    """
+
+    file = pvl.args.apply_file(options.output, 'w', options.output_charset)
+
+    for line, r in zone :
+        if r :
+            file.write(unicode(r))
+        else :
+            file.write(unicode(line))
+        file.write('\n')
+
+def main (argv) :
+    options, args = parse_options(argv)
+    
+    # input
+    zone = apply_zone_input(options, args)
+   
+    if options.check_hosts :
+        whitelist = set(options.check_exempt)
+
+        log.info("Checking hosts: whitelist=%r", whitelist)
+
+        zone = list(check_zone_hosts(zone, whitelist=whitelist))
+
+    if options.serial :
+        log.info("Set zone serial: %s", options.serial)
+
+        zone = list(process_zone_serial(zone, serial=options.serial))
+
+    if options.forward_zone :
+        log.info("Generate forward zone...")
+
+        zone = list(process_zone_forwards(zone, txt=options.forward_txt, mx=options.forward_mx))
+
+    if options.meta_zone :
+        log.info("Generate metadata zone...")
+
+        if not options.input_line_date :
+            log.error("--meta-zone requires --input-line-date")
+            return 1
+
+        zone = list(process_zone_meta(zone, ignore=set(options.meta_ignore)))
+
+    if options.reverse_zone :
+        if ':' in options.reverse_zone :
+            # IPv6
+            origin = reverse_ipv6(options.reverse_zone)
+
+        else :
+            # IPv4
+            origin = reverse_ipv4(options.reverse_zone)
+
+        domain = options.reverse_domain
+
+        if not domain :
+            log.error("--reverse-zone requires --reverse-domain")
+            return 1
+
+        zone = list(process_zone_reverse(zone, origin=origin, domain=domain))
+    
+    if options.include_path :
+        zone = list(process_zone_includes(options, zone, options.include_path))
+
+    # output
+    apply_zone_output(options, zone)
+
+    return 0
+
+if __name__ == '__main__':
+    import sys
+    sys.exit(main(sys.argv))
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.hosts-dhcp	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,32 @@
+#!/usr/bin/env python
+
+import logging; log = logging.getLogger('pvl.hosts-dhcp')
+import optparse
+import pvl.args
+import pvl.hosts
+import pvl.hosts.dhcp
+
+def main (argv):
+    """
+        Generate DHCP host configs from host definitions.
+    """
+
+    parser = optparse.OptionParser(main.__doc__)
+    parser.add_option_group(pvl.args.parser(parser))
+    parser.add_option_group(pvl.hosts.config.optparser(parser))
+
+    # input
+    options, args = pvl.args.parse(parser, argv)
+    
+    hosts = pvl.hosts.apply(options, args)
+
+    # process
+    try:
+        for line in pvl.hosts.dhcp.apply_hosts_dhcp(hosts):
+            print line
+    except pvl.hosts.HostError as error:
+        log.error("%s", error)
+        return 3
+
+if __name__ == '__main__':
+    pvl.args.main(main)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.hosts-forward	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,61 @@
+#!/usr/bin/env python
+
+import logging; log = logging.getLogger('pvl.hosts-forward')
+import optparse 
+import os.path
+import pvl.args
+import pvl.hosts
+import pvl.hosts.zone
+
+def main (argv):
+    """
+        Generate bind zonefiles from host definitions.
+    """
+
+    parser = optparse.OptionParser(main.__doc__)
+    parser.add_option_group(pvl.args.parser(parser))
+    parser.add_option_group(pvl.hosts.config.optparser(parser))
+
+    parser.add_option('--zone-origin',          metavar='DOMAIN',
+            help="Generated records for given zone origin")
+
+    parser.add_option('--root-zone',            action='store_const', dest='zone_origin', const='.',
+            help="Generate root zone")
+    
+    parser.add_option('--add-origin',           action='store_true',
+            help="Include $ORIGIN directive in zone")
+
+    # input
+    options, args = pvl.args.parse(parser, argv)
+ 
+    if options.zone_origin:
+        origin = options.zone_origin
+        
+        log.info("using given zone origin: %s", origin)
+   
+    elif len(args) == 1:
+        path, = args
+        origin = os.path.basename(path.rstrip('/'))
+
+        log.info("using given hostpath for zone origin: %s", origin)
+
+    else:
+        log.fatal("--zone-origin is required if passing multiple hostfiles")
+        return 1
+    
+    hosts = pvl.hosts.apply(options, args)
+
+    # process
+    try:
+        for rr in pvl.hosts.zone.apply_hosts_forward(hosts, origin,
+                add_origin  = options.add_origin,
+        ):
+            print unicode(rr)
+    except pvl.hosts.HostError as error:
+        log.error("%s", error)
+        return 3
+
+    return 0
+
+if __name__ == '__main__':
+    pvl.args.main(main)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.hosts-graph	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,740 @@
+#!/usr/bin/env python
+
+"""
+    Requirements:
+        pydot
+"""
+
+import pvl.args
+import pvl.hosts
+from pvl.invoke import merge
+
+import collections
+import logging; log = logging.getLogger('pvl.hosts-graph')
+import optparse
+
+class ParseError (Exception) :
+    def __init__ (self, file, line, msg) :
+        self.file = file
+        self.line = line
+        self.msg = msg
+  
+    def __str__ (self) :
+        return "{self.file}:{self.line}: {self.msg}".format(self=self)
+
+def _parse_snmp_part (part) :
+    if part.isdigit() :
+        return int(part)
+    else :
+        return part
+
+def _parse_snmp_attr (line) :
+    for part in line.split() :
+        yield _parse_snmp_part(part)
+
+def _parse_snmp_value (line) :
+    if '\t' in line :
+        key, value = line.split('\t', 1)
+
+        return { _parse_snmp_part(key): _parse_snmp_part(value) }
+
+    else :
+        return set((_parse_snmp_part(line), ))
+    
+def _load_snmp_data (options, file) :
+    """
+        Load a data dict generated by pvl.hosts-snmp from a file.
+
+        Yields (host, attr, value)
+    """
+
+    host = None
+    attr = None
+    value = None
+    
+    for idx, line in enumerate(file, 1) :
+        indent = 0
+
+        while line.startswith('\t') :
+            indent += 1
+            line = line[1:]
+
+        line = line.lstrip('\t').rstrip('\n')
+
+        if indent == 0 :
+            host = line
+            attr = None
+            value = None
+
+        elif indent == 1 :
+            attr = tuple(_parse_snmp_attr(line))
+            value = None
+
+            yield host, attr, None
+
+        elif indent == 2 :
+            if not attr :
+                raise ParseError(file, line, "[%s] %s: value outside of attr" % (host, attr))
+            
+            value = _parse_snmp_value(line)
+
+            yield host, attr, value
+
+def load_snmp_data (options, file, hosts) :
+    """
+        Load snmp data as dict, from given file path, or stdin.
+    """
+
+    if file :
+        file = open(file)
+    else :
+        file = sys.stdin
+
+    root = { }
+    
+    hosts_by_namedomain = dict(
+        (
+            '{host}@{domain}'.format(host=host, domain=host.domain), host
+        ) for host in hosts
+    )
+
+    for host_domain, attr, value in _load_snmp_data(options, file) :
+        host = hosts_by_namedomain.get(host_domain)
+        
+        if value :
+            log.debug("[%s] %s: %s", host, ' '.join(str(a) for a in attr), value)
+        else :
+            log.debug("[%s] %s", host, ' '.join(str(a) for a in attr),)
+
+        item = root.setdefault(host, { })
+        
+        for a in attr[:-1] :
+            item = item.setdefault(a, {})
+
+        a = attr[-1]
+        
+        if value is None :
+            pass
+
+        elif isinstance(value, set) :
+            item.setdefault(a, set()).update(value)
+
+        elif isinstance(value, dict) :
+            item.setdefault(a, dict()).update(value)
+
+        else :
+            item[a] = value
+            
+    return root
+
+def host_vlans (host, host_vlans) :
+    """
+        {vlan: { tagged/untagged: [port] } } -> (port, (untag, [tag])).
+    """
+
+    ports = set()
+    vlans_untagged = { }
+    vlans_tagged = collections.defaultdict(set)
+
+    for vlan, vlan_attrs in host_vlans.iteritems() :
+        for port in vlan_attrs.get('tagged', ()) :
+            ports.add(port)
+            vlans_tagged[port].add(vlan)
+        
+        for port in vlan_attrs.get('untagged', ()) :
+            ports.add(port)
+            vlans_untagged[port] = vlan
+    
+    for port in ports :
+        untag = vlans_untagged.get(port)
+        tagged = vlans_tagged.get(port, ())
+
+        log.debug("%s: %s: untag=%s tag=%s", host, port, untag, tagged)
+        
+        yield port, (untag, tagged)
+
+def build_graph (options, snmp, hosts) :
+    """
+        Combine given snmp data and { host: Host } into
+            { node: label }
+            { (remote, remote_port, local_port, local): (local_untag, tagged, remote_untag) }
+    """
+
+    nodes = { } # host: label
+    links = { } # (local, local_port, remote_port, remote_host): (local_untag, tagged, remote_untag)
+
+    hosts_by_lldp = { } # chassis: host
+    hosts_by_ethernet = { } # ethernet: host
+    hosts_by_location = { } # (domain, location): host
+
+    nodes_port = { } # (local, int(local_port)): {remote}
+    nodes_out = { } # local: {remote}
+    nodes_in = { } # remote: {local}
+    links_out = { } # (local, remote): local_port
+    links_in = { } # (remote, local): remote_port
+    
+    # first scan: lldp hosts
+    for host, host_attrs in snmp.iteritems() :
+        nodes[host] = host.location or str(host)
+
+        if 'lldp' in host_attrs :
+            lldp_local = host_attrs['lldp']['local']
+
+            hosts_by_lldp[lldp_local['chassis']] = host
+    
+    # second scan: nodes by ethernet
+    for host in hosts :
+        for ethernet in host.ethernet.itervalues() :
+            hosts_by_ethernet[ethernet] = host
+
+        if host.location and host.location_domain:
+            hosts_by_location[(host.location_domain, host.location)] = host
+        elif host.location:
+            hosts_by_location[(host.domain, host.location)] = host
+
+    # first graph: lldp remotes
+    for host, host_attrs in snmp.iteritems() :
+        local_node = host
+
+        if 'vlan' in host_attrs :
+            vlans = dict(host_vlans(host, host_attrs['vlan']))
+        else :
+            vlans = None
+
+        if 'lldp' in host_attrs :
+            lldp = host_attrs['lldp']
+
+            local_lldp = lldp['local']['chassis']
+            
+            for port, port_attrs in lldp.get('port', { }).iteritems() :
+                local_port = port_attrs['local']['port']
+
+                for remote_lldp, remote_attrs in port_attrs['remote'].iteritems() :
+                    # determine remote node
+                    remote_label = remote_attrs['sys_name']
+
+                    if remote_lldp in hosts_by_lldp :
+                        remote_node = remote_host = hosts_by_lldp[remote_lldp]
+
+                    elif remote_lldp in hosts_by_ethernet :
+                        remote_node = remote_host = hosts_by_ethernet[remote_lldp]
+
+                        if remote_host.location :
+                            remote_label = remote_host.location
+
+                        log.info("%s:%s: guessing lldp host %s -> %s (%s)", host, port, remote_lldp, remote_host, remote_label)
+
+                    elif options.graph_lldp_unknown :
+                        log.warning("%s:%s: unknown lldp remote %s (%s)", host, port, remote_lldp, remote_label)
+                        
+                        # by chassis id
+                        remote_node = remote_lldp
+                        remote_host = None
+
+                    else :
+                        log.info("%s:%s: unknown lldp remote %s (%s)", host, port, remote_lldp, remote_label)
+                        
+                        remote_node = remote_host = None
+
+                    
+                    if not remote_node :
+                        continue
+
+                    # ensure remote node
+                    if remote_node not in nodes :
+                        log.debug("%s:%s: lazy-add remote %s (%s)", host, port, remote_node, remote_label)
+
+                        nodes[remote_node] = remote_label
+                    
+                    # local vlans
+                    if vlans :
+                        port_vlans = vlans.get(port)
+                    else :
+                        port_vlans = None
+
+                    if port_vlans :
+                        local_untag, local_tagged = port_vlans
+
+                    # directional mapping
+                    links_out[(local_node, remote_node)] = local_port
+                    nodes_port.setdefault((local_node, port), set()).add(remote_node)
+                    nodes_out.setdefault(local_node, set()).add(remote_node)
+                    nodes_in.setdefault(remote_node, set()).add(local_node)
+                    
+                    # bidirectional mappings
+                    remote_port = remote_attrs['port']
+
+                    links_in[(remote_node, local_node)] = remote_port
+
+                    forward = (local_node, local_port, remote_port, remote_node)
+                    reverse = (remote_node, remote_port, local_port, local_node)
+
+                    if reverse not in links :
+                        links[forward] = (local_untag, local_tagged, None)
+                    else :
+                        remote_untag, remote_tagged, _ = links[reverse]
+
+                        # merge
+                        if remote_untag != local_untag :
+                            log.warning("%s:%s untag %s <=> %s untag %s:%s",
+                                    host, local_port, local_untag,
+                                    remote_untag, remote_node, remote_port
+                            )
+
+                        if remote_tagged != local_tagged :
+                            log.warning("%s:%s tagged %s <-> %s tagged %s:%s",
+                                    host, local_port, ':'.join(str(x) for x in sorted(local_tagged)),
+                                    ':'.join(str(x) for x in sorted(remote_tagged)), remote_node, remote_port
+                            )
+
+                        links[reverse] = (remote_untag, remote_tagged, local_untag)
+
+    # second graph: manual ports
+    for host in hosts :
+        local_node = host
+        host_links = host.extensions.get('link')
+
+        # XXX: copy-pasta
+        if host in snmp and 'vlan' in snmp[host] :
+            vlans = dict(host_vlans(host, snmp[host]['vlan']))
+        else :
+            vlans = None
+
+        if host_links :
+            if local_node not in nodes :
+                # XXX: copypasta
+                nodes[local_node] = host.location or str(host)
+
+            for link_port, remote in host_links.iteritems() :
+                if link_port.isdigit() :
+                    port = int(link_port)
+                else :
+                    port = str(link_port)
+
+                # map remote -> remote_host
+                if '@' in remote :
+                    remote_location, remote_domain = remote.split('@', 1)
+                else :
+                    remote_location = remote
+                    remote_domain = host.domain
+
+                remote_node = remote_host = hosts_by_location.get((remote_domain, remote_location))
+
+                if not remote_host :
+                    log.warning("%s:%s: unknown remote location: %s@%s", host, port, remote_location, remote_domain)
+                    continue
+
+                remote_label = remote_host.location or str(remote_host)
+                
+                log.info("%s:%s: link -> %s@%s (%s)", host, port, remote_host, remote_host.domain, remote_label)
+
+                if remote_node not in nodes :
+                    # XXX: copypasta
+                    nodes[remote_node] = remote_label
+            
+                # local vlans
+                if vlans and port in vlans :
+                    local_untag, local_tagged = vlans[port]
+
+                    log.info("%s:%s link vlans (%s) <%s>", host, port, local_untag, ':'.join(str(tag) for tag in local_tagged))
+
+                    link_vlans = (local_untag, local_tagged, None)
+                else :
+                    # unknown
+                    link_vlans = None
+                    
+                    log.warning("%s:%s unknown vlans", host, port)
+
+                # directional links
+                local_port = links_out.get((local_node, remote_node))
+                
+                if not local_port :
+                    log.info("%s:%s: unconfirmed -> %s", host, port, remote_host)
+
+                elif local_port != port :
+                    log.warn("%s:%s: port mismatch %s -> %s", host, port, local_port, remote_host)
+
+                else :
+                    log.debug("%s:%s: confirm -> %s", host, port, remote_host)
+                
+                links_out[(local_node, remote_node)] = port
+                nodes_port.setdefault((local_node, port), set()).add(remote_node)
+                nodes_out.setdefault(local_node, set()).add(remote_node)
+                nodes_in.setdefault(remote_node, set()).add(local_node)
+
+                # update directional or missing links
+                remote_port = links_out.get((remote_node, local_node))
+                reverse_port = links_in.get((local_node, remote_node))
+
+                if reverse_port and reverse_port != port :
+                    # XXX: this can be caused by str vs int >_>
+                    log.warn("%s:%s: reverse port mismatch %s <- %s", host, port, reverse_port, remote_node)
+
+
+                if local_port and remote_port :
+                    log.debug("%s:%s link <-> %s:%s", local_node, local_port, remote_port, remote_node)
+
+                elif local_port :
+                    # we have the forward mapping already, so this doesn't add any new info
+                    log.debug("%s:%s link -> %s:%s", local_node, local_port, remote_port, remote_node)
+
+                elif remote_port and reverse_port :
+                    # we have the bidirectional mapping already, so this doesn't add any new info
+                    log.debug("%s:%s link <-> %s:%s", local_node, local_port, remote_port, remote_node)
+
+                elif remote_port :
+                    # we had the reverse mapping already, make it bidirectional
+                    local_port = port
+                    log.info("%s:%s link <- %s:%s", local_node, local_port, remote_port, remote_node)
+                    
+                    # TODO: update vlan info
+                    links[(remote_node, remote_port, local_port, local_node)] = links.pop((remote_node, remote_port, None, local_node))
+                
+                else :
+                    local_port = port
+
+                    # mapping was completely missing
+                    log.info("%s:%s link -> %s", local_node, local_port, remote_node)
+
+                    links[(local_node, local_port, None, remote_node)] = link_vlans
+
+
+    # verify non-p2p links
+    for (node, port), remotes in nodes_port.iteritems() :
+        if len(remotes) > 1 :
+            log.warning("%s:%s: multiple remotes: %s", node, port, ' '.join(str(host) for host in remotes))
+
+    if options.graph_bridge :
+        # scan hosts with bridges
+        bridge_hosts = set()
+        bridge_ports = { }
+
+        for host, host_attrs in snmp.iteritems() :
+            if 'bridge' in host_attrs or any('bridge' in vlan_attrs for vlan_attrs in host_attrs.get('vlan', { }).itervalues()) :
+                bridge_hosts.add(host)
+        
+        # third graph: bridge
+        for host, host_attrs in snmp.iteritems() :
+            local_out = nodes_out.get(host)
+
+            if not local_out :
+                log.warning("%s: no outgoing links, skipping bridge", host)
+                continue
+            
+            # scan vlan/port bridge ethers
+            bridge = { } # (port, vlan): {ethernet}
+
+            for port, ethernets in host_attrs.get('bridge', { }).iteritems() :
+                bridge[(port, None)] = ethernets
+
+            for vlan, vlan_attrs in host_attrs.get('vlan', { }).iteritems() :
+                for port, ethernets in vlan_attrs.get('bridge', { }).iteritems()  :
+                    bridge[(port, vlan)] = ethernets
+
+            for (port, vlan), ethernets in bridge.iteritems() :
+                local_node = host
+                local_port = port
+                
+                remote_nodes = nodes_port.get((local_node, local_port))
+                
+                if not remote_nodes :
+                    remote_node = None
+                elif len(remote_nodes) == 1 :
+                    remote_node, = remote_nodes
+                else :
+                    log.warning("%s:%s: ignore port with multiple remotes: %s", host, port, ' '.join(str(host) for host in remotes))
+                    continue
+
+                if remote_node :
+                    remote_in = nodes_in.get(remote_node, set())
+                else :
+                    remote_in = set()
+                
+                remote_leaf = (remote_in == set((host, )))
+                
+                # TODO: add ether node and link if remote node also has this ether on this link
+                #       also do this if all remote_in's agree that the ether is on the remote_node
+                if not remote_node :
+                    log.debug("%s:%s: no remote node", host, port)
+                
+                elif remote_leaf and (remote_node not in bridge_hosts) and len(ethernets) > 1 :
+                    # map onto non-bridge leaf node
+                    log.info("%s: <== %s:%s ", remote_node, host, port)
+
+                    # map links out of the assumed remote bridge
+                    local_node = remote_node
+                    local_port = None
+
+                else :
+                    log.debug("%s:%s/%s bridge skip -> %s", host, port, vlan, remote_node)
+                    continue
+
+                for ethernet in ethernets :
+                    # remote host
+                    if ethernet in hosts_by_ethernet :
+                        remote_node = remote_host = hosts_by_ethernet[ethernet]
+
+                        remote_label = remote_host.location or str(remote_host)
+
+                        log.debug("%s:%s/%s bridge %s = %s (%s)", host, port, vlan, ethernet, remote_host, remote_label)
+
+                    elif options.graph_bridge_unknown :
+                        log.warning("%s:%s/%s bridge unknown host %s", host, port, vlan, ethernet)
+
+                        remote_label = remote_node = ethernet
+
+                        nodes[remote_node] = remote_label
+                        
+                        remote_host = None
+
+                    else :
+                        log.info("%s:%s/%s bridge unknown host %s", host, port, vlan, ethernet)
+
+                        continue
+                
+                    # TODO: also handled multiple IP/ethers for the same host
+                    if remote_host == host and local_node != host :
+                        log.debug("%s:%s: skip remote-mapped self", host, port)
+                        continue
+
+                    if remote_node not in nodes :
+                        log.debug("%s:%s: lazy-add remote %s (%s)", host, port, remote_node, remote_label)
+
+                        nodes[remote_node] = remote_label
+                    
+                    # unknown vlans
+                    if vlan :
+                        link_vlans = (vlan, (), None)
+                    else :
+                        link_vlans = None
+
+                    # directional link
+                    links_out[(local_node, remote_node)] = local_port
+
+                    if local_port :
+                        bridge_ports.setdefault((local_node, local_port), set()).add(remote_node)
+                    
+                    # bidirectional link
+                    forward = (local_node, local_port, None, remote_node)
+
+                    # scan for reverse
+                    remote_port = links_out.get((remote_node, local_node))
+
+                    if remote_port :
+                        reverse = (remote_node, remote_port, None, local_node)
+
+                        log.info("%s:%s bridge <-> %s:%s", local_node, local_port, remote_port, remote_node)
+
+                        # fill in remote_port for bidirectional link
+                        del links[reverse]
+                        reverse = local_node, local_port, remote_port, remote_node
+                        links[reverse] = link_vlans
+
+                    else :
+                        log.info("%s:%s bridge -> %s", local_node, local_port, remote_node)
+
+                        links[forward] = link_vlans
+        
+        # verify unmanaged bridges
+        for (node, port), remotes in bridge_ports.iteritems() :
+            if len(remotes) > 1 :
+                log.warning("%s:%s: multiple bridge remotes: %s", node, port, ' '.join(str(host) for host in remotes))
+
+    return nodes, links
+
+class GraphVlans (object) :
+    """
+        Maintain vlan -> dot style/color mappings
+    """
+
+    SERIES = 'paired12'
+    NONE = 'black'
+
+    def __init__ (self, vlans=None) :
+        if vlans :
+            self.vlans = dict(vlans)
+        else :
+            self.vlans = { }
+    
+    def color (self, vlan) :
+        if vlan in self.vlans :
+            return self.vlans[vlan]
+        
+        # alloc
+        color = '/{series}/{index}'.format(series=self.SERIES, index=len(self.vlans) + 1)
+
+        self.vlans[vlan] = color
+
+        return color
+
+def dot_quote (value) :
+    """
+        Quote a dot value.
+    """
+
+    return '"{value}"'.format(value=value)
+
+def dot (*line, **attrs) :
+    """
+        Build dot-syntax:
+            *line {
+                *line [**attrs];
+            }
+    """
+
+    if line and attrs :
+        return ''.join(('\t', ' '.join(str(x) for x in line), ' [',
+            ', '.join('{name}="{value}"'.format(name=name, value=value) for name, value in attrs.iteritems() if value is not None),
+        ']', ';'))
+    elif line :
+        return ' '.join(line) + ' {'
+    else :
+        return '}'
+
+def build_dot (options, nodes, links, type='digraph', vlans=None) :
+    """
+        Construct a dot description of the given node/links graph.
+    """
+
+    if vlans is True :
+        vlans = { }
+
+    yield dot(type, 'verkko')
+
+    # defaults
+    yield dot('graph',
+            # XXX: breaks multi-edges?
+            #splines     = 'true',
+
+            sep             = '+25,25',
+            overlap         = 'scalexy',
+
+            # only applies to loops
+            nodesep     = 0.5,
+    )
+    yield dot('edge',
+        labeldistance   = 3.0,
+        penwidth        = 2.0,
+    )
+    yield dot('node',
+        fontsize        = 18,
+    )
+    
+    # nodes
+    for node, node_label in nodes.iteritems() :
+        yield dot(dot_quote(node), label=node_label)
+
+    # links
+    for (local, local_port, remote_port, remote), link_vlans in links.iteritems() :
+        if link_vlans :
+            local_untag, tagged, remote_untag = link_vlans
+
+            if vlans :
+                head_color = vlans.color(local_untag) if local_untag else None
+                tail_color = vlans.color(remote_untag) if remote_untag else None
+                line_colors = [vlans.color(tag) for tag in sorted(tagged)]
+            else :
+                head_color = GraphVlans.NONE if local_untag else None
+                tail_color = GraphVlans.NONE if remote_untag else None
+                line_colors = []
+        else :
+            # unknown
+            head_color = tail_color = None
+            line_colors = []
+
+        if head_color and tail_color :
+            dir = 'both'
+            colors = [head_color, tail_color] + line_colors
+        elif head_color :
+            dir = 'forward'
+            colors = [head_color] + line_colors
+        elif tail_color :
+            dir = 'back'
+            colors = [vlans.NONE, tail_color] + line_colors
+        else :
+            dir = 'none'
+            colors = line_colors
+
+        yield dot(dot_quote(local), '->', dot_quote(remote),
+            taillabel   = local_port,
+            headlabel   = remote_port,
+            dir         = dir,
+
+            fillcolor   = 'black',
+            color       = ':'.join(colors) if colors else None,
+        )
+
+    yield dot()
+
+def apply_dot (options, file, dot) :
+    """
+        Output dot file for given graphbits
+    """
+
+    for line in dot :
+        file.write(line + '\n')
+
+def main (argv) :
+    """
+        Graph network
+    """
+
+    parser = optparse.OptionParser(main.__doc__)
+    parser.add_option_group(pvl.args.parser(parser))
+    parser.add_option_group(pvl.hosts.optparser(parser))
+
+    parser.add_option('--snmp-data', metavar='FILE', default=None,
+            help="Load snmp data from FILE")
+
+
+    parser.add_option('--graph-lldp-unknown', action='store_true',
+            help="Graph unknown LLDP nodes")
+
+
+    parser.add_option('--graph-vlans', action='store_true', dest='graph_vlans', 
+            help="Graph links with VLAN information")
+
+    parser.add_option('--no-vlans', action='store_false', dest='graph_vlans',
+            help="Do not color VLANs")
+
+
+    parser.add_option('--graph-bridge', action='store_true',
+            help="Graph bridge forwarding database links")
+
+    parser.add_option('--graph-bridge-unknown', action='store_true',
+            help="Graph unknown bridge forwarding databse hosts")
+
+
+    parser.add_option('--graph-dot', metavar='FILE',
+            help="Output .dot graph data to file")
+
+    # input
+    options, args = parser.parse_args(argv[1:])
+    pvl.args.apply(options)
+    
+    # load hosts
+    hosts = list(pvl.hosts.apply(options, args))
+
+    # load raw snmp data
+    snmp = load_snmp_data(options, options.snmp_data, hosts)
+
+    # process data into graph
+    nodes, links = build_graph(options, snmp, hosts)
+    
+    # process graph into dot
+    if options.graph_vlans is False :
+        graph_vlans = None
+    else :
+        graph_vlans = GraphVlans()
+
+    if options.graph_dot :
+        # process to dot
+        dot = build_dot(options, nodes, links, vlans=graph_vlans)
+        
+        # write out
+        apply_dot(options, open(options.graph_dot, 'w'), dot)
+
+    return 0
+
+if __name__ == '__main__':
+    pvl.args.main(main)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.hosts-import	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,784 @@
+#!/usr/bin/env python
+
+"""
+    Import hosts from existing BIND or dhcpd files.
+"""
+
+import pvl.args
+import pvl.dns.zone
+import pvl.dhcp.config
+import pvl.hosts
+import pvl.ldap.args
+
+import collections
+import ipaddr
+import logging; log = logging.getLogger('pvl.hosts-import')
+import optparse
+import os.path
+import re
+
+__version__ = '0.1'
+
+def parse_options (argv) :
+    """
+        Parse command-line arguments.
+    """
+
+    parser = optparse.OptionParser(
+            prog        = argv[0],
+            usage       = '%prog: [options]',
+            version     = __version__,
+
+            # module docstring
+            description = __doc__,
+    )
+
+    # logging
+    parser.add_option_group(pvl.args.parser(parser))
+    parser.add_option_group(pvl.ldap.args.parser(parser))
+
+    parser.add_option('--input-charset',  metavar='CHARSET',  default='utf-8', 
+            help="Encoding used for input files")
+
+    parser.add_option('--output-charset',       metavar='CHARSET',  default='utf-8', 
+            help="Encoding used for output files")
+
+    # input
+    parser.add_option('--import-zone-hosts',    metavar='FILE',     action='append',
+            help="Load hosts from DNS zone")
+
+    parser.add_option('--import-zone-origin',   metavar='ORIGIN',
+            help="Initial origin for given zone file; default is basename")
+
+    parser.add_option('--import-zone-comments-owner',  action='store_const',
+            dest='import_zone_comments', const='owner',
+            help="Import DNS zone comment as owner comment")
+
+    parser.add_option('--import-zone-comments-host',   action='store_const',
+            dest='import_zone_comments', const='host',
+            help="Import DNS zone comment as host comment")
+
+    parser.add_option('--import-dhcp-hosts',    metavar='FILE',     action='append',
+            help="Load hosts from DHCP config")
+
+    parser.add_option('--import-dhcp-boot-server',      metavar='NEXT-SERVER',
+            help="Default boot_server for dpc hosts")
+
+
+    parser.add_option('--dump-host-comments',   action='store_true',
+            help="Dump out info on imported host comments")
+
+    # defaults
+    parser.add_option('--zone-unused',          metavar='HOST',
+            help="DNS name for unallocated hosts")
+
+    # output
+    parser.add_option('--output-hosts',         metavar='FILE',         default='-',
+            help="Output hosts file")
+
+    parser.add_option('--output-prefix',        metavar='PREFIX',
+            help="Select hosts by ip prefix")
+
+    parser.add_option('--output-domain',        metavar='DOMAIN',
+            help="Select hosts by domain")
+
+    parser.add_option('--output-others',        action='store_true',
+            help="Negate selection")
+
+    # defaults
+    parser.set_defaults(
+        import_zone_hosts   = [],
+        import_dhcp_hosts   = [],
+    )
+    
+    # parse
+    options, args = parser.parse_args(argv[1:])
+
+    # apply
+    pvl.args.apply(options, argv[0])
+
+    return options, args
+
+def import_zone_host_name (options, name, origin) :
+    """
+        Import zone name from rr
+    """
+
+    if '.' in name :
+        host, domain = name.split('.', 1)
+        domain = pvl.dns.join(domain, origin)
+    else :
+        host = name
+        domain = origin
+            
+    if domain :
+        # not a fqdn
+        domain = domain.rstrip('.')
+
+        log.info("%s: %s@%s", name, host, domain)
+    else :
+        log.warn("%s: no domain", name)
+
+    return host, domain
+
+def import_zone_hosts (options, file) :
+    """
+        Yield host info from zonefile records.
+    """
+
+    origin = options.import_zone_origin or os.path.basename(file.name)
+
+    for line, rr in pvl.dns.zone.ZoneLine.load(file,
+            # used to determine domain
+            origin          = origin,
+
+            # lazy-import generated hosts on demand
+            expand_generate = True,
+    ) :
+        if rr :
+            pass
+        elif line.parts[0] == '$ORIGIN' :
+            # handled by ZoneLine.load
+            continue
+        else :
+            log.warn("%s: skip non-rr line: %s", line, line.line)
+            continue
+
+        host, domain = import_zone_host_name(options, rr.name, rr.origin)
+
+        if rr.type in ('A', 'AAAA') :
+            ip, = rr.data
+            ip = ipaddr.IPAddress(ip)
+
+            type = { 'A': 'ip', 'AAAA': 'ip6' }[rr.type]
+
+            if options.zone_unused and rr.name == options.zone_unused :
+                yield (str(ip), domain), 'ip.unused', ip
+            else :
+                yield (host, domain), type, ip,
+
+            if rr.comment :
+                yield (host, domain), 'comment', rr.comment
+
+            if line.parts[0] == '$GENERATE' :
+                # only import as host if used for other purposes as well
+                yield (host, domain), 'lazy-import', True
+
+        elif rr.type == 'CNAME' :
+            alias, = rr.data
+            alias_host, alias_domain = import_zone_host_name(options, alias, rr.origin)
+            
+            if domain == alias_domain :
+                yield (alias_host, alias_domain), 'alias', host
+            elif domain.endswith('.' + alias_domain) :
+                yield (alias_host, alias_domain), 'alias', pvl.dns.join(host, domain[:(len(domain) - len(alias_domain) - 1)])
+            else :
+                log.warn("%s@%s: alias outside of target domain: %s", host, domain, alias_domain)
+        
+        elif rr.type == 'TXT' :
+            txt, = rr.data
+
+            yield (host, domain), 'comment', txt
+
+        else :
+            log.warn("%s: unknown rr: %s", host, rr)
+
+def import_dhcp_host (options, dhcp_host, items) :
+    """
+        Yield host infos from a dhcp host ... { ... }
+    """
+
+    host_name = None
+    ethernet = []
+    fixed_address = None
+
+    boot_server = options.import_dhcp_boot_server
+    boot_filename = None
+
+    for item in items :
+        item, args = item[0], item[1:]
+
+        if item == 'hardware' :
+            _ethernet, ethernet = args
+            assert _ethernet == 'ethernet'
+        elif item == 'fixed-address' :
+            fixed_address, = args
+        elif item == 'option' :
+            option = args.pop(0)
+
+            if option == 'host-name' :
+                host_name, = args
+            else :
+                log.warn("host %s: ignore unknown option: %s", dhcp_host, option)
+        elif item == 'next-sever' :
+            boot_server, = args
+        elif item == 'filename' :
+            boot_filename, = args
+        else :
+            log.warn("host %s: ignore unknown item: %s", dhcp_host, item)
+
+    # determine host
+    host = None
+    domain = None
+    suffix = None
+    
+    if not fixed_address :
+        log.warn("%s: fixed-address is missing, unable to determine hostname/domainname", dhcp_host)
+    elif re.match(r'\d+\.\d+\.\d+.\d+', fixed_address) :
+        log.warn("%s: fixed-address is an IP, unable to determine hostname/domainname", dhcp_host)
+    else :
+        host, domain = fixed_address.split('.', 1)
+
+    # XXX: not actually true... eh
+    if host and dhcp_host.lower() == host.lower() :
+        # do not split suffix from host
+        pass
+    elif host and '-' in dhcp_host :
+        dhcp_host, suffix = dhcp_host.rsplit('-', 1)
+    elif '-' in dhcp_host :
+        host, suffix = dhcp_host.rsplit('-', 1)
+    else :
+        host = dhcp_host
+
+    if not (host or ethernet) :
+        log.warn("%s: no hostname/ethernet: %s/%s", dhcp_host, hostname, ethernet)
+    elif suffix :
+        log.info("%s: %s@%s: %s: %s", dhcp_host, host, domain, suffix, ethernet)
+        yield (host, domain), 'ethernet.{suffix}'.format(suffix=suffix), ethernet
+    else :
+        log.info("%s: %s@%s: %s", dhcp_host, host, domain, ethernet)
+        yield (host, domain), 'ethernet', ethernet
+
+    if boot_server and boot_filename :
+        yield (host, domain), 'boot', "{server}:{filename}".format(
+                server      = boot_server,
+                filename    = boot_filename,
+        )
+    elif boot_filename :
+        yield (host, domain), 'boot', "{filename}".format(filename=boot_filename)
+
+def import_dhcp_hosts (options, file_name, blocks) :
+    """
+        Process hosts from a parsed block
+    """
+
+    for block, items, blocks in blocks :
+        
+        block, args = block[0], block[1:]
+
+        if block == 'group' :
+            log.info("%s: group", file_name)
+            for info in import_dhcp_hosts(options, file_name, blocks) :
+                yield info
+        elif block == 'host' :
+            host, = args
+            
+            log.info("%s: host: %s", file_name, host)
+
+            try :
+                for info in import_dhcp_host(options, host, items) :
+                    yield info
+            except ValueError as error :
+                log.exception("%s: invalid host %s: %s", file_name, host, error)
+        else:
+            log.warn("%s: ignore unknown block: %s", file_name, block)
+
+def import_dhcp_conf (options, file) :
+    items, blocks = pvl.dhcp.config.DHCPConfigParser().load(file)
+
+    for item in items :
+        item, args = item[0], item[1:]
+
+        if item == 'include' :
+            include, = args
+            for info in import_dhcp_conf(options, pvl.args.apply_file(include)) :
+                yield info
+        else :
+            log.warn("ignore unknown item: %s", item)
+    
+    for info in import_dhcp_hosts(options, file.name, blocks) :
+        yield info
+
+ZONE_COMMENTS = (
+        re.compile(r'(?P<owner>[^/]+)\s*-\s+(?P<host>.+)'),
+        re.compile(r'(?P<group>.+?)\s*/\s*(?P<owner>.+)\s+[/-]\s+(?P<host>.+)'),
+        re.compile(r'(?P<group>.+?)\s*/\s*(?P<owner>.+)\s+[(]\s*(?P<host>.+)[)]'),
+        re.compile(r'(?P<group>.+?)\s*/\s*(?P<owner>.+)'),
+)
+
+ZONE_OWNER_MAIL = re.compile(r'(?P<owner>.*?)\s*<(?P<mail>.+?)>')
+
+def process_zone_comment (options, hostname, comment) :
+    """
+        Attempt to parse a host comment field... :D
+
+        Yields (field, value) bits
+    """
+
+    for regex in ZONE_COMMENTS :
+        match = regex.match(comment)
+
+        if match :
+            matches = match.groupdict()
+
+            log.info("%s: matched comment: %s", hostname, comment)
+            break
+    else :
+        if options.import_zone_comments :
+            log.info("%s: default comment: %s", hostname, comment)
+            matches = { options.import_zone_comments: comment }
+        else :
+            log.warn("%s: unknown comment: %s", hostname, comment)
+            return
+    
+    owner = matches.pop('owner', None)
+    
+    if owner :
+        mail_match = ZONE_OWNER_MAIL.match(owner)
+
+        if mail_match :
+            mail_matches = mail_match.groupdict()
+            
+            owner = mail_matches['owner']
+            yield 'mail', mail_matches['mail'].strip()
+    
+        yield 'owner', owner.strip()
+
+    for field, value in matches.iteritems() :
+        if value :
+            yield field, value.strip()
+
+NONE_OWNERS = set((
+    u'tech',
+    u'atk',
+    u'toimisto',
+))
+
+def process_host_owner_ldap (options, host, info) :
+    """
+        Yield guesses for user from LDAP.
+    """
+
+    if info.get('mail') :
+        for user in options.ldap.users.filter(
+                { 'mailLocalAddress': info['mail'] },
+                { 'uid': info['mail'] },
+        ) :
+            yield user, None
+
+    if info.get('group') and info.get('owner') :
+        groups = options.ldap.groups.filter(cn=info['group'])
+
+        for group in groups :
+            for user in options.ldap.users.filter({
+                'gidNumber': group['gidNumber'],
+                'cn': info['owner'],
+            }) :
+                yield user, group
+
+    if info.get('owner') :
+            for user in options.ldap.users.filter({
+                'cn': info['owner'],
+            }) :
+                yield user, None
+
+def process_host_owner (options, host, info) :
+    """
+        Return (owner, comment) for host based on info, or None.
+    """
+
+    owner = info.get('owner')
+
+    if owner and owner.lower() in NONE_OWNERS :
+        return False
+    
+    # from ldap?
+    for ldap in process_host_owner_ldap(options, host, info) :
+        user, group = ldap
+        
+        if not group :
+            # get group from ldap
+            group = options.ldap.users.group(user)
+        
+        return user['uid'], u"{group} / {user}".format(
+                user    = user.getunicode('cn'),
+                group   = group.getunicode('cn'),
+        )
+
+def process_host_comments (options, host, info) :
+    """
+        Process host fields from comment.
+
+        Attempts to find owner from LDAP..
+    """
+
+    log.debug("%s: %s", host, info)
+    
+    owner = process_host_owner(options, host, info) 
+
+    if owner is False :
+        # do not mark any owner
+        pass
+
+    elif owner :
+        owner, comment = owner
+        
+        log.info("%s: %s (%s)", host, owner, comment)
+        
+        yield 'comment.owner', comment
+        yield 'owner', owner,
+
+    elif 'group' in info or 'owner' in info :
+        log.warn("%s: unknown owner: %s", host, info)
+        yield 'comment.owner', "{group} / {owner}".format(
+                group   = info.get('group', ''),
+                owner   = info.get('owner', ''),
+        )
+    
+    if info.get('host') :
+        yield 'comment.host', info['host']
+
+def process_hosts_comments (options, import_hosts) :
+    """
+        Parse out comments from host imports..
+    """
+
+    for host, field, value in import_hosts :
+        if field != 'comment':
+            yield host, field, value
+            continue
+
+        fields = dict(process_zone_comment(options, host, value))
+        
+        if options.dump_host_comments :
+            print u"{host:20} {comment:80} = {group:15} / {owner:20} <{mail:20}> / {hostinfo}".format(
+                    host        = host,
+                    comment     = value,
+                    group       = fields.get('group', ''),
+                    owner       = fields.get('owner', ''),
+                    mail        = fields.get('mail', ''),
+                    hostinfo    = fields.get('host', ''),
+            ).encode('utf-8')
+        
+
+        for field, value in process_host_comments(options, host, fields) :
+            yield host, field, value
+
+def import_hosts_files (options, zone_files, dhcp_files) :
+    """
+        Import host infos from given files.
+    """
+
+    for zone_file in zone_files:
+        file = pvl.args.apply_file(zone_file, 'r', options.input_charset)
+        for info in import_zone_hosts(options, file) :
+            yield info
+    
+    for dhcp_file in dhcp_files :
+        file = pvl.args.apply_file(dhcp_file, 'r', options.input_charset)
+        for info in import_dhcp_conf(options, file) :
+            yield info
+       
+def process_import_hosts (options, import_hosts) :
+    """
+        Build hosts from imported fields.
+
+        Yields (domain, host), { (field, ...): value }
+    """
+    
+    # gather
+    hosts = collections.defaultdict(lambda: collections.defaultdict(list))
+
+    for (host, domain), field, value in import_hosts :
+        hosts[domain, host][tuple(field.split('.'))].append(value)
+    
+    # process
+    for (domain, host), fields in hosts.iteritems() :
+        SINGLE_FIELDS = (
+                'ip',
+                'ip.unused',
+                'ip6',
+                'comment.owner',
+                'owner',
+                'boot',
+        )
+        MULTI_FIELDS = (
+                'comment.host',
+                'ethernet',
+                'alias',
+        ) 
+        host_fields = {}
+
+        for field_name in SINGLE_FIELDS :
+            field = tuple(field_name.split('.'))
+            values = fields.get(field)
+
+            if not values :
+                continue
+            elif len(values) == 1 :
+                value, = values
+            else :
+                log.error("%s@%s: multiple %s: %s", host, domain, field, values)
+                value = values[0]
+            
+            log.debug("%s@%s: %s: %s", host, domain, field, value)
+            host_fields[field] = value
+        
+        for field_name in MULTI_FIELDS :
+            field_prefix = tuple(field_name.split('.'))
+            
+            # find labled fields by prefix, or unlabled multi-fields
+            for field, values in fields.iteritems() :
+                pre, field_index = field[:-1], field[-1]
+                
+                if not values :
+                    pass
+
+                elif pre == field_prefix :
+                    log.debug("%s@%s: %s.%s: %s", host, domain, field_prefix, field_index, value)
+                    host_fields[field] = values
+
+                elif field == field_prefix :
+                    log.debug("%s@%s: %s.*: %s", host, domain, field_prefix, value)
+                    host_fields[field_prefix] = values
+
+        lazy_import = fields.get(tuple('lazy-import'.split('.')))
+
+        if not lazy_import :
+            pass
+        elif set(host_fields) == set([('ip', )]) :
+            log.info("%s: omit lazy-import with fields: %s", host, ' '.join('.'.join(field) for field in host_fields))
+            continue
+        else :
+            log.info("%s: import lazy-import with fields: %s", host, ' '.join('.'.join(field) for field in host_fields))
+
+        yield (host, domain), host_fields
+
+def apply_import_hosts (options) :
+    """
+        Import hosts.
+    """
+
+    import_hosts = import_hosts_files(options, options.import_zone_hosts, options.import_dhcp_hosts)
+
+    # process
+    import_hosts = process_hosts_comments(options, import_hosts)
+
+    # gather
+    return process_import_hosts(options, import_hosts)
+
+def process_hosts (options, hosts) :
+    """
+        Sanity-check and post-process hosts.
+
+        Does alias4 mapping, nonexistant alias checks, duplicate ip checks..
+    """
+
+    by_name = dict(hosts)
+    by_ip = dict()
+
+    # scan for alias4
+    for (host, domain), fields in by_name.items() :
+        for fmt, ip_field, alias_field in (
+                (pvl.hosts.Host.ALIAS4_FMT, 'ip', 'alias4'),
+                (pvl.hosts.Host.ALIAS6_FMT, 'ip6', 'alias6'),
+        ) :
+            alias = fmt.format(host=host)
+            alias_fields = by_name.get((alias, domain))
+
+            if not alias_fields :
+                continue
+
+            elif alias_fields[(ip_field, )] != fields[(ip_field, )] :
+                log.warn("%s: %s %s collision with %s", host, alias_field, ip_field, alias)
+            elif ('alias', ) in alias_fields :
+                log.warn("%s: mapped to %s on %s", alias, alias_field, host)
+                fields[(alias_field, )] = alias_fields.get(('alias', ), ())
+                del by_name[(alias, domain)]
+            else :
+                log.warn("%s: %s mapped to %s, but no aliases", alias, alias_field, host)
+                del by_name[(alias, domain)]
+
+    # scan by alias
+    by_alias = { }
+
+    for (host, domain), fields in hosts :
+        for alias in fields.get(('alias', ), ()) :
+            if (alias, domain) in by_alias :
+                log.warn("%s: duplicate alias %s: %s", host, alias, by_alias[(alias, domain)])
+            else :
+                by_alias[(alias, domain)] = (host, fields)
+
+    for (host, domain), fields in hosts :
+        fields = by_name.get((host, domain))
+
+        if not fields :
+            # skip
+            continue
+
+        if set(fields) == set([('alias', )]) :
+            aliases = fields[('alias', )]
+            if (host, domain) in by_alias :
+                alias_host, alias_fields = by_alias[(host, domain)]
+                log.info("%s: chain as alias to %s: %s", host, alias_host, ' '.join(aliases))
+                alias_fields[('alias', )].extend(aliases)
+                continue
+            else :
+                log.warn("%s@%s: nonexistant alias target for: %s", host, domain, ' '.join(aliases))
+        
+        ip = fields.get(('ip', ))
+
+        if ip in by_ip :
+            log.warn("%s: duplicate ip %s: %s", host, ip, by_ip[ip])
+        elif ip :
+            by_ip[ip] = host
+        else :
+            log.warn("%s: no ip", host)
+
+        yield (host, domain), fields
+
+def sort_export_hosts (options, hosts) :
+    """
+        Generate a sortable version of hosts, yielding (sort, host, fields).
+    """
+
+    if options.output_prefix :
+        prefix = ipaddr.IPNetwork(options.output_prefix)
+    else :
+        prefix = None
+
+    if options.output_domain :
+        select_domain = options.output_domain
+    else :
+        select_domain = None
+
+    for (host, domain), fields in hosts :
+        ip = fields.get(('ip', )) or fields.get(('ip', 'unused'))
+
+        log.debug("%s@%s: ip=%s", host, domain, ip)
+        
+        # sort by IP
+        if ip :
+            sort = ip
+        else :
+            # fake, to sort correctly
+            sort = ipaddr.IPAddress(0)
+        
+        # select
+        match = True
+
+        if prefix:
+            if not (ip and ip in prefix) :
+                match = False
+
+        if select_domain :
+            if not (domain and domain == select_domain) :
+                match = False
+
+        if match and options.output_others :
+            pass
+        elif not match and not options.output_others :
+            pass
+        else :
+            yield (domain, sort), (host, domain), fields
+
+def export_hosts (options, hosts) :
+    """
+        Generate hosts config lines for given hosts.
+    """
+
+    # filter + sort
+    hosts = [(host, fields) for sort, host, fields in sorted(sort_export_hosts(options, hosts))]
+
+    if options.output_domain :
+        # global
+        output_domain = False
+    else :
+        output_domain = None
+
+    for (host, domain), fields in hosts :
+        if output_domain is False :
+            pass
+        elif domain != output_domain :
+            yield u"[{domain}]".format(domain=domain)
+            output_domain = domain
+
+        # special handling for "unused" hosts
+        if ('ip', 'unused') in fields :
+            yield u"{indent}# {unused} {ip}".format(
+                    indent  = '\t' if output_domain else '',
+                    unused  = options.zone_unused,
+                    ip      = fields[('ip', 'unused')],
+            )
+            yield u""
+            continue
+
+        # optional host-comments
+        for comment in fields.get(('comment', 'host'), ()):
+            yield u"{indent}# {comment}".format(
+                    indent  = '\t' if output_domain else '',
+                    comment = comment,
+            )
+        
+        if output_domain :
+            yield u"\t[[{host}]]".format(host=host)
+        else :
+            yield u"[{host}]".format(host=host)
+
+        #if not options.output_domain and domain :
+        #    yield u"\t{field:15} = {domain}".format(field='domain', domain=domain)
+        
+        for field_name in (
+                'ip',
+                'ip6',
+                'ethernet',
+                'owner',
+                'alias',
+                'alias4',
+                'alias6',
+                'boot',
+        ) :
+            for field, value in fields.iteritems() :
+                if field[0] == field_name :
+                    # optional field-comment
+                    comment = fields.get(('comment', field_name), None)
+
+                    if isinstance(value, list) :
+                        value = ' '.join(value)
+
+                    yield u"{indent}{field:15} = {value} {comment}".format(
+                            indent  = '\t\t' if output_domain else '\t',
+                            field   = '.'.join(str(label) for label in field),
+                            value   = value,
+                            comment = u"# {comment}".format(comment=comment) if comment else '',
+                    ).rstrip()
+    
+        yield ""
+   
+def apply_hosts_export (options, hosts) :
+    """
+        Export hosts to file.
+    """
+
+    file = pvl.args.apply_file(options.output_hosts, 'w', options.output_charset)
+
+    for line in export_hosts(options, hosts) :
+        print >>file, line
+
+def main (argv) :
+    options, args = parse_options(argv)
+
+    options.ldap = pvl.ldap.args.apply(options)
+    
+    # import
+    hosts = list(apply_import_hosts(options))
+   
+    # verify
+    hosts = process_hosts(options, hosts)
+
+    # output
+    if options.output_hosts :
+        apply_hosts_export(options, hosts)
+
+if __name__ == '__main__':
+    pvl.args.main(main)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.hosts-reverse	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,74 @@
+#!/usr/bin/env python
+
+import logging; log = logging.getLogger('pvl.hosts-reverse')
+import optparse 
+import os.path
+import pvl.args
+import pvl.hosts
+import pvl.hosts.zone
+
+def main (argv):
+    """
+        Generate bind zonefiles from host definitions.
+    """
+
+    parser = optparse.OptionParser(main.__doc__)
+    parser.add_option_group(pvl.args.parser(parser))
+    parser.add_option_group(pvl.hosts.config.optparser(parser))
+
+    parser.add_option('--zone-prefix',          metavar='PREFIX',
+            help="Generated records for given prefix's reverse zone origin")
+
+    parser.add_option('--unknown-host',         metavar='NAME',
+            help="Generate records for unused IPs")
+
+    # input
+    options, args = pvl.args.parse(parser, argv)
+ 
+    if options.zone_prefix:
+        try:
+            prefix = pvl.dns.parse_prefix(options.zone_prefix)
+        except ValueError as error:
+            log.error("invalid reverse --zone-prefix=%s: %s", options.zone_prefix, error)
+            return 1
+        else:
+            log.info("using given reverse --zone-prefix: %s", prefix)
+   
+    elif len(args) == 1:
+        path, = args
+        zone_prefix = os.path.basename(path.rstrip('/'))
+
+        try:
+            prefix = pvl.dns.parse_prefix(zone_prefix)
+        except ValueError as error:
+            log.error("invalid hosts path %s for reverse --zone-prefix: %s", zone_prefix, error)
+            return 1
+        else:
+            log.info("using given hosts path %s for reverse --zone-prefix: %s", zone_prefix, prefix)
+
+    else:
+        log.fatal("--zone-prefix is required if passing multiple hosts files")
+        return 1
+ 
+    if options.unknown_host and not options.hosts_domain:
+        log.fatal("--unknown-host requires --hosts-domain=")
+        return 1
+
+    hosts = pvl.hosts.apply(options, args)
+
+    # process
+    try:
+        for rr in pvl.hosts.zone.apply_hosts_reverse(hosts, prefix,
+                unknown_host    = options.unknown_host,
+                unknown_domain  = options.hosts_domain,
+        ):
+            print unicode(rr)
+
+    except pvl.hosts.HostError as error:
+        log.error("%s", error)
+        return 3
+
+    return 0
+
+if __name__ == '__main__':
+    pvl.args.main(main)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/pvl.hosts-snmp	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,299 @@
+#!/usr/bin/env python
+
+import pvl.args
+import pvl.hosts
+from pvl.snmp import snmp, lldp, vlan, bridge
+
+import collections
+import logging; log = logging.getLogger('pvl.hosts-lldp')
+import optparse
+
+def hosts_snmp (options, hosts) :
+    """
+        Discover SNMP-supporting hosts.
+
+        Yields Host, snmpdata
+    """
+
+    for host in hosts :
+        host_snmp = host.extensions.get('snmp')
+
+        if not host_snmp :
+            log.debug("%s: skip non-snmp host", host)
+            continue
+
+        elif host.down :
+            log.debug("%s: skip down host", host)
+            continue
+
+        else :
+            log.debug("%s: %s", host, host_snmp)
+
+        yield host, host_snmp
+
+def hosts_lldp (options, hosts) :
+    """
+        Discover LLDP-supporting hosts.
+
+        Yields Host, LLDPAgent
+    """
+
+    for host, host_snmp in hosts_snmp(options, hosts) :
+        agent = lldp.LLDPAgent.apply(options, host.fqdn(), community=host_snmp.get('community'))
+
+        try :
+            local = agent.local
+        except snmp.SNMPError as ex :
+            log.warning("%s: %s", host, ex)
+            continue
+        
+        if not local :
+            log.info("%s: no lldp support", host)
+            continue
+
+        log.info("%s: %s", host, local)
+
+        if local['sys_name'] != host.host :
+            log.warning("%s: SNMP sys_name mismatch: %s", host, local['sys_name'])
+
+        yield host, agent
+
+def hosts_vlan (options, hosts) :
+    """
+        Discover VLAN-supporting hosts.
+
+        Yields Host, VLANAgent
+    """
+
+    for host, host_snmp in hosts_snmp(options, hosts) :
+        agent = vlan.VLANAgent.apply(options, host.fqdn(), community=host_snmp.get('community'))
+
+        try :
+            count = agent.count
+        except snmp.SNMPError as ex :
+            log.warning("%s: %s", host, ex)
+            continue
+
+        log.info("%s: %s", host, count)
+
+        yield host, agent
+
+def hosts_bridge (options, hosts) :
+    """
+        Discover Bridge-supporting hosts.
+
+        Yields Host, BridgeAgent
+    """
+
+    for host, host_snmp in hosts_snmp(options, hosts) :
+        agent = bridge.BridgeAgent.apply(options, host.fqdn(), community=host_snmp.get('community'))
+
+        try :
+            agent.ping()
+        except snmp.SNMPError as ex :
+            log.warning("%s: %s", host, ex)
+            continue
+
+        log.info("%s", host)
+
+        yield host, agent
+
+
+def apply_hosts_lldp (options, hosts) :
+    """
+        Query host LLDP info.
+    """
+    
+    # second pass to discver links
+    for host, agent in hosts_lldp(options, hosts) :
+        try :
+            remotes = list(agent.remotes())
+        except snmp.SNMPError as ex :
+            log.warn("%s: broken lldp remotes: %s", host, ex)
+            continue
+
+        for port, remote in remotes :
+            port = agent.port(port)
+
+            log.info("%s: %s: %s", host, port, remote)
+
+            yield host, agent.local, port, remote
+
+def apply_hosts_vlan (options, hosts) :
+    """
+        Query host VLAN ports.
+
+        Yields host, { port: (untagged, [tagged]) }
+    """
+
+    _hosts_vlan = list(hosts_vlan(options, hosts))
+
+    for host, agent in _hosts_vlan :
+        # only one untagged vlan / port
+        vlan_untagged = { }
+            
+        # multiple taggd vlans / port
+        vlan_tagged = collections.defaultdict(set)
+
+        for vlan, (tagged, untagged) in agent.vlan_ports() :
+            log.info("%s: %s: %s + %s", host, vlan, tagged, untagged)
+            
+            for port in tagged :
+                vlan_tagged[port].add(vlan)
+            
+            for port in untagged :
+                if port in vlan_untagged :
+                    log.warning("%s: duplicate untagged vlan %s for port %s on vlan %s", host, vlan, port, vlan_untagged[port])
+
+                vlan_untagged[port] = vlan
+            
+        for port in set(vlan_untagged) | set(vlan_tagged) :
+            yield host, port, vlan_untagged.get(port), tuple(vlan_tagged[port])
+
+def apply_hosts_bridge (options, hosts) :
+    """
+        Query host bridge tables.
+
+        Yields host, { port: (macs) }
+    """
+
+    for host, agent in hosts_bridge(options, hosts) :
+        ports = collections.defaultdict(list)
+
+        try :
+            vlan_fdb_ports = list(agent.vlan_fdb_ports())
+        except snmp.SNMPError as ex :
+            log.warn("%s: broken dot1q fdb: %s", host, ex)
+            continue
+
+        if vlan_fdb_ports :
+            log.info("%s: have dot1q ports", host)
+
+            for ether, port, vlan in agent.vlan_fdb_ports() :
+                if not port :
+                    # XXX: unknown?
+                    continue
+
+                ports[(port, vlan)].append(ether)
+        else :
+            try :
+                fdb_ports = list(agent.fdb_ports())
+            except snmp.SNMPError as ex :
+                log.warn("%s: broken dot1q fdb: %s", host, ex)
+                continue
+            
+            # fallback to dot1d fdb
+            log.info("%s: fallback to dot1d", host)
+
+            for ether, port in agent.fdb_ports() :
+                if not port :
+                    # XXX: unknown?
+                    continue
+
+                ports[(port, None)].append(ether)
+        
+        for (port, vlan), ethers in ports.iteritems() :
+            yield host, vlan, port, ethers
+
+def apply_hosts (options, hosts) :
+    """
+        Gather data on given hosts...
+
+            (host, key, value)
+    """
+    
+    if options.scan or options.scan_lldp :
+        # discover node/port graph
+        for host, local, port, remote in apply_hosts_lldp(options, hosts) :
+            # XXX: duplicates galore
+            yield host, ('lldp', 'local'), {
+                    'chassis':  local['chassis'],
+                    'sys_name': local['sys_name'],
+            }
+            
+            # XXX: duplicates galore
+            yield host, ('lldp', 'port', port['port_id'], 'local'), {
+                    'port':     port['port'],
+            }
+        
+            yield host, ('lldp', 'port', port['port_id'], 'remote', remote['chassis']), {
+                    'sys_name':     remote['sys_name'],
+                    'port':         remote['port'],
+            }
+    
+    if options.scan or options.scan_vlan :
+        # discover vlan ports
+        for host, port, untag, tagged in apply_hosts_vlan(options, hosts) :
+            if untag :
+                yield host, ('vlan', untag, 'untagged'), set((port, ))
+
+            for tag in tagged :
+                yield host, ('vlan', tag, 'tagged'), set((port, ))
+    
+    if options.scan or options.scan_bridge :
+        # discover edge nodes
+        for host, vlan, port, ethers in apply_hosts_bridge(options, hosts) :
+            if vlan :
+                yield host, ('vlan', vlan, 'bridge', port), set(ethers)
+            else :
+                yield host, ('bridge', port), set(ethers)
+
+def main (argv) :
+    """
+        SNMP polling.
+    """
+
+    parser = optparse.OptionParser(main.__doc__)
+    parser.add_option_group(pvl.args.parser(parser))
+    parser.add_option_group(pvl.hosts.optparser(parser))
+    parser.add_option_group(pvl.snmp.snmp.options(parser))
+
+    parser.add_option('--scan', action='store_true')
+    parser.add_option('--scan-lldp', action='store_true')
+    parser.add_option('--scan-vlan', action='store_true')
+    parser.add_option('--scan-bridge', action='store_true')
+
+    # input
+    options, args = parser.parse_args(argv[1:])
+    pvl.args.apply(options)
+
+    # gather SNMP data from hosts
+    hosts = pvl.hosts.apply(options, args)
+    
+    data = collections.defaultdict(dict)
+
+    for host, attr, values in apply_hosts(options, hosts) :
+        if isinstance(values, set) :
+            log.info("[%s] %s + %s", host, attr, values)
+
+            data[host].setdefault(attr, set()).update(values)
+
+        elif isinstance(values, dict) :
+            log.info("[%s] %s = %s", host, attr, values)
+
+            data[host][attr] = values
+
+        else :
+            raise Exception("No value for [%s] %s" % (host, attr))
+
+    # output
+    for host, attrs in sorted(data.items()) :
+        print "{host}@{domain}".format(host=host, domain=host.domain)
+
+        for attr, value in sorted(attrs.items()) :
+            print "\t{attr}".format(attr=' '.join(str(a) for a in attr))
+
+            if isinstance(value, set) :
+                for v in sorted(value) :
+                    print "\t\t{value}".format(value=v)
+            elif isinstance(value, dict) :
+                for k, v in sorted(value.items()) :
+                    print "\t\t{key}\t{value}".format(key=k, value=v)
+            else :
+                raise Exception("[%s] %s: invalid value: %s" % (host, attr, value))
+
+    return 0
+
+if __name__ == '__main__':
+    pvl.args.main(main)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/alias.test	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,7 @@
+[foo]
+    ip          = 127.0.0.1
+    alias       = test
+
+[bar]
+    ip          = 127.0.0.2
+    alias       = test
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/asdf	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,2 @@
+[asdf{1-3}]
+    ip  = 10.100.100.$
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/asdf.test	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,2 @@
+[quux]
+    ip  = 192.0.2.5
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/boot.dhcp	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,3 @@
+[foo]
+    ethernet    = 00:11:22:33:44:55
+    boot        = boot.lan:debian/wheezy/pxelinux.0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/dhcp1	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,2 @@
+[foo]
+    ethernet    = 00:11:22:33:44:55
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/dhcp2	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,9 @@
+[foo.dhcp]
+    [[asdf]]
+        ip              = 10.1.0.1
+        ethernet.eth1   = 00:11:22:33:44:55
+
+[bar.dhcp]
+    [[asdf]]
+        ip              = 10.2.0.1
+        ethernet.eth2   = 55:44:33:22:11:00
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/example.com	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,7 @@
+[foo]
+    ip          = 192.0.2.1
+    ethernet    = 00:11:22:33:44:55
+
+[bar]
+    ip          = 192.0.2.2
+    ethernet    = 01:23:45:67:89:ab
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/reverse	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,4 @@
+[foo-{240-247}]
+    forward =
+    reverse = $.240/29.0.0.10.in-addr.arpa
+    ip      = 10.0.0.$
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/test	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,1 @@
+include = test.d/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/test.d/bar	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,1 @@
+ip = 192.0.2.2
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/test.d/foo	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,2 @@
+ip = 192.0.2.1
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/wrong.d/host	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,2 @@
+[host]
+    ip  = 192.0.2.6
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/hosts/wrong.test	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,1 @@
+include = wrong.d/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/mibs/HP-CONFIG-MIB	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,3452 @@
+-- HP Enterprise Switch Configuration MIB 
+
+
+HP-CONFIG-MIB DEFINITIONS ::= BEGIN
+
+    IMPORTS
+        IpAddress
+            FROM RFC1155-SMI
+        OBJECT-TYPE
+            FROM RFC-1212
+        TRAP-TYPE
+            FROM RFC-1215
+        dot1dStpPortState, dot1dStpPortDesignatedBridge,
+        dot1dStpPortDesignatedPort
+            FROM BRIDGE-MIB -- RFC-1493
+        DisplayString, RowStatus, MacAddress, TimeStamp, TruthValue
+            FROM SNMPv2-TC
+        HpSwitchPortType, ConfigStatus
+            FROM HP-ICF-TC
+        hpSwitch
+            FROM HP-ICF-OID
+        InetAddressType, InetAddress, InetAddressPrefixLength
+            FROM INET-ADDRESS-MIB
+        PortList
+            FROM Q-BRIDGE-MIB
+        Dscp    
+            FROM DIFFSERV-DSCP-TC;
+
+    -- Icf Switch Specific 
+
+    hpConfig OBJECT IDENTIFIER ::= { hpSwitch 7 }
+
+    -- type.
+
+-- -------------------------------------------------------------
+-- Textual Conventions
+-- -------------------------------------------------------------
+
+    VlanID ::= Integer32(1..65535)
+
+    Timeout ::= INTEGER
+
+   HpicfUsrProfilePortSpeed ::= TEXTUAL-CONVENTION
+   STATUS      current
+   DESCRIPTION "An enumerated value for the Port Speed"
+   SYNTAX  INTEGER {
+            speed10HDX(1),
+            speed100HDX(2),
+            speed10FDx(3),
+            speed100FDx(4),
+            speedAuto(5),
+            speed1000FDx(6),
+            speedAuto10Mbits(7),
+            speedAuto100Mbits(8),
+            speedAuto1000Mbits(9),
+            speedAuto-10Gbits(10),
+            speedAuto10or100Mbits(11)
+          }
+
+
+    -- ###########################################################
+    -- the hpConfig Group
+
+    -- This group contains switch configuration related variables.
+    -- ###########################################################
+
+    hpSwitchConfig   OBJECT IDENTIFIER ::= { hpConfig 1 }
+
+    hpSwitchSystemConfig  OBJECT IDENTIFIER ::= { hpSwitchConfig 1 }
+
+    hpSwitchAutoReboot OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        yes(1),
+                        no(2),
+                        useHw(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "When set to yes(1), the switch will automatically
+                     reboot on crash. When set to no(2), the switch will halt
+                     on crash and wait until power cycled. When set to
+                     useHw(3), physical jumper is used to determine the
+                     behavior of the switch. The default value is useHw(3)."
+        ::= { hpSwitchSystemConfig 1 }
+          
+    hpSwitchTimeZone OBJECT-TYPE
+        SYNTAX      INTEGER (-720..840)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The number of minutes to the east of Greenwich Mean
+                    Time(GMT). For a location west of GMT, use a negative
+                    integer."
+        ::= { hpSwitchSystemConfig 2 }
+          
+    hpSwitchDaylightTimeRule OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        none(1),
+                        alaska(2),
+                        canadaAndContinentalUS(3),
+                        middleEuropeAndPortugal(4),
+                        southernHemisphere(5),
+                        westernEurop(6),
+                        userDefined(7)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The daylight savings time rule for use by the
+                    Internet's RFC 868 Time protocol."
+        ::= { hpSwitchSystemConfig 3 }
+
+    hpSwitchDaylightBeginningMonth OBJECT-TYPE
+        SYNTAX      INTEGER (1..12)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The month that daylight saving time starts if
+                    DaylightTimeRule is set to userDefined."
+        ::= { hpSwitchSystemConfig 4 }
+
+    hpSwitchDaylightBeginningDay OBJECT-TYPE
+        SYNTAX      INTEGER (1..31)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The day of the month that daylight saving time
+                    starts if DaylightTimeRule is set to userDefined."
+        ::= { hpSwitchSystemConfig 5 }
+
+    hpSwitchDaylightEndingMonth OBJECT-TYPE
+        SYNTAX      INTEGER (1..12)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The month that daylight saving time ends if
+                    DaylightTimeRule is set to userDefined."
+        ::= { hpSwitchSystemConfig 6 }
+
+    hpSwitchDaylightEndingDay OBJECT-TYPE
+        SYNTAX      INTEGER (1..31)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The day of the month that daylight saving time emds
+                    if DaylightTimeRule is set to userDefined."
+        ::= { hpSwitchSystemConfig 7 }
+          
+    hpSwitchSystemConfigStatus OBJECT-TYPE
+        SYNTAX      ConfigStatus
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The configuration status of this group of objects.
+                    If one or more variables in this group were
+                    reconfigured since last reboot and required reboot
+                    to take effect, the value of this variable will be
+                    set to notInService."
+        ::= { hpSwitchSystemConfig 8 }
+
+    hpSwitchSystemPortLEDMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        link-activity(1),
+                        link-only(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The mode of the port LED can be either link/activity
+                    (link for 3 seconds then activity thereafter) or
+                    link-only."
+        ::= { hpSwitchSystemConfig 9 }
+
+    hpSwitchControlUnknownIPMulticast OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "When enabled along with IGMP, any IP Multicast packets
+                    that are not already controlled by IGMP will be
+                    restricted to ports that have detected a multicast
+                    router or ports configured to always forward IP
+                    multicast.  When set to disabled or when IGMP is
+                    disabled, the unknown IP Multicast packets will be
+                    flooded out all ports in the VLAN"
+        ::= { hpSwitchSystemConfig 10 }
+
+    hpSwitchIgmpDelayedGroupFlushTimer OBJECT-TYPE
+        SYNTAX      INTEGER (0..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This feature is disabled by default, which is indicated
+                    by a timer value of 0 seconds. When IGMP is enabled and
+                    the value of the Delayed Group Flush Timer is not zero,
+                    traffic filters for any previously-joined IGMP groups
+                    which no longer have active members will persist for
+                    the number of seconds indicated by the timer. This has
+                    the effect of dropping any additional unjoined traffic
+                    for an empty group until the Delayed Group Flush Timer
+                    expires, at which time the traffic filter is then
+                    removed."
+        ::= { hpSwitchSystemConfig 11 }
+
+    hpSwitchMaxFrameSize OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This is the value of the global jumbos max-frame-size
+                    supported by the switch. The default value for this is
+                    set to 9216, in order to make it compatible with
+                    previous versions of software. This configuration does
+                    not take a reboot to take effect."
+        ::= { hpSwitchSystemConfig 12 }
+
+    hpSwitchIpMTU OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This is the value of the global jumbos IP MTU or L3 MTU
+                    supported by the switch. The default value for this is
+                    set to 9198, in order to make it compatible with
+                    previous versions of software. This configuration does
+                    not take a reboot to take effect."
+        ::= { hpSwitchSystemConfig 13 }
+    
+    hpSwitchAllowV1Modules OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "enable : both V1 and V2 modules can inter-operate.
+	             disable: only V2 modules will be up and V1 modules will be
+		     powered down. 
+		     By enabling this mib object,the config will be erased and 
+		     system will reboot.The default mode is enable."   
+        ::= { hpSwitchSystemConfig 14 }
+    
+              
+    hpSwitchConsoleConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 2 }
+
+    hpSwitchTelnetAdminStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      obsolete
+        DESCRIPTION "The status of the console telnet operation."
+        ::= { hpSwitchConsoleConfig 1 }
+
+    hpSwitchTerminalType OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        vt100(2),
+                        ansi(4)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "Terminal type of the console device."
+        ::= { hpSwitchConsoleConfig 2 }
+
+    hpSwitchConsoleRefRate OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        refRate1(1),
+                        refRate3(3),
+                        refRate5(5),
+                        refRate10(10),
+                        refRate20(20),
+                        refRate30(30),
+                        refRate45(45),
+                        refRate(60)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The rate, in second per cycle, at which the display
+                    of various switch measurements."
+        ::= { hpSwitchConsoleConfig 3 }
+          
+    hpSwitchDisplayedEvent OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        none(1),
+                        major(2),
+                        notInfo(3),
+                        all(4),
+                        debug(5)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The type of event messages to display on the console."
+        ::= { hpSwitchConsoleConfig 4 }
+
+    hpSwitchConsoleConfigStatus OBJECT-TYPE
+        SYNTAX      ConfigStatus
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The configuration status of this group of objects.
+                    If one or more variables in this group were
+                    reconfigured since last reboot and required reboot
+                    to take effect, the value of this variable will be
+                    set to notInService."
+        ::= { hpSwitchConsoleConfig 5 }
+
+    hpSwitchConsoleConfigLogoutPrompt OBJECT-TYPE
+        SYNTAX      TruthValue
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "When this object is set to true (1), console/telnet/SSH
+                    logout confirmation prompt will be shown. This is the
+                    default behavior. When this object is set to false (2),
+                    logout confirmation prompt will not be shown."
+        DEFVAL      { true }
+        ::= { hpSwitchConsoleConfig 6 }
+ 
+    hpSwitchUsbConsoleAdminStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      optional
+        DESCRIPTION "The status of the USB console port."
+        ::= { hpSwitchConsoleConfig 7 }
+
+    hpSwitchSessionGlobalIdleTimeout OBJECT-TYPE
+        SYNTAX      INTEGER (0..7200)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The number of seconds to wait after no character was
+                    input to log out of a session. Valid values are 0 (no
+                    timeout) through 7200 (two hours)."
+        DEFVAL      { 0 }
+        ::= { hpSwitchConsoleConfig 8 }
+
+    hpSwitchSessionConsoleIdleTimeout OBJECT-TYPE
+        SYNTAX      INTEGER (-1..7200)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The number of seconds to wait after no character was
+                    input to log out of a serial or USB console session.
+                    This value takes precedence over
+                    hpSwitchSessionGlobalIdleTimeout for the serial or USB
+                    console. Valid values are -1 (no override), or 0 (no
+                    timeout) through 7200 (two hours)."
+        DEFVAL      { -1 }
+        ::= { hpSwitchConsoleConfig 9 }
+
+    hpSwitchPortConfig    OBJECT IDENTIFIER ::= { hpSwitchConfig 3 }
+
+    hpSwitchPortTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchPortEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the current
+                    port status in this device."
+        ::= { hpSwitchPortConfig 1 }
+
+    hpSwitchPortEntry OBJECT-TYPE
+        SYNTAX      HpSwitchPortEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "Information about a specific port status in this
+                    device."
+        INDEX       { hpSwitchPortIndex }
+        ::= { hpSwitchPortTable 1 }
+       
+    HpSwitchPortEntry ::=
+        SEQUENCE {
+            hpSwitchPortIndex                  INTEGER,
+            hpSwitchPortType                   HpSwitchPortType,
+            hpSwitchPortDescr                  DisplayString,
+            hpSwitchPortAdminStatus            INTEGER,
+            hpSwitchPortEtherMode              INTEGER,
+            hpSwitchPortVgMode                 INTEGER,
+            hpSwitchPortLinkbeat               INTEGER,
+            hpSwitchPortTrunkGroup             INTEGER,
+            hpSwitchPortBcastLimit             INTEGER,
+            hpSwitchPortFastEtherMode          INTEGER,
+            hpSwitchPortFlowControl            INTEGER,
+ --         hpSwitchPortBcastPktLimit          INTEGER,
+            hpSwitchPortTrunkType              INTEGER,
+            hpSwitchPortTrunkLACPStatus        INTEGER,
+            hpSwitchPortMDIXStatus             INTEGER,
+            hpSwitchPortAutoMDIX               INTEGER,
+            hpSwitchPortLACPKey                INTEGER,
+            hpSwitchPortTrafficTemplateName    OCTET STRING (SIZE(0..255)),
+            hpSwitchPortEEEAdminStatus         INTEGER,
+            hpSwitchPortEEEOperStatus          INTEGER,
+            hpSwitchPortEEECurrentTwSysTx      INTEGER,
+            hpSwitchPortEEEMinTwSysTx          INTEGER,
+            hpSwitchPortEEEMaxTwSysTx          INTEGER,
+            hpSwitchPortPvid                   INTEGER,
+            hpSwitchPortTaggedVlanMap1k        OCTET STRING,
+            hpSwitchPortTaggedVlanMap2k        OCTET STRING,
+            hpSwitchPortTaggedVlanMap3k        OCTET STRING,
+            hpSwitchPortTaggedVlanMap4k        OCTET STRING, 
+            hpSwitchPortEEECurrentTwSysTx1     INTEGER,
+            hpSwitchPortEEEMinTwSysTx1         INTEGER,
+            hpSwitchPortEEEMaxTwSysTx1         INTEGER
+       }
+       
+    hpSwitchPortIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The ifIndex value which uniquely identifies a row in
+                    the Interfaces Table."
+        ::= { hpSwitchPortEntry 1 }
+
+    hpSwitchPortType OBJECT-TYPE
+        SYNTAX      HpSwitchPortType
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The type of port."
+        ::= { hpSwitchPortEntry 2 }
+          
+    hpSwitchPortDescr OBJECT-TYPE
+        SYNTAX      DisplayString (SIZE (0..255))
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "A textual string containing information about the
+                    interface."
+        ::= { hpSwitchPortEntry 3 }
+
+    hpSwitchPortAdminStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      obsolete
+        DESCRIPTION "The desired state of the interface. This variable is
+                    similar to the ifAdminStatus but instead of keeping
+                    the operational status, this variable maintain the
+                    desired state in the configuration data base."
+        ::= { hpSwitchPortEntry 4 }
+
+    hpSwitchPortEtherMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        half-duplex(1),
+                        full-duplex(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The type of transmission on this port. This
+                    variable is valid only if the hpSwitchPortType
+                    was Ethernet."
+        ::= { hpSwitchPortEntry 5 }
+
+    hpSwitchPortVgMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        master(1),
+                        endNode(2),
+                        autoDetect(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The type of transmission on this port. This variable
+                    is valid only if the hpSwitchPortType was VG."
+        ::= { hpSwitchPortEntry 6 }
+
+    hpSwitchPortLinkbeat OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The linkbeat status of this port."
+        ::= { hpSwitchPortEntry 7 }
+         
+    hpSwitchPortTrunkGroup OBJECT-TYPE
+        SYNTAX      INTEGER (0..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The trunk group this port belong to."
+        ::= { hpSwitchPortEntry 8 }
+          
+    hpSwitchPortBcastLimit OBJECT-TYPE
+        SYNTAX      INTEGER (0..99)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The percentage of network bandwidth consumed by
+                    broadcast traffic through this port. If the value of
+                    this variable is 0, there will be no broadcast limit."
+        ::= { hpSwitchPortEntry 9 }
+
+    hpSwitchPortFastEtherMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        half-duplex-10Mbits(1),
+                        half-duplex-100Mbits(2),
+                        full-duplex-10Mbits(3),
+                        full-duplex-100Mbits(4),
+                        auto-neg(5),
+                        full-duplex-1000Mbits(6),
+                        auto-10Mbits(7),
+                        auto-100Mbits(8),
+                        auto-1000Mbits(9),
+                        auto-10Gbits(10),
+                        auto-10-100Mbits(11)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The type of transmission on this port. This variable
+                    is valid only if the hpSwitchPortType was Fast
+                    Ethernet."
+        ::= { hpSwitchPortEntry 10 }
+
+    hpSwitchPortFlowControl OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        disable(1),
+                        enable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The Flow Control of this port."
+        ::= { hpSwitchPortEntry 11}
+
+    
+
+ -- hpSwitchPortBcastPktLimit OBJECT-TYPE
+ --     SYNTAX      INTEGER (0..1500000) 
+ --     ACCESS      read-write
+ --     STATUS      mandatory
+ --     DESCRIPTION "Network bandwidth in packets per second consumed
+ --                 by broadcast traffic through this port. If the value
+ --                 of this variable is 0, there will be no broadcast
+ --                 limit."
+ --     ::= { hpSwitchPortEntry 12 }
+         
+    hpSwitchPortTrunkType OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        trunk(1), 
+                        fecAuto(2),
+                        saTrunk(3),
+                        lacpTrk(4),
+                        none(5),
+                        dtLacpTrk(6),
+			dtTrunk(7)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "Used in conjunction with hpSwitchPortTrunkGroup to
+                    determine what type of trunk and which group it
+                    belongs to.  If hpSwitchPortTrunkGroup is set to 0,
+                    trunking is disabled on the port and this variable
+                    becomes a 'don't care'"
+        ::= { hpSwitchPortEntry 13 }
+
+    hpSwitchPortTrunkLACPStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        disabled(1), 
+                        active(2),
+                        passive(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "Used in conjunction with hpSwitchPortTrunkType.
+                    When the trunk is a LACP trunk, this variable defines
+                    its administrative status"
+        ::= { hpSwitchPortEntry 14 }
+
+    hpSwitchPortMDIXStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        not-applicable(1),
+                        mdi(2),
+                        mdix(3),
+                        automdix(4)
+                    }			
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "Shows the MDI/MDIX setting for an RJ-45 port.
+                     Returns a value of 'not-applicable' for all
+                     ports except RJ-45 ports."
+        ::= { hpSwitchPortEntry 15 }
+	
+    hpSwitchPortAutoMDIX OBJECT-TYPE
+        SYNTAX       INTEGER {
+                        not-applicable(1),
+                        mdi(2),
+                        mdix(3),
+                        automdix(4)
+                    }			
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "Sets the MDI/MDIX value for an RJ-45 port.
+                     Negates need for crossover cables. 'automdix',
+                     'mdi', or 'mdix' may be set when the port
+                     configuration is set to any auto-negotiation mode,
+                     for example 'auto' or 'auto-100', or to any of the
+                     fixed-configuration modes, for example '100-full'.
+                     The MDI/MDIX value is maintained across port 
+                     configuration mode changes."
+        ::= { hpSwitchPortEntry 16 }
+
+    hpSwitchPortLACPKey OBJECT-TYPE
+        SYNTAX       INTEGER(0..65535)
+        ACCESS       read-write
+        STATUS       mandatory
+        DESCRIPTION  "This is the key associated with the port. The user
+                     can configure this key to control the dynamic link
+                     aggregation. The ports with the same key can be
+                     aggregated in the single trunk. The key can also be
+                     configured with dot3adAggPortActorAdminKey mib but it
+                     will be created only when the LACP is enabled on the port."
+        ::= {hpSwitchPortEntry 17}
+
+    hpSwitchPortTrafficTemplateName OBJECT-TYPE
+        SYNTAX      OCTET STRING (SIZE(0..255))
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The name of Traffic template that is applied to this
+                     port defining the priority to queue mapping."
+        ::= { hpSwitchPortEntry 18 }
+
+    hpSwitchPortEEEAdminStatus OBJECT-TYPE
+        SYNTAX       INTEGER {
+                        enable(1),
+                        disable(2)
+                     }         
+        ACCESS       read-write
+        STATUS       mandatory
+        DESCRIPTION  "This indicates the Admin status of the port EEE. This
+                      says whether energy-efficient-ethernet is enabled or
+                      disabled on the port."
+        ::= {hpSwitchPortEntry 19}
+
+    hpSwitchPortEEEOperStatus OBJECT-TYPE
+        SYNTAX       INTEGER {
+                        notSupported(1),
+                        active(2),
+                        inactive(3)
+                     }
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "This indicates the current operational status of the port 
+                      EEE. 
+                      NotSupported indicates that the local PHY do not
+                      have EEE capability.
+                      Active indicates that the port is operating in EEE mode.
+                      Inactive indicates that EEE is disabled on the port
+                      or EEE is disabled on the remote end port."
+    ::= {hpSwitchPortEntry 20}
+
+    hpSwitchPortEEECurrentTwSysTx OBJECT-TYPE
+        SYNTAX       INTEGER (1..65535)
+        UNITS        "microseconds"
+        ACCESS       read-only
+        STATUS       deprecated
+        DESCRIPTION  "This indicates the current period of time the 
+                      system has to wait between a request to transmit
+                      and its readiness to transmit."
+    ::= {hpSwitchPortEntry 21}
+
+    hpSwitchPortEEEMinTwSysTx OBJECT-TYPE
+        SYNTAX       INTEGER (1..65535)
+        UNITS        "microseconds"
+        ACCESS       read-only
+        STATUS       deprecated
+        DESCRIPTION  "This indicates the minimum period of time the 
+                      system has to wait between a request to transmit
+                      and its readiness to transmit."
+    ::= {hpSwitchPortEntry 22}
+
+    hpSwitchPortEEEMaxTwSysTx OBJECT-TYPE
+        SYNTAX       INTEGER (1..65535)
+        UNITS        "microseconds"
+        ACCESS       read-only
+        STATUS       deprecated
+        DESCRIPTION  "This indicates the maximum period of time the 
+                      system has to wait between a request to transmit
+                      and its readiness to transmit."
+    ::= {hpSwitchPortEntry 23}
+
+   hpSwitchPortPvid OBJECT-TYPE
+        SYNTAX       INTEGER (1..4096)
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "This indicates the vlan in which the given port
+                      is untagged in."
+      ::= {hpSwitchPortEntry 25}
+
+   hpSwitchPortTaggedVlanMap1k OBJECT-TYPE
+        SYNTAX      OCTET STRING (SIZE (0..128))
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "A string of octets containing one bit per VLAN ID in
+                     the range 1 through 1024. The first octet corresponds
+                     to VLAN IDs 1 through 8, the second octet to VLAN IDs
+                     9 through 16, etc. Within each octet, the most
+                     significant bit represents the lowest numbered VLAN ID,
+                     and the least significant bit represents the highest
+                     numbered VLAN ID. If a bit is set to 1, then the given 
+                     port is tagged in the corresponding VLAN ."
+    ::= {hpSwitchPortEntry 26}
+
+   hpSwitchPortTaggedVlanMap2k OBJECT-TYPE
+        SYNTAX      OCTET STRING (SIZE (0..128))
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "A string of octets containing one bit per VLAN ID in
+                     the range 1025 through 2048. The first octet corresponds
+                     to VLAN IDs 1025 through 1032, the second octet to VLAN
+                     IDs 1033 through 1040, etc. Within each octet, the most
+                     significant bit represents the lowest numbered VLAN ID,
+                     and the least significant bit represents the highest
+                     numbered VLAN ID.If a bit is set to 1, then the given
+                     port is tagged in the corresponding VLAN ."
+    ::= {hpSwitchPortEntry 27}
+
+   hpSwitchPortTaggedVlanMap3k OBJECT-TYPE
+        SYNTAX      OCTET STRING (SIZE (0..128))
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "A string of octets containing one bit per VLAN ID in
+                     the range 2049 through 3072. The first octet corresponds
+                     to VLAN IDs 2049 through 2056, the second octet to VLAN
+                     IDs 2057 through 2064, etc. Within each octet, the most
+                     significant bit represents the lowest numbered VLAN ID,
+                     and the least significant bit represents the highest
+                     numbered VLAN ID.If a bit is set to 1, then the given
+                     port is tagged in the corresponding VLAN ."
+    ::= {hpSwitchPortEntry 28}
+
+   hpSwitchPortTaggedVlanMap4k OBJECT-TYPE
+        SYNTAX      OCTET STRING (SIZE (0..128))
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "A string of octets containing one bit per VLAN ID in
+                     the range 3073 through 4096. The first octet corresponds
+                     to VLAN IDs 3073 through 3080, the second octet to VLAN
+                     IDs 3081 through 3088, etc. Within each octet, the most
+                     significant bit represents the lowest numbered VLAN ID,
+                     and the least significant bit represents the highest
+                     numbered VLAN ID. If a bit is set to 1, then the given
+                     port is tagged in the corresponding VLAN ."
+    ::= {hpSwitchPortEntry 29}
+     
+    hpSwitchPortEEECurrentTwSysTx1 OBJECT-TYPE
+        SYNTAX       INTEGER (0..65535)
+        UNITS        "microseconds"
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "This indicates the current period of time the 
+                      system has to wait between a request to transmit
+                      and its readiness to transmit."
+    ::= {hpSwitchPortEntry 30}
+
+    hpSwitchPortEEEMinTwSysTx1 OBJECT-TYPE
+        SYNTAX       INTEGER (0..65535)
+        UNITS        "microseconds"
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "This indicates the minimum period of time the 
+                      system has to wait between a request to transmit
+                      and its readiness to transmit."
+    ::= {hpSwitchPortEntry 31}
+
+    hpSwitchPortEEEMaxTwSysTx1 OBJECT-TYPE
+        SYNTAX       INTEGER (0..65535)
+        UNITS        "microseconds"
+        ACCESS       read-only
+        STATUS       mandatory
+        DESCRIPTION  "This indicates the maximum period of time the 
+                      system has to wait between a request to transmit
+                      and its readiness to transmit."
+    ::= {hpSwitchPortEntry 32}
+
+
+    hpSwitchPortConfigStatus OBJECT-TYPE
+        SYNTAX      ConfigStatus
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The configuration status of this group of objects. If
+                    one or more variables in this group were
+                    reconfigured since last reboot and required reboot to
+                    take effect, the value of this variable will be set to
+                    notInService."
+        ::= { hpSwitchPortConfig 2 }
+
+    hpSwitchLinkUpDownTrapAllPortsStatus OBJECT-TYPE
+        SYNTAX       INTEGER {
+                        enable(1),
+                        disable(2)
+                     }
+        ACCESS       read-write
+        STATUS       mandatory
+        DESCRIPTION "Used to either enable/disable the Link Up/Link Down traps for all the ports."
+        ::= { hpSwitchPortConfig 3 }
+
+    hpSwitchIpxConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 4 }
+
+    hpSwitchIpxConfigStatus OBJECT-TYPE
+        SYNTAX      ConfigStatus
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The status of the IPX configuration table."
+        ::= { hpSwitchIpxConfig 2 }
+
+
+    hpSwitchIpConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 5 }
+
+    hpSwitchIpTimepAdminStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        manual(1),
+                        disable(2),
+                        dhcp(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of the Time protocol." 
+        ::= { hpSwitchIpConfig 1 }
+       
+    hpSwitchIpTimepServerAddr OBJECT-TYPE
+        SYNTAX      IpAddress
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "### deprecated ### The IP address of the Time server." 
+        ::= { hpSwitchIpConfig 2 }
+       
+    hpSwitchIpTimepPollInterval OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The client poll interval of the Time server in
+                    minutes." 
+        ::= { hpSwitchIpConfig 3 }
+   
+    hpSwitchIpConfigStatus OBJECT-TYPE
+        SYNTAX      ConfigStatus
+        ACCESS      read-only
+        STATUS      obsolete
+        DESCRIPTION "The configuration status of the Timep and IP
+                    related objects."
+        ::= { hpSwitchIpConfig 5 }
+
+    hpSwitchIpTftpMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        secure(1),
+                        unsecure(2)
+                    }
+        ACCESS      read-write
+        STATUS      obsolete
+        DESCRIPTION "The operational mode of the Tftp protocol.
+                     This object is obsoleted by 
+                     hpicfDownloadTftpServerConfig."
+        ::= { hpSwitchIpConfig 6 }
+
+    hpSwitchIpTimepInetServerAddrType OBJECT-TYPE
+        SYNTAX      InetAddressType
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The IP address type of the Time server." 
+        ::= { hpSwitchIpConfig 7 }
+
+    hpSwitchIpTimepInetServerAddr OBJECT-TYPE
+        SYNTAX      InetAddress
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The IP address (of the Time server)to which this entry's
+                    addressing information pertains.
+                    hpSwitchIpTimepInetServerAddr is always interpreted within 
+                    the context of hpSwitchIpTimepInetServerAddrType."
+        ::= { hpSwitchIpConfig 8 }
+
+    hpSwitchIpTimepIsOobm OBJECT-TYPE
+        SYNTAX      TruthValue
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object indicates whether this TIMEP Server
+                    is reachable over OOBM (Out Of Band Management)
+                    interface or not. This mib object will be applicable
+                    only if there is a physical OOBM port on the device."
+        DEFVAL      {false}
+        ::= { hpSwitchIpConfig 9 }
+
+    hpSwitchSerialLinkConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 6 }
+
+    hpSwitchSLinkBaudRate OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        speedSense(1),
+                        baudRate300(2),
+                        baudRate600(3),
+                        baudRate1200(4),
+                        baudRate2400(5),
+                        baudRate4800(6),
+                        baudRate9600(7),
+                        baudRate19200(8),
+                        baudRate38400(9),
+                        baudRate57600(10),
+                        baudRate115200(11)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The rate of data transfer between the console and
+                    the node. baudRate1 is speed sense."
+        ::= { hpSwitchSerialLinkConfig 1 }
+
+    hpSwitchSLinkFlowCtrl OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        none(1),
+                        xonXoff(2),
+                        robustXonXoff(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The flow-control mechanism between the console and
+                    the switch."
+        ::= { hpSwitchSerialLinkConfig 2 }
+
+    hpSwitchSLinkConnInactTime OBJECT-TYPE
+        SYNTAX      INTEGER (0..120)
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "The number of minutes to wait after no character was
+                    input to log out the console. Valid values are 0 (not
+                    to log out of the console for inactivity) through 120
+                    (two hours)."
+        ::= { hpSwitchSerialLinkConfig 3 }
+
+    hpSwitchSLinkModemConnTime OBJECT-TYPE
+        SYNTAX      INTEGER (0..300)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The number of seconds to wait for data mode and
+                    clear to send and receive ready signals after
+                    asserting request to send and terminal ready signals.
+                    Valid values are 0 (switch will wait forever for the
+                    modem) through 300 (5 minutes)."
+        ::= { hpSwitchSerialLinkConfig 4 }
+
+    hpSwitchSLinkModemLostRecvTime OBJECT-TYPE
+        SYNTAX      INTEGER (0..5000)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The number of milliseconds the receiver ready signal
+                    is allowed to drop before the switch will disconnect
+                    the modem. Valid values are 0 (the switch will wait
+                    forever) through 5000 (5 seconds)."
+        ::= { hpSwitchSerialLinkConfig 5 }
+
+    hpSwitchSLinkModemDisConnTime OBJECT-TYPE
+        SYNTAX      INTEGER (0..60)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The number of seconds to wait after the modem is
+                    disconnected before allowing the modem to be
+                    reconnected. Valid values are 0 (allow a connection
+                    as soon as possible, the default) through 60 (1
+                    minute)."
+        ::= { hpSwitchSerialLinkConfig 6 }
+
+    hpSwitchSLinkParity OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        parityNone(1),
+                        parityOdd(2),
+                        parityEven(3)
+                    }
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The type of parity to use between the console and
+                    the node."
+        ::= { hpSwitchSerialLinkConfig 7 }
+
+    hpSwitchSLinkCharBits OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        char8Bits(1),
+                        char7Bits(2)
+                    }
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The number of bits per character to use between
+                    the console and the node."
+        ::= { hpSwitchSerialLinkConfig 8 }
+
+    hpSwitchSLinkStopBits OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        stop1Bits(1),
+                        stop1andHalfBits(2),
+                        stop2Bits(3)
+                    }
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The number of stop bots to use when communicating
+                    between the console and the node."
+        ::= { hpSwitchSerialLinkConfig 9 }
+
+    hpSwitchSLinkConfigStatus OBJECT-TYPE
+        SYNTAX      ConfigStatus
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The configuration status of this group of objects.
+                    If one or more variables in this group were
+                    reconfigured since last reboot and required reboot
+                    to take effect, the value of this variable will be
+                    set to notInService."
+        ::= { hpSwitchSerialLinkConfig 10 }
+
+
+    hpSwitchFilterConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 8 }
+
+    -- A sample of the traffic filter
+
+    -- type      MacAddr   ProType  SrcPort       PortMask
+
+    -- unicast   MAC address    X     port #    Bit Mask of ports
+    -- multicast MAC address    X        X      Bit Mask of ports
+    -- port           X         X     port #    Bit Mask of ports
+    -- level 3        X      protocol    X      Bit Mask of ports
+
+    hpSwitchFilterConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchFilterConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the 
+                    traffic filter configuration in this device."
+        ::= { hpSwitchFilterConfig 1 }
+
+    hpSwitchFilterConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchFilterConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "Information about a traffic filter configuration 
+                    in this device."
+        INDEX       { hpSwitchFilterIndex }
+        ::= { hpSwitchFilterConfigTable 1 }
+       
+    HpSwitchFilterConfigEntry ::=
+        SEQUENCE {
+            hpSwitchFilterIndex              INTEGER,
+            hpSwitchFilterType               INTEGER,
+            hpSwitchFilterSrcPort            INTEGER,
+            hpSwitchFilterMacAddr            MacAddress,
+            hpSwitchFilterProtocolType       INTEGER,
+            hpSwitchFilterPortMask           OCTET STRING,
+            hpSwitchFilterEntryStatus        RowStatus,
+            hpSwitchFilterName               DisplayString
+        }
+       
+    hpSwitchFilterIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "An index that uniquely identifies a traffic filter
+                    for which this entry contains information."
+        ::= { hpSwitchFilterConfigEntry 1 }
+          
+    hpSwitchFilterType OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        multicast(1),
+                        level-3(2),
+                        port(3),
+                        unicast(4)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The type of filter."
+        ::= { hpSwitchFilterConfigEntry 2 }
+          
+    hpSwitchFilterSrcPort OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This variable is required when a port filter or
+                    unicast filter was configured. It will be ignored
+                    otherwise."
+        ::= { hpSwitchFilterConfigEntry 3 }
+         
+    hpSwitchFilterMacAddr OBJECT-TYPE
+        SYNTAX      MacAddress
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This variable is valid only if a unicast or
+                    multicast filter was defined. It will be ignored
+                    otherwise."
+        ::= { hpSwitchFilterConfigEntry 4 }
+         
+    hpSwitchFilterProtocolType OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This variable is valid only if a level-3 filter
+                    was defined.  It will be ignored otherwise. This
+                    variable will contain either a etherType (DIX
+                    Ethernet) or SAP(IEEE 802) value of the level-3
+                    protocol."
+        ::= { hpSwitchFilterConfigEntry 5 }
+         
+    hpSwitchFilterPortMask OBJECT-TYPE
+        SYNTAX      OCTET STRING 
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This variable specifies a group of ports whose
+                    traffic will be filtered. Each octet within the value
+                    of this object specifies a set of eight ports, with
+                    the first octet specifying ports 1 through 8, the
+                    second octet specifying ports 9 through 16, etc.
+                    Within each octet, the most significant bit represents
+                    the lowest numbered port, and the least significant bit
+                    represents the highest numbered port.  Thus, each port
+                    of the switch is represented by a single bit within
+                    the value of this object."
+        ::= { hpSwitchFilterConfigEntry 6 }
+
+    hpSwitchFilterEntryStatus OBJECT-TYPE
+        SYNTAX      RowStatus
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The status of a filter entry."
+        ::= { hpSwitchFilterConfigEntry 7 }
+
+    hpSwitchFilterName OBJECT-TYPE
+        SYNTAX      DisplayString 
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This variable applies only when 'hpSwitchFilterType' is 
+                     port. This variable specifies the filter name and can
+                     only be specified for named filters. 
+                     Filter name can be upto 20 characters long and cannot 
+                     contain tilde (~). 
+                     when a entry is created without specifying this variable, 
+                     port-name will be assumed as filter-name (unnamed-filter). 
+                     Filter-name for named filter should be present in
+                     'hpicfBridgeFilterName' before a port can be mapped to it."         ::= { hpSwitchFilterConfigEntry 8 } 
+         
+    hpSwitchProbeConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 9 }
+
+    hpSwitchProbeType OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        ports(1),
+                        vlan(2)
+                    }
+        ACCESS      read-write
+        STATUS      obsolete
+        DESCRIPTION "If the value of this variable is equal to 1, the
+                    probe will monitor those ports specified by
+                    hpSwitchProbedPortMask, otherwise all of the port
+                    belong to the virtual LAN specified by
+                    hpSwitchProbedVlanId will be monitored."
+        ::= { hpSwitchProbeConfig 1 }
+
+    hpSwitchProbedVlanId OBJECT-TYPE
+        SYNTAX      VlanID
+        ACCESS      read-write
+        STATUS      obsolete
+        DESCRIPTION "The probed virtual LAN."
+        ::= { hpSwitchProbeConfig 2 }
+
+    hpSwitchProbePort OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      obsolete
+        DESCRIPTION "The port that every packet passes through those
+                    probed ports will be copied to."
+        ::= { hpSwitchProbeConfig 3 }
+
+    hpSwitchProbeAdminStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      obsolete
+        DESCRIPTION "The operational status of the probing function"
+        ::= { hpSwitchProbeConfig 4 }
+
+    hpSwitchProbedPortMask OBJECT-TYPE
+        SYNTAX      OCTET STRING
+        ACCESS      read-write
+        STATUS      obsolete
+        DESCRIPTION "This variable specifies a group of ports which will
+                    be probed. Each octet within the value of this
+                    object specifies a set of eight ports, with the
+                    first octet specifying ports 1 through 8, the second
+                    octet specifying ports 9 through 16, etc. Within each
+                    octet, the most significant bit represents the lowest
+                    numbered port, and the least significant bit
+                    represents the highest numbered port.  Thus, each port
+                    of the switch is represented by a single bit within
+                    the value of this object."
+        ::= { hpSwitchProbeConfig  5 }
+
+        
+    -- The FDDI IP Fragmention Configuration group
+
+    hpSwitchFddiIpFragConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 11 }
+        
+    -- The FDDI IP Fragmention Configuration Table
+        
+    hpSwitchFddiIpFragConfigTable OBJECT-TYPE 
+        SYNTAX      SEQUENCE OF HpSwitchFddiIpFragConfigEntry 
+        ACCESS      not-accessible 
+        STATUS      mandatory
+        DESCRIPTION "A list of IP fragmentation configuration 
+                    parameters for the FDDI cards in the switch." 
+        ::= { hpSwitchFddiIpFragConfig 1 } 
+
+    hpSwitchFddiIpFragConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchFddiIpFragConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "An Fddi IP fragmentation entry which is 
+                    containing configurable options for the FDDI 
+                    cards in the switch."
+        INDEX       { hpSwitchFddiIpFragConfigIndex }
+        ::= { hpSwitchFddiIpFragConfigTable 1 }
+
+    HpSwitchFddiIpFragConfigEntry ::=
+        SEQUENCE {
+            hpSwitchFddiIpFragConfigIndex          INTEGER,
+            hpSwitchFddiIpFragConfigStatus         INTEGER
+        }
+          
+    hpSwitchFddiIpFragConfigIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "A unique value for each FDDI Card.  
+                    The value for each FDDI card must remain constant 
+                    at least from one re-initialization of the entity's 
+                    network management system to the next 
+                    re-initialization." 
+        ::= { hpSwitchFddiIpFragConfigEntry 1 }
+
+    hpSwitchFddiIpFragConfigStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of FDDI IP fragmentation
+                    for each FDDI card. 
+                    enable(1): FDDI card will fragment all packets which
+                            are bigger than the Ethernet packet size 
+                            limitation, 1518 Bytes.
+                    disable(2): FDDI card will drop all packets which
+                            are bigger than the Ethernet packet size 
+                            limitation, 1518 Bytes."
+        ::= { hpSwitchFddiIpFragConfigEntry 2 }
+
+
+    hpSwitchABCConfig OBJECT IDENTIFIER ::= {hpSwitchConfig 12 }
+
+    hpSwitchABCConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchABCConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A list of Automatic Broadcast Control (ABC
+                    disable/enable entries for each VLAN on the switch."
+        ::= { hpSwitchABCConfig 1 }
+
+    hpSwitchABCConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchABCConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "Contains the ABC status for each VLAN on the switch,
+                    including IP RIP control and IPX RIP/SAP control."
+        INDEX       { hpSwitchABCConfigVlan }
+        ::= { hpSwitchABCConfigTable 1 }
+
+    HpSwitchABCConfigEntry ::=
+        SEQUENCE {
+            hpSwitchABCConfigVlan                   VlanID,
+            hpSwitchABCConfigControl                INTEGER,
+            hpSwitchABCConfigIpRipControl           INTEGER,
+            hpSwitchABCConfigIpxRipSapControl       INTEGER,
+            hpSwitchABCConfigVlanBcastLimit         INTEGER,
+ --         hpSwitchABCConfigVlanBcastPktLimit      INTEGER,
+            hpSwitchABCConfigAutoGatewayConfig      INTEGER
+        }
+
+    hpSwitchABCConfigVlan OBJECT-TYPE
+        SYNTAX      VlanID
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The user is able to enable/disable ABC on a per VLAN
+                    basis, so the VLAN serves as an index into the ABC
+                    configuration table."
+        ::= { hpSwitchABCConfigEntry 1 }
+
+    hpSwitchABCConfigControl OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        ipipx(1),
+                        ip(2),
+                        ipx(3),
+                        disable(4)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "ABC control is either IP&IPX or IP or IPX or disabled 
+                    for each VLAN on the switch."
+        ::= { hpSwitchABCConfigEntry 2 }
+
+    hpSwitchABCConfigIpRipControl OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "IP RIP control. If this feature is enabled then IP
+                    RIP packets will only be forwarded on ports, within
+                    its VLAN domain, that have heard RIPs before.  If
+                    this feature is disabled then IP RIP packets seen by
+                    a given port will be forwarded to all ports within its
+                    VLAN domain."
+        ::= { hpSwitchABCConfigEntry 3 }
+
+    hpSwitchABCConfigIpxRipSapControl OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "IPX RIP/SAP control. If this feature is enabled then
+                    IPX RIP/SAP packets will only be forwarded on ports,
+                    within its VLAN domain, that have previously  seen
+                    RIP/SAP packets.  If this feature is disabled then
+                    IPX RIP and SAP packets seen by a given port will be
+                    forwarded to all ports within its VLAN domain."
+        ::= { hpSwitchABCConfigEntry 4 }
+
+    hpSwitchABCConfigVlanBcastLimit OBJECT-TYPE
+        SYNTAX      INTEGER (0..99)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The percentage of network bandwidth consumed by
+                    broadcast traffic through VLAN. If the value of this
+                    variable is 0, there will be no broadcast limit. There
+                    is a default value chosen when ABC is enabled."
+        ::= { hpSwitchABCConfigEntry 5 }
+
+ -- hpSwitchABCConfigVlanBcastPktLimit OBJECT-TYPE
+ --     SYNTAX      INTEGER (0..2147483647)
+ --     ACCESS      read-write
+ --     STATUS      mandatory
+ --     DESCRIPTION "Network bandwidth in packets per second consumed
+ --                 by broadcast traffic through VLAN. If the value of
+ --                 this variable is 0, there will be no broadcast limit.
+ --                 There is a default value chosen when ABC is enabled."
+ --     ::= { hpSwitchABCConfigEntry 6 }
+
+    hpSwitchABCConfigAutoGatewayConfig OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "If this feature is enabled then DHCP packets both
+                    ucast and bcast with UDP destination port 68 will be
+                    intercepted.  DHCP packets with the router option in
+                    the options field in the DHCP message will be
+                    modified so that the first daddress in the router
+                    option is the same as the clients address.  Thus the
+                    client will be its own default gateway.  If this
+                    feature is disabled DHCP packets will be forwarded as
+                    usual."
+        ::= { hpSwitchABCConfigEntry 7 }
+
+
+    hpSwitchStpConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 14 }
+
+    hpSwitchStpVlanTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchStpVlanEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains vlan-specific information
+                    for the Spanning Tree Protocol."
+        ::= { hpSwitchStpConfig 1}
+
+    hpSwitchStpVlanEntry OBJECT-TYPE
+        SYNTAX      HpSwitchStpVlanEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A list of information maintained by every port
+                    about the Spanning Tree Protocol state for that
+                    port."
+        INDEX       { hpSwitchStpVlan }
+        ::= { hpSwitchStpVlanTable 1 }
+
+    HpSwitchStpVlanEntry ::=
+        SEQUENCE {
+            hpSwitchStpVlan                    VlanID,
+            hpSwitchStpAdminStatus             INTEGER,
+            hpSwitchStpPriority                INTEGER,
+            hpSwitchStpMaxAge                  Timeout,
+            hpSwitchStpHelloTime               Timeout,
+            hpSwitchStpForwardDelay            Timeout
+        }
+
+    hpSwitchStpVlan OBJECT-TYPE
+        SYNTAX      VlanID
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The VLAN ID for which this entry contains STP
+                     configuration."
+        ::= { hpSwitchStpVlanEntry 1 }
+
+    hpSwitchStpAdminStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The admin status of the spanning tree
+                    protocol."
+        ::= { hpSwitchStpVlanEntry 2 }
+
+    hpSwitchStpPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The value of the write-able portion of the Bridge
+                    ID, i.e., the first two octets of the (8 octet
+                    long) Bridge ID.  The other (last) 6 octets of the
+                    Bridge ID are given by the value of
+                    dot1dBaseBridgeAddress."
+        REFERENCE   "IEEE 802.1D-1990: Section 4.5.3.7"
+        ::= { hpSwitchStpVlanEntry 3 }
+
+    hpSwitchStpMaxAge OBJECT-TYPE
+        SYNTAX      Timeout
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The maximum age of Spanning Tree Protocol
+                    information learned from the network on any port
+                    before it is discarded, in units of hundredths of
+                    a second.  This is the actual value that this
+                    bridge is currently using."
+        REFERENCE   "IEEE 802.1D-1990: Section 4.5.3.4"
+        ::= { hpSwitchStpVlanEntry 4 }
+
+    hpSwitchStpHelloTime OBJECT-TYPE
+        SYNTAX      Timeout
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The amount of time between the transmission of
+                    Configuration bridge PDUs by this node on any port
+                    when it is the root of the spanning tree or trying
+                    to become so, in units of hundredths of a second.
+                    This is the actual value that this bridge is
+                    currently using."
+        REFERENCE   "IEEE 802.1D-1990: Section 4.5.3.5"
+        ::= { hpSwitchStpVlanEntry 5 }
+
+    hpSwitchStpForwardDelay OBJECT-TYPE
+        SYNTAX      Timeout
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This time value, measured in units of hundredths
+                    of a second, controls how fast a port changes its
+                    spanning state when moving towards the Forwarding
+                    state.  The value determines how long the port
+                    stays in each of the Listening and Learning
+                    states, which precede the Forwarding state.  This
+                    value is also used, when a topology change has
+                    been detected and is underway, to age all dynamic
+                    entries in the Forwarding Database.  [Note that
+                    this value is the one that this bridge is
+                    currently using, in contrast to
+                    dot1dBridgeForwardDelay which is the value that
+                    this bridge and all others would start using
+                    if/when this bridge were to become the root.]"
+        REFERENCE   "IEEE 802.1D-1990: Section 4.5.3.6"
+        ::= { hpSwitchStpVlanEntry 6 }
+
+    hpSwitchStpPortTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchStpPortEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains port-specific information
+                    for the Spanning Tree Protocol."
+        ::= { hpSwitchStpConfig 2 }
+
+    hpSwitchStpPortEntry OBJECT-TYPE
+        SYNTAX      HpSwitchStpPortEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A list of information maintained by every port
+                    about the Spanning Tree Protocol state for that
+                    port."
+        INDEX       { hpSwitchStpPort }
+        ::= { hpSwitchStpPortTable 1 }
+
+    HpSwitchStpPortEntry ::=
+        SEQUENCE {
+            hpSwitchStpPort                   INTEGER,
+            hpSwitchStpPortType               HpSwitchPortType,
+            hpSwitchStpPortSrcMac             MacAddress,
+            hpSwitchStpPortPriority           INTEGER,
+            hpSwitchStpPortPathCost           INTEGER,
+            hpSwitchStpPortMode               INTEGER,
+            hpSwitchStpPortBpduFilter         INTEGER,
+            hpSwitchStpPortBpduProtection     INTEGER,
+            hpSwitchStpPortErrantBpduCounter  Counter32,
+	    hpSwitchStpPortPvstFilter         TruthValue,
+	    hpSwitchStpPortPvstProtection     TruthValue
+        }
+
+    hpSwitchStpPort OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The port number of the port for which this entry
+                    contains Spanning Tree Protocol management
+                    information."
+        REFERENCE
+             "IEEE 802.1D-1990: Section 6.8.2.1.2"
+        ::= { hpSwitchStpPortEntry 1 }
+
+    hpSwitchStpPortType OBJECT-TYPE
+        SYNTAX      HpSwitchPortType
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The type of port."
+        ::= { hpSwitchStpPortEntry 2 }
+
+    hpSwitchStpPortSrcMac OBJECT-TYPE
+        SYNTAX      MacAddress
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The source MAC address used by the spanning
+                    tree protocol."
+        ::= { hpSwitchStpPortEntry 3 }
+
+    hpSwitchStpPortPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The value of the priority field which is
+                    contained in the first (in network byte order)
+                    octet of the (2 octet long) Port ID.  The other
+                    octet of the Port ID is given by the value of
+                    dot1dStpPort."
+        REFERENCE   "IEEE 802.1D-1990: Section 4.5.5.1"
+        ::= { hpSwitchStpPortEntry 4 }
+
+    hpSwitchStpPortPathCost OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The contribution of this port to the path cost of
+                    paths towards the spanning tree root which include
+                    this port.  802.1D-1990 recommends that the
+                    default value of this parameter be in inverse
+                    proportion to the speed of the attached LAN."
+        REFERENCE   "IEEE 802.1D-1990: Section 4.5.5.3"
+        ::= { hpSwitchStpPortEntry 5 }
+
+    hpSwitchStpPortMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        normal(1),
+                        fast(2),
+			uplink(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "If the value of this variable is set to fast(2), the 
+                    port will go directly into the Forwarding State when a
+                    device is connected to it. Use this feature only on
+                    ports that are connected to an individual PC or
+                    Workstation, to allow these ports to come up and
+                    move quickly to the Forwarding State instead of going
+                    through the normal STP initialization process.
+
+                    Caution: Changing the value of this variable to fast(2)
+                    on ports connected to a hub or switch may cause loops
+                    in your network."
+        ::= { hpSwitchStpPortEntry 6 }
+
+    hpSwitchStpPortBpduFilter OBJECT-TYPE
+        SYNTAX      INTEGER { 
+                        true(1), 
+                        false(2) 
+                    }
+        ACCESS      read-write
+        STATUS      optional
+        DESCRIPTION "Setting True will cause port to ignore ingress BPDUs
+                    and not generate egress BPDUs, as the result the port 
+                    will stay in forwarding state. Default is False."
+        DEFVAL      { false }
+        ::= { hpSwitchStpPortEntry 7 }
+
+    hpSwitchStpPortBpduProtection OBJECT-TYPE
+        SYNTAX      INTEGER { 
+                        true(1), 
+                        false(2) 
+                    }
+        ACCESS      read-write
+        STATUS      optional
+        DESCRIPTION "Setting True indicates that no BPDUs are expected to 
+                    be received on this port. At the reception of BPDUs 
+                    the BPDU protection mechanism will disable this port
+                    and port will transition into bpduError state.
+                    Default is False."
+        DEFVAL      { false }
+        ::= { hpSwitchStpPortEntry 8 }
+
+    hpSwitchStpPortErrantBpduCounter OBJECT-TYPE
+        SYNTAX      Counter32
+        ACCESS      read-only
+        STATUS      optional
+        DESCRIPTION "Counts the number of BPDUs that were not expected 
+                    to be received on this port. This counter gets 
+                    incremented only if hpSwitchStpPortBpduProtection,
+                    hpSwitchStpPortBpduFilter, hpSwitchStpPortPvstFilter,
+                    or hpSwitchStpPvstProtection is True for the port, 
+                    otherwise it is cleared to zero."
+        ::= { hpSwitchStpPortEntry 9 }
+
+    hpSwitchStpPortPvstFilter OBJECT-TYPE
+        SYNTAX      TruthValue
+        ACCESS      read-write
+        STATUS      optional
+        DESCRIPTION "Setting True will cause the port to ignore incoming
+                    PVST BPDUs.
+                    Default is False."
+        DEFVAL      { false }
+        ::= { hpSwitchStpPortEntry 10 }
+
+    hpSwitchStpPortPvstProtection OBJECT-TYPE
+        SYNTAX      TruthValue
+        ACCESS      read-write
+        STATUS      optional
+        DESCRIPTION "Setting True indicates that any PVST BPDUs arriving
+                    on this port should be discarded and that this will
+                    cause the port to be disabled.  The port will remain
+                    disabled for the time period indicated by
+                    hpSwitchStpBpduProtectionTimeout.
+                    Default is False."
+        DEFVAL      { false }
+        ::= { hpSwitchStpPortEntry 11 }
+
+    hpSwitchStpTrapCntl OBJECT-TYPE
+        SYNTAX       BITS {
+                         errantBpdu(0),
+                         newRoot(1),
+                         rootGuard(2),
+                         loopGuard(3)
+                     }
+        ACCESS       read-write
+        STATUS       optional
+        DESCRIPTION  "Controls generation of SNMP traps by STP-enabled switch
+                     for events defined in this MIB.
+                     The set bit means 'enabled'.
+
+                      - errantBpdu(0)
+                        The state of this bit specifies whether the 
+                        notification trap allowed to be send when 
+                        unexpected (errant) BPDU is received on a port.
+
+                       - newRoot(1):
+                        The state of this bit specifies whether the 
+                        trap is allowed to be send when 
+                        sending agent has become the new root. 
+                        Currently, it is only supported in RPVST mode.
+
+                      - rootGuard(2): 
+                        The state of this bit specifies whether  the 
+                        trap is allowed to be send when Root-Guard
+                        enabled port receives superior BPDUs 
+                        on its interface.
+                        Currently, it is only supported in RPVST mode.
+
+                      - loopGuard(3):
+                        The state of this bit specifies whether the trap 
+                        is allowed to be send when a Loop Guard 
+                        enabled port stops receiving BPDUs from its 
+                        designated port.
+                        Currently, it is only supported in RPVST mode."
+
+        ::= { hpSwitchStpConfig 3 }
+
+    hpSwitchStpBpduProtectionTimeout OBJECT-TYPE
+        SYNTAX       INTEGER
+        ACCESS       read-write
+        STATUS       optional
+        DESCRIPTION  "The duration of time in seconds when a protected port
+                     affected by receiving of an unauthorized BPDU will 
+                     remain in down state. The zero value means infinity."
+        DEFVAL      { 0 }
+        ::= { hpSwitchStpConfig 4 }
+
+        hpSwitchSTPAdminStatus OBJECT-TYPE
+            SYNTAX          INTEGER {
+                                 enabled(1),
+                                 disabled(2)
+                             }
+            ACCESS      read-write
+            STATUS          mandatory
+            DESCRIPTION
+                "The administrative status of STP in the switch.
+                 The value 'enabled' denotes that the
+                 STP is active; 'disabled' disables it. 
+                "
+            ::= { hpSwitchStpConfig 5 }
+
+      hpicfSwitchSTPVersion    OBJECT-TYPE
+            SYNTAX      INTEGER {
+                                 mstp(3),
+                                 rapidPvst(4)
+                             }
+            ACCESS      read-write
+            STATUS      mandatory
+            DESCRIPTION
+                "The version of Spanning Tree Protocol the bridge is
+                 currently running.  "
+            ::= { hpSwitchStpConfig 6 }
+
+    hpSwitchIgmpConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 15 }
+
+    hpSwitchIgmpConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchIgmpConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the IGMP
+                    Querier capacity or High Priority Forward
+                    configuration on any given vlan on the switch."
+        ::= { hpSwitchIgmpConfig 1 }
+
+    hpSwitchIgmpConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchIgmpConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "Information about the IGMP Querier feature associated
+                    with a specific virtual LAN in this device."
+        INDEX       { hpSwitchIgmpVlanIndex }
+        ::= { hpSwitchIgmpConfigTable 1 }
+
+    HpSwitchIgmpConfigEntry ::= 
+        SEQUENCE {
+            hpSwitchIgmpVlanIndex             VlanID,
+            hpSwitchIgmpState                 INTEGER,
+            hpSwitchIgmpQuerierState          INTEGER,
+            hpSwitchIgmpPriorityState         INTEGER,
+            hpSwitchIgmpQuerierInterval       INTEGER,
+            hpSwitchIgmpProxyDomainMap        INTEGER
+        }
+
+    hpSwitchIgmpVlanIndex OBJECT-TYPE
+        SYNTAX      VlanID
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "An index that uniquely identifies the IGMP
+                    configuration of a virtual LAN for which this entry
+                    contains information."
+        ::= { hpSwitchIgmpConfigEntry 1 }
+
+    hpSwitchIgmpState OBJECT-TYPE
+        SYNTAX      INTEGER{
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of the IGMP support for
+                    this virtual LAN."
+        ::= { hpSwitchIgmpConfigEntry 2 }
+
+    hpSwitchIgmpQuerierState OBJECT-TYPE
+        SYNTAX      INTEGER{
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of the IGMP Querier
+                    functionality for this virtual LAN."
+        ::= { hpSwitchIgmpConfigEntry 3 }
+
+    hpSwitchIgmpPriorityState OBJECT-TYPE
+        SYNTAX      INTEGER{
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "The operational status of the IGMP Forward with High
+                    Priority mode for  this virtual LAN. This feature is now 
+                    deprecated since the functionality is not supported by 
+                    IGMP."
+        ::= { hpSwitchIgmpConfigEntry 4 }
+
+    hpSwitchIgmpQuerierInterval OBJECT-TYPE
+        SYNTAX      INTEGER (5..300)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The time (in seconds) to wait between Querier
+                    election cycles for this virtual LAN."
+        ::= { hpSwitchIgmpConfigEntry 5 }
+
+    hpSwitchIgmpProxyDomainMap OBJECT-TYPE
+        SYNTAX      INTEGER
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "Denotes the IGMP proxy domains that are associated with
+                     this VLAN. Only IGMP proxy domains that already exist 
+                     can be associated."
+        ::= { hpSwitchIgmpConfigEntry 6 }
+
+    hpSwitchIgmpPortConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchIgmpPortConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the IGMP port
+                    configurations on this switch."
+        ::= { hpSwitchIgmpConfig 2 }
+
+    hpSwitchIgmpPortConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchIgmpPortConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "The information associated with each IGMP port
+                    configuration."
+        INDEX       { hpSwitchIgmpPortIndex }
+        ::= { hpSwitchIgmpPortConfigTable 1 }
+
+    HpSwitchIgmpPortConfigEntry ::=        
+        SEQUENCE {
+            hpSwitchIgmpPortIndex             INTEGER,
+            hpSwitchIgmpPortType              HpSwitchPortType,
+            hpSwitchIgmpIpMcastState          INTEGER
+        }
+
+    hpSwitchIgmpPortIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The ifIndex value which uniquely identifies a row in
+                    the Interfaces Table."
+        ::= { hpSwitchIgmpPortConfigEntry 1 }
+
+    hpSwitchIgmpPortType OBJECT-TYPE
+        SYNTAX      HpSwitchPortType
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The type of port."
+        ::= { hpSwitchIgmpPortConfigEntry 2 }
+
+    hpSwitchIgmpIpMcastState OBJECT-TYPE
+        SYNTAX      INTEGER{
+                        auto(1),
+                        blocked(2),
+                        forward(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of the IGMP feature for this
+                    port or trunk.  1 implies that all IP Multicast
+                    traffic will be monitored on the port, 2 implies that
+                    IP Multicast traffic will be dropped on the port, and
+                    3 implies that all IP Multicast traffic will be
+                    forwarded without the switch examining it."
+        ::= { hpSwitchIgmpPortConfigEntry 3 }
+
+
+    hpSwitchIgmpPortConfigTable2 OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchIgmpPortConfigEntry2
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the IGMP port
+                    configurations on this switch.  This table supersedes
+                    hpSwitchIgmpPortConfigTable for products which support
+                    multiple VLANs on each port."
+        ::= { hpSwitchIgmpConfig 3 }
+
+    hpSwitchIgmpPortConfigEntry2 OBJECT-TYPE
+        SYNTAX      HpSwitchIgmpPortConfigEntry2
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "The information associated with each IGMP port
+                    configuration."
+        INDEX       { hpSwitchIgmpPortVlanIndex2, hpSwitchIgmpPortIndex2 }
+        ::= { hpSwitchIgmpPortConfigTable2 1 }
+
+    HpSwitchIgmpPortConfigEntry2 ::=        
+        SEQUENCE {
+            hpSwitchIgmpPortVlanIndex2          INTEGER,
+            hpSwitchIgmpPortIndex2              INTEGER,
+            hpSwitchIgmpPortType2               HpSwitchPortType,
+            hpSwitchIgmpIpMcastState2           INTEGER,
+            hpSwitchIgmpPortForcedLeaveState    INTEGER,
+            hpSwitchIgmpPortFastLeaveState      INTEGER
+        }
+
+    hpSwitchIgmpPortVlanIndex2 OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The Vlan Index value which uniquely identifies a row
+                    in the Interfaces Table."
+        ::= { hpSwitchIgmpPortConfigEntry2 1 }
+
+    hpSwitchIgmpPortIndex2 OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The ifIndex value which uniquely identifies a row in
+                    the Interfaces Table."
+        ::= { hpSwitchIgmpPortConfigEntry2 2 }
+
+    hpSwitchIgmpPortType2 OBJECT-TYPE
+        SYNTAX      HpSwitchPortType
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The type of port."
+        ::= { hpSwitchIgmpPortConfigEntry2 3 }
+
+    hpSwitchIgmpIpMcastState2 OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        auto(1),
+                        blocked(2),
+                        forward(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of the IGMP feature for this
+                    port or trunk.  1 implies that all IP Multicast traffic
+                    will be monitored on the port, 2 implies that
+                    IP Multicast traffic will be dropped on the port, and
+                    3 implies that all IP Multicast traffic will be
+                    forwarded without the switch examining it."
+        ::= { hpSwitchIgmpPortConfigEntry2 4 }
+
+    hpSwitchIgmpPortForcedLeaveState OBJECT-TYPE
+        SYNTAX      INTEGER{
+                        enabled(1),
+                        disabled(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of the IGMP feature for this
+                    port or trunk indicates whether any IGMP V2 Leaves
+                    received for an IP Multicast group will cause the
+                    group to be deleted after the
+                    hpSwitchIgmpForcedLeaveInterval if no new IGMP V2
+                    Reports are received for that group. Normal behavior
+                    is for a group issuing a Leave to be deleted after
+                    the Querier's Maximum Response time if no IGMP V2 
+                    Report is received."
+        ::= { hpSwitchIgmpPortConfigEntry2 5 }
+
+    hpSwitchIgmpPortFastLeaveState OBJECT-TYPE
+        SYNTAX      INTEGER{
+                        enabled(1),
+                        disabled(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of the IGMP feature for this
+                    port or trunk indicates whether any IGMP V2 Leaves
+                    received for an IP Multicast group will cause the
+                    group to be deleted immediately on single-
+		    connection ports. Normal behavior is for a group 
+		    issuing a Leave to be deleted after the Querier's 
+		    Maximum Response time if no IGMP V2 Report is 
+                    received."
+        ::= { hpSwitchIgmpPortConfigEntry2 6 }
+
+    hpSwitchIgmpForcedLeaveInterval OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "When a port's hpSwitchIgmpPortForcedLeaveState is
+                    enabled, this is the amount of time allowed for an
+                    IGMP V2 Report to arrive and cancel deletion of a
+                    multicast group requested by a previous IGMP V2
+                    Leave request."
+        ::= { hpSwitchIgmpConfig 4 }
+
+    -- CoS support MIB definition
+    hpSwitchCosConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 17 }
+
+    hpSwitchCosPortConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchCosPortConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the CoS port
+                    configurations on this switch."
+        ::= { hpSwitchCosConfig 1 }
+
+    hpSwitchCosPortConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchCosPortConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "The information associated with each CoS port
+                    configuration."
+        INDEX       { hpSwitchCosPortIndex }
+        ::= { hpSwitchCosPortConfigTable 1 }
+
+    HpSwitchCosPortConfigEntry ::=        
+        SEQUENCE {
+            hpSwitchCosPortIndex              INTEGER,
+            hpSwitchCosPortType               HpSwitchPortType,
+            hpSwitchCosPortPriority           INTEGER,
+            hpSwitchCosPortDSCPPolicy         INTEGER,
+            hpSwitchCosPortResolvedPriority   INTEGER,
+            hpSwitchCosPortApplyPolicy        INTEGER,
+            hpSwitchCosPortTrustMode          INTEGER
+        }
+
+    hpSwitchCosPortIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The ifIndex value which uniquely identifies a row
+                    in the Interfaces Table."
+        ::= { hpSwitchCosPortConfigEntry 1 }
+
+    hpSwitchCosPortType OBJECT-TYPE
+        SYNTAX      HpSwitchPortType
+        ACCESS      read-only
+        STATUS      deprecated
+        DESCRIPTION "The type of port."
+        ::= { hpSwitchCosPortConfigEntry 2 }
+
+    hpSwitchCosPortPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority value to assign to packets
+                    received on the specified port.  This value will be
+                    inserted in the 802.1Q tag and the packet will be
+                    placed in the appropriate outbound port queue.  The
+                    value of 255 is used to indicate No Override."
+        ::= { hpSwitchCosPortConfigEntry 3 }
+
+    hpSwitchCosPortDSCPPolicy OBJECT-TYPE
+        SYNTAX      INTEGER (1..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The DSCP Policy to assign to packets received on
+                    the specified Port.  This is an index into the
+                    hpSwitchCosDSCPPolicy table, or the value 255
+		    indicating no DSCP Policy exists.  This policy is
+                    associated with an 802.1p priority value, which will
+                    be inserted in the 802.1Q tag and will cause the 
+                    packet to be placed in the appropriate outbound port
+                    queue. When the packet is IP protocol type, the DSCP
+                    policy value (a Differentiated Services codepoint)
+                    will also be written into the Differentiated-Services
+                    field of the IP Type-of-Service byte."
+        ::= { hpSwitchCosPortConfigEntry 4 }
+
+    hpSwitchCosPortResolvedPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..7 | 255)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority that will be applied to packets
+                    received on the specified port.  This value
+                    represents the actual operating value for this CoS
+                    port entry. A value of 255 represents no override
+                    of the incoming priority."
+        ::= { hpSwitchCosPortConfigEntry 5 }
+
+    hpSwitchCosPortApplyPolicy OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        noPolicyOverride(1),
+                        applyHpSwitchCosPortPriority(2),
+                        applyHpSwitchCosPortDSCPPolicy(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object determines which configuration policy,
+                    noPolicyOverride, hpSwitchCosPortPriority or 
+                    hpSwitchCosPortDSCPPolicy, applies for the given
+                    Port CoS entry.  These configuration policies are
+                    mutually exclusive of one another."
+        ::= { hpSwitchCosPortConfigEntry 6 }
+
+    hpSwitchCosPortTrustMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        trustNone(1),
+                        trust8021pCos(2),
+                        trustTosIpPrecedence(3),
+                        trustTosDiffserv(4),
+                        trustAll(5) 
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object determines which trust mode,
+                    trustNone, trust802.1pCos, trustTosIpPrecedence, 
+                    trustTosDffserv, or trustAll, applies for the given 
+                    Port CoS entry.  When the trust-mode is anything other 
+                    than trustNone, the inbound QoS values for the trusted 
+                    fields will be preserved and any associated inbound 
+                    queuing will occur.  For all configurations, any 
+                    inbound values NOT specifically included in the 
+                    trust-mode will be cleared.  The default setting is
+                    trustAll. These configuration modes are mutually 
+                    exclusive of one another."
+        ::= { hpSwitchCosPortConfigEntry 7 }
+
+
+    hpSwitchCosVlanConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchCosVlanConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the CoS Vlan
+                    configurations on this switch."
+        ::= { hpSwitchCosConfig 2 }
+
+    hpSwitchCosVlanConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchCosVlanConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "The information associated with each CoS Vlan
+                    configuration."
+        INDEX       { hpSwitchCosVlanIndex }
+        ::= { hpSwitchCosVlanConfigTable 1 }
+
+    HpSwitchCosVlanConfigEntry ::=        
+        SEQUENCE {
+            hpSwitchCosVlanIndex              VlanID,
+            hpSwitchCosVlanPriority           INTEGER,
+            hpSwitchCosVlanDSCPPolicy         INTEGER,
+            hpSwitchCosVlanResolvedPriority   INTEGER,
+            hpSwitchCosVlanApplyPolicy        INTEGER
+        }
+
+    hpSwitchCosVlanIndex OBJECT-TYPE
+        SYNTAX      VlanID
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The index that uniquely identifies the CoS
+                    configuration of a virtual LAN for which this entry
+                    contains information."
+        ::= { hpSwitchCosVlanConfigEntry 1 }
+
+    hpSwitchCosVlanPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority value to assign to packets
+                    received on the specified Vlan.  This value will be
+                    inserted in the 802.1Q tag and the packet will be
+                    placed in the appropriate outbound port queue.  The
+                    value of 255 is used to indicate No Override."
+        ::= { hpSwitchCosVlanConfigEntry 2 }
+
+    hpSwitchCosVlanDSCPPolicy OBJECT-TYPE
+        SYNTAX      INTEGER (1..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The DSCP Policy to assign to packets received on
+                    the specified Vlan.  This is an index into the
+                    hpSwitchCosDSCPPolicy table, or the value 255
+                    indicating no DSCP Policy exists. This policy is
+                    associated with an 802.1p priority value, which
+                    will be inserted in the 802.1Q tag and will cause
+                    the packet to be placed in the appropriate outbound
+                    port queue.  When the packet is IP protocol type,
+                    the DSCP policy value (a Differentiated Services
+                    codepoint) will also be written into the
+                    Differentiated-Services field of the IP
+                    Type-of-Service byte."
+        ::= { hpSwitchCosVlanConfigEntry 3 }
+
+    hpSwitchCosVlanResolvedPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..7 | 255)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority that will be applied to
+                    packets received on the specified VLAN.  This value
+                    represents the actual operating value for this CoS
+                    vlan entry. A value of 255 represents no override of
+                    the incoming priority ."
+        ::= { hpSwitchCosVlanConfigEntry 4 }
+
+    hpSwitchCosVlanApplyPolicy OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        noPolicyOverride(1),
+                        applyHpSwitchCosVlanPriority(2),
+                        applyHpSwitchCosVlanDSCPPolicy(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object determines which configuration policy,
+                    noPolicyOverride, hpSwitchCosVlanPriority or 
+                    hpSwitchCosDSCPPolicy, applies for this given Vlan
+                    CoS entry. These configuration policies are mutually
+                    exclusive of one another."
+        ::= { hpSwitchCosVlanConfigEntry 5 }
+
+
+    hpSwitchCosProtocolConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchCosProtocolConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the CoS
+                    protocol type configurations on this switch."
+        ::= { hpSwitchCosConfig 3 }
+
+    hpSwitchCosProtocolConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchCosProtocolConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "The information associated with each CoS protocol
+                    configuration."
+        INDEX       { hpSwitchCosProtocolType }
+        ::= { hpSwitchCosProtocolConfigTable 1 }
+
+    HpSwitchCosProtocolConfigEntry ::=        
+        SEQUENCE {
+            hpSwitchCosProtocolType             INTEGER,
+            hpSwitchCosProtocolPriority         INTEGER
+        }
+
+    hpSwitchCosProtocolType OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        ip(1),
+                        ipx(2),
+                        arp(3),
+                        decnet(4),
+                        appletalk(5),
+                        sna(6),
+                        netbios(7)
+                    }
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "Packets with this protocol type will receive the new
+                    priority value."
+        ::= { hpSwitchCosProtocolConfigEntry 1 }
+
+    hpSwitchCosProtocolPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority value to assign to packets
+                    received for the specified protocol.  This value will
+                    be inserted in the 802.1Q tag and the packet will be
+                    placed in the appropriate outbound port queue.  The
+                    value of 255 is used to indicate No Override."
+        ::= { hpSwitchCosProtocolConfigEntry 2 }
+
+
+    hpSwitchCosAddressConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchCosAddressConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the CoS
+                    address configurations on this switch."
+        ::= { hpSwitchCosConfig 4 }
+
+    hpSwitchCosAddressConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchCosAddressConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "The information associated with each CoS address
+                    configuration."
+        INDEX       { hpSwitchCosAddressIndex }
+        ::= { hpSwitchCosAddressConfigTable 1 }
+
+    HpSwitchCosAddressConfigEntry ::=        
+        SEQUENCE {
+            hpSwitchCosAddressIndex            INTEGER,
+            hpSwitchCosAddressType             INTEGER,
+            hpSwitchCosAddressIp               IpAddress,
+            hpSwitchCosAddressPriority         INTEGER,
+            hpSwitchCosAddressStatus           RowStatus,
+            hpSwitchCosAddressDSCPPolicy       INTEGER,
+            hpSwitchCosAddressResolvedPriority INTEGER,
+            hpSwitchCosAddressApplyPolicy      INTEGER,
+            hpSwitchCosIpv4AddressMask         IpAddress,
+            hpSwitchCosAddressIpv6             InetAddress,
+            hpSwitchCosAddressIpv6PrefixLength InetAddressPrefixLength
+        }
+
+    hpSwitchCosAddressIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The index that uniquely identifies the CoS
+                    configuration for an address for which this entry
+                    contains information."
+        ::= { hpSwitchCosAddressConfigEntry 1 }
+
+    hpSwitchCosAddressType OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        ip(1),
+                        ipv6(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The type of address to configure. Default is ip 
+                    (IPv4).  This field indicates which of the other
+                    address fields must be configured for this table 
+                    entry. "
+        ::= { hpSwitchCosAddressConfigEntry 2 }
+
+    hpSwitchCosAddressIp OBJECT-TYPE
+        SYNTAX      IpAddress
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This variable is valid only if an IPv4 CoS
+                    configuration was defined.  It will be ignored
+                    otherwise.  Packets with this IPv4 address as a source
+                    or destination will receive the new priority value."
+        ::= { hpSwitchCosAddressConfigEntry 3 }
+
+    hpSwitchCosAddressPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority value to assign to packets
+                    received for the specified address.  This value will
+                    be inserted in the 802.1Q tag and the packet will be
+                    placed in the appropriate outbound port queue."
+        ::= { hpSwitchCosAddressConfigEntry 4 }
+
+    hpSwitchCosAddressStatus OBJECT-TYPE
+        SYNTAX      RowStatus
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The status of a Cos Address entry."
+        ::= { hpSwitchCosAddressConfigEntry 5 }
+
+    hpSwitchCosAddressDSCPPolicy OBJECT-TYPE
+        SYNTAX      INTEGER (1..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The DSCP Policy to assign to packets received for
+                    the specified address. This is an index into the
+                    hpSwitchCosDSCPPolicy table, or the value 255
+                    indicating no DSCP Policy exists. This policy is
+                    associated with an 802.1p priority value, which
+                    will be inserted in the 802.1Q tag and will cause
+                    the packet to be placed in the appropriate outbound
+                    port queue. The DSCP policy value (a Differentiated
+                    Services codepoint) will also be written into the
+                    Differentiated-Services field of the IP
+                    Type-of-Service byte."
+        ::= { hpSwitchCosAddressConfigEntry 6 }
+
+    hpSwitchCosAddressResolvedPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..7 | 255)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority that will be applied to packets
+                    received for the specified address.  This value
+                    represents the actual operating value for this given
+                    address entry. A value of 255 represents no override."
+        ::= { hpSwitchCosAddressConfigEntry 7 }
+
+    hpSwitchCosAddressApplyPolicy       OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        applyHpSwitchCosAddressPriority(1),
+                        applyHpSwitchCosAddressDSCPPolicy(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object determines which configuration policy,
+                    hpSwitchCosAddressPriority or hpSwitchCosDSCPPolicy,
+                    applies for the given Address CoS entry.  These
+                    configuration policies are mutually exclusive of
+                    one another."
+        DEFVAL      { applyHpSwitchCosAddressPriority }
+        ::= { hpSwitchCosAddressConfigEntry 8 }
+
+    hpSwitchCosIpv4AddressMask OBJECT-TYPE
+        SYNTAX      IpAddress
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This value is applied as a direct IPv4-address mask
+                    when an IPv4 CoS configuration is defined for this 
+                    table entry.  It will be ignored otherwise.  The 
+                    default mask value is 255.255.255.255, which 
+                    specifies the exact IPv4 address defined in 
+                    hpSwitchCosAddressIp (i.e., no subnet-masking is
+                    performed)." 
+        ::= { hpSwitchCosAddressConfigEntry 9 }
+
+    hpSwitchCosAddressIpv6 OBJECT-TYPE
+        SYNTAX      InetAddress
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This variable is valid only if an IPv6 CoS
+                    configuration was defined.  It will be ignored
+                    otherwise.  Packets with this IPv6 address as a source
+                    or destination will receive the new priority value."
+        ::= { hpSwitchCosAddressConfigEntry 10 }
+
+    hpSwitchCosAddressIpv6PrefixLength OBJECT-TYPE
+        SYNTAX      InetAddressPrefixLength
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The prefix length associated with the 
+                    hpSwitchCosAddressIpv6 object, if an IPv6 CoS 
+                    configuration is valid and hpSwitchCosAddressType is
+                    type ipv6.  This variable will otherwise be ignored.
+                    The prefix length for an IPv6 entry functions in the 
+                    same way as an address mask for an IPv4 entry. The 
+                    default value of this object is 128, which specifies
+                    the exact IPv6 address defined in 
+                    hpSwitchCosAddressIpv6 (i.e., no subnet-masking is
+                    performed)."  
+        ::= { hpSwitchCosAddressConfigEntry 11 }
+
+
+    hpSwitchCosTosConfig OBJECT IDENTIFIER ::= { hpSwitchCosConfig 5 }
+
+    hpSwitchCosTosConfigMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        disable(1),
+                        ipprecedence(2),
+                        diffserv(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The operational status of Type of Service based
+                    Class of Service."
+        ::= { hpSwitchCosTosConfig 1 }
+
+    hpSwitchCosTosConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchCosTosConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the CoS Type
+                    of Service configurations on this switch.  This table
+                    is used only when the hpSwitchCosTosConfigMode is set
+                    to diffserv."
+        ::= { hpSwitchCosTosConfig 2 }
+
+    hpSwitchCosTosConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchCosTosConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "The information associated with each CoS TOS
+                    configuration."
+        INDEX       { hpSwitchCosTosIndex }
+        ::= { hpSwitchCosTosConfigTable 1 }
+
+    HpSwitchCosTosConfigEntry ::=        
+        SEQUENCE {
+            hpSwitchCosTosIndex             INTEGER,
+            hpSwitchCosTosPriority          INTEGER,
+            hpSwitchCosTosDSCPPolicy        INTEGER,
+            hpSwitchCosTosResolvedPriority  INTEGER,
+            hpSwitchCosTosApplyPolicy       INTEGER
+        }
+
+    hpSwitchCosTosIndex OBJECT-TYPE
+        SYNTAX      INTEGER
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "Packets with this value in the upper bits of the Type
+                    of Service field of the IP protocol header will receive
+                    the new priority value.  For Differentiated Services
+                    the upper 6 bits of the TOS field are used."
+        ::= { hpSwitchCosTosConfigEntry 1 }
+
+    hpSwitchCosTosPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..255)
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "The 802.1p priority value to assign to packets
+                    received for the specified TOS.  This value will be
+                    inserted in the 802.1Q tag and the packet will be
+                    placed in the appropriate outbound port queue.  The
+                    value of 255 is used to indicate No Override."  
+        ::= { hpSwitchCosTosConfigEntry 2 }
+
+    hpSwitchCosTosDSCPPolicy OBJECT-TYPE
+        SYNTAX      INTEGER (1..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The DSCP Policy to assign to packets received for
+                    the specified ToS codepoint.  This is an index
+                    into the hpSwitchCosDSCPPolicy table, or the value 
+		    255 indicating no DSCP Policy exists.  The DSCP
+                    policy is associated with an 802.1p priority value,
+                    which will be inserted in the 802.1Q tag and will
+                    cause the packet to be placed in the appropriate
+                    outbound port queue.  The DSCP policy value (a
+                    Differentiated Services codepoint) will also
+                    replace the incoming value of the Differentiated
+                    Services field of the IP Type-of-Service byte."
+        ::= { hpSwitchCosTosConfigEntry 3 }
+
+    hpSwitchCosTosResolvedPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..7 | 255)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority that will be applied to
+                    packets received for the specified ToS.  This
+                    value represents the actual operating value for
+                    this given ToS entry. A value of 255 represents no
+                    override of the incoming priority.  If
+                    hpSwitchCosTosApplyPolicy is set to
+                    applyInheritedPriority, the parallel codepoint in
+                    the hpSwitchCosDSCPPolicyConfigTable is used to
+                    determine the operating priority. Otherwise if set
+                    to applyHpSwitchCosTosDSCPPolicy, the priority for
+                    the codepoint that the hpSwitchCosTosDSCPPolicy is
+                    indexing will be used."
+        ::= { hpSwitchCosTosConfigEntry 4 }
+
+    hpSwitchCosTosApplyPolicy OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        applyInheritedPriority(1),
+                        applyHpSwitchCosTosDSCPPolicy(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object determines which configuration policy, 
+                    applyInheritedPriority or hpSwitchCosTosDSCPPolicy,
+                    applies for the given Tos CoS entry."
+        DEFVAL      { applyInheritedPriority }
+        ::= { hpSwitchCosTosConfigEntry 5 }
+
+
+    hpSwitchCosDSCPPolicyConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchCosDSCPPolicyConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the
+                    priority applied to each of the Differentiated
+                    Services Code Points."
+        ::= { hpSwitchCosConfig 6 }
+
+    hpSwitchCosDSCPPolicyConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchCosDSCPPolicyConfigEntry
+        ACCESS      not-accessible     
+        STATUS      mandatory
+        DESCRIPTION "A list of objects describing a DiffServe Codepoint
+                    (DSCP), and the 802.1p priority to apply for that
+                    DSCP."
+        INDEX       { hpSwitchCosDSCPPolicyIndex }
+        ::= { hpSwitchCosDSCPPolicyConfigTable 1 }
+
+    HpSwitchCosDSCPPolicyConfigEntry ::=
+          SEQUENCE {
+            hpSwitchCosDSCPPolicyIndex        INTEGER,
+            hpSwitchCosDSCPPolicyPriority     INTEGER,
+            hpSwitchCosDSCPPolicyName         OCTET STRING
+          }    
+        
+    hpSwitchCosDSCPPolicyIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..64)
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "An index to uniquely identify each row in the 
+                    hpSwitchCosDSCPPolicyConfigTable." 
+        ::= { hpSwitchCosDSCPPolicyConfigEntry 1 }
+      
+    hpSwitchCosDSCPPolicyPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..7 | 255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority value to assign to packets
+                    with a given DSCP.  This value will be inserted in
+                    the 802.1Q tag and the packet will be placed in the
+                    appropriate outbound port queue.  The value of 255
+                    is used to indicate no override of the incoming
+                    priority."
+        ::= { hpSwitchCosDSCPPolicyConfigEntry 2 }
+ 
+    hpSwitchCosDSCPPolicyName OBJECT-TYPE
+        SYNTAX      OCTET STRING (SIZE(0..32))
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "A user settable name describing a DSCP policy
+                    table entry."
+        ::= { hpSwitchCosDSCPPolicyConfigEntry 3 }
+
+
+    hpSwitchCosAppTypeConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchCosAppTypeConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the CoS
+                    Application type configurations on the switch.  An
+                    application is determined by its network source
+                    and/or destination port number."
+        ::= { hpSwitchCosConfig 7 }
+
+    hpSwitchCosAppTypeConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchCosAppTypeConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "An entry in the switch
+                    hpSwitchCosAppTypeConfigEntry Table."
+        INDEX      { hpSwitchCosAppTypeConfigIndex }
+        ::= { hpSwitchCosAppTypeConfigTable 1 }
+        
+    HpSwitchCosAppTypeConfigEntry ::=
+        SEQUENCE {
+            hpSwitchCosAppTypeConfigIndex        INTEGER,
+            hpSwitchCosAppTypeConfigType         INTEGER,
+            hpSwitchCosAppTypeSrcPort            INTEGER,
+            hpSwitchCosAppTypeDestPort           INTEGER,
+            hpSwitchCosAppTypePriority           INTEGER,
+            hpSwitchCosAppTypeDSCPPolicy         INTEGER,
+            hpSwitchCosAppTypeResolvedPriority   INTEGER,
+            hpSwitchCosAppTypeApplyPolicy        INTEGER,
+            hpSwitchCosAppTypeStatus             RowStatus,
+            hpSwitchCosAppTypeMaxSrcPort         INTEGER,
+            hpSwitchCosAppTypeMaxDestPort        INTEGER,
+            hpSwitchCosAppTypeIpPacketType       INTEGER
+        } 
+
+    hpSwitchCosAppTypeConfigIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "An index to uniquely identify this
+                    hpSwitchCosAppType row."
+        ::= { hpSwitchCosAppTypeConfigEntry 1 }
+       
+    hpSwitchCosAppTypeConfigType OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        udpSrcPortConfig(1),
+                        udpDestPortConfig(2),
+                        udpBothPortsConfig(3),
+                        tcpSrcPortConfig(4),
+                        tcpDestPortConfig(5),
+                        tcpBothPortsConfig(6)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This signifies which network port number to apply
+                    to the given CoS Application policy."  
+        ::= { hpSwitchCosAppTypeConfigEntry 2 }
+        
+    hpSwitchCosAppTypeSrcPort OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object represents the source network port
+                    that this policy applies to."
+        ::= { hpSwitchCosAppTypeConfigEntry 3 }
+   
+    hpSwitchCosAppTypeDestPort OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object represents the destination network
+                    port that this policy applies to."
+        ::= { hpSwitchCosAppTypeConfigEntry 4 }
+
+    hpSwitchCosAppTypePriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..7 | 255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority that should be applied to
+                    packets containing the particular configured source
+                    and/or destination port number in this entry.  A
+                    value of 255 represents that no priority override
+                    should take place."
+        ::= { hpSwitchCosAppTypeConfigEntry 5 }
+
+    hpSwitchCosAppTypeDSCPPolicy OBJECT-TYPE
+        SYNTAX      INTEGER (1..255)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The DSCP Policy to assign to packets received for
+                    the specified application.  This is an index into
+                    the hpSwitchCosDSCPPolicy table, or the value 255
+                    indicating no DSCP Policy exists. This policy is
+                    associated with an 802.1p priority value, which
+                    will be inserted in the 802.1Q tag and will cause
+                    the packet to be placed in the appropriate outbound
+                    port queue.  The DSCP policy value (a
+                    Differentiated Services codepoint) will also be
+                    written into the Differentiated-Services field of
+                    the IP Type-of-Service byte.  The value of 255 is
+                    used to indicate No Override."
+        ::= { hpSwitchCosAppTypeConfigEntry 6 }
+
+    hpSwitchCosAppTypeResolvedPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..7 | 255)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The 802.1p priority that will be applied to
+                    packets received on the specified application.
+                    This value represents the actual operating value
+                    for this CoS application entry. A value of 255
+                    represents no override of the incoming priority"
+        ::= { hpSwitchCosAppTypeConfigEntry 7 }
+
+    hpSwitchCosAppTypeApplyPolicy OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        applyHpSwitchCosAppTypePriority(1),
+                        applyHpSwitchCosAppTypeDSCPPolicy(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object determines which configuration policy,
+                    hpSwitchCosAppTypePriority or
+                    hpSwitchCosAppTypeDSCPPolicy, applies for the given
+                    AppType CoS entry.  These configuration policies
+                    are mutually exclusive of one another."
+        DEFVAL      { applyHpSwitchCosAppTypePriority }
+        ::= { hpSwitchCosAppTypeConfigEntry 8 }
+
+    hpSwitchCosAppTypeStatus OBJECT-TYPE
+        SYNTAX      RowStatus
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object is used to create and delete in the 
+                    hpSwitchCosAppType table."
+        ::= { hpSwitchCosAppTypeConfigEntry 9 }
+
+    hpSwitchCosAppTypeMaxSrcPort OBJECT-TYPE
+        SYNTAX      INTEGER (0..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object represents the maximum source network
+                    port that this policy applies to. If a single, 
+                    specific port is being used and not a range, then
+                    value of this object is zero."
+        ::= { hpSwitchCosAppTypeConfigEntry 10 }
+   
+    hpSwitchCosAppTypeMaxDestPort OBJECT-TYPE
+        SYNTAX      INTEGER (0..65535)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object represents the maximum destination 
+                    network port that this policy applies to. If a 
+                    single, specific port is being used and not a range, 
+                    then value of this object is zero."
+        ::= { hpSwitchCosAppTypeConfigEntry 11 }
+
+    hpSwitchCosAppTypeIpPacketType OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        ipv4PacketsOnly(1),
+                        ipv6PacketsOnly(2),
+                        ipv4AndIpv6Packets(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This object represents the type of IP packet for which
+                    this TCP and/or UDP application QoS will apply. The 
+                    default is IPv4." 
+        ::= { hpSwitchCosAppTypeConfigEntry 12 }
+
+
+    hpSwitchCosLastChange OBJECT-TYPE
+        SYNTAX      TimeStamp
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The value of the agent's sysUptime when the last
+                    time this device experienced a change in the 
+                    Class of Service configuration."
+        ::= { hpSwitchCosConfig 8 }
+	
+    hpSwitchConfigCosLastConfigError OBJECT-TYPE
+        SYNTAX      INTEGER {
+                         aclQosNoError(1),
+                         aclQosTooManyRulesError(2),
+                         aclQosTooManyMasksError(3),
+                         aclQosTooManyRangesError(4),
+                         aclQosTooManyMetersError(5),
+                         aclQosTooManyLookupsError(6) 
+                    }
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The type of the last QoS 
+                     configuration result or error. 
+                     This object is updated for each
+                     new QoS configuration. It is
+                     reset upon reboot."
+        ::= { hpSwitchCosConfig 9 }
+
+    hpSwitchQueueWatchTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchQueueWatchEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains port-specific information
+                    for queue monitoring."
+        ::= {  hpSwitchCosConfig 10 }
+
+    hpSwitchQueueWatchEntry OBJECT-TYPE
+        SYNTAX      HpSwitchQueueWatchEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A list of information maintained by every port
+                    about queue monitoring for that port."
+        INDEX       { hpSwitchQueueWatchPort }
+        ::= { hpSwitchQueueWatchTable 1 }
+
+    HpSwitchQueueWatchEntry ::=
+        SEQUENCE {
+            hpSwitchQueueWatchPort               INTEGER,
+            hpSwitchQueueWatchState              INTEGER
+        }
+
+    hpSwitchQueueWatchPort OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The port number of the port for which this entry
+                    contains Queue monitoring information."
+        ::= { hpSwitchQueueWatchEntry 1 }
+
+    hpSwitchQueueWatchState OBJECT-TYPE
+           SYNTAX     INTEGER {
+                          disabled(1),
+                          outbound(2)
+                      }
+           ACCESS     read-write
+           STATUS     mandatory
+           DESCRIPTION
+                   "If configured for outbound, egress queues for the 
+                   corresponding port will be monitored for drops."
+           ::= { hpSwitchQueueWatchEntry 2 }
+
+    hpSwitchMeshConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 18 }
+
+    hpSwitchMeshMulticastAgingMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        aging(1),
+                        nonaging(2)
+                    }
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "With meshing active, a value of aging will cause
+                    learned multicast addresses to be aged out within
+                    the required address aging interval.  A setting of
+                    non-aging will prevent learned multicast addresses
+                    from being removed from the switch. Multicast addresses
+                    learned while in non-aging mode are not removed until
+                    the switch is rebooted."
+        ::= { hpSwitchMeshConfig 1 }
+
+    hpSwitchMeshBackwardCompatibility OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS  read-write
+        STATUS      mandatory
+	     DESCRIPTION "Due to some hardware differences, the Series
+                     1600/24xx/4000/8000 switches cannot be used
+                     directly in a mesh environment with Series 5300XL
+                     switches.  Series 5300XL switches need to emulate
+                     the operation of Series 1600/24xx/4000/8000
+                     switches in order to have a heterogeneous mesh
+                     working properly.  Meshing backward-compatibility
+                     feature allows Series 5300XL switches to operate in
+                     a compatible mode in which the operation of Series
+                     1600/24xx/4000/8000 switches are emulated.  When
+                     backward-compatibility is enabled, meshing software
+                     will establish connections with Series
+                     1600/24xx/4000/8000 switches and emulate their
+                     operation.  When backward-compatibility disabled,
+                     Series 1600/24xx/4000/8000 switches in the mesh
+                     will be ignored by the Series 5300XL switches."
+        ::= { hpSwitchMeshConfig 2 }
+
+ hpSwitchMeshConfiguredId  OBJECT-TYPE
+        SYNTAX        INTEGER
+        ACCESS        read-write
+        STATUS        mandatory
+        DESCRIPTION   "Specify a mesh id for this member. The mesh id is
+                      an optional parameter that, if specified should be
+                      unique for each switch participating in the mesh.
+                      Specifying unique IDs will improve performance by
+                      eliminating a costly mesh election process each
+                      time a participating switch is brought online.
+                      Default value of mesh configured id returns to
+                      default behavior of auto-negotiation. Mesh configured
+                      id take effect only after reboot."
+        DEFVAL { 0 }
+        ::= { hpSwitchMeshConfig 3 }
+
+    hpSwitchMeshActualId  OBJECT-TYPE
+        SYNTAX        INTEGER
+        ACCESS        read-only
+        STATUS        mandatory
+        DESCRIPTION   "This object is a mesh id that the switches in a
+                      mesh are  using currently. If mesh configured id is
+                      not specified or if it is not unique then the switches
+                      in the mesh will auto-negotiate unique IDs. Mesh Actual
+                      id is not necessary to be same as mesh configured id.
+                      Actual mesh id  may differ from mesh configured id if
+                      switches in a mesh auto-negotiate unique IDs."
+
+        ::= { hpSwitchMeshConfig 4 }
+
+    hpSwitchPortIsolationConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 19 }
+
+    hpSwitchPortIsolationMode OBJECT-TYPE
+        SYNTAX        INTEGER {
+                          enable(1),
+                          disable(2)
+                      }
+        ACCESS        read-write
+        STATUS        mandatory
+        DESCRIPTION  "This enables the port isolation feature on the device.
+                      Note:  Enabling this feature may require VLANS to be
+                      configured properly."
+        ::= { hpSwitchPortIsolationConfig 1 }
+
+    hpSwitchPortIsolationConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchPortIsolationConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the CoS
+                    Application type configurations on the switch.  An
+                    application is determined by its network source
+                    and/or destination port number."
+        ::= { hpSwitchPortIsolationConfig 2 }
+
+    hpSwitchPortIsolationConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchPortIsolationConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "An entry in the switch
+                    hpSwitchPortIsolationConfigEntry Table."
+        INDEX      { hpSwitchPortIsolationPort }
+        ::= { hpSwitchPortIsolationConfigTable 1 }
+
+    HpSwitchPortIsolationConfigEntry ::=
+        SEQUENCE {
+            hpSwitchPortIsolationPort                INTEGER,
+            hpSwitchPortIsolationPortMode            INTEGER
+        }
+
+    hpSwitchPortIsolationPort OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "An entry in the IfIndex table representing a logical port
+                     on this switch."
+        ::= { hpSwitchPortIsolationConfigEntry 1 }
+
+    hpSwitchPortIsolationPortMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        uplink(1),
+                        public(2),
+                        private(3),
+                        local(4),
+                        group1(5),
+                        group2(6)
+                    } 
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "Defines the operational mode of a port when Port
+                     Isolation feature is enabled."
+        ::= { hpSwitchPortIsolationConfigEntry 2 }
+
+    hpSwitchSshConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 20 }
+
+    hpSwitchSshAdminStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The status of the SSH operation."
+        ::= { hpSwitchSshConfig 1 }
+
+    hpSwitchSshVersion OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        version1(1),
+                        version2(2),
+                        version1or2(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The version of the SSH protocol to run. 
+                     'version1' will accept connections from
+                     v1.3 or v1.5 clients. 'version2' will accept 
+                     connections only from v2.0 clients.
+                     The default is 'version1_or_2' which will accept  any 
+                     connection which can be successfully negotiated."
+        DEFVAL { 1 }
+        ::= { hpSwitchSshConfig 2 }
+
+    hpSwitchSshTimeout OBJECT-TYPE
+        SYNTAX      Timeout (5..120)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The maximum length of time (in seconds) between the wakeup 
+                     of SSH task and successful protocol negotiation and 
+                     authentication. The default is 120 seconds."
+        DEFVAL { 120 }
+        ::= { hpSwitchSshConfig 3 }
+
+    hpSwitchSshPortNumber OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS  read-write
+        STATUS      mandatory
+        DESCRIPTION "The port number on which SSH daemon should listen for
+                     connection requests."
+        DEFVAL { 22 }
+        ::= { hpSwitchSshConfig 4 }
+
+    hpSwitchSshServerKeySize OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        bits512(1),
+                        bits768(2),
+                        bits1024(3)
+                    }
+        ACCESS  read-write
+        STATUS      mandatory
+        DESCRIPTION "Specifies the key size (in bits) of version 1 SSH host
+                     rsa key"
+        ::= { hpSwitchSshConfig 5 }
+
+    hpSwitchSshFileServerAdminStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable(1),
+                        disable(2)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "Specifies whether or not the SSH daemon will accept
+                    and process file transfer requests."
+        ::= { hpSwitchSshConfig 6 }
+
+    hpSwitchSshIpVersion OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        ipv4(1),
+                        ipv6(2),
+                        ipv4or6(3)
+                    }
+        ACCESS      read-write
+        STATUS      deprecated 
+        DESCRIPTION "#### THIS OBJECT IS DEPRECATED ####
+                     The types of IP connections SSH will support. 
+                     'ipv4' will accept connections from
+                     Ipv4 clients. 'ipv6' will accept 
+                     connections only from ipv6 clients.
+                     The default is 'ipv4or6' which will accept 
+                     Connections from both ipv4 and ipv6 clients."
+        DEFVAL { 3 }
+        ::= { hpSwitchSshConfig 7 }
+
+    hpSwitchPendingConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 21 }
+
+    hpSwitchPendingConfigControl OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        applyMstp(1),
+                        resetMstp(2),
+                        noAction(3)
+                    }
+        ACCESS  read-write
+        STATUS      mandatory
+        DESCRIPTION "The object controls switch pending configuration.
+                     If set to the 'applyMstp' value the object applies 
+                     pending Multiple Spanning Tree Protocol (MSTP) 
+                     configuration. The 'resetMstp' value, if set, triggers 
+                     copying of the active MSTP configuration to the 
+                     pending one. Before the pending configuration is applied
+                     its consistency is verified and the request fails if 
+                     errors are detected. 
+                     The value the object returns is undefined."
+        ::= { hpSwitchPendingConfig 1 }
+
+    hpSwitchBWMinConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 22 }
+
+    hpSwitchBWMinEgressPortConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchBWMinEgressPortConfigEntry 
+        ACCESS      not-accessible
+        STATUS      deprecated
+        DESCRIPTION "New definitions under HP-ICF-RATE-LIMIT-MIB.
+          A table that contains information about the port's
+		    egress Guaranteed Minimum Bandwidth configurations
+		    on this switch."
+        ::= { hpSwitchBWMinConfig 1 }
+
+    hpSwitchBWMinEgressPortConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchBWMinEgressPortConfigEntry
+        ACCESS      not-accessible
+        STATUS      deprecated
+        DESCRIPTION "New definitions under HP-ICF-RATE-LIMIT-MIB.
+               The information associated with each port's egress
+                    Guaranteed Minimum Bandwidth configuration."
+        INDEX       { hpSwitchBWMinEgressPortIndex }
+        ::= { hpSwitchBWMinEgressPortConfigTable 1 }
+
+    HpSwitchBWMinEgressPortConfigEntry ::=        
+        SEQUENCE {
+            hpSwitchBWMinEgressPortIndex  		INTEGER,
+            hpSwitchBWMinEgressPortPrctLowPriority 	INTEGER,
+            hpSwitchBWMinEgressPortPrctNormalPriority 	INTEGER,
+            hpSwitchBWMinEgressPortPrctMedPriority    	INTEGER,
+            hpSwitchBWMinEgressPortPrctHighPriority   	INTEGER
+        }
+
+    hpSwitchBWMinEgressPortIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      deprecated
+        DESCRIPTION "New definitions under HP-ICF-RATE-LIMIT-MIB.
+                    The ifIndex value which uniquely identifies a row
+                    in the Interfaces Table."
+        ::= { hpSwitchBWMinEgressPortConfigEntry 1 }
+
+    hpSwitchBWMinEgressPortPrctLowPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "New definitions under HP-ICF-RATE-LIMIT-MIB.
+          The percentage of Guaranteed Minimum bandwidth to
+		    be assigned to the egress Low-Priority queue for 
+		    this port. Total values for all four queues must not
+ 		    exceed 100 percent."
+        ::= { hpSwitchBWMinEgressPortConfigEntry 2 }
+
+    hpSwitchBWMinEgressPortPrctNormalPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "New definitions under HP-ICF-RATE-LIMIT-MIB.
+          The percentage of Guaranteed Minimum bandwidth to
+		    be assigned to the egress Normal-Priority queue for 
+		    this port. Total values for all four queues must not
+ 		    exceed 100 percent."
+        ::= { hpSwitchBWMinEgressPortConfigEntry 3 }
+
+    hpSwitchBWMinEgressPortPrctMedPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "New definitions under HP-ICF-RATE-LIMIT-MIB.
+          The percentage of Guaranteed Minimum bandwidth to
+		    be assigned to the egress Medium-Priority queue for 
+		    this port. Total values for all four queues must not
+ 		    exceed 100 percent."
+        ::= { hpSwitchBWMinEgressPortConfigEntry 4 }
+
+    hpSwitchBWMinEgressPortPrctHighPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      deprecated
+        DESCRIPTION "New definitions under HP-ICF-RATE-LIMIT-MIB.
+          The percentage of Guaranteed Minimum bandwidth to
+		    be assigned to the egress High-Priority queue for 
+		    this port. Total values for all four queues must not
+ 		    exceed 100 percent."
+        ::= { hpSwitchBWMinEgressPortConfigEntry 5 }
+
+    hpSwitchRateLimitPortConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 23 }
+
+    hpSwitchRateLimitPortConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchRateLimitPortConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table that contains information about the port
+                    Rate-Limiting configurations on this switch."
+        ::= { hpSwitchRateLimitPortConfig 1 }
+
+    hpSwitchRateLimitPortConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchRateLimitPortConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "The information associated with each port's
+                    Rate-Limiting configuration."
+        INDEX       { hpSwitchRateLimitPortIndex }
+        ::= { hpSwitchRateLimitPortConfigTable 1 }
+
+    HpSwitchRateLimitPortConfigEntry ::=
+        SEQUENCE {
+            hpSwitchRateLimitPortIndex                  INTEGER,
+            hpSwitchRateLimitPortControlMode            INTEGER,
+            hpSwitchRateLimitPortSingleControlPrct      INTEGER,
+            hpSwitchRateLimitPortPrctLowPriority        INTEGER,
+            hpSwitchRateLimitPortPrctNormalPriority     INTEGER,
+            hpSwitchRateLimitPortPrctMedPriority        INTEGER,
+            hpSwitchRateLimitPortPrctHighPriority       INTEGER
+        }
+
+    hpSwitchRateLimitPortIndex OBJECT-TYPE
+        SYNTAX      INTEGER (1..65535)
+        ACCESS      read-only
+        STATUS      mandatory
+        DESCRIPTION "The ifIndex value which uniquely identifies a row
+                    in the Interfaces Table."
+        ::= { hpSwitchRateLimitPortConfigEntry 1 }
+
+    hpSwitchRateLimitPortControlMode OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        disabled(1),
+                        rateLimitPerPortOnly(2),
+                        rateLimitPerQueue(3)
+                    }
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The mode by which this port will be Rate-Limited
+                    on ingress. If rateLimitPerPortOnly is configured,
+                    there will be a single maximum rate for the entire
+                    port. If rateLimitPerQueue is configured, the values
+                    for each of the four queues indicate the maximum
+                    percentage of port traffic that may be received by
+                    that queue (the sum of these values must not exceed
+                    100). When rate-limiting is disabled, there are no
+                    maximum controls on ingress for this port."
+        ::= { hpSwitchRateLimitPortConfigEntry 2 }
+
+    hpSwitchRateLimitPortSingleControlPrct OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "When hpSwitchRateLimitPortControlMode is configured
+                    for rateLimitPerPortOnly, this value is the maximum
+                    percentage of traffic that may be received by this
+                    port on ingress."
+        ::= { hpSwitchRateLimitPortConfigEntry 3 }
+
+        hpSwitchRateLimitPortPrctLowPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The maximum percentage of traffic that may be
+                    received by this port's Low-Priority queue on ingress.
+                    hpSwitchRateLimitPortControlMode must be configured to
+                    use rateLimitPerQueue for this to take effect. A value
+                    of 0-percent for any queue means that no traffic will
+                    ever be received on this port for that ingress queue.
+                    Total values for all four queues must not exceed 100
+                    percent."
+        ::= { hpSwitchRateLimitPortConfigEntry 4 }
+
+    hpSwitchRateLimitPortPrctNormalPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The maximum percentage of traffic that may be
+                    received by this port's Normal-Priority queue on
+                    ingress. hpSwitchRateLimitPortControlMode must be
+                    configured to use rateLimitPerQueue for this to take
+                    effect. A value of 0-percent for any queue means that
+                    no traffic will ever be received on this port for that
+                    ingress queue. Total values for all four queues must
+                    not exceed 100 percent."
+        ::= { hpSwitchRateLimitPortConfigEntry 5 }
+
+    hpSwitchRateLimitPortPrctMedPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The maximum percentage of traffic that may be
+                    received by this port's Medium-Priority queue on
+                    ingress. hpSwitchRateLimitPortControlMode must be
+                    configured to use rateLimitPerQueue for this to take
+                    effect. A value of 0-percent for any queue means that
+                    no traffic will ever be received on this port for that
+                    ingress queue. Total values for all four queues must
+                    not exceed 100 percent."
+        ::= { hpSwitchRateLimitPortConfigEntry 6 }
+
+    hpSwitchRateLimitPortPrctHighPriority OBJECT-TYPE
+        SYNTAX      INTEGER (0..100)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The maximum percentage of traffic that may be
+                    received by this port's High-Priority queue on
+                    ingress. hpSwitchRateLimitPortControlMode must be
+                    configured to use rateLimitPerQueue for this to take
+                    effect. A value of 0-percent for any queue means that
+                    no traffic will ever be received on this port for that
+                    ingress queue. Total values for all four queues must
+                    not exceed 100 percent."
+        ::= { hpSwitchRateLimitPortConfigEntry 7 }
+
+    hpSwitchQosPassThroughMode OBJECT IDENTIFIER ::= { hpSwitchConfig 24 }
+
+    hpSwitchQosPassThroughModeConfig OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        optimized (1),
+                        typical (2),
+                        balanced (3),
+                        onequeue (4)
+                    }
+        ACCESS  read-write
+        STATUS      mandatory
+        DESCRIPTION "Specify the queue configuration mode for the switch. 
+                     While changing the queue configuration mode this feature 
+                     momentarily require to bring down the logical port and 
+                     after the initialization of the queues the ports are 
+                     brought up."
+        
+        ::= { hpSwitchQosPassThroughMode 1 }
+    
+    hpSwitchReboot OBJECT IDENTIFIER ::= { hpSwitchConfig 25 }
+
+    hpSwitchRebootConfig OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        yes (1),
+                        no (2)
+                    }
+        ACCESS  read-only
+        STATUS      mandatory
+        DESCRIPTION "This tells the status of the switch whether it requires
+                     reboot for some variable to get effective.
+                     The value of this variable can be 
+                     
+                     yes (1) reboot is required.
+                     no (2)  reboot is not required."
+        ::= { hpSwitchReboot 1 }
+
+    hpSwitchRebootFastBoot OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        enable (1),
+                        disable (2)
+                    }
+        ACCESS  read-write
+        STATUS      mandatory
+        DESCRIPTION "Specifies whether fastboot is enabled or not on
+                     the switch."
+        DEFVAL      { disable }
+
+        ::= { hpSwitchReboot 2 }
+
+
+    hpSwitchProtectedPortsConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 26 }
+
+    hpSwitchProtectedPortsMask OBJECT-TYPE
+        SYNTAX      OCTET STRING
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "This variable specifies a group of ports that are not
+                    allowed to communicate to each-other. Each octet within
+                    the value of this object specifies a set of eight ports,
+                    with the first octet specifying ports 1 through 8, the
+                    second octet specifying ports 9 through 16, etc.
+                    Within each octet, the most significant bit represents
+                    the lowest numbered port, and the least significant bit
+                    represents the highest numbered port.  Thus, each port
+                    of the switch is represented by a single bit within
+                    the value of this object."
+        ::= { hpSwitchProtectedPortsConfig 1 }
+
+     hpSwitchLACPConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 28 }
+
+     hpSwitchLACPAllPortsStatus OBJECT-TYPE
+        SYNTAX      INTEGER {
+                        disabled(1), 
+                        active(2),
+                        passive(3)
+                    }
+      ACCESS      read-write
+      STATUS      mandatory
+      DESCRIPTION "Used to set administrative status of LACP on all the ports.
+                   A Port can have one of the three administrative status of 
+		   LACP. Active/Passive/Disabled are the three states. "
+      ::= { hpSwitchLACPConfig 1 }
+
+    hpSwitchDSCPRateLimitConfig OBJECT IDENTIFIER ::= { hpSwitchConfig 31 }
+
+    hpSwitchDSCPRateLimitConfigTable OBJECT-TYPE
+        SYNTAX      SEQUENCE OF HpSwitchDSCPRateLimitConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "A table containing information about DSCP-based
+                     rate limits and ports on which they are applied."
+        ::= { hpSwitchDSCPRateLimitConfig 1 }
+
+    hpSwitchDSCPRateLimitConfigEntry OBJECT-TYPE
+        SYNTAX      HpSwitchDSCPRateLimitConfigEntry
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "Information about a single DSCP-based rate limit."
+        INDEX       { hpSwitchDSCPRateLimitIndex }
+        ::= { hpSwitchDSCPRateLimitConfigTable 1 }
+
+    HpSwitchDSCPRateLimitConfigEntry ::=
+        SEQUENCE {
+            hpSwitchDSCPRateLimitIndex          Dscp,
+            hpSwitchDSCPRateLimitKbps           INTEGER,
+            hpSwitchDSCPRateLimitPorts          PortList
+	}
+
+    hpSwitchDSCPRateLimitIndex OBJECT-TYPE
+        SYNTAX      Dscp
+        ACCESS      not-accessible
+        STATUS      mandatory
+        DESCRIPTION "An index into the DSCP rate limit table.  The value is
+                     a DSCP codepoint."
+        ::= { hpSwitchDSCPRateLimitConfigEntry 1 }
+
+    hpSwitchDSCPRateLimitKbps  OBJECT-TYPE
+        SYNTAX      INTEGER (-1..10000000)
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The rate limit in kilobits per second for a row of the
+                     DSCP rate limit table.  Incoming traffic with the DSCP
+                     field of the IP header matching the index of the row
+                     will be limited to this rate and excess traffic will be
+                     dropped.  On some devices, the actual traffic rate
+                     allowed may be slightly higher or lower due to hardware
+                     limitations.  A value of -1 indicates no limit and is
+                     the default.  Setting a value of -1 will clear all rate
+                     limits for the codepoint.  The rate limit is only applied
+                     on the ports set in the hpSwitchDSCPRateLimitPorts column
+                     of the row."
+        ::= { hpSwitchDSCPRateLimitConfigEntry 2 }
+
+    hpSwitchDSCPRateLimitPorts OBJECT-TYPE
+        SYNTAX      PortList
+        ACCESS      read-write
+        STATUS      mandatory
+        DESCRIPTION "The applied ports for a row of the DSCP rate limit table.
+                     The rate limit from the hpSwitchDSCPRateLimitKbps column
+                     of the row will be applied on the logical ports specified.
+                     A rate limit may not be applied to individual ports that
+                     are members of a trunk, but must be applied to the entire
+                     trunk instead.  It is an error to apply a DSCP rate limit
+                     to any ports before setting hpSwitchDSCPRateLimitKbps to
+                     a value other than -1.  When the port list for a row is
+                     cleared, the hpSwitchDSCPRateLimitKbps column is set to
+                     the default of -1."
+    ::= { hpSwitchDSCPRateLimitConfigEntry 3 }		     
+	       
+    -- **********************************************************
+    -- Trap Definitions
+    -- **********************************************************
+
+    hpSwitchTraps OBJECT IDENTIFIER ::= { hpSwitchConfig 0 }
+
+    hpSwitchTrapsObjects
+                   OBJECT IDENTIFIER ::= { hpSwitchTraps 1 }
+
+    hpSwitchStpErrantBpduDetector OBJECT-TYPE 
+        SYNTAX       INTEGER {
+                         bpduFilter (1),
+                         bpduProtection (2),
+			 pvstFilter (3),
+			 pvstProtection (4)
+                     }
+        ACCESS       accessible-for-notify
+        STATUS       optional
+        DESCRIPTION  "The identifier of the feature generating Errant 
+                     BPDU trap."
+        ::= { hpSwitchTrapsObjects 1 }
+
+    hpSwitchStpErrantBpduSrcMac OBJECT-TYPE
+        SYNTAX       MacAddress
+        ACCESS       accessible-for-notify
+        STATUS       optional
+        DESCRIPTION "The source MAC address of the port sending Errant
+                    STP BPDU."
+        ::= { hpSwitchTrapsObjects 2 }
+
+    hpSwitchStpErrantBpduReceived     TRAP-TYPE
+        ENTERPRISE  hpSwitchTraps
+        VARIABLES   { hpSwitchStpPort,  
+                      hpSwitchStpPortErrantBpduCounter,
+                      dot1dStpPortState,
+                      dot1dStpPortDesignatedBridge,
+                      dot1dStpPortDesignatedPort,
+                      hpSwitchStpErrantBpduSrcMac,
+                      hpSwitchStpErrantBpduDetector }
+        DESCRIPTION "This trap indicates that unexpected (errant) STP BPDU  
+                    has been received on a port (e.g. on a port that is 
+                    connected to non-STP device). This notification trap 
+                    is controlled by the state of 'hpSwitchStpTrapCntl' 
+                    object. Implementation of this trap is optional."
+        ::= 1
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/mibs/HP-ICF-OID	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,4168 @@
+HP-ICF-OID DEFINITIONS ::= BEGIN
+
+    IMPORTS
+        enterprises, MODULE-IDENTITY, OBJECT-IDENTITY
+            FROM SNMPv2-SMI;
+
+    icf MODULE-IDENTITY
+         LAST-UPDATED "201307080000Z" -- July 8, 2013
+         ORGANIZATION "HP Networking"
+         CONTACT-INFO "Hewlett Packard Company
+                       8000 Foothills Blvd.
+                       Roseville, CA 95747"
+         DESCRIPTION  "This MIB module describes devices in the HP 
+                      Integrated Communication Facility product 
+                      line."
+
+         REVISION     "201307080000Z" -- July 8, 2013
+         DESCRIPTION  "Update descriptions for the 2530 family."
+
+         REVISION     "201306120000Z" -- June 12, 2013
+         DESCRIPTION  "Added the following to support 640 switches
+                       hpSwitchJ9581PowerSupply,
+                       hpSwitchJ9582FanTray"
+		       
+         REVISION     "201303200000Z" -- March 20, 2013
+         DESCRIPTION  "Added hpicfSmartLink MIB for Smart Link feature."
+
+         REVISION     "201302110000Z" -- Feb 11, 2013
+         DESCRIPTION  "Added new mib hpicfMAD.mib for LACP_MAD feature."
+
+         REVISION    "201301210000Z" -- January 21st, 2013
+         DESCRIPTION  "MIB description fixes for 2920 power supplies."                    
+
+         REVISION      "201212060000Z" -- Dec 6, 2012
+         DESCRIPTION   "Mib Description Issue fixes."
+         REVISION     "201210170000Z" -- October 17, 2012 
+         DESCRIPTION  "Added hpicfVrrpv3 MIB for VRRPv3."
+       
+         REVISION      "201208210000Z" -- August 21, 2012
+         DESCRIPTION   "Added unique stacking definitions for 
+                        2920 stackable switch series."
+
+         REVISION     "201204020000Z" -- April 2, 2012
+         DESCRIPTION  "Added the following to support E2530 switches:
+                       J9772A HP 2530-48G-PoE+ Switch,
+                       J9773A HP 2530-24G-PoE+ Switch,
+                       J9774A HP 2530-8G-PoE+ Switch,
+                       J9775A HP 2530-48G Switch,
+                       J9776A HP 2530-24G Switch,
+                       J9777A HP 2530-8G Switch,
+                       J9778A HP 2530-48-PoE+ Switch,
+                       J9779A HP 2530-24-PoE+ Switch,
+                       J9780A HP 2530-8-PoE+ Switch,
+                       J9781A HP 2530-48 Switch,
+                       J9782A HP 2530-24 Switch,
+                       J9783A HP 2530-8 Switch"
+
+         REVISION      "201203220000Z" -- March 22, 2012
+         DESCRIPTION   "Added the Jnumbers J9737A, J9738A, J9739A
+                       for 2920 stackable switch series."
+
+         REVISION      "201202170000Z" -- Feb 17, 2012
+         DESCRIPTION   "Added hpicfMauType10GigBaseESP."
+
+         REVISION      "201107030000Z" -- July 3, 2011
+         DESCRIPTION   "Added hpicfIpv6RAGuard MIB for
+                       raGuard."
+       
+         REVISION      "201105270000Z" -- May 27, 2011
+         DESCRIPTION   "Added hpicfSvcsAppMIB."
+
+         REVISION      "201105090000Z" -- May 09, 2011
+         DESCRIPTION   "Added hpSwitchV2ServicesModule."
+
+         REVISION      "201103030000Z" -- March 3, 2011
+         DESCRIPTION   "Added hpicfTransceiverMIB for
+                       transceivers."
+
+         REVISION      "201009061632Z" -- Sep 06, 2010
+         DESCRIPTION   "Added hpicfTcp MIB."
+         
+         REVISION     "201008040000Z" -- Aug 04, 2010
+         DESCRIPTION  "Added hpSwitchModuleJ9637A."
+
+         REVISION      "201007220000Z"  -- July 22, 2010
+         DESCRIPTION   "Added hpTunnelMIB for Tunnels." 
+         REVISION      "201006250000Z"  -- June 25, 2010
+         DESCRIPTION   "Added hpSwitchModuleJ9485A and hpSBMMIB for
+                        HP Survivable Branch Module."
+ 
+         REVISION     "201006220000Z" -- June 22, 2010
+         DESCRIPTION  "Added hpicfLoadBalanceMod for Load Balancing."
+         REVISION     "201005180000Z" -- May 18, 2010
+         DESCRIPTION  "Added the following fixed modules for stacking:
+                       hpSwitchModuleJ9573, hpSwitchModuleJ9574x, 
+                       hpSwitchModuleJ9574y, hpSwitchModuleJ9575,
+                       hpSwitchModuleJ9576x, hpSwitchModuleJ9576y,
+                       hpSwitchModuleJ9584, hpSwitchModuleJ9585,
+                       hpSwitchModuleJ9586x, hpSwitchModuleJ9586y,
+                       hpSwitchModuleJ9587, hpSwitchModuleJ9588x,
+                       hpSwitchModuleJ9588y."
+
+         REVISION     "201005170000Z" -- May 17, 2010
+         DESCRIPTION  "Added the following to support 2620 switches:
+                       J9626A HP 2620-48 ES3652BT-FLF-18 Switch,
+                       J9623A HP 2620-24 ES3628BT-FLF-18 Switch,
+                       J9627A HP 2620-48-PoE+ ES3652BT-HPoE-FLF-18 Switch,
+                       J9625A HP 2620-24-PoE+ ES3628BT-HPoE-FLF-18 Switch,
+                       J9624A HP 2620-24-PPoE+ ES3628BT-HPPoE-FLF-18 Switch"
+         REVISION     "201004220000Z" -- Apr 22, 2010
+         DESCRIPTION  "Added the following to support stacking:
+                       hpSwitchJ9573, hpSwitchJ9574, hpSwitchJ9575, 
+                       hpSwitchJ9576, hpSwitchJ9584, hpSwitchJ9585, 
+                       hpSwitchJ9586, hpSwitchJ9587, hpSwitchJ9588.
+                       Also added hpStack, hpSwitchJ9580PowerSupply,
+                       hpSwitchJ9581PowerSupply, hpSwitchJ9582FanTray."
+
+         REVISION     "201004110000Z" -- Apr 11, 2010
+         DESCRIPTION  "Added hpEntityPowerMIB"
+
+         REVISION     "201003220000Z" -- Mar 22, 2010
+         DESCRIPTION  "Added hpStackMIB"
+
+ 
+         REVISION     "200910160000Z" -- Oct 16, 2009
+         DESCRIPTION  "Added 8-port PoE 10/100/1000 and 10/100
+                       switches:  2915-8G-PoE (J9562A) and 2615-8-PoE (J9565A)."
+
+         REVISION     "200909250000Z" -- Sep 25, 2009
+         DESCRIPTION  "Added the following:
+                       hpSwitchModuleJ9534A, hpSwitchModuleJ9535A, 
+                       hpSwitchModuleJ9536A, hpSwitchModuleJ9537A,
+                       hpSwitchModuleJ9538A, hpSwitchModuleJ9546A,
+                       hpSwitchModuleJ9547A, hpSwitchModuleJ9548A,
+                       hpSwitchModuleJ9549A, hpSwitchModuleJ9550A,
+                       hpSwitchAdvServicesModule, 
+                       hpSwitchExtServicesModule, 
+                       hpSwitchModuleJ9485A."
+
+         REVISION     "200909240000Z" -- Sep 24, 2009
+         DESCRIPTION  "Added hpicfDebugLog"
+
+         REVISION     "200909090000Z" -- Sep 09, 2009
+         DESCRIPTION  "Added 2640-8-POE (J93xxA) and 2640G-8-POE (J93yyA)
+                       8-port PoE 10/100 and 10/100/1000 switches"
+
+         REVISION     "200907080000Z" -- Jul 08, 2009
+         DESCRIPTION  "Added hpSwitchModuleJ9312A"
+
+         REVISION     "200904080000Z" -- Apr 08, 2009
+         DESCRIPTION  "Added hpSwitchModuleJ9477A, hpSwitchJ9310A
+                       and hpSwitchJ9311A"
+
+         REVISION     "200902170000Z" -- Feb 17, 2009
+         DESCRIPTION  "Added definitions for 3500 10/100 family"
+
+         REVISION     "200902040000Z" -- Feb 4, 2009
+         DESCRIPTION  "Added hpSwitchModuleJ9307A, hpSwitchModuleJ9308A
+                       hpSwitchModuleJ9478A and hpSwitchModuleJ9309A"
+
+         REVISION     "200902020000Z" -- Feb 02. 2009
+         DESCRIPTION  "Added definition for 1810-8(J9449A) and 1810-24(J9450A)"
+
+         REVISION     "200812150001Z" -- Dec 15, 2008
+         DESCRIPTION  "Added hpSwitchImage"
+
+         REVISION     "200812150000Z" -- Dec 15, 2008
+         DESCRIPTION  "Added hpicfOobmMIB"
+
+         REVISION     "200810300000Z" -- Oct 30, 2008
+         DESCRIPTION  "Added hpicfSysMgmt and hpicfSecurityDevice"
+
+         REVISION     "200810240000Z" -- Oct 24, 2008
+         DESCRIPTION  "Added hpicfDhcpClient"
+
+         REVISION     "200810210000Z" -- Oct 21, 2008
+         DESCRIPTION  "Updated official name for 2910al family"
+
+         REVISION     "200810020000Z" -- Oct 2, 2008
+         DESCRIPTION  "Added 2520G-24-PoE(J9299A) and 2520G-8-PoE(J9298A)"
+
+         REVISION     "200808060000Z" -- Aug 6, 2008
+         DESCRIPTION  "Added 2520-24-PoE(J9138A) and 2520-8-PoE(J9137A)"
+
+         REVISION     "200805120000Z" -- May 12, 2008
+         DESCRIPTION  "Added 1800-24G-B(J9028B) and changed 2510-24-B(J9019B)"
+
+         REVISION     "200803100000Z"  -- Mar 10, 2008
+         DESCRIPTION  "Added hpicfSyslog "
+
+         REVISION     "200803060000Z"  -- Mar 6, 2008
+         DESCRIPTION  "Added 2510G-24 (J9279A) and 2510G-48 (J9280A)"
+
+         REVISION     "200802150000Z"  -- Feb 15, 2008
+         DESCRIPTION  "Added definitions for 2910"
+
+         REVISION     "200802041525Z"  -- February 04, 2008
+         DESCRIPTION  "Added definitions for transceivers."
+
+         REVISION     "200710230001Z"  -- Oct 23, 2007
+         DESCRIPTION  "Added definitions for 2510B"
+
+         REVISION     "200710230000Z"  -- Oct 23, 2007
+         DESCRIPTION  "Added definitions for 2626C and 2650C"
+
+         REVISION     "200709070000Z"  -- September 07, 2007
+         DESCRIPTION  "Added definition for hpicfInstMIB."
+
+         REVISION     "200705210000Z"  -- May 21, 2007 
+         DESCRIPTION  "Revised definitions for J8766A and 
+                       J8988A devices."
+
+         REVISION     "200704300000Z"  -- April 30, 2007 
+         DESCRIPTION  "Added definitions for all 2610 products."
+
+         REVISION     "200704170000Z"  -- April 17, 2006 
+         DESCRIPTION  "Added hpicfProviderBridge node and branch."
+
+         REVISION     "200610310000Z"  -- October 31, 2006 
+         DESCRIPTION  "Added hpicfCommonSecurity node and branch."
+
+         REVISION     "200609251200Z"  -- Sept 25, 2006 
+         DESCRIPTION  "Cleaned up definition of J8715 Chassis."
+
+         REVISION     "200609081200Z"  -- Sept 8, 2006 
+         DESCRIPTION  "Added definitions for ESP blades."
+
+         REVISION     "200608221200Z"  -- Aug 22, 2006 
+         DESCRIPTION  "Added definitions for hpicfL3MacConfigMIB."
+
+         REVISION     "200608040000Z"  -- August 04, 2006
+         DESCRIPTION  "Added definition for hpicfInstMonMIB."
+
+         REVISION     "200607271200Z"  -- July 27, 2006
+         DESCRIPTION  "Added definitions for J9032A, J9031A, 
+                      J8768A, J8765B, J9033A, J9036A, J9037A, 
+                      J8766A and J8988A devices."
+
+         REVISION     "200607260000Z"  -- July 26, 2006
+         DESCRIPTION  "Added definition for J9049A and J9050A switch."
+
+         REVISION     "200606300000Z"  -- June 30, 2006
+         DESCRIPTION  "Added definition for J9038A device."
+
+         REVISION     "200606051233Z"  -- June 05, 2006
+         DESCRIPTION  "Added definition for hpicfDhcpSnoopMIB."
+
+         REVISION     "200605171233Z"  -- May 17, 2006
+         DESCRIPTION  "Added definition for hpSwitchAuthorizationMIB."
+
+         REVISION     "200603201627Z" -- Mar. 20, 2006
+         DESCRIPTION  "Added definition for J9028A and J9029A switch"
+
+         REVISION     "200601101853Z"  -- Jan.  10, 2006
+         DESCRIPTION  "Added definition J8726A device."
+
+         REVISION     "200508041619Z"  -- August 4, 2005
+         DESCRIPTION  "Added definitions for hpSwitchAuthenticationMIB,
+                      hpSwitchAccountingMIB, hpicfXrrpMIB, hpicfUsrAuthMIB,
+                      hpicfPimMIB, hpicfUdpFwd,
+                      hpicfConnectionRateFilter, hpicfDot1xMIB,
+                      hpicfVrrpMIB."
+
+         REVISION     "200506081244Z"  -- June 8, 2005
+         DESCRIPTION  "Added definition for hpicFrabric."
+
+         REVISION     "200505202123Z"  -- May  20, 2005
+         DESCRIPTION  "Added definitions J9001 and J9003 devices."
+
+         REVISION     "200503221926Z"  -- March  22, 2005
+         DESCRIPTION  "Added definitions J8771A and J8772A devices."
+
+         REVISION     "200503081530Z"  -- March  08, 2005
+         DESCRIPTION  "Added definition for hpSwitchModuleJ8762A,
+                      hpSwitch2600n8PPortSlot, updated definition 
+                      for J8474A, updated hpSwitchJ8433A,
+                      updated hpSwitchJ8474A, and updated 
+                      hpSwitchModuleJ8433A."
+
+         REVISION     "200502250041Z"  -- February 24, 2005
+         DESCRIPTION  "Added definitions for hpicfRateLimitMIB and
+                       J8680A router."
+
+         REVISION     "200501111745Z"  -- January 11, 2005
+         DESCRIPTION  "Added definitions for J8770A, J8773A, J8765A,
+                       J8764A, J8776A, and J8763A products."
+
+         REVISION     "200501102043Z"  -- January 10, 2005
+         DESCRIPTION  "Added definitions for J8697A, J8698A products."
+
+         REVISION     "200409102043Z"  -- September 10, 2004
+         DESCRIPTION  "Added definitions for more WAN products."
+
+         REVISION     "200409021030Z"  -- September 02, 2004
+         DESCRIPTION  "Added definitions for hpSwitchModuleJ4905A, 
+                       hpSwitchModuleJ4906A, hpSwitchModuleJ8433A, 
+                       hpSwitchModuleJ8474A, and hpicfJumboMIB."
+         
+         REVISION     "200408091030Z"  -- August 09, 2004
+         DESCRIPTION  "Added HP 6400cl-6XG and 6410cl-6XG."
+         
+         REVISION     "200407282043Z"  -- July 28, 2004
+         DESCRIPTION  "Added definitions for J8718A and J8719A."
+
+         REVISION     "200403310051Z"  -- March 31, 2004
+         DESCRIPTION  "Added definitions for 10Gig SR, LR, and ER."
+
+
+         REVISION     "200403310050Z"  -- March 31, 2004
+         DESCRIPTION  "Added HP 2650-CR and 2626-CR Switch 
+                       definitions."
+
+         REVISION     "200402122115Z"  -- February 12, 2004
+         DESCRIPTION  "Added definition for 10Gig CX4, 
+                       ESP port and WAN Products"
+
+         REVISION     "200401201855Z"  -- January 20, 2004
+         DESCRIPTION  "Added definitions for J8161A, J4907A, J8162A,
+                       J4820B, J4821B, and J4878B."
+
+         REVISION     "200312291705Z"  -- December 29, 2003
+         DESCRIPTION  "Added definitions for J4905A and J4906A Switch 
+                       definitions."
+
+         REVISION     "200306091617Z"  -- June 9, 2003
+         DESCRIPTION  "Added definitions for wireless products."
+
+         REVISION     "200304101118Z"  -- April 10, 2003
+         DESCRIPTION  "Added HP 2650-PWR and 2626-PWR Switch 
+                       definitions."
+
+         REVISION     "200302041716Z"  -- February 04, 2003
+         DESCRIPTION  "Added  Transceiver cards for HP Switch 2824."
+
+         REVISION     "200301281510Z"  -- January 28, 2003
+         DESCRIPTION  "Added HP 2626 Switch definitions."
+
+         REVISION     "200301211633Z"  -- January 21, 2003
+         DESCRIPTION  "Added Proliant Switch Object to hpEtherSwitch."
+
+         REVISION     "200204060100Z"  -- April 5, 2002
+         DESCRIPTION  "Added new HP Switch definitions"
+
+         REVISION     "200011032225Z"  -- November 3, 2000
+         DESCRIPTION  "Added new HP Switch definitions"
+
+         REVISION     "9909030004Z"  -- September 3, 1999
+         DESCRIPTION  "Added definition for HP Routing 
+                      Switch products."
+
+         REVISION     "9809240004Z"  -- September 24, 1998
+         DESCRIPTION  "Added definitions for 100Mbit and 10/100
+                      hub products, and definitions for the
+                      HP switch products."
+
+         REVISION     "9710210242Z"  -- October 21, 1997
+         DESCRIPTION  "Added definitions for new hub products
+                      (10Base-T Hub-12M, 10Base-T Hub-24M, and
+                      10Base-T Hub-16M) and Switch 2000 ATM module.
+                      Added branch for the Fault Finder MIB."
+
+         REVISION     "9703060342Z"  -- March 6, 1997
+         DESCRIPTION  "Added definitions for new switch products
+                      (208/224), 100T hub (J3233A).  Added missing
+                      include of OBJECT-IDENTITY."
+
+         REVISION     "9609132303Z"  -- September 13, 1996
+         DESCRIPTION  "Initial revision.  Split from the former
+                      monolithic hpicf MIB."
+         ::= { nm 14 }
+
+    hp                OBJECT IDENTIFIER ::= { enterprises 11 }
+    nm                OBJECT IDENTIFIER ::= { hp 2 }
+
+    -- Branches under the icf node.  Most of these
+    -- branches are defined in other modules.
+
+    icfCommon         OBJECT IDENTIFIER ::= { icf 1 }
+    icfHub            OBJECT IDENTIFIER ::= { icf 2 }
+    icfBridge         OBJECT IDENTIFIER ::= { icf 3 }
+
+    icfSecurity       OBJECT IDENTIFIER ::= { icf 4 }
+    icfConfig         OBJECT IDENTIFIER ::= { icf 5 }
+
+    icfEsSwitch       OBJECT IDENTIFIER ::= { icf 6 }
+    hpEs              OBJECT IDENTIFIER ::= { icfEsSwitch 1 }
+    hpEs2             OBJECT IDENTIFIER ::= { icfEsSwitch 2 }
+    hpNetSwitch       OBJECT IDENTIFIER ::= { icfEsSwitch 3 }
+
+    icfRouter         OBJECT IDENTIFIER ::= { icf 7 }
+
+    icfDot12Draft     OBJECT IDENTIFIER ::= { icf 8 }
+    icfVgRepeater     OBJECT IDENTIFIER ::= { icfDot12Draft 1 }
+    icfVgInterface    OBJECT IDENTIFIER ::= { icfDot12Draft 2 }
+
+    hpEntityMIB       OBJECT IDENTIFIER ::= { icf 9 }
+
+    hpicfAdmin        OBJECT IDENTIFIER ::= { icf 10 }
+    hpicfObjects      OBJECT IDENTIFIER ::= { icf 11 }
+    hpicfNotifications OBJECT IDENTIFIER ::= { icf 12 }
+
+    hpicfOEMs         OBJECT IDENTIFIER ::= { icf 13 }
+    hpicfFEHub        OBJECT IDENTIFIER ::= { hpicfOEMs 1 }
+
+    hpicfSyslog       OBJECT IDENTIFIER ::= { icf 14 }
+
+    -- HP defined transport domains
+
+    hpicfDomains      OBJECT IDENTIFIER ::= { hpicfAdmin 1 }
+
+    hpicfLLCDomain OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The SNMP over 802.2 transport domain."
+        ::= { hpicfDomains 1 }
+
+
+    -- Placeholder for registering object modules.  Note that the
+    -- MODULE-IDENTITY, MODULE-COMPLIANCE, and OBJECT-GROUP
+    -- definitions for each module are declared beneath these
+    -- branches.
+
+    hpicfObjectModules OBJECT IDENTIFIER ::= { hpicfAdmin 2 }
+
+    icfSecurityMib    OBJECT IDENTIFIER ::= { hpicfObjectModules 1 }
+    hpicfChainMib     OBJECT IDENTIFIER ::= { hpicfObjectModules 2 }
+    hpicfChassisMib   OBJECT IDENTIFIER ::= { hpicfObjectModules 3 }
+    hpicfDownloadMib  OBJECT IDENTIFIER ::= { hpicfObjectModules 4 }
+    hpicfBasicMib     OBJECT IDENTIFIER ::= { hpicfObjectModules 5 }
+    hpicfStackMib     OBJECT IDENTIFIER ::= { hpicfObjectModules 6 }
+    hpicfLinkTestMib  OBJECT IDENTIFIER ::= { hpicfObjectModules 7 }
+    hpicfGenRptrMib   OBJECT IDENTIFIER ::= { hpicfObjectModules 8 }
+    hpicf8023RptrMib  OBJECT IDENTIFIER ::= { hpicfObjectModules 9 }
+    icfVgRepeaterMib  OBJECT IDENTIFIER ::= { hpicfObjectModules 10 }
+    hpicfVgRptrMib    OBJECT IDENTIFIER ::= { hpicfObjectModules 11 }
+    hpicfFaultFinderMib OBJECT IDENTIFIER ::= { hpicfObjectModules 12 }
+    hpicfJumboMIB OBJECT IDENTIFIER ::= { hpicfObjectModules 13 }
+    hpicfRateLimitMIB OBJECT IDENTIFIER ::= { hpicfObjectModules 14 }
+
+    -- Placeholder for registering agent capabilities modules
+
+    hpicfAgentModules OBJECT IDENTIFIER ::= { hpicfAdmin 3 }
+
+
+       -- Placeholders for branches allocated to agent capabilities
+       -- modules
+
+   hpicfETwistHubAgentsMib    OBJECT IDENTIFIER ::= { hpicfAgentModules 1 }
+   hpicfETwistBridgeAgentsMib OBJECT IDENTIFIER ::= { hpicfAgentModules 2 }
+   hpicfAdvStk8023AgentsMib   OBJECT IDENTIFIER ::= { hpicfAgentModules 3 }
+   hpicfAdvStkVGAgentsMib     OBJECT IDENTIFIER ::= { hpicfAgentModules 4 }
+
+   -- Placeholder for the HP ICF Textual Conventions module
+
+   hpicfTextualConventions    OBJECT IDENTIFIER ::= { hpicfAdmin 4 }
+
+
+    -- Placeholders for branches allocated to other MIB modules
+    -- under the hpicfObjects node
+
+    hpicfCommon       OBJECT IDENTIFIER ::= { hpicfObjects 1 }
+    hpicfRepeater     OBJECT IDENTIFIER ::= { hpicfObjects 2 }
+    hpicfVg           OBJECT IDENTIFIER ::= { hpicfObjects 3 }
+    hpicfGenericRepeater OBJECT IDENTIFIER ::= { hpicfObjects 4 }
+    hpicfSwitch       OBJECT IDENTIFIER ::= { hpicfObjects 5 }
+    hpicfAccess       OBJECT IDENTIFIER ::= { hpicfObjects 6 }
+    hpicfWAN          OBJECT IDENTIFIER ::= { hpicfObjects 7 }
+    hpicfFabric       OBJECT IDENTIFIER ::= { hpicfObjects 8 }
+    hpicfSecurityDevice  OBJECT IDENTIFIER ::= { hpicfObjects 9 }
+    hpicfSysMgmt      OBJECT IDENTIFIER ::= { hpicfObjects 10 }
+
+    -- Branches under the hpicfSwitch node
+    hpSwitch          OBJECT IDENTIFIER ::= { hpicfSwitch 1 }
+
+    -- Branches under the hpSwitch node
+    hpOpSystem                OBJECT IDENTIFIER ::= { hpSwitch 1 }
+    hpHwSystem                OBJECT IDENTIFIER ::= { hpSwitch 2 }
+    hpVLAN                    OBJECT IDENTIFIER ::= { hpSwitch 3 }
+    hpConfig                  OBJECT IDENTIFIER ::= { hpSwitch 7 }
+    hpSwitchStatistics        OBJECT IDENTIFIER ::= { hpSwitch 9 }
+    hpSwitchVirtualStackMib   OBJECT IDENTIFIER ::= { hpSwitch 10 }
+    hpicfDhcpRelay            OBJECT IDENTIFIER ::= { hpSwitch 11 }
+    hpicfBridge               OBJECT IDENTIFIER ::= { hpSwitch 12 }
+    hpicfRip                  OBJECT IDENTIFIER ::= { hpSwitch 13 }
+    hpicfOspf                 OBJECT IDENTIFIER ::= { hpSwitch 14 }
+    hpicfIpRouting            OBJECT IDENTIFIER ::= { hpSwitch 15 }
+    hpSwitchAuthenticationMIB OBJECT IDENTIFIER ::= { hpSwitch 16 }
+    hpSwitchAccountingMIB     OBJECT IDENTIFIER ::= { hpSwitch 17 }
+    hpicfXrrpMIB              OBJECT IDENTIFIER ::= { hpSwitch 18 }
+    hpicfUsrAuthMIB           OBJECT IDENTIFIER ::= { hpSwitch 19 }
+    hpicfPimMIB               OBJECT IDENTIFIER ::= { hpSwitch 20 }
+    hpicfUdpFwd               OBJECT IDENTIFIER ::= { hpSwitch 23 }
+    hpicfConnectionRateFilter OBJECT IDENTIFIER ::= { hpSwitch 24 }
+    hpicfDot1xMIB             OBJECT IDENTIFIER ::= { hpSwitch 25 }
+    hpicfVrrpMIB              OBJECT IDENTIFIER ::= { hpSwitch 31 }
+    hpSwitchAuthorizationMIB  OBJECT IDENTIFIER ::= { hpSwitch 32 }
+    hpicfUdldMIB	      OBJECT IDENTIFIER ::= { hpSwitch 33 }
+    hpicfIpDhcpSnoop          OBJECT IDENTIFIER ::= { hpSwitch 34 }
+    hpicfInstMonMIB           OBJECT IDENTIFIER ::= { hpSwitch 35 }
+    hpicfL3MacConfigMIB       OBJECT IDENTIFIER ::= { hpSwitch 36 }
+    hpicfArpProtect           OBJECT IDENTIFIER ::= { hpSwitch 37 }
+    hpicfSnmpMIB	      OBJECT IDENTIFIER ::= { hpSwitch 38 }
+    hpicfIpLockdown	      OBJECT IDENTIFIER ::= { hpSwitch 39 }
+    hpicfProviderBridge       OBJECT IDENTIFIER ::= { hpSwitch 40 }
+    hpicfGppcMIB              OBJECT IDENTIFIER ::= { hpSwitch 41 }
+    hpicfAutorun	      OBJECT IDENTIFIER ::= { hpSwitch 42 }
+    hpicfInstMIB              OBJECT IDENTIFIER ::= { hpSwitch 45 }
+    hpicfFtrCo                OBJECT IDENTIFIER ::= { hpSwitch 46 }
+    hpicfMldMIB               OBJECT IDENTIFIER ::= { hpSwitch 48 }
+    hpicfDhcpv6Relay          OBJECT IDENTIFIER ::= { hpSwitch 50 }
+    hpicfScriptMIB            OBJECT IDENTIFIER ::= { hpSwitch 51 }
+    hpicfUSBPortMIB           OBJECT IDENTIFIER ::= { hpSwitch 53 }  
+    hpicfFanMIB               OBJECT IDENTIFIER ::= { hpSwitch 54 }
+    hpicfPsMIB                OBJECT IDENTIFIER ::= { hpSwitch 55 }
+    hpicfSavepowerMIB         OBJECT IDENTIFIER ::= { hpSwitch 56 }
+    hpicfDhcpClient           OBJECT IDENTIFIER ::= { hpSwitch 57 }
+    hpicfOobmMIB              OBJECT IDENTIFIER ::= { hpSwitch 58 }
+    hpSwitchImage             OBJECT IDENTIFIER ::= { hpSwitch 59 }
+    hpicfDosFilterMib         OBJECT IDENTIFIER ::= { hpSwitch 60 }
+    hpicfGppcv2MIB            OBJECT IDENTIFIER ::= { hpSwitch 61 }
+    hpicfDebugLog             OBJECT IDENTIFIER ::= { hpSwitch 64 }
+    hpicfMacNotifyMIB         OBJECT IDENTIFIER ::= { hpSwitch 66 }
+    hpicfGenericVlanMIB       OBJECT IDENTIFIER ::= { hpSwitch 67 }
+    hpSwitchErrorMsgMIB       OBJECT IDENTIFIER ::= { hpSwitch 68 }
+    hpStackMIB                OBJECT IDENTIFIER ::= { hpSwitch 69 }
+    hpicfLayer3VlanConfigMIB  OBJECT IDENTIFIER ::= { hpSwitch 70 }
+    hpEntityPowerMIB          OBJECT IDENTIFIER ::= { hpSwitch 71 }
+    hpicfTrafficTemplateMIB   OBJECT IDENTIFIER ::= { hpSwitch 72 }
+    hpicfUfdMIB               OBJECT IDENTIFIER ::= { hpSwitch 74 }
+    hpSBMMIB                  OBJECT IDENTIFIER ::= { hpSwitch 75 }
+    hpicfLoadBalanceMod       OBJECT IDENTIFIER ::= { hpSwitch 76 }
+    hpTunnelMIB               OBJECT IDENTIFIER ::= { hpSwitch 77 }    
+    hpSwitchFipSnoopingMib    OBJECT IDENTIFIER ::= { hpSwitch 78 }
+    hpicfTcpMib		      OBJECT IDENTIFIER ::= { hpSwitch 79 }
+    hpicfTransceiverMIB       OBJECT IDENTIFIER ::= { hpSwitch 82 }
+    hpicfSvcsAppMIB           OBJECT IDENTIFIER ::= { hpSwitch 86 }
+    hpicfIpv6RAGuard          OBJECT IDENTIFIER ::= { hpSwitch 87 }
+    hpicfRpvstMIB             OBJECT IDENTIFIER ::= { hpSwitch 88 }
+    hpicfVrrpv3MIB            OBJECT IDENTIFIER ::= { hpSwitch 90 }
+    hpicfSflowMIB             OBJECT IDENTIFIER ::= { hpSwitch 92 }
+    hpicfMstpExtnMIB          OBJECT IDENTIFIER ::= { hpSwitch 94 }
+
+    hpicfMadMIB               OBJECT IDENTIFIER ::= { hpSwitch 95 }
+    hpicfSmartLinkMIB         OBJECT IDENTIFIER ::= { hpSwitch 96 }
+    hpSwitchTrapMib           OBJECT IDENTIFIER ::= { hpSwitch 104 }
+    -- Branches under the hpicfCommon node
+    hpicfChain        OBJECT IDENTIFIER ::= { hpicfCommon 1 }
+    hpicfChassis      OBJECT IDENTIFIER ::= { hpicfCommon 2 }
+    hpicfDownload     OBJECT IDENTIFIER ::= { hpicfCommon 3 }
+    hpicfBasic        OBJECT IDENTIFIER ::= { hpicfCommon 4 }
+    hpicfStack        OBJECT IDENTIFIER ::= { hpicfCommon 5 }
+    hpicfLinktest     OBJECT IDENTIFIER ::= { hpicfCommon 6 }
+    hpicfFaultFinder  OBJECT IDENTIFIER ::= { hpicfCommon 7 }
+    hpicfPOE          OBJECT IDENTIFIER ::= { hpicfCommon 9 }
+    hpicfCommonSecurity    OBJECT IDENTIFIER ::= { hpicfCommon 12 }
+    hpicfSrcIpMIB     OBJECT IDENTIFIER ::= { hpicfCommon 13 }
+    hpicfCoreDumpMIB     OBJECT IDENTIFIER ::= { hpicfCommon 14 }
+
+
+    -- Branches for registering HP ICF notifications
+
+    hpicfCommonTraps  OBJECT IDENTIFIER ::= { hpicfNotifications 1 }
+    hpicfCommonTrapsPrefix OBJECT IDENTIFIER ::= { hpicfCommonTraps 0 }
+
+    hpicf8023RptrTraps
+                         OBJECT IDENTIFIER ::= { hpicfNotifications 2 }
+    hpicf8023RptrTrapsPrefix OBJECT IDENTIFIER ::= { hpicf8023RptrTraps 0 }
+
+    hpicfVgRptrTraps  OBJECT IDENTIFIER ::= { hpicfNotifications 3 }
+    hpicfVgRptrTrapsPrefix OBJECT IDENTIFIER ::= { hpicfVgRptrTraps 0 }
+
+    hpicfGenRptrTraps OBJECT IDENTIFIER ::= { hpicfNotifications 4 }
+    hpicfGenRptrTrapsPrefix OBJECT IDENTIFIER ::= { hpicfGenRptrTraps 0 }
+
+    hpicfRateLimitTraps OBJECT IDENTIFIER ::= { hpicfNotifications 5 }
+    hpicfRateLimitTrapsPrefix OBJECT IDENTIFIER ::= { hpicfRateLimitTraps 0 }
+
+    hpicfSecLoggingTraps OBJECT IDENTIFIER ::= { hpicfNotifications 6 }
+    hpicfSecLoggingTrapsPrefix OBJECT IDENTIFIER ::= { hpicfSecLoggingTraps 0 }
+
+    -- HP ICF Device Identifiers
+
+    hpSystem          OBJECT IDENTIFIER ::= { nm 3 }
+    netElement        OBJECT IDENTIFIER ::= { hpSystem 7 }
+
+
+    -- Bridges
+
+    bridge            OBJECT IDENTIFIER ::= { netElement 1 }
+
+    bridge1010 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the 
+                    HP 28673A 10:10 LAN Bridge."
+        ::= { bridge 1 }
+
+    bridgeRemote OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 28674A/B Remote Bridge."
+        ::= { bridge 2 }
+
+    eswitch OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2418A EtherTwist LAN Switch."
+        ::= { bridge 3 }
+
+    eswitch2 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2980A AdvanceStack LAN Switch-16."
+        ::= { bridge 8 }
+
+    netSwitch100 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3126A AdvanceStack Switch 100."
+        ::= { bridge 9 }
+
+    netSwitch200 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3125A AdvanceStack Switch 200."
+        ::= { bridge 10 }
+
+
+    -- Routers
+
+    router            OBJECT IDENTIFIER ::= { netElement 2 }
+
+    icfRouterER OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 27285A Router ER."
+        ::= { router 1 }
+
+    icfRouterTR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 27286A Router TR."
+        ::= { router 2 }
+
+    icfRouterSR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 27288A Router SR."
+        ::= { router 3 }
+
+    icfRouterFR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 27289A Router FR."
+        ::= { router 4 }
+
+    icfRouterLR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP Router LR."
+        ::= { router 5 }
+
+    icfRouterBR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 27290A Router BR."
+        ::= { router 6 }
+
+    icfRouterPR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2540A Router PR."
+        ::= { router 7 }
+
+    icfRouter650 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2430A AdvanceStack Router 650."
+        ::= { router 8 }
+
+    icfRouter230 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2540B Router 230."
+        ::= { router 9 }
+
+    icfRouter250 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 27289B Router 250."
+        ::= { router 10 }
+
+    icfRouter255 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2543A Router 255."
+        ::= { router 11 }
+
+    icfRouter210 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2628A AdvanceStack Router 210."
+        ::= { router 12 }
+
+    -- Cards for the Router 650
+
+    icfRouter650Engine OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the routing
+                    engine card for the HP J2430A AdvanceStack
+                    Router 650."
+        ::= { icfRouter650 2 }
+
+    icfRouter650Port4E OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2435A AdvanceStack Router 4E Port Module."
+        ::= { icfRouter650 3 }
+
+    icfRouter650Port4S OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2434A AdvanceStack Router 4S Port Module."
+        ::= { icfRouter650 4 }
+
+    icfRouter650Port4T OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2437A AdvanceStack Router 4T Port Module."
+        ::= { icfRouter650 5 }
+
+    icfRouter650PortFDDI OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2436A AdvanceStack Router FDDI Port Module."
+        ::= { icfRouter650 6 }
+
+    icfRouter650Port100VG OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2438A AdvanceStack Router 100VG Port
+                    Module."
+        ::= { icfRouter650 7 }
+
+
+    -- Hubs
+
+    hub               OBJECT IDENTIFIER ::= { netElement 5 }
+
+    etherTwist12 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 27288A/B EtherTwist Hub PLUS."
+        ::= { hub 1 }
+
+    fiberOptic OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 28682A Fiber-Optic Hub PLUS."
+        ::= { hub 3 }
+
+    etherTwist48 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 28699A EtherTwist Hub PLUS/48."
+        ::= { hub 4 }
+
+    thinLAN OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP 28692A ThinLAN Hub PLUS."
+        ::= { hub 5 }
+
+    etherTwist24S OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2355A EtherTwist Secure Hub PLUS/24S"
+        ::= { hub 6 }
+
+    advStack12 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2600A AdvanceStack 10Base-T Hub-12"
+        ::= { hub 7 }
+
+    advStack24 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2601A/B AdvanceStack 10Base-T Hub-24."
+        ::= { hub 8 }
+
+    advStack48 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2602A/B AdvanceStack 10Base-T Hub-48."
+        ::= { hub 9 }
+
+    advStackVg15 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2410A AdvanceStack 100VG Hub-15."
+        ::= { hub 10 }
+
+    advStackU8 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2610A AdvanceStack 10Base-T Hub-8U."
+        ::= { hub 11 }
+
+    advStackU16 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2611A AdvanceStack 10Base-T Hub-16U."
+        ::= { hub 12 }
+
+    advStackVg6 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2413A AdvanceStack 100VG Hub-7M."
+        ::= { hub 13 }
+
+    advStackVg12 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2415A AdvanceStack 100VG Hub-14."
+        ::= { hub 14 }
+
+    hpAdvStkEnetSH12R OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3200A AdvanceStack 10BT Switching Hub-12R."
+        ::= { hub 15 }
+
+    hpAdvStkEnetSH24R OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3202A AdvanceStack 10BT Switching Hub-24R."
+        ::= { hub 16 }
+
+    hpAdvStkEnetSH24T OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3204A AdvanceStack 10BT Switching Hub-24T."
+        ::= { hub 17 }
+
+    hpAdvStk100Tx12TM OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3233A AdvanceStack 100B-TX Hub-12TM w/MGMT."
+        ::= { hub 18 }
+
+    hp10THub16M OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3188A 10Base-T Hub-16M."
+        ::= { hub 19}
+
+    hp10BaseTHub12M OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3301A 10Base-T Hub-12M"
+        ::= { hub 20 }
+
+    hp10BaseTHub24M OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3303A 10Base-T Hub-24M"
+        ::= { hub 21 }
+
+    hpProCurve10T100THub12M OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3288A 100Base-T Hub 12M"
+        ::= { hub 22 }
+
+    hpProCurve10T100THub24M OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3289A 100Base-T Hub 24M"
+        ::= { hub 23 }
+
+
+    -- Entity MIB OIDs
+
+    chassis           OBJECT IDENTIFIER ::= { netElement 8 }
+
+    repeaterAgent OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2603A/B AdvanceStack Ethernet SNMP module."
+        ::= { chassis 1 }
+
+
+    chassisAgents     OBJECT IDENTIFIER ::= { chassis 2 }
+
+    icfVgAgent OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2414A AdvanceStack 100VG/ET SNMP/Bridge
+                    Module."
+        ::= { chassisAgents 1 }
+
+    icfVgAgent2 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J2414B AdvanceStack 100VG/ET SNMP/Bridge
+                    Module."
+        ::= { chassisAgents 3 }
+
+    hpicfEnetSMM OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HPJ3133A AdvanceStack 8U/16U SNMP Module."
+        ::= { chassisAgents 4 }
+
+    hpAdvStkEnetSHAgent OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HPJ3210A AdvanceStack 10BT Switching Hub
+                    Management Module."
+        ::= { chassisAgents 5 }
+
+    hpAdvStkSwStackTopMgmt OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HPJ3179A AdvanceStack Switch StackTop Management
+                    Module."
+        ::= { chassisAgents 6 }
+
+    hpSwitch8000CpuCard OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4110A Switch 8000M and HP J4121A Switch
+                    4000M CPU card."
+        ::= { chassisAgents 7 }
+
+    icfSensors        OBJECT IDENTIFIER ::= { chassis 3 }
+
+    icfPowerSupplySensor OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Identifier for a power supply sensor type."
+        ::= { icfSensors 1 }
+
+    icfFanSensor OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Identifier for a fan sensor type."
+        ::= { icfSensors 2 }
+
+    icfTemperatureSensor OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Identifier for a temperature sensor type."
+        ::= { icfSensors 3 }
+
+    icfFutureSlotSensor OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Identifier for a FutureSlot sensor type."
+        ::= { icfSensors 4 }
+
+
+    icfCards          OBJECT IDENTIFIER ::= { chassis 4 }
+
+    icfUnidentifiedCard OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Used to indicate that a module is installed in
+                    a slot in a chassis, but the agent is unable to
+                    identify it."
+        ::= { icfCards 1 }
+
+    hpAdvStkEnetSHSwitch OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3212A AdvanceStack 10BT Switching Hub Switch
+                    Module."
+        ::= { icfCards 2 }
+
+    hpAdvStkSwStackExpander OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HPJ3180A AdvanceStack Switch Stack Expander
+                    Module."
+        ::= { icfCards 3 }
+
+    hpicfStacks       OBJECT IDENTIFIER ::= { chassis 5 }
+
+    hpAdvStkEnetSHStack OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a stack of
+                    HP AdvanceStack 10Base-T Switching Hubs."
+        ::= { hpicfStacks 1 }
+
+    hpStack OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the HP 
+                     stack. The stack can have the devices like 
+                     hpSwitchJ9573, hpSwitchJ9574, hpSwitchJ9575, 
+                     hpSwitchJ9576, hpSwitchJ9584, hpSwitchJ9585, 
+                     hpSwitchJ9586, hpSwitchJ9587, hpSwitchJ9588."
+        ::= { hpicfStacks 2 }
+
+    hpStack2920 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the HP 
+                     stack of 2920 series switches. The stack can 
+                     include devices like 
+                     hpSwitchJ9726, hpSwitchJ9727, hpSwitchJ9728,
+                     hpSwitchJ9729."
+        ::= { hpicfStacks 3 }
+
+    hpicfBackplanes   OBJECT IDENTIFIER ::= { chassis 6 }
+
+    hpAdvStkEnetSHExtSeg OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an inter-box
+                    repeater segment in a stack of HP AdvanceStack
+                    10Base-T Switching Hubs."
+        ::= { hpicfBackplanes 1 }
+
+    hpAdvStkEnetSHIntSeg OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a repeater
+                    segment that is internal to a single box in
+                    a stack of HP AdvanceStack 10Base-T Switching
+                    Hubs."
+        ::= { hpicfBackplanes 2 }
+
+    hp10BaseTHubSeg OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a repeater
+                    segment in an HP 10Base-T Hub-12M or HP
+                    10Base-T Hub-24M."
+        ::= { hpicfBackplanes 3 }
+
+    hpSwitchBackplane OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an HP Switch
+                    backplane."
+        ::= { hpicfBackplanes 4 }
+
+    hp100BaseTHubSeg OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a repeater
+                    segment in an HP 100Base-T Hub 12M
+                    or HP 100Base-T Hub 24M."
+        ::= { hpicfBackplanes 5 }
+
+
+
+    hpicfSlots        OBJECT IDENTIFIER ::= { chassis 7 }
+
+    hpAdvStkEnetSHAgentSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the Management
+                    Slot in an HP AdvanceStack 10Base-T Switching
+                    Hub."
+        ::= { hpicfSlots 1 }
+
+    hpAdvStkEnetSHIOSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the Expansion
+                    Slot in an HP AdvanceStack 10Base-T Switching
+                    Hub."
+        ::= { hpicfSlots 2 }
+
+    hpAdvStkSwStackMgmtSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    Management/Stacking Slot in an HP AdvanceStack
+                    Switch 208 or Switch 224."
+        ::= { hpicfSlots 3 }
+
+    hpAdvStkSwStackExpSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    Expansion Slot in an HP AdvanceStack Switch 208
+                    or Switch 224."
+        ::= { hpicfSlots 4 }
+
+    hpSwitch8000PowerSupplyBay OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                    power supply bay in an HP Switch 8000 or
+                    HP Switch 4000."
+        ::= { hpicfSlots 5 }
+
+    hpSwitch8000CpuSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the CPU
+                    slot in an HP Switch 8000 or HP Switch 4000."
+        ::= { hpicfSlots 6 }
+
+    hpSwitch8000PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP Switch 8000, HP Switch
+                    4000, HP Switch 1600, or HP Switch 2400/2424."
+        ::= { hpicfSlots 7 }
+
+    hpSwitch2524PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP Switch 2524, HP Switch
+                    2512, or HP Network Blade."
+        ::= { hpicfSlots 8 }
+
+    hpSwitch5308PowerSupplyBay OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                    power supply bay in an HP 5308XL Switch or
+                    HP 5304XL Switch."
+        ::= { hpicfSlots 9 }
+
+    hpSwitch5308PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 5308XL Switch, HP 
+                    5304XL Switch, HP 3324XL Switch, or HP 3124XL Switch."
+        ::= { hpicfSlots 10 }
+
+    hpSwitch4865PowerSupplyBay OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                    power supply bay in an HP 4108GL Switch."
+        ::= { hpicfSlots 11 }
+
+    hpSwitch4865PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 4108GL Switch."
+        ::= { hpicfSlots 12 }
+
+    hpSwitch2650PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2650 Switch."
+        ::= { hpicfSlots 13 }
+
+    hpSwitch6108PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 6108 Switch."
+        ::= { hpicfSlots 14 }
+    
+    hpSwitch2824PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2824 Switch or HP 2848 Switch."
+        ::= { hpicfSlots 15 }
+
+    hpSwitch2626PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2626 Switch."
+        ::= { hpicfSlots 16 }
+
+    hpSwitch2650PPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2650-PWR Switch."
+        ::= { hpicfSlots 17 }
+
+    hpSwitch2626PPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2626-PWR Switch."
+        ::= { hpicfSlots 18 }
+
+    hpSwitch3324PortSlot OBJECT-IDENTITY
+	STATUS      current
+	DESCRIPTION "The authoritative identifier for a port
+		    module slot in an HP 3324 Switch or 
+                    HP 3348 Switch."
+        ::= { hpicfSlots 19 }
+
+    hpSwitch2650CRPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2650-CR Switch."
+        ::= { hpicfSlots 20 }
+
+    hpSwitch2626CRPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2626-CR Switch."
+        ::= { hpicfSlots 21 }
+
+    hpSwitch2600n8PPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2600-8-PWR Switch."
+        ::= { hpicfSlots 22 }
+
+    hpSwitch869xPowerSupplyBay OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                    power supply bay in an HP 5406 zl Switch Chassis
+                    or HP 5412 zl Switch Chassis."
+        ::= { hpicfSlots 23 }
+
+    hpSwitch869xPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 5406 zl Switch Chassis, 
+                    HP 5412 zl Switch Chassis,HP E3800 Switch,
+                    HP 3500yl-24G-PWR Switch, HP 3500yl-48G-PWR Switch,
+                    and HP 6200yl-24G-mGBIC Switch."
+        ::= { hpicfSlots 24 }
+
+    hpSwitch2510PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2510-24 Switch  or
+                    HP 2510-48 Switch."
+        ::= { hpicfSlots 25 }
+
+    hpSwitch2810PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2810-24G Switch  or
+                    HP 2810-48G Switch ."
+        ::= { hpicfSlots 26 }
+
+    hpSwitch5400CpuCardBay OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                    Management Module bay in a HP 54XXZL Switch or
+                    HP 8212ZL Switch ."
+        ::= { hpicfSlots 27 }
+
+    hpSwitch8212FabricBay OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                    Fabric bay in a HP 8212ZL Switch ."
+        ::= { hpicfSlots 28 }
+
+    hpSwitch2610PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2610-24 Switch  or
+                    HP 2610-48 Switch."
+        ::= { hpicfSlots 29 }
+
+    hpSwitch2610PPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2610-24-PWR Switch,
+                    HP 2610-48-PWR Switch  or HP 2610-24/12PWR
+                    Switch."
+        ::= { hpicfSlots 30 }
+
+    hpSwitch2510BPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2510B-24 Switch."
+        ::= { hpicfSlots 31 }
+
+    hpSwitch2626CPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2626C Switch."
+        ::= { hpicfSlots 32 }
+
+    hpSwitch2650CPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2650C Switch."
+        ::= { hpicfSlots 33 }
+
+    hpSwitch2910PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2910al-24G Switch or
+		    HP 2910al-48G Switch."
+        ::= { hpicfSlots 34 }
+
+    hpSwitch2510GPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2510G-24 Switch or
+                    HP 2510G-48 Switch."
+        ::= { hpicfSlots 35 }
+
+    hpSwitch2520PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2520-24 Switch or
+                    HP 2520-8 Switch."
+        ::= { hpicfSlots 36 }
+
+    hpSwitch2520GPortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2520G-24 Switch or
+                    HP 2520G-8 Switch."
+        ::= { hpicfSlots 37 }
+
+    hpSwitch2615PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2615-8-PoE Switch."
+        ::= { hpicfSlots 38 }
+
+    hpSwitch2915PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2915-8G-PoE Switch."
+        ::= { hpicfSlots 39 }
+
+    hpSwitchJ9580PowerSupply  OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the 
+	             HP X312 1000W 100-240VAC to 54VDC PS."
+        ::= { hpicfSlots 40 }
+
+    hpSwitchJ9581PowerSupply OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the 
+	             HP X311 400W 100-240VAC to 12VDC PS."
+        ::= { hpicfSlots 41 }
+
+    hpSwitchJ9582FanTray OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the 
+	             HP E3800 Switch Fan Tray."
+        ::= { hpicfSlots 42 }
+
+    hpSwitch2620PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2620-24 Switch or
+		    HP 2620-48 Switch."
+        ::= { hpicfSlots 43 }
+
+   hpSwitch2530PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+                    module slot in an HP 2530-8 Switch or
+		    HP 2530-48 Switch or HP 2530-48 Switch."
+        ::= { hpicfSlots 45 }
+
+    hpSwitch2920StackingSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a stacking
+        module slot in an HP E2920-24 Switch or
+        HP E2920-48 Switch."
+        ::= { hpicfSlots 46 }
+
+    hpSwitchJ9737APowerSupply OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        HP 2920 X332 1050W 100-240VAC to 54VDC Power Supply."
+        ::= { hpicfSlots 47 }
+
+     hpSwitchJ9738APowerSupply OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        HP 2920 X332 575W 100-240VAC to 54VDC Power Supply."
+        ::= { hpicfSlots 48 }
+
+    hpSwitchJ9739APowerSupply OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        HP 2920 X331 165W 100-240VAC to 12VDC Power Supply"
+        ::= { hpicfSlots 49 }
+
+    hpSwitch2920PortSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a port
+        module slot in an HP E2920-24 Switch or
+        HP E2920-48 Switch."
+        ::= { hpicfSlots 50 }
+
+    hpSwitch3800StackingSlot OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a stacking
+        module slot in an HP E3800 Switch."
+        ::= { hpicfSlots 51 }
+
+    hpSwitchJ9805APowerSupply OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        HP 640 External/Redundant Power Supply ."
+        ::= { hpicfSlots 57 }
+
+    hpSwitchJ9806APowerCable OBJECT-IDENTITY
+       STATUS      current
+       DESCRIPTION "The authoritative identifier for the
+       HP 640 EPS/RPS 1m Cable."
+       ::= { hpicfSlots 58 }
+
+    hpicfHubPorts     OBJECT IDENTIFIER ::= { chassis 8 }
+
+    hpAdvStkEnetSHExtPort OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a repeater
+                     port which has an external connector on an HP
+                    AdvanceStack 10Base-T Switching Hub."
+        ::= { hpicfHubPorts 1 }
+
+    hpAdvStkEnetSHIntPort OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a repeater
+                    port which does not have an external connector
+                    on an HP AdvanceStack 10Base-T Switching Hub.
+                    This port may be used to connect to an interface
+                    on an expansion module."
+        ::= { hpicfHubPorts 2 }
+
+    hpAdvStkEnetSHAgentPort OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an internal
+                    repeater port used to connect to an interface on
+                    a management module in an HP AdvanceStack
+                    10Base-T Switching Hub."
+        ::= { hpicfHubPorts 3 }
+
+    hp10BaseTHubPort OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a repeater
+                    port which has an external connector on an HP
+                    10Base-T Hub-12M or an HP 10Base-T Hub-24M."
+        ::= { hpicfHubPorts 4 }
+
+    hp10BaseTHubAgentPort OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an internal
+                    repeater port used to connect to an agent
+                    interface in an HP 10Base-T Hub-12M or an HP
+                    10Base-T Hub-24M."
+        ::= { hpicfHubPorts 5 }
+
+    hp10T100THubPort OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a 10/100
+                    repeater port that has an external connector
+                    on an HP 100Base-T Hub."
+        ::= { hpicfHubPorts 6 }
+
+    hp100BaseTHubAgentPort OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an internal
+                    100Mbit repeater port used to connect to an
+                    agent interface in an HP 100Base-T
+                    Hub."
+        ::= { hpicfHubPorts 7 }
+
+
+    hpicfEnetChipSets OBJECT IDENTIFIER ::= { chassis 9 }
+
+    hpicfEnetChipSetHydra OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP Hydra 4-interface Ethernet LAN controller."
+        ::= { hpicfEnetChipSets 1 }
+
+    hpicfEnetChipSetGT48001 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    GT48001 8-interface switch chip."
+        ::= { hpicfEnetChipSets 2 }
+
+    hpicfEnetChipSetPentagon OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP Pentagon ASIC."
+        ::= { hpicfEnetChipSets 3 }
+
+
+    hpicfSwitchPorts  OBJECT IDENTIFIER ::= { chassis 10 }
+
+    hpicfSwitchPort10T100TX OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10BASE-T/100BASE-TX autonegotiating port
+                    on an HP switch."
+        ::= { hpicfSwitchPorts 1 }
+
+    hpicfSwitchPort100FX  OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 100BASE-FX port on an HP switch."
+        ::= { hpicfSwitchPorts 2 }
+
+    hpicfSwitchPort10FL OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10BASE-FL port on an HP switch."
+        ::= { hpicfSwitchPorts 3 }
+
+    hpicfSwitchPort1000SX OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-SX port on an HP switch."
+        ::= { hpicfSwitchPorts 4 }
+
+    hpicfSwitchPort10T OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10BASE-T port on an HP switch."
+        ::= { hpicfSwitchPorts 5 }
+
+    hpicfSwitchPort1000LX OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-LX port on an HP switch."
+        ::= { hpicfSwitchPorts 6 }
+
+    hpicfSwitchPort1000T OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-T port on an HP switch."
+        ::= { hpicfSwitchPorts 7 }
+
+    hpicfSwitchPort1000Stk OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-Stk port on an HP switch."
+        ::= { hpicfSwitchPorts 8 }
+
+    hpicfSwitchPort1000LH OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-LH port on an HP switch."
+        ::= { hpicfSwitchPorts 9 }
+
+    hpicfSwitchPort10GigBaseCX4 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CX4 port on an HP switch."
+        ::= { hpicfSwitchPorts 10 }
+
+    hpicfSwitchPort1000ESP OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an internal
+                     ESP Blade port on an HP switch."
+        ::= { hpicfSwitchPorts 11 }
+
+    hpicfSwitchPort10GigBaseSR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-SR port on an HP switch."
+        ::= { hpicfSwitchPorts 12 }
+
+    hpicfSwitchPort10GigBaseER OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-ER port on an HP switch."
+        ::= { hpicfSwitchPorts 13 }
+
+    hpicfSwitchPort10GigBaseLR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-LR port on an HP switch."
+        ::= { hpicfSwitchPorts 14 }
+
+
+
+    hpicfSwitchPort100GEN OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                     generic 100BASE port on an HP switch."
+        ::= { hpicfSwitchPorts 15 }
+
+    hpicfSwitchPort1000GEN OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                     generic 1000BASE port on an HP switch."
+        ::= { hpicfSwitchPorts 16 }
+
+    hpicfSwitchPort10GigBaseGEN OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+                    generic 10Gig port on an HP switch."
+        ::= { hpicfSwitchPorts 17 }
+
+    hpicfSwitchPort100BXD OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                     802.3 100BASE-BX downstream port on an HP switch."
+        ::= { hpicfSwitchPorts 18 }
+
+    hpicfSwitchPort100BXU OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                     802.3 100BASE-BX upstream port on an HP switch."
+        ::= { hpicfSwitchPorts 19 }
+
+    hpicfSwitchPort1000BXD OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                     802.3 1000BASE-BX downstream port on an HP switch."
+        ::= { hpicfSwitchPorts 20 }
+
+    hpicfSwitchPort1000BXU OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                     802.3 1000BASE-BX upstream port on an HP switch."
+        ::= { hpicfSwitchPorts 21 }
+
+    hpicfSwitchPort10GigBaseLRM OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-LRM port on an HP switch."
+        ::= { hpicfSwitchPorts 22 }
+
+    hpicfSwitchPortSFPplusSR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-SR SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 23 }
+
+    hpicfSwitchPortSFPplusLR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-LR SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 24 }
+
+    hpicfSwitchPortSFPplusLRM OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-LRM SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 25 }
+
+    hpicfSwitchPortSFPplusDAC OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 26 }
+
+    hpicfSwitchPortSFPplusDA1 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            1 meter 10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 27 }
+
+    hpicfSwitchPortSFPplusDA2 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            2 meter 10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 28 }
+
+    hpicfSwitchPortSFPplusDA3 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            3 meter 10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 29 }
+
+    hpicfSwitchPortSFPplusDA5 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            5 meter 10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 30 }
+
+    hpicfSwitchPortSFPplusDA7 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            7 meter 10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 31 }
+
+    hpicfSwitchPortSFPplusDA10 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            10 meter 10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 32 }
+
+    hpicfSwitchPortSFPplusDA15 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            15 meter 10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 33 }
+
+    hpicfSwitchPortSFPplusDA20 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            20 meter 10 GIG DAC SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 34 }
+
+    hpicfSwitchPort10GigBaseT OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            10 GIG T port on an HP switch."
+        ::= { hpicfSwitchPorts 35 }
+
+    hpicfSwitchPort10GigBaseTSH OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            10 GIG TSH port on an HP switch."
+        ::= { hpicfSwitchPorts 36 }
+
+    hpicfSwitchPort10GigBaseTLH OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            10 GIG TLH port on an HP switch."
+        ::= { hpicfSwitchPorts 37 }
+
+    hpicfSwitchPort10GigBaseSTK OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for a
+	            10 GIG stacking port on an HP switch."
+        ::= { hpicfSwitchPorts 38 }
+
+    hpicfSwitchPort1000CWDM1470 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-CWDM1470 port on an HP switch."
+        ::= { hpicfSwitchPorts 39 }
+
+    hpicfSwitchPort1000CWDM1490 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-CWDM1490 port on an HP switch."
+        ::= { hpicfSwitchPorts 40 }
+
+    hpicfSwitchPort1000CWDM1510 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-CWDM1510 port on an HP switch."
+        ::= { hpicfSwitchPorts 41 }
+
+    hpicfSwitchPort1000CWDM1530 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-CWDM1530 port on an HP switch."
+        ::= { hpicfSwitchPorts 42 }
+
+    hpicfSwitchPort1000CWDM1550 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-CWDM1550 port on an HP switch."
+        ::= { hpicfSwitchPorts 43 }
+
+    hpicfSwitchPort1000CWDM1570 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-CWDM1570 port on an HP switch."
+        ::= { hpicfSwitchPorts 44 }
+
+    hpicfSwitchPort1000CWDM1590 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-CWDM1590 port on an HP switch."
+        ::= { hpicfSwitchPorts 45 }
+
+    hpicfSwitchPort1000CWDM1610 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 1000BASE-CWDM1610 port on an HP switch."
+        ::= { hpicfSwitchPorts 46 }
+
+    hpicfSwitchPort10GigCWDM1470 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CWDM1470 SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 47 }
+
+    hpicfSwitchPort10GigCWDM1490 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CWDM1490 SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 48 }
+
+    hpicfSwitchPort10GigCWDM1510 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CWDM1510 SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 49 }
+
+    hpicfSwitchPort10GigCWDM1530 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CWDM1530 SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 50 }
+
+    hpicfSwitchPort10GigCWDM1550 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CWDM1550 SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 51 }
+
+    hpicfSwitchPort10GigCWDM1570 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CWDM1570 SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 52 }
+
+    hpicfSwitchPort10GigCWDM1590 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CWDM1590 SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 53 }
+
+    hpicfSwitchPort10GigCWDM1611 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for an IEEE
+                    802.3 10GIGBASE-CWDM1611 SFP+ port on an HP switch."
+        ::= { hpicfSwitchPorts 54 }
+
+    -- Temporary assignments for IEEE 802.3 MAU types.  These are only used
+    -- for MAUs that are not yet defined in the standard MAU MIB at the
+    -- time products are released.  They are deprecated when the standard
+    -- MAU MIB is updated to include a standard identifier for the MAU.
+    -- These are also used for proprietary connectors, like stacking
+    -- connectors.
+
+    hpicfMAUTypes     OBJECT IDENTIFIER ::= { chassis 11 }
+
+    hpicfMauType1000BaseSXHD OBJECT-IDENTITY
+        STATUS      deprecated
+        DESCRIPTION "IEEE 802.3 X fiber over short-wavelength
+                    laser PMD (clause 38), half-duplex."
+        ::= { hpicfMAUTypes 1 }
+
+    hpicfMauType1000BaseSXFD OBJECT-IDENTITY
+        STATUS      deprecated
+        DESCRIPTION "IEEE 802.3 X fiber over short-wavelength
+                    laser PMD (clause 38), full-duplex."
+        ::= { hpicfMAUTypes 2 }
+
+    hpicfMauType1000BaseLXHD OBJECT-IDENTITY
+        STATUS      deprecated
+        DESCRIPTION "IEEE 802.3 X fiber over long-wavelength
+                    laser PMD (clause 38), half-duplex."
+        ::= { hpicfMAUTypes 3 }
+
+    hpicfMauType1000BaseLXFD OBJECT-IDENTITY
+        STATUS      deprecated
+        DESCRIPTION "IEEE 802.3 X fiber over long-wavelength
+                    laser PMD (clause 38), full-duplex."
+        ::= { hpicfMAUTypes 4 }
+
+    hpicfMauType1000BaseTHD OBJECT-IDENTITY
+        STATUS      deprecated
+        DESCRIPTION "IEEE 802.3 four-pair Category 5 UTP
+                    PHY (clause 40), half-duplex."
+        ::= { hpicfMAUTypes 5 }
+
+    hpicfMauType1000BaseTFD OBJECT-IDENTITY
+        STATUS      deprecated
+        DESCRIPTION "IEEE 802.3 four-pair Category 5 UTP
+                    PHY (clause 40), full-duplex."
+        ::= { hpicfMAUTypes 6 }
+
+    hpicfMauType1000BaseStkHD OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "IEEE 802.3 X copper, half-duplex."
+        ::= { hpicfMAUTypes 7 }
+
+    hpicfMauType1000BaseStkFD OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "IEEE 802.3 X copper, full-duplex."
+        ::= { hpicfMAUTypes 8 }
+
+    hpicfMauType1000BaseLHFD OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary Long Haul, Fiber full-duplex."
+        ::= { hpicfMAUTypes 9 }
+
+    hpicfMauType1000BaseEspPCS OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary internal, PCS port."
+        ::= { hpicfMAUTypes 10 }
+
+    hpicfMauType1000BaseEspG OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary internal, GMII port."
+        ::= { hpicfMAUTypes 11 }
+    
+    hpicfMauType10GigBaseCX4 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CX4, full-duplex."
+        ::= { hpicfMAUTypes 12 }
+
+    hpicfMauType10GigBaseSR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig SR, full-duplex."
+        ::= { hpicfMAUTypes 13 }
+
+    hpicfMauType10GigBaseER OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig ER, full-duplex."
+        ::= { hpicfMAUTypes 14 }
+
+    hpicfMauType10GigBaseLR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig LR, full-duplex."
+        ::= { hpicfMAUTypes 15 }
+
+    hpicfMauType100BaseGEN OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 100Base Generic, full-duplex."
+        ::= { hpicfMAUTypes 16 }
+
+    hpicfMauType1000BaseGEN OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000Base Generic, full-duplex."
+        ::= { hpicfMAUTypes 17 }
+    
+    hpicfMauType10GigBaseGEN OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig Generic, full-duplex."
+        ::= { hpicfMAUTypes 18 }
+
+    hpicfMauType100BaseBXD OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 100Base BX downstream, full-duplex."
+        ::= { hpicfMAUTypes 19 }
+
+    hpicfMauType100BaseBXU OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 100Base BX upstream, full-duplex."
+        ::= { hpicfMAUTypes 20 }
+
+    hpicfMauType1000BaseBXD OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000Base BX downstream, full-duplex."
+        ::= { hpicfMAUTypes 21 }
+
+    hpicfMauType1000BaseBXU OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000Base BX upstream, full-duplex."
+        ::= { hpicfMAUTypes 22 }
+
+    hpicfMauType10GigBaseLRM OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig LRM, full-duplex."
+        ::= { hpicfMAUTypes 23 }
+
+    hpicfMauTypeSFPplusSR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig SR SFP+, full-duplex."
+        ::= { hpicfMAUTypes 24 }
+
+    hpicfMauTypeSFPplusLR OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig LR SFP+, full-duplex."
+        ::= { hpicfMAUTypes 25 }
+
+    hpicfMauTypeSFPplusLRM OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig LRM SFP+, full-duplex."
+        ::= { hpicfMAUTypes 26 }
+
+    hpicfMauTypeSFPplusDAC OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 27 }
+
+    hpicfMauTypeSFPplusDA1 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1 meter 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 28 }
+
+    hpicfMauTypeSFPplusDA2 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 2 meter 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 29 }
+
+    hpicfMauTypeSFPplusDA3 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 3 meter 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 30 }
+
+    hpicfMauTypeSFPplusDA5 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 5 meter 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 31 }
+
+    hpicfMauTypeSFPplusDA7 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 7 meter 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 32 }
+
+    hpicfMauTypeSFPplusDA10 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10 meter 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 33 }
+
+    hpicfMauTypeSFPplusDA15 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 15 meter 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 34 }
+
+    hpicfMauTypeSFPplusDA20 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 20 meter 10Gig DAC SFP+, full-duplex."
+        ::= { hpicfMAUTypes 35 }
+
+    hpicfMauType10GigBaseT OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig T, full-duplex."
+        ::= { hpicfMAUTypes 36 }
+
+    hpicfMauType10GigBaseTSH OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig TSH, full-duplex."
+        ::= { hpicfMAUTypes 37 }
+
+    hpicfMauType10GigBaseTLH OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig TLH, full-duplex."
+        ::= { hpicfMAUTypes 38 }
+
+    hpicfMauType10GigBaseSTK OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig STK, full-duplex."
+        ::= { hpicfMAUTypes 39 }
+
+    hpicfMauType1000CWDM1470 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000CWDM1470 SFP, full-duplex."
+        ::= { hpicfMAUTypes 40 }
+
+    hpicfMauType1000CWDM1490 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000CWDM1490 SFP, full-duplex."
+        ::= { hpicfMAUTypes 41 }
+
+    hpicfMauType1000CWDM1510 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000CWDM1510 SFP, full-duplex."
+        ::= { hpicfMAUTypes 42 }
+
+    hpicfMauType1000CWDM1530 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000CWDM1530 SFP, full-duplex."
+        ::= { hpicfMAUTypes 43 }
+
+    hpicfMauType1000CWDM1550 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000CWDM1550 SFP, full-duplex."
+        ::= { hpicfMAUTypes 44 }
+
+    hpicfMauType1000CWDM1570 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000CWDM1570 SFP, full-duplex."
+        ::= { hpicfMAUTypes 45 }
+
+    hpicfMauType1000CWDM1590 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000CWDM1590 SFP, full-duplex."
+        ::= { hpicfMAUTypes 46 }
+
+    hpicfMauType1000CWDM1610 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 1000CWDM1610 SFP, full-duplex."
+        ::= { hpicfMAUTypes 47 }
+
+    hpicfMauType10GigCWDM1470 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CWDM1470 SFP+, full-duplex."
+        ::= { hpicfMAUTypes 48 }
+
+    hpicfMauType10GigCWDM1490 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CWDM1490 SFP+, full-duplex."
+        ::= { hpicfMAUTypes 49 }
+
+    hpicfMauType10GigCWDM1510 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CWDM1510 SFP+, full-duplex."
+        ::= { hpicfMAUTypes 50 }
+
+    hpicfMauType10GigCWDM1530 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CWDM1530 SFP+, full-duplex."
+        ::= { hpicfMAUTypes 51 }
+
+    hpicfMauType10GigCWDM1550 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CWDM1550 SFP+, full-duplex."
+        ::= { hpicfMAUTypes 52 }
+
+    hpicfMauType10GigCWDM1570 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CWDM1570 SFP+, full-duplex."
+        ::= { hpicfMAUTypes 53 }
+
+    hpicfMauType10GigCWDM1590 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CWDM1590 SFP+, full-duplex."
+        ::= { hpicfMAUTypes 54 }
+
+    hpicfMauType10GigCWDM1610 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary 10Gig CWDM1610 SFP+, full-duplex."
+        ::= { hpicfMAUTypes 55 }
+
+    hpicfMauType10GigBaseESP OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "Proprietary internal, 10Gig port."
+        ::= { hpicfMAUTypes 56 }
+
+
+    -- Ethernet switches
+
+    hpEtherSwitch     OBJECT IDENTIFIER ::= { netElement 11 }
+
+    -- Entity MIB support for older switches
+
+    hpEtherSwitchPortType OBJECT IDENTIFIER ::= { hpEtherSwitch 99 }
+
+    hpEtherSwitchPort10T   OBJECT IDENTIFIER ::= { hpEtherSwitchPortType 1 }
+    hpEtherSwitchPort100T  OBJECT IDENTIFIER ::= { hpEtherSwitchPortType 2 }
+    hpEtherSwitchPort100VG OBJECT IDENTIFIER ::= { hpEtherSwitchPortType 3 }
+    hpEtherSwitchPort100F  OBJECT IDENTIFIER ::= { hpEtherSwitchPortType 4 }
+
+    hpAdvSwitch2000 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3100A AdvanceStack Switch 2000."
+        ::= { hpEtherSwitch 1 }
+
+    hpAdvSwitch2000B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3100B AdvanceStack Switch 2000B."
+        ::= { hpEtherSwitch 2 }
+
+    hpAdvSwitch800T OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3245A AdvanceStack Switch 800T."
+        ::= { hpEtherSwitch 3 }
+
+    hpAdvSwitch200   OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3175A AdvanceStack Switch 208T and
+                    HP J3177A AdvanceStack Switch 224T."
+        ::= { hpEtherSwitch  4 }
+
+    -- Different types of Switch 200s (desktop switches)
+    hpAdvSwitch208T       OBJECT IDENTIFIER ::= { hpAdvSwitch200 1 }
+    hpAdvSwitch208VG      OBJECT IDENTIFIER ::= { hpAdvSwitch200 2 }
+    hpAdvSwitch224T       OBJECT IDENTIFIER ::= { hpAdvSwitch200 3 }
+    hpAdvSwitch224VG      OBJECT IDENTIFIER ::= { hpAdvSwitch200 4 }
+
+
+    hpSwitch212M OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J3298A HP 212M  Switch."
+        ::= { hpEtherSwitch 5 }
+
+    hpSwitch224M OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J3299A HP 224M Switch."
+        ::= { hpEtherSwitch 6 }
+
+    hpSwitch8000 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4110A HP 8000M Switch."
+        ::= { hpEtherSwitch 7 }
+
+    hpSwitch1600 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4120A HP 1600M Switch."
+        ::= { hpEtherSwitch 8 }
+
+    hpSwitch4000 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4121A HP 4000M Switch."
+        ::= { hpEtherSwitch 9 }
+
+    hpSwitch2400 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4122A HP 2400M Switch."
+        ::= { hpEtherSwitch 10 }
+
+    hpSwitch2424 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4122B HP 2424M Switch."
+        ::= { hpEtherSwitch 11 }
+
+    hpSwitch9308 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4138A HP 9308M Switch."
+        ::= { hpEtherSwitch 13 }
+
+    hpSwitch9304 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4139A HP 9304M Routing Switch."
+        ::= { hpEtherSwitch 14 }
+
+    hpSwitch6308 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4840A HP 6308M Switch."
+        ::= { hpEtherSwitch 15 }
+
+    hpSwitch6208 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4841A HP 6208M Switch."
+        ::= { hpEtherSwitch 16 }
+
+    hpSwitchJ4819A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4819A HP 5308XL Switch."
+        ::= { hpEtherSwitch 17 }
+
+    hpSwitchJ4812A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4812A HP 2512 Switch."
+        ::= { hpEtherSwitch 18 }
+
+    hpSwitchJ4813A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4813A HP 2524 Switch."
+        ::= { hpEtherSwitch 19 }
+
+    hpSwitchJ4850A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4850A HP 5304XL Switch."
+        ::= { hpEtherSwitch 20 }
+
+    hpSwitchJ4815A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4815A HP 3324XL Switch."        
+        ::= { hpEtherSwitch 21 }
+
+    hpSwitchJ4851A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4851A HP 3124 Switch."
+        ::= { hpEtherSwitch 22 }
+
+    hpSwitchJ4865A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4865A HP 4108GL Switch."
+        ::= { hpEtherSwitch 23 }
+
+    hpSwitchA6713A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP A6713A Network Blade."
+        ::= { hpEtherSwitch 24 }
+
+    hpSwitchA6716A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP A6716A Network Blade."
+        ::= { hpEtherSwitch 25 }
+
+    hpSwitchA6717A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP A6717A Network Blade."
+        ::= { hpEtherSwitch 26 }
+
+    hpSwitchJ4887A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4887A HP 4104GL Switch."
+        ::= { hpEtherSwitch 27 }
+
+    hpSwitchJ4874A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4874A HP 9315 Switch."
+        ::= { hpEtherSwitch 28 }
+
+    hpSwitchJ4899A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4899A HP 2650 Switch."
+        ::= { hpEtherSwitch 29 }
+
+    hpSwitchJ4902A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4902A HP 6108 Switch."
+        ::= { hpEtherSwitch 30 }
+
+    hpSwitchJ4903A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J4903A HP 2824 Switch."
+        ::= { hpEtherSwitch 31 }
+    
+    hpSwitchJ4904A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J4904A HP 2848 Switch."
+        ::= { hpEtherSwitch 32 }
+
+    hpSwitchProliant OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP Proliant Series Switches."
+        ::= { hpEtherSwitch 33 }
+
+    hpSwitchJ4900A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4900A HP 2626 Switch."
+        ::= { hpEtherSwitch 34 }
+
+    hpSwitchJ8165A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J8165A HP 2650-PWR Switch."
+        ::= { hpEtherSwitch 35 }
+
+    hpSwitchJ8164A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8164A HP 2626-PWR Switch."
+        ::= { hpEtherSwitch 36 }
+
+    hpSwitchJ8130A OBJECT-IDENTITY
+        STATUS      obsolete
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8130A Wireless Access Point AP420WL."
+        ::= { hpEtherSwitch 37 }
+
+    hpSwitchJ8133A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8133A Wireless Access Point AP520WL."
+        ::= { hpEtherSwitch 38 }
+
+    hpSwitchJ8153A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8153A Access Controller 720WL."
+        ::= { hpEtherSwitch 39 }
+
+    hpSwitchJ8154A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8154A Access Controller Server 740WL."
+        ::= { hpEtherSwitch 40 }
+
+    hpSwitchJ8155A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8155A Integrated Access Manager 760WL."
+        ::= { hpEtherSwitch 41 }
+
+    hpSwitchJ4905A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J4905A HP 3400cl-24G Switch."
+        ::= { hpEtherSwitch 42 }
+
+    hpSwitchJ4906A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J4906A HP 3400cl-48G  Switch."
+        ::= { hpEtherSwitch 43 }
+
+    hpSwitchJ4899B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4899B HP 2650B Switch."
+        ::= { hpEtherSwitch 44 }
+
+    hpSwitchJ4900B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J4900B HP 2626B Switch."
+        ::= { hpEtherSwitch 45 }
+
+    hpSwitchJ8718A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J8718A HP 5404yl Switch."
+        ::= { hpEtherSwitch 46 }
+
+    hpSwitchJ8719A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J8719A HP 5408yl Switch."
+        ::= { hpEtherSwitch 47 }
+
+    hpSwitchJ8433A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J8433A HP 6400cl-6XG Switch."
+        ::= { hpEtherSwitch 48 }
+
+    hpSwitchJ8474A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J8474A HP 6410cl-6XG Switch."
+        ::= { hpEtherSwitch 49 }
+
+    hpSwitchJ8697A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J8697A HP 5406zl Switch."
+        ::= { hpEtherSwitch 50 }
+
+    hpSwitchJ8698A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J8698A HP 5412zl Switch. "
+        ::= { hpEtherSwitch 51 }
+
+    hpSwitchJ8770A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J8770A HP 4204vl Switch."
+        ::= { hpEtherSwitch 52 }
+
+    hpSwitchJ8773A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J8773A HP 4208vl Switch."
+        ::= { hpEtherSwitch 53 }
+
+    hpSwitchJ8680A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8680A HP E9408sl Router."
+        ::= { hpEtherSwitch 54 }
+
+    hpSwitchJ8762A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8762A HP 2600-8-PWR Switch."
+        ::= { hpEtherSwitch 55 }
+
+    hpSwitchJ8771A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8771A HP 4202vl-48G Switch."
+        ::= { hpEtherSwitch 56 }
+
+    hpSwitchJ8772A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8772A HP 4202vl-72 Switch."
+        ::= { hpEtherSwitch 57 }
+
+    hpSwitchJ8692A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8692A HP 3500yl-24G-PWR Switch."
+        ::= { hpEtherSwitch 58 }
+
+    hpSwitchJ8693A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8693A HP 3500yl-48G-PWR Switch."
+        ::= { hpEtherSwitch 59 }
+
+    
+    hpSwitchJ8992A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8992A HP 6200yl-24G Switch."
+        ::= { hpEtherSwitch 60 }
+
+    hpSwitchJ9019A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9019A HP E2510A-24 Switch."
+        ::= { hpEtherSwitch 61 }
+
+    hpSwitchJ9020A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9020A HP E2510A-48 Switch."
+        ::= { hpEtherSwitch 62 }
+
+    hpSwitchJ9021A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9021A HP 2810-24G Switch."
+        ::= { hpEtherSwitch 63 }
+
+    hpSwitchJ9022A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9022A HP 2810-48G Switch."
+        ::= { hpEtherSwitch 64 }
+
+    hpSwitchJ9028A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9028A HP 1800-24G Switch."
+        ::= { hpEtherSwitch 65 }
+
+    hpSwitchJ9029A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9029A HP 1800-8G Switch."
+        ::= { hpEtherSwitch 66 }
+
+    hpSwitchJ9038A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9038A Access Control Server 745wl."
+        ::= { hpEtherSwitch 67 }
+
+    hpSwitchJ9050A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9050A HP 2900-48G Switch."
+        ::= { hpEtherSwitch 68 }
+
+    hpSwitchJ9049A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9049A HP 2900-24G Switch."
+        ::= { hpEtherSwitch 69 }
+
+    hpSwitchJ9032A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9032A HP 4202vl-68G Switch."
+        ::= { hpEtherSwitch 70 }
+
+    hpSwitchJ9091A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9091A HP 8212zl Switch. "
+        ::= { hpEtherSwitch 72 }
+
+    hpSwitchJ9065A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J9065A Network Access Controller 800. "
+        ::= { hpEtherSwitch 73 }
+
+    hpSwitchJ9079A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9079A HP 1700-8 Switch. "
+        ::= { hpEtherSwitch 74 }
+
+    hpSwitchJ9080A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9080A HP E1700-24 Switch. " 
+        ::= { hpEtherSwitch 75 }
+
+    hpSwitchJ9085A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9085A HP E2610-24 Switch."
+        ::= { hpEtherSwitch 76 }
+
+    hpSwitchJ9088A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9088A HP 2610-48 Switch. "
+        ::= { hpEtherSwitch 77 }
+
+    hpSwitchJ9087A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9087A HP 2610-24-PWR Switch. "
+        ::= { hpEtherSwitch 78 }
+
+    hpSwitchJ9089A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9089A HP 2610-48-PWR Switch. "
+        ::= { hpEtherSwitch 79 }
+
+    hpSwitchJ9086A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9086A HP E2610-24-PPoE Switch ."
+        ::= { hpEtherSwitch 80 }
+
+    hpSwitchJ9028B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9028B HP 1800-24G-B Switch ."
+        ::= { hpEtherSwitch 81 }
+
+    hpSwitchJ4900C OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J4900C HP 2626C Switch ."
+        ::= { hpEtherSwitch 82 }
+
+    hpSwitchJ4899C OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J4899C HP 2650C Switch ."
+        ::= { hpEtherSwitch 83 }
+
+    hpSwitchJ9146A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9146A HP 2910al-24G-PoE+ Switch."
+        ::= { hpEtherSwitch 84 }
+
+    hpSwitchJ9148A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9148A HP 2910al-48G-PoE+ Switch."
+        ::= { hpEtherSwitch 85 }
+
+    hpSwitchJ9145A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9145A HP 2910al-24G Switch."
+        ::= { hpEtherSwitch 86 }
+
+    hpSwitchJ9147A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9147A HP 2910al-48G Switch."
+        ::= { hpEtherSwitch 87 }
+
+    hpSwitchJ9279A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		   J9279A HP 2510G-24 Switch. "
+        ::= { hpEtherSwitch 88 }
+
+    hpSwitchJ9280A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9280A HP 2510G-48 Switch. "
+        ::= { hpEtherSwitch 89 }
+
+    hpSwitchJ9019B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9019B HP 2510B-24 Switch ."
+        ::= { hpEtherSwitch 90 }
+
+    hpSwitchJ9137A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9137A HP 2520-8 Switch. "
+        ::= { hpEtherSwitch 94 }
+
+    hpSwitchJ9138A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9138A HP 2520-24 Switch. "
+        ::= { hpEtherSwitch 95 }
+
+    hpSwitchJ9298A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9298A HP 2520G-8 Switch. "
+        ::= { hpEtherSwitch 96 }
+
+    hpSwitchJ9299A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9299A HP 2520G-24 Switch. "
+        ::= { hpEtherSwitch 97 }
+
+    hpSwitchJ9265A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9265A HP E6600-24XG Switch. "
+        ::= { hpEtherSwitch 98 }
+
+    hpSwitchJ9263A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9263A HP E6600-24G Switch. "
+        ::= { hpEtherSwitch 100 }
+
+    hpSwitchJ9264A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9264A HP E6600-24G-4XG Switch. "
+        ::= { hpEtherSwitch 101 }
+
+    hpSwitchJ9445A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J9445A DCM Controller. "
+        ::= { hpEtherSwitch 102 }
+
+    hpSwitchJ9449A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9449A HP 1810-8G Switch."
+        ::= { hpEtherSwitch 103 }
+
+    hpSwitchJ9450A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9450A HP 1810-24G Switch."
+        ::= { hpEtherSwitch 104 }
+
+    hpSwitchJ9452A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9452A HP 6600-48G-4XG Switch."
+        ::= { hpEtherSwitch 105 }
+
+    hpSwitchJ9451A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                   J9451A HP 6600-48G Switch ."
+        ::= { hpEtherSwitch 106 }
+
+    hpSwitch516733-B21 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    516733-B21 HP 6120-XG Switch."
+        ::= { hpEtherSwitch 107 }
+
+    hpSwitch498358-B21 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    498358-B21 HP 6120-GXG Switch."
+        ::= { hpEtherSwitch 108 }
+
+    hpSwitchJ9471A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9471A HP 3500-24-PoE Switch."
+        ::= { hpEtherSwitch 109 }
+
+    hpSwitchJ9473A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9473A HP 3500-48-PoE Switch."
+        ::= { hpEtherSwitch 110 }
+
+    hpSwitchJ9470A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9470A HP 3500-24 Switch."
+        ::= { hpEtherSwitch 111 }
+
+    hpSwitchJ9472A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9472A HP 3500-48 Switch."
+        ::= { hpEtherSwitch 112 }
+
+    hpSwitchJ9477A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9477A HP 8206zl Switch."
+        ::= { hpEtherSwitch 113 }
+
+    hpSwitchJ9310A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9310A HP 3500yl-24G-PoE+ Switch."
+        ::= { hpEtherSwitch 114 }
+
+    hpSwitchJ9311A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9311A HP 3500yl-48G-PoE+ Switch."
+        ::= { hpEtherSwitch 115 }
+
+    hpSwitchJ9565A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9565A HP 2615-8-PoE Switch."
+        ::= { hpEtherSwitch 117 }
+
+    hpSwitchJ9562A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9562A HP 2915-8G-PoE Switch."
+        ::= { hpEtherSwitch 118 }
+
+    hpSwitchJ9573 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-24G-PoE+-2SFP+ Switch."
+        ::= { hpEtherSwitch 119 }
+
+    hpSwitchJ9574 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-48G-PoE+-4SFP+ Switch."
+        ::= { hpEtherSwitch 120 }
+
+    hpSwitchJ9575 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-24G-2SFP+ Switch."
+        ::= { hpEtherSwitch 121 }
+
+    hpSwitchJ9576 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-48G-4SFP+ Switch."
+        ::= { hpEtherSwitch 122 }
+
+    hpSwitchJ9584 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-24SFP-2SFP+ Switch."
+        ::= { hpEtherSwitch 123 }
+
+    hpSwitchJ9585 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-24G-2XG Switch."
+        ::= { hpEtherSwitch 124 }
+
+    hpSwitchJ9586 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-48G-4XG Switch."
+        ::= { hpEtherSwitch 125 }
+
+    hpSwitchJ9587 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-24G-PoE+-2XG Switch."
+        ::= { hpEtherSwitch 126 }
+
+    hpSwitchJ9588 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-48G-PoE+-4XG Switch."
+        ::= { hpEtherSwitch 127 }
+
+    hpSwitchJ9577 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800 4-port Stacking Module."
+        ::= { hpEtherSwitch 128 }
+
+    hpSwitchJ9623A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9623A HP 2620-24 Switch."
+        ::= { hpEtherSwitch 129 }
+
+    hpSwitchJ9624A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9624A HP 2620-24-PPoE+ Switch."
+        ::= { hpEtherSwitch 130 }
+
+    hpSwitchJ9625A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9625A HP 2620-24-PoE+ Switch."
+        ::= { hpEtherSwitch 131 }
+
+    hpSwitchJ9626A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9626A HP 2620-48 Switch."
+        ::= { hpEtherSwitch 132 }
+
+    hpSwitchJ9627A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9627A HP 2620-48-PoE+ Switch."
+        ::= { hpEtherSwitch 133 }
+
+    -- different cards for Switch 2000
+
+    hpSwitchJ9772A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9772A HP 2530-48G-PoE+ Switch."
+        ::= { hpEtherSwitch 136 }
+
+    hpSwitchJ9773A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9773A HP 2530-24G-PoE+ Switch."
+        ::= { hpEtherSwitch 137 }
+
+    hpSwitchJ9774A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9774A HP 2530-8G-PoE+ Switch."
+        ::= { hpEtherSwitch 138 }
+
+    hpSwitchJ9775A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9775A HP 2530-48G Switch."
+        ::= { hpEtherSwitch 139 }
+
+    hpSwitchJ9776A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9776A HP 2530-24G Switch."
+        ::= { hpEtherSwitch 140 }
+
+    hpSwitchJ9777A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9777A HP 2530-8G Switch."
+        ::= { hpEtherSwitch 141 }
+
+    hpSwitchJ9778A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9778A HP 2530-48-PoE+ Switch."
+        ::= { hpEtherSwitch 142 }
+
+    hpSwitchJ9779A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9779A HP 2530-24-PoE+ Switch."
+        ::= { hpEtherSwitch 143 }
+
+    hpSwitchJ9780A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9780A HP 2530-8-PoE+ Switch."
+        ::= { hpEtherSwitch 144 }
+
+    hpSwitchJ9781A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9781A HP 2530-48 Switch."
+        ::= { hpEtherSwitch 145 }
+
+    hpSwitchJ9782A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9782A HP 2530-24 Switch."
+        ::= { hpEtherSwitch 146 }
+
+    hpSwitchJ9783A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     J9783A HP 2530-8 Switch."
+        ::= { hpEtherSwitch 147 }
+
+    hpSwitchJ9728A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9728A HP 2920-48G Switch."
+        ::= { hpEtherSwitch 154 }
+ 
+    hpSwitchJ9729A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9729A HP 2920-48G-PoE+ Switch."
+        ::= { hpEtherSwitch 155 }
+
+    hpSwitchJ9726A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9726A HP 2920-24G Switch."
+        ::= { hpEtherSwitch 152 }
+
+    hpSwitchJ9727A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9727A HP 2920-24G-PoE+ Switch."
+        ::= { hpEtherSwitch 153 }
+
+    hpSwitchPortModuleET4 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3102A AdvanceStack Switch Ethernet Port
+                    Module."
+        ::= { hpAdvSwitch2000 1 }
+
+    hpSwitchPortModuleVG2 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J3103A AdvanceStack Switch 100VG Port
+                    Module."
+        ::= { hpAdvSwitch2000 2 }
+
+    hpSwitchPortModule10FL OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP AdvanceStack Switch 10BaseFL Port Module."
+        ::= { hpAdvSwitch2000 3 }
+
+    hpSwitchPortModuleFDDI OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP AdvanceStack Switch FDDI Port Module."
+        ::= { hpAdvSwitch2000 4 }
+
+    hpSwitchPortModuleTX2 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP AdvanceStack Switch 100BaseT Port Module."
+        ::= { hpAdvSwitch2000 5 }
+
+    hpSwitchPortModuleATM OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP AdvanceStack Switch ATM Port Module."
+        ::= { hpAdvSwitch2000 6 }
+
+    -- different cards for Switch 8000/4000/1600/2400/2424 family
+
+    hpSwitchPortModule100TX8 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4111A 8-port 10/100Base-TX module."
+        ::= { hpSwitch8000 1 }
+
+    hpSwitchPortModule100FX4 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4112A 4-port 100Base-FX module."
+        ::= { hpSwitch8000 2 }
+
+    hpSwitchPortModule10FL4 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4118A 4-port 10Base-FL module."
+        ::= { hpSwitch8000 3 }
+
+    hpSwitchPortModuleGigSX OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4113A 1-port Gigabit SX module."
+        ::= { hpSwitch8000 4 }
+
+    hpSwitchPortModuleGigLX OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4114A 1-port Gigabit LX module."
+        ::= { hpSwitch8000 5 }
+
+    hpSwitchPortModuleTwoGig OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4130A 2-port Gigabit module."
+        ::= { hpSwitch8000 6 }
+
+    hpSwitchPortModuleGigStk OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4130A 1-port Gigabit Stacking module."
+        ::= { hpSwitch8000 7 }
+
+    hpSwitchPortModuleGigT OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4115A 1-port Gigabit T module."
+        ::= { hpSwitch8000 8 }
+
+
+    -- different cards for Switch 5308 family
+
+    hpSwitchPortModuleJ4820A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4820A 24 Port 10/100Base-TX Module."
+        ::= { hpSwitchJ4819A 1 }
+
+    hpSwitchPortModuleJ4821A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4821A 4 Port 100/1000Base-TX Module."
+        ::= { hpSwitchJ4819A 2 }
+
+    hpSwitchPortModuleJ4878A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4878A 4x MiniGBIC Module."
+        ::= { hpSwitchJ4819A 3 }
+    
+    hpSwitchModuleJ4852A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4852A 12-port 100-FX MTRJ" 
+        ::= { hpSwitchJ4819A 4 }
+
+    hpSwitchModuleJ8161A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8161A 24-port 10/100Base-TX PoE Module." 
+        ::= { hpSwitchJ4819A 5 }
+
+    hpSwitchModuleJ4907A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4907A Gig-T/GBIC xl Module." 
+        ::= { hpSwitchJ4819A 6 }
+
+    hpSwitchModuleJ8162A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8162A XL Access Controller Module." 
+        ::= { hpSwitchJ4819A 7 }
+
+    hpSwitchPortModuleJ4820B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4820B 24 Port 10/100Base-TX Module."
+        ::= { hpSwitchJ4819A 8 }
+
+    hpSwitchPortModuleJ4821B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4821B 4 Port 100/1000Base-TX Module."
+        ::= { hpSwitchJ4819A 9 }
+
+    hpSwitchPortModuleJ4878B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4878B 4x MiniGBIC Module."
+        ::= { hpSwitchJ4819A 10 }
+
+    hpSwitchModuleJ9001A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9001A Wireless Services xl Module." 
+        ::= { hpSwitchJ4819A 11 }
+
+    hpSwitchModuleJ9003A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9003A Redundant Wireless Services xl Module." 
+        ::= { hpSwitchJ4819A 12 }
+
+    hpSwitchModuleJ8988A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8988A 10-GbE X2 xl module."
+        ::= { hpSwitchJ4819A 13 }  
+
+    -- different pseudo cards for Switch 2524/2512 family
+
+    hpSwitchModuleJ4812A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4812A 12-port 10/100Base-TX + 2 Gig
+                    module"
+        ::= { hpSwitchJ4812A 1 }
+
+    hpSwitchModuleJ4813A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4813A 24-port 10/100Base-TX + 2 Gig 
+                    module"
+        ::= { hpSwitchJ4813A 1 }
+
+    -- different pseudo cards for Switch 4865 family
+
+    hpSwitchModuleJ4862A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4862A 24-port 10/100Base-TX" 
+        ::= { hpSwitchJ4865A 1 }
+
+    hpSwitchModuleJ4863A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4863A 6-port 100/1000Base-TX" 
+        ::= { hpSwitchJ4865A 2 }
+
+    hpSwitchModuleJ4864A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4864A 3-port tranceiver module"
+        ::= { hpSwitchJ4865A 3 }
+
+    hpSwitchModuleJ4862B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4862B 24-port 10/100Base-TX" 
+        ::= { hpSwitchJ4865A 4 }
+
+    hpSwitchModuleJ4893A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4893A 6-port Mini-GBIC module" 
+        ::= { hpSwitchJ4865A 5 }
+
+    hpSwitchModuleJ4892A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4892A 12-port 100-FX MTRJ" 
+        ::= { hpSwitchJ4865A 6 }
+    
+    hpSwitchModuleJ4908A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J489XA 20-port 10/100/1000Base-TX + 2 Mini-GBIC" 
+        ::= { hpSwitchJ4865A 7 }
+    
+    hpSwitchModuleJ4903A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4903A 24-port 10/100/1000Base-TX" 
+        ::= { hpSwitchJ4903A 1 }
+
+    hpSwitchModuleJ8434A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8434A 2-port 10G CX4"
+        ::= { hpSwitchJ4903A 2}
+
+    hpSwitchModuleJ8435A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8435A 2-port 10G MF"
+        ::= { hpSwitchJ4903A 3}
+
+    hpSwitchModuleJ4904A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J4904A 48-port 10/100/1000Base-TX" 
+        ::= { hpSwitchJ4904A 1 }
+    
+    -- psuedo cards for the 3400/6400 family        
+    
+    hpSwitchModuleJ4905A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J4905A HP 3400cl-24G Switch."
+        ::= { hpSwitchJ4905A 1 }
+    
+    hpSwitchModuleJ4906A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J4906A HP 3400cl-48G Switch."
+        ::= { hpSwitchJ4906A 1 }
+
+    hpSwitchModuleJ8433A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J8433A HP 6400cl-6XG Switch."
+        ::= { hpSwitchJ8433A 1 }
+
+    hpSwitchModuleJ8474A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J8474A HP 6410cl-6XG Switch."
+        ::= { hpSwitchJ8474A 1 }
+
+    -- 5400/8200 blade family
+
+    hpSwitchModuleJ8701A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8701A 24 port Gig-T."
+        ::= { hpSwitchJ8697A 1 }
+    
+    hpSwitchModuleJ8702A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8702A 24 port Gig-T zl Module."
+        ::= { hpSwitchJ8697A 2 }
+
+    hpSwitchModuleJ8705A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8705A Gig-T/SFP zl Module."
+        ::= { hpSwitchJ8697A 3 }
+
+    hpSwitchModuleJ8706A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8706A 24 port SFP zl Module. "
+        ::= { hpSwitchJ8697A 4 }
+
+   hpSwitchModuleJ8707A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8707A 4 port 10-GbE zl Module."
+        ::= { hpSwitchJ8697A 5 }
+
+   hpSwitchModuleJ8708A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8708A 4 port 10G CX4 zl Module. "
+        ::= { hpSwitchJ8697A 6 }
+
+   hpSwitchModuleJ87xxA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J87xxA yl Fixed Gig-T/SFP."
+        ::= { hpSwitchJ8697A 7 }
+
+   hpSwitchModuleJ87yyA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J87yyA yl Fixed 24p Gig-T."
+        ::= { hpSwitchJ8697A 8 }
+
+   hpSwitchModuleJ8694A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8694A yl X2/CX4 10-GbE Module."
+        ::= { hpSwitchJ8697A 9 }
+
+   hpSwitchModuleJ8726A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J8726A HP 5400 zl Switch Management Module."
+        ::= { hpSwitchJ8697A 10 }
+ hpSwitchModuleJ90xxA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9050A yl Fixed Gig-T/SFP."
+        ::= { hpSwitchJ9050A 11 }
+
+   hpSwitchModuleJ90yyA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9050A yl Fixed 24p Gig-T."
+        ::= { hpSwitchJ9050A 12 }
+
+   hpSwitchModuleJ90zzA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9050A yl X2/CX4 10-GbE Module."
+        ::= { hpSwitchJ9050A 13 }
+
+   hpSwitchModuleJ9051A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9051A Wireless Services zl Module."
+        ::= { hpSwitchJ8697A 14 }
+
+   hpSwitchModuleJ9052A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9052A Redundant Wireless Services zl Module."
+        ::= { hpSwitchJ8697A 15 }
+
+   hpSwitchModuleJ9154A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9154A Services zl Module."
+        ::= { hpSwitchJ8697A 16 }
+
+   hpSwitchModuleJ9155A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9155A zl Threat Management Services Module."
+        ::= { hpSwitchJ8697A 17 }
+
+   hpSwitchModuleJ9446A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9446A zl Data Center Connection Manager ONE Module."
+        ::= { hpSwitchJ8697A 18 }
+
+   hpSwitchModuleJ9307A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9307A 24-Port 10/100/1000 PoE+ zl Module."                    
+        ::= { hpSwitchJ8697A 19 }
+
+   hpSwitchModuleJ9308A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9308A 20-Port 10/100/1000 PoE+ with
+                    4-Port SFP zl Module."
+        ::= { hpSwitchJ8697A 20 }
+ 
+   hpSwitchModuleJ9478A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9478A 24-Port 10/100 PoE+ zl Module."                    
+        ::= { hpSwitchJ8697A 21 }
+
+   hpSwitchModuleJ9309A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9309A 4-Port 10-GbE SFP+ zl Module."
+        ::= { hpSwitchJ8697A 22 }
+
+   hpSwitchModuleJ9312A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9312A yl SFP+/CX4 10G Module."
+        ::= { hpSwitchJ8697A 23 }
+
+         -- 5400/8200 blade family
+
+   hpSwitchModuleJ9534A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9534A 24 port Gig-T PoE+ v2 zl Module."
+        ::= { hpSwitchJ8697A 24 }
+
+   hpSwitchModuleJ9535A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9535A 20-Port Gig-T PoE+ / 4-Port SFP v2 zl 
+                    Module."
+        ::= { hpSwitchJ8697A 25 }
+
+   hpSwitchModuleJ9536A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J9536A 20-Port Gig-T PoE+ / 2-Port SFP+ zl Module."
+        ::= { hpSwitchJ8697A 26 }
+
+   hpSwitchModuleJ9537A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9537A 24-Port SFP v2 zl Module."
+        ::= { hpSwitchJ8697A 27 }
+
+   hpSwitchModuleJ9538A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9538A 8-Port 10GbE SFP+ v2 zl Module."
+        ::= { hpSwitchJ8697A 28 }
+
+   hpSwitchModuleJ9546A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J9546A 8-Port 10Gig-T LH zl Module."
+        ::= { hpSwitchJ8697A 29 }
+
+   hpSwitchModuleJ9547A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J9547A 24-Port 10/100 PoE+ zl Module."
+        ::= { hpSwitchJ8697A 30 }
+
+   hpSwitchModuleJ9548A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9548A 20-Port Gig-T / 2-Port 10GbE SFP+ v2 zl
+                    Module."
+        ::= { hpSwitchJ8697A 31 }
+
+   hpSwitchModuleJ9549A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9549A 20-Port Gig-T / 4-Port SFP v2 zl Module."       
+        ::= { hpSwitchJ8697A 32 }
+
+   hpSwitchModuleJ9550A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9550A 24-Port Gig-T v2 zl Module." 
+        ::= { hpSwitchJ8697A 33 }
+
+   hpSwitchAdvServicesModule OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP Advanced Services zl Module.
+                    The actual JwxyzA product number varies by SKU."
+        ::= { hpSwitchJ8697A 34 }
+        
+   hpSwitchExtServicesModule OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP Extended Services zl Module.
+                    The actual JwxyzA product number varies by SKU."
+        ::= { hpSwitchJ8697A 35 }
+
+   hpSwitchModuleJ9485A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP AllianceONE zl module (J9485A) with PCIe telephony
+                    interfaces, Microsoft Windows Server 2008 and
+                    Communications Server software installed."
+        ::= { hpSwitchJ8697A 36 }
+
+   hpSwitchModuleJ9637A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9637A 12-Port Gig-T PoE+ / 12-Port SFP v2 zl 
+                    Module." 
+        ::= { hpSwitchJ8697A 37 }
+
+   hpSwitchV2ServicesModule OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP Advanced Services v2 zl Module.
+                    The actual JwxyzA product number varies by SKU."
+        ::= { hpSwitchJ8697A 41 }
+
+    -- different cards for the 4200 family
+
+
+    hpSwitchModuleJ8765A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8765A 10/100 module."
+        ::= { hpSwitchJ8770A 1 }  
+
+    hpSwitchModuleJ8764A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8764A 10/100/1000 module."
+        ::= { hpSwitchJ8770A 2 }        
+
+    hpSwitchModuleJ8776A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8776A miniGBIC module."
+        ::= { hpSwitchJ8770A 3 }  
+
+    hpSwitchModuleJ8763A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8763A 100FX module."
+        ::= { hpSwitchJ8770A 4 } 
+	 
+    hpSwitchModuleJ8768A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8768A Gig-T vl module."
+        ::= { hpSwitchJ8770A 5 }  
+
+    hpSwitchModuleJ9033A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J9033A Gig-T/SFP vl module."
+        ::= { hpSwitchJ8770A 6 }  
+hpSwitchModuleJ8765B OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8765B 10/100-TX vl module."
+        ::= { hpSwitchJ8770A 8 }
+
+    hpSwitchModuleJ8766A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    HP J8766A 10-GbE X2 vl module."
+        ::= { hpSwitchJ8770A 10 }  
+
+    hpSwitchModuleJ9021A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9021A HP 2810-24G Switch."
+        ::= { hpSwitchJ9021A 1 }  
+
+    hpSwitchModuleJ9022A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9022A HP 2810-48G Switch."
+        ::= { hpSwitchJ9022A 1 }  
+
+    hpSwitchModuleJ9019A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9019A HP 2510-24A Switch."
+        ::= { hpSwitchJ9019A 1 }  
+
+    hpSwitchModuleJ9020A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9020A HP 2510-48A Switch."
+        ::= { hpSwitchJ9020A 1 }  
+
+    hpSwitchModuleJ9085A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9085A HP 2610-24 Switch."
+        ::= { hpSwitchJ9085A 1 }
+
+    hpSwitchModuleJ9088A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9088A HP 2610-48 Switch."
+        ::= { hpSwitchJ9088A 1 }
+
+    hpSwitchModuleJ9087A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9087A HP 2610-24-PWR Switch."
+        ::= { hpSwitchJ9087A 1 }
+
+    hpSwitchModuleJ9089A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9089A HP 2610-48-PWR Switch."
+        ::= { hpSwitchJ9089A 1 }
+
+    hpSwitchModuleJ9086A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9086A HP 2610-24-PWR Switch on which 
+                    POE is supported on 12 ports."
+        ::= { hpSwitchJ9086A 1 }
+
+    hpSwitchModuleJ9279A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9279A HP 2510G-24 Switch."
+        ::= { hpSwitchJ9279A 1 }
+
+    hpSwitchModuleJ9280A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9280A HP 2510G-48 Switch."
+        ::= { hpSwitchJ9280A 1 }
+
+    -- psuedo cards for the 2910 family
+
+    hpSwitchModuleJ9726A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9726A HP 2920-24G Switch" 
+        ::= { hpSwitchJ9726A 1 }
+ 
+    hpSwitchModuleJ9727A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9727A HP 2920-24G-PoE+ Switch" 
+        ::= { hpSwitchJ9727A 1 }
+
+    hpSwitchModuleJ9728A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9728A HP 2920-48G Switch"
+        ::= { hpSwitchJ9728A 1 }
+
+    hpSwitchModuleJ9729A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        J9729A HP 2920-48G-PoE+ Switch"
+        ::= { hpSwitchJ9729A 1 }
+
+    hpSwitchModuleJ9147A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9147A HP 2910al-48G Switch" 
+        ::= { hpSwitchJ9147A 1 }
+
+    hpSwitchModuleJ9145A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9145A HP 2910al-24G Switch" 
+        ::= { hpSwitchJ9145A 1 }
+
+    hpSwitchModuleJ9148A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9148A HP 2910al-48G-PoE+ Switch" 
+        ::= { hpSwitchJ9148A 1 }
+
+    hpSwitchModuleJ9146A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9146A HP 2910al-24G-PoE+ Switch" 
+        ::= { hpSwitchJ9146A 1 }
+
+    hpSwitchModuleJ9149A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9149A 10-GbE 2-port CX4" 
+        ::= { hpSwitchJ9146A 2 }
+
+    hpSwitchModuleJ9008A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9008A 10-GbE 2-port SFP+"
+        ::= { hpSwitchJ9146A 3 }
+
+    hpSwitchModuleJ9165A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J9165A 10-GbE 1-port passive CX4" 
+        ::= { hpSwitchJ9146A 4 }
+    
+    hpSwitchModuleJ9137A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9137A HP 2520-8 Switch."
+        ::= { hpSwitchJ9137A 1 }
+
+    hpSwitchModuleJ9138A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9138A HP 2520-24 Switch."
+        ::= { hpSwitchJ9138A 1 }
+
+    hpSwitchModuleJ9298A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9298A HP 2520G-8 Switch."
+        ::= { hpSwitchJ9298A 1 }
+
+    hpSwitchModuleJ9299A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+		    J9299A HP 2520G-24 Switch."
+        ::= { hpSwitchJ9299A 1 }
+
+   -- pseudo cards for the E3800 family
+    hpSwitchModuleJ9577A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800 4-port Stacking Module."
+        ::= { hpSwitchJ9577 1 }
+
+    hpSwitchModuleJ9573 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-24G-PoE+-2SFP+ Switch."
+        ::= { hpSwitchJ9573 1 }
+
+    hpSwitchModuleJ9574x OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-48G-PoE+-4SFP+ Switch."
+        ::= { hpSwitchJ9574 1 }
+
+    hpSwitchModuleJ9574y OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                     HP E3800-48G-PoE+-4SFP+ Switch."
+        ::= { hpSwitchJ9574 2 }
+
+    hpSwitchModuleJ9575 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-24G-2SFP+ Switch."
+        ::= { hpSwitchJ9575 1 }
+
+    hpSwitchModuleJ9576x OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-48G-4SFP+ Switch."
+        ::= { hpSwitchJ9576 1 }
+
+    hpSwitchModuleJ9576y OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-48G-4SFP+ Switch."
+        ::= { hpSwitchJ9576 2 }
+
+    hpSwitchModuleJ9584 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-24SFP-2SFP+ Switch."
+        ::= { hpSwitchJ9584 1 }
+
+    hpSwitchModuleJ9585 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-24G-2XG Switch."
+        ::= { hpSwitchJ9585 1 }
+
+    hpSwitchModuleJ9586x OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-48G-4XG Switch."
+        ::= { hpSwitchJ9586 1 }
+
+    hpSwitchModuleJ9586y OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-48G-4XG Switch."
+        ::= { hpSwitchJ9586 2 }
+
+   hpSwitchModuleJ9587 OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-24G-PoE+-2XG Switch."
+        ::= { hpSwitchJ9587 1 }
+
+   hpSwitchModuleJ9588x OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-48G-PoE+-4XG Switch."
+        ::= { hpSwitchJ9588 1 }
+
+   hpSwitchModuleJ9588y OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+	             HP E3800-48G-PoE+-4XG Switch."
+        ::= { hpSwitchJ9588 2 }
+
+   -- psuedo cards for the 3500 10/100 products
+
+   hpSwitchModuleJ94xxA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J94xxA Fixed 10/100Base-TX/SFP."
+        ::= { hpSwitchJ9472A 1 }
+
+   hpSwitchModuleJ94xyA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J94xyA Fixed 24p 10/100Base-TX."
+        ::= { hpSwitchJ9472A 2 }
+
+   hpSwitchModuleJ94yxA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J94yxA Fixed 10/100Base-TX/SFP PoE."
+        ::= { hpSwitchJ9473A 1 }
+
+   hpSwitchModuleJ94yyA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J94yyA Fixed 24p 10/100Base-TX PoE."
+        ::= { hpSwitchJ9473A 2 }
+
+   hpSwitchModuleJ93aaA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J93aaA Fixed Gig-T/SFP PoE+."
+        ::= { hpSwitchJ9311A 1 }
+
+   hpSwitchModuleJ93bbA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J93bbA Fixed 24p Gig-T PoE+."
+        ::= { hpSwitchJ9311A 2 }
+
+   hpSwitchModuleJ9565A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9565A HP 2615-8-PoE Switch."
+        ::= { hpSwitchJ9565A 1 }
+
+   hpSwitchModuleJ9562A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9562A HP 2915-8G-PoE Switch."
+        ::= { hpSwitchJ9562A 1 }
+
+    -- psuedo cards for the 2620 10/100 family
+
+    hpSwitchModuleJ9623A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9623A HP 2620-24 Switch" 
+        ::= { hpSwitchJ9623A 1 }
+
+    hpSwitchModuleJ9624A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9624A HP 2620-24-PPoE+ Switch" 
+        ::= { hpSwitchJ9624A 1 }
+
+    hpSwitchModuleJ9625A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9625A  HP 2620-24-PoE+ Switch" 
+        ::= { hpSwitchJ9625A 1 }
+
+    hpSwitchModuleJ9626A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9626A HP 2620-48 Switch" 
+        ::= { hpSwitchJ9626A 1 }
+
+    hpSwitchModuleJ9627A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    J9627A HP 2620-48-PoE+ Switch" 
+        ::= { hpSwitchJ9627A 1 }
+
+    -- psuedo cards for the 2530 family
+
+    hpSwitchModuleJ9772A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9772A Fixed 48p PoEP 10/100/1000-T module."
+      ::= { hpSwitchJ9772A 1 }
+
+    hpSwitchModuleJ9773A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9773A Fixed 24p PoEP 10/100/1000-T module."
+      ::= { hpSwitchJ9773A 1 }
+
+    hpSwitchModuleJ9774A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9774A Fixed 8p PoEP 10/100/1000-T module."
+      ::= { hpSwitchJ9774A 1 }
+
+    hpSwitchModuleJ9775A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9775A Fixed 48p 10/100/1000-T module."
+      ::= { hpSwitchJ9775A 1 }
+
+    hpSwitchModuleJ9776A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9776A Fixed 24p 10/100/1000-T module."
+      ::= { hpSwitchJ9776A 1 }
+
+    hpSwitchModuleJ9777A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9777A Fixed 8p 10/100/1000-T module."
+      ::= { hpSwitchJ9777A 1 }
+
+    hpSwitchModuleJ9778A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9778A Fixed 48p PoEP 10/100 module."
+      ::= { hpSwitchJ9778A 1 }
+
+    hpSwitchModuleJ9779A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9779A Fixed 24p PoEP 10/100 module."
+      ::= { hpSwitchJ9779A 1 }
+
+    hpSwitchModuleJ9780A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9779A Fixed 8p PoEP 10/100 module."
+      ::= { hpSwitchJ9780A 1 }
+
+    hpSwitchModuleJ9781A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9781A Fixed 48p 10/100 module."
+      ::= { hpSwitchJ9781A 1 }
+
+    hpSwitchModuleJ9782A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9782A Fixed 24p 10/100 module."
+      ::= { hpSwitchJ9782A 1 }
+
+    hpSwitchModuleJ9783A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+            J9783A Fixed 8p 10/100 module."
+      ::= { hpSwitchJ9783A 1 }
+    -- end of Lakes family
+
+    hpSwitchModuleJ9730A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        HP J9730A 10-GbE 2-port CX4"
+        ::= { hpSwitchJ9729A 2 }
+
+    hpSwitchModuleJ9731A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        HP J9731A 10-GbE 2-port SFP+"
+        ::= { hpSwitchJ9729A 3 }
+
+    hpSwitchModuleJ9732A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        HP J9732A 10GBASE-T"
+        ::= { hpSwitchJ9729A 4 }
+        
+    hpSwitchModuleJ9733A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+        HP J9733A 2 Port Stacking"
+        ::= { hpSwitchJ9729A 5 }
+
+    -- WAN Products
+
+    -- Branches under the hpicfWan node
+    hpWANRouters          OBJECT IDENTIFIER ::= { hpicfWAN 1 }
+    hpWANModules          OBJECT IDENTIFIER ::= { hpicfWAN 2 }
+
+    -- WAN Routers 
+
+    hpSRJ8751A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8751A Secure Router 7001dl." 
+        ::= { hpWANRouters 1 }
+
+    hpSRJ8752A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8752A Secure Router 7102dl." 
+        ::= { hpWANRouters 2 }
+
+    hpSRJ8753A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8753A Secure Router 7203dl." 
+        ::= { hpWANRouters 3 }
+
+    hpSRJ8754A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8754A Secure Router 7306dl." 
+        ::= { hpWANRouters 4 }    
+
+   -- WAN Modules
+
+   hpSRmoduleJ8451A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 1 x T1 module." 
+        ::= { hpWANModules 1 }
+
+   hpSRmoduleJ8452A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 1 x T1 + DSX-1 module." 
+        ::= { hpWANModules 2 }
+
+   hpSRmoduleJ8453A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 2 x T1 module." 
+        ::= { hpWANModules 3 }
+
+   hpSRmoduleJ8454A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 1 x E1 module." 
+        ::= { hpWANModules 4 }
+
+   hpSRmoduleJ8455A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 1 x E1 + G.703 module." 
+        ::= { hpWANModules 5 }
+
+   hpSRmoduleJ8456A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 2 x E1 module." 
+        ::= { hpWANModules 6 }
+
+   hpSRmoduleJ8457A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 2 x ISDN BRI S/T module." 
+        ::= { hpWANModules 7 }
+
+   hpSRmoduleJ8458A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 1 x Serial module." 
+        ::= { hpWANModules 8 }
+
+   hpSRmoduleJ8459A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 1 x ADSL2+ Annex A module." 
+        ::= { hpWANModules 9 }
+
+   hpSRmoduleJ8759A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 1 x ADSL2+ Annex B module."
+        ::= { hpWANModules 10 }
+
+   hpSRmoduleJ8460A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl ISDN BRI U backup." 
+        ::= { hpWANModules 11 }
+
+   hpSRmoduleJ8461A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl ISDN BRI S/T backup." 
+        ::= { hpWANModules 12 }
+
+   hpSRmoduleJ8462A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl Analog Modem backup." 
+        ::= { hpWANModules 13 }
+
+   hpSRmoduleJ8463A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl 8 x T1/E1 wide module." 
+        ::= { hpWANModules 14 }
+
+   hpSRmoduleJ8464A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl DS-3 wide module." 
+        ::= { hpWANModules 15 }
+
+   hpSRmoduleJ8465A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR dl HSSI wide  module." 
+        ::= { hpWANModules 16 }
+
+   hpSRmoduleJ8471A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR 7100/7200 IPSec module." 
+        ::= { hpWANModules 17 }
+
+   hpSRmoduleJ8472A OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP SR 7300 series IPSec module." 
+        ::= { hpWANModules 18 }
+
+-- Accessories for 7300 series WAN Secure Router
+
+    hpSRPowerSupply8756A OBJECT-IDENTITY
+        STATUS            current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J8754A Secure Router 7306dl powersupply." 
+        ::= { hpSRJ8754A 1 }    
+
+    hpManagementModuleJ9092A OBJECT-IDENTITY
+        STATUS            current
+        DESCRIPTION "The authoritative identifier for the
+                    J9092A HP 8200zl Switch Management Module." 
+        ::= { hpSwitchJ9091A 1 }    
+
+    hpFabricModuleJ9093A OBJECT-IDENTITY
+        STATUS            current
+        DESCRIPTION "The authoritative identifier for the
+                    J9093A HP 8200zl Switch Fabric Module." 
+        ::= { hpSwitchJ9091A 2 }    
+        
+    hpSSMModuleJ8784A OBJECT-IDENTITY
+        STATUS            current
+        DESCRIPTION "The authoritative identifier for the
+                    J8784A HP 8212zl Switch System Support Module." 
+        ::= { hpSwitchJ9091A 3 }    
+   
+    -- different cards for the 6600 family
+
+   hpSwitchModuleJ92yyA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J92yyA Fixed 4p SFP+."
+        ::= { hpSwitchJ9265A 1 }
+
+   hpSwitchModuleJ92xxA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J92xxA Fixed Gig-T/SFP."
+        ::= { hpSwitchJ9265A 2 }
+
+   hpSwitchModuleJ92wwA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J92wwA Fixed 24 Gig."
+        ::= { hpSwitchJ9265A 3 }
+
+   hpSwitchModuleJ92vvA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J92vvA Fixed 24 Gig DP."
+        ::= { hpSwitchJ9265A 4 }
+
+   hpSwitchModuleJ92uuA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J92uuA Fixed 24 Gig Non DP."
+        ::= { hpSwitchJ9265A 5 }
+
+   hpSwitchModuleJ92ttA OBJECT-IDENTITY
+        STATUS      current
+        DESCRIPTION "The authoritative identifier for the
+                    HP J92ttA Fixed 2 10Gig."
+        ::= { hpSwitchJ9265A 6 }
+
+END
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/mibs/HP-ICF-TC	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,236 @@
+HP-ICF-TC DEFINITIONS ::= BEGIN
+
+    IMPORTS
+        MODULE-IDENTITY
+            FROM SNMPv2-SMI
+        TEXTUAL-CONVENTION
+            FROM SNMPv2-TC
+        hpicfAdmin
+            FROM HP-ICF-OID;
+
+    hpicfTextualConventions MODULE-IDENTITY
+        
+        LAST-UPDATED "201220220800Z"  -- Feb 22, 2012
+        ORGANIZATION "HP Networking"
+        CONTACT-INFO "Hewlett-Packard Company
+                      8000 Foothills Blvd.
+                      Roseville, CA 95747"
+        DESCRIPTION  "This module contains common textual convention
+                     definitions used by various HP ICF MIB modules."
+
+	REVISION     "201220220800Z"  -- Feb 22, 2012
+        DESCRIPTION  "Added HpInetCidrRouteState type"
+        
+        REVISION     "201202170000Z"  -- February 17, 2012
+        DESCRIPTION  "Added tenGigabitEthernetESP."
+ 
+        REVISION     "201010120800Z"  -- October 12, 2010
+        DESCRIPTION  "Added VidList type"
+
+        REVISION     "200902101800Z"  -- February 10, 2009
+        DESCRIPTION  "Added 10GbE-K for 802.3ap (clauses 69-74)"
+
+        REVISION     "200808190905Z"  -- August 19, 2008
+        DESCRIPTION  "Added XFP-SFP+ DAC types for HpSwitchPortType."
+
+        REVISION     "200802041536Z"  -- February 04, 2008
+        DESCRIPTION  "Added multiple transceiver types."
+
+        REVISION     "200402182305Z"  -- February 18, 2004
+        DESCRIPTION  "Added gigabitEthernetESP and tenGigabitEthernetCX 
+                      type for HpSwitchPortType."
+
+        REVISION     "200011030717Z"  -- November 3, 2000
+        DESCRIPTION  "Initial revision."
+        ::= { hpicfAdmin 4 }
+
+    ConfigStatus ::= TEXTUAL-CONVENTION
+        STATUS      current
+        DESCRIPTION "Used to indicate the configuration status for
+                    a group of objects.  'active' means that the
+                    values of the related objects are currently in
+                    use by the device.  'notInService' indicates that
+                    the objects have been reconfigured in such a way
+                    that the values cannot take effect until after the
+                    next reboot of the device.  'notReady' indicates
+                    that the objects are not consistent with each other."
+        SYNTAX      INTEGER {
+                        active(1),
+                        notInService(2),
+                        notReady(3)
+                    }
+
+    HpSwitchPortType ::= TEXTUAL-CONVENTION
+        STATUS      current
+        DESCRIPTION "Used to indicate the type of port."
+        SYNTAX      INTEGER {
+                        other(1),
+                        none(2),
+                        unknown(3),
+                        ethernetCsmacd(6),
+                        iso88023Csmacd(7),
+                        fddi(15),
+                        atm(37),
+                        propMultiplexor(54),
+                        ieee80212(55),
+                        fastEther(62),
+                        fastEtherFX(69),
+                        fastEtherFX-sfp(70),
+                        tenGSFP-SR (112),
+                        tenGSFP-LR (113),
+                        tenGSFP-ER (114),
+                        tenGSFP-LRM (115),
+                        tenGSFP-LX4 (116),
+                        gigabitEthernetSX (117),
+                        gigabitEthernetLX (118),
+                        gigabitEthernetT (119),
+                        gigabitEthernetStk (120),
+                        gigabitEthernetLH (121),
+                        tenGbE-CX4 (122),
+                        gigabitEthernetESP (123),
+                        tenGbE-SR (124),
+                        tenGbE-ER (125),
+                        tenGbE-LR (126),
+                        gigabitEthernetT-sfp (127),
+                        fastEtherGEN (128),
+                        gigabitEthernetGEN (129),
+                        tenGbE-GEN (130),
+                        fastEtherBX-D (131),
+                        fastEtherBX-U (132),
+                        gigabitEthernetBX-D (133),
+                        gigabitEthernetBX-U (134),
+                        tenGbE-LRM (135),
+                        sFP-PLUS-SR (136),
+                        sFP-PLUS-LR (137),
+                        sFP-PLUS-LRM (138),
+                        sFP-PLUS-DAC (139),
+                        sFP-PLUS-DA1 (140),
+                        sFP-PLUS-DA2 (141),
+                        sFP-PLUS-DA3 (142),
+                        sFP-PLUS-DA5 (143),
+                        sFP-PLUS-DA7 (144),
+                        sFP-PLUS-DA10 (145),
+                        sFP-PLUS-DA15 (146),
+                        sFP-PLUS-DA20 (147),
+                        tenGbE-T (148),
+                        tenGbE-TSH (149),
+                        tenGbE-TLH (150),
+                        tenGbE-STK (151),
+                        xFP-SFP-PLUS-DAC  (152),
+                        xFP-SFP-PLUS-DA1  (153),
+                        xFP-SFP-PLUS-DA3  (154),
+                        xFP-SFP-PLUS-DA5  (155),
+                        xFP-SFP-PLUS-DA7  (156),
+                        xFP-SFP-PLUS-DA10 (157),
+                        tenGbE-K (158), 
+                        sFP-PLUS-ER (160),
+                        sFP-CWDM1470 (161),
+                        sFP-CWDM1490 (162),
+                        sFP-CWDM1510 (163),
+                        sFP-CWDM1530 (164),
+                        sFP-CWDM1550 (165),
+                        sFP-CWDM1570 (166),
+                        sFP-CWDM1590 (167),
+                        sFP-CWDM1610 (168),
+                        tenGigabitEthernetESP (169)
+                    }
+
+    VidList ::= TEXTUAL-CONVENTION
+        DISPLAY-HINT "512x"
+        STATUS      current
+        DESCRIPTION
+           "Each octet within this value specifies a set of eight
+           VlanIndex (VID), with the first octet specifying VIDs 1
+           through 8, the second octet specifying VIDs 9 through 16,
+           etc.  Within each octet, the most significant bit represents
+           the lowest numbered VID, and the least significant bit
+           represents the highest numbered VID.  Thus, each VID
+           is represented by a single bit within the value of this
+           object.  If that bit has a value of 1 then that VID is
+           included in the set of VIDs; the VID is not included if its
+           bit has a value of 0.  This list represents the entire
+           range of VlanIndex values defined in the scope of IEEE
+           802.1Q."
+        SYNTAX       OCTET STRING (SIZE (512))
+    
+    HpInetCidrRouteState ::= TEXTUAL-CONVENTION
+        STATUS      current
+        DESCRIPTION "used for the bitmap for getting the state of the 
+                     route."
+        SYNTAX      BITS {
+                        remote(0),
+                        notInstall(1),
+                        noAdvise(2),
+                        interior(3),
+                        exterior(4),
+                        delete(5),
+                        hidden(6),
+                        initial(7),
+                        release(8),
+                        unused(9),
+                        unused2(10),
+                        retain(11),
+                        unused3(12),
+                        gateway(13),
+                        reject(14),
+                        static(15),
+                        blackHole(16),
+                        ifSubnetMask(17),
+                        unused4(18),
+                        suppressed(19),
+                        eligibleUnicast(21),
+                        eligibleMulticast(22),
+                        activeUnicast(23),
+                        activeMulticast(24),
+                        pendingUnicast(25),
+                        pendingMulticast(26),
+                        inferiorMed(27),
+                        split(28),
+                        aggr(29),
+                        bgpAggr(30),
+                        recurse(31)
+                      }
+
+
+StpPortRole ::= TEXTUAL-CONVENTION
+    STATUS       current
+    DESCRIPTION  "Identifies the role played by the port in a given spanning 
+                  tree.
+
+
+                     - disabled(1)
+                       This port has no role in the spanning-tree
+                       topology.
+
+                     - root(2)
+                       This port provides the minimum cost path
+                       from this bridge to the Root Bridge.
+
+                     - designated(3)
+                       This port provides the least cost path from
+                       the attached LAN through this bridge to the
+                       root bridge.
+
+                     - alternate(4)
+                       This port provides connectivity to the
+                       root bridge if the current root port failed.
+
+                     - backup(5)
+                       This port provides connectivity from the
+                       attached LAN to the root bridge if the
+                       current designated port failed.
+
+                     - boundary(6)
+                       This role is only applicable for MSTP. 
+                       This port provides connectivity from the MSTP Region to 
+                       the CIST Root that lies outside the Region."
+      SYNTAX INTEGER{
+                       disabled(1),
+                       root(2),
+                       designated(3),
+                       alternate(4),
+                       backup(5),
+                       boundary(6)
+                   }
+
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/mibs/LLDP-MIB	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,2032 @@
+LLDP-MIB DEFINITIONS ::= BEGIN
+
+IMPORTS
+    MODULE-IDENTITY, OBJECT-TYPE, Integer32, Counter32, NOTIFICATION-TYPE
+        FROM SNMPv2-SMI
+    TEXTUAL-CONVENTION, TimeStamp, TruthValue
+        FROM SNMPv2-TC
+    SnmpAdminString
+        FROM SNMP-FRAMEWORK-MIB
+    MODULE-COMPLIANCE, OBJECT-GROUP, NOTIFICATION-GROUP
+        FROM SNMPv2-CONF
+    TimeFilter, ZeroBasedCounter32
+        FROM RMON2-MIB
+    AddressFamilyNumbers
+        FROM IANA-ADDRESS-FAMILY-NUMBERS-MIB;
+
+lldpMIB MODULE-IDENTITY
+    LAST-UPDATED "200505060000Z" -- May 06, 2005
+    ORGANIZATION "IEEE 802.1 Working Group"
+    CONTACT-INFO 
+            "  WG-URL: http://grouper.ieee.org/groups/802/1/index.html
+             WG-EMail: stds-802-1@ieee.org
+
+              Contact: Paul Congdon
+               Postal: Hewlett-Packard Company
+                       8000 Foothills Blvd. 
+                       Roseville, CA 95747
+                       USA
+                  Tel: +1-916-785-5753
+               E-mail: paul_congdon@hp.com"
+    DESCRIPTION
+            "Management Information Base module for LLDP configuration,
+            statistics, local system data and remote systems data
+            components.
+
+            Copyright (C) IEEE (2005).  This version of this MIB module
+            is published as subclause 12.1 of IEEE Std 802.1AB-2005;
+            see the standard itself for full legal notices."
+    REVISION        "200505060000Z" -- May 06, 2005
+    DESCRIPTION
+            "Published as part of IEEE Std 802.1AB-2005 initial version."
+   ::= { iso std(0) iso8802(8802) ieee802dot1(1) ieee802dot1mibs(1) 2 }
+
+lldpNotifications            OBJECT IDENTIFIER ::= { lldpMIB 0 }
+lldpObjects                  OBJECT IDENTIFIER ::= { lldpMIB 1 }
+lldpConformance              OBJECT IDENTIFIER ::= { lldpMIB 2 } 
+
+--
+-- LLDP MIB Objects
+--
+
+lldpConfiguration            OBJECT IDENTIFIER ::= { lldpObjects 1 }
+lldpStatistics               OBJECT IDENTIFIER ::= { lldpObjects 2 }
+lldpLocalSystemData          OBJECT IDENTIFIER ::= { lldpObjects 3 }
+lldpRemoteSystemsData        OBJECT IDENTIFIER ::= { lldpObjects 4 }
+lldpExtensions               OBJECT IDENTIFIER ::= { lldpObjects 5 }
+
+-- 
+-- ***********************************************************
+-- 
+-- Textual Conventions
+-- 
+-- ***********************************************************
+
+LldpChassisIdSubtype ::= TEXTUAL-CONVENTION
+    STATUS      current
+    DESCRIPTION
+            "This TC describes the source of a chassis identifier.
+
+            The enumeration 'chassisComponent(1)' represents a chassis
+            identifier based on the value of entPhysicalAlias object
+            (defined in IETF RFC 2737) for a chassis component (i.e.,
+            an entPhysicalClass value of 'chassis(3)').
+
+            The enumeration 'interfaceAlias(2)' represents a chassis
+            identifier based on the value of ifAlias object (defined in
+            IETF RFC 2863) for an interface on the containing chassis.
+
+            The enumeration 'portComponent(3)' represents a chassis
+            identifier based on the value of entPhysicalAlias object
+            (defined in IETF RFC 2737) for a port or backplane
+            component (i.e., entPhysicalClass value of 'port(10)' or
+            'backplane(4)'), within the containing chassis.
+
+            The enumeration 'macAddress(4)' represents a chassis
+            identifier based on the value of a unicast source address
+            (encoded in network byte order and IEEE 802.3 canonical bit
+            order), of a port on the containing chassis as defined in
+            IEEE Std 802-2001.
+
+            The enumeration 'networkAddress(5)' represents a chassis
+            identifier based on a network address, associated with
+            a particular chassis.  The encoded address is actually
+            composed of two fields.  The first field is a single octet,
+            representing the IANA AddressFamilyNumbers value for the
+            specific address type, and the second field is the network
+            address value.
+
+            The enumeration 'interfaceName(6)' represents a chassis
+            identifier based on the value of ifName object (defined in
+            IETF RFC 2863) for an interface on the containing chassis.
+
+            The enumeration 'local(7)' represents a chassis identifier
+            based on a locally defined value."
+    SYNTAX  INTEGER {
+            chassisComponent(1),
+            interfaceAlias(2),
+            portComponent(3),
+            macAddress(4),
+            networkAddress(5),
+            interfaceName(6),
+            local(7)
+    }
+
+LldpChassisId ::= TEXTUAL-CONVENTION
+    STATUS      current
+    DESCRIPTION
+            "This TC describes the format of a chassis identifier string.
+            Objects of this type are always used with an associated
+            LldpChassisIdSubtype object, which identifies the format of
+            the particular LldpChassisId object instance.
+
+            If the associated LldpChassisIdSubtype object has a value of
+            'chassisComponent(1)', then the octet string identifies
+            a particular instance of the entPhysicalAlias object
+            (defined in IETF RFC 2737) for a chassis component (i.e.,
+            an entPhysicalClass value of 'chassis(3)').
+
+            If the associated LldpChassisIdSubtype object has a value
+            of 'interfaceAlias(2)', then the octet string identifies
+            a particular instance of the ifAlias object (defined in
+            IETF RFC 2863) for an interface on the containing chassis.
+            If the particular ifAlias object does not contain any values,
+            another chassis identifier type should be used.
+
+            If the associated LldpChassisIdSubtype object has a value
+            of 'portComponent(3)', then the octet string identifies a
+            particular instance of the entPhysicalAlias object (defined
+            in IETF RFC 2737) for a port or backplane component within
+            the containing chassis.
+
+            If the associated LldpChassisIdSubtype object has a value of
+            'macAddress(4)', then this string identifies a particular
+            unicast source address (encoded in network byte order and
+            IEEE 802.3 canonical bit order), of a port on the containing
+            chassis as defined in IEEE Std 802-2001.
+
+            If the associated LldpChassisIdSubtype object has a value of
+            'networkAddress(5)', then this string identifies a particular
+            network address, encoded in network byte order, associated
+            with one or more ports on the containing chassis.  The first
+            octet contains the IANA Address Family Numbers enumeration
+            value for the specific address type, and octets 2 through
+            N contain the network address value in network byte order.
+
+            If the associated LldpChassisIdSubtype object has a value
+            of 'interfaceName(6)', then the octet string identifies
+            a particular instance of the ifName object (defined in
+            IETF RFC 2863) for an interface on the containing chassis.
+            If the particular ifName object does not contain any values,
+            another chassis identifier type should be used.
+
+            If the associated LldpChassisIdSubtype object has a value of
+            'local(7)', then this string identifies a locally assigned
+            Chassis ID."
+    SYNTAX      OCTET STRING (SIZE (1..255))
+
+LldpPortIdSubtype ::= TEXTUAL-CONVENTION
+    STATUS      current
+    DESCRIPTION
+            "This TC describes the source of a particular type of port
+            identifier used in the LLDP MIB.
+
+            The enumeration 'interfaceAlias(1)' represents a port
+            identifier based on the ifAlias MIB object, defined in IETF
+            RFC 2863.
+
+            The enumeration 'portComponent(2)' represents a port
+            identifier based on the value of entPhysicalAlias (defined in
+            IETF RFC 2737) for a port component (i.e., entPhysicalClass
+            value of 'port(10)'), within the containing chassis.
+
+            The enumeration 'macAddress(3)' represents a port identifier
+            based on a unicast source address (encoded in network
+            byte order and IEEE 802.3 canonical bit order), which has
+            been detected by the agent and associated with a particular
+            port (IEEE Std 802-2001).
+
+            The enumeration 'networkAddress(4)' represents a port
+            identifier based on a network address, detected by the agent
+            and associated with a particular port.
+
+            The enumeration 'interfaceName(5)' represents a port
+            identifier based on the ifName MIB object, defined in IETF
+            RFC 2863.
+
+            The enumeration 'agentCircuitId(6)' represents a port
+            identifier based on the agent-local identifier of the circuit
+            (defined in RFC 3046), detected by the agent and associated
+            with a particular port.
+
+            The enumeration 'local(7)' represents a port identifier
+            based on a value locally assigned."
+
+    SYNTAX  INTEGER {
+            interfaceAlias(1),
+            portComponent(2),
+            macAddress(3),
+            networkAddress(4),
+            interfaceName(5),
+            agentCircuitId(6),
+            local(7)
+    }
+
+LldpPortId ::= TEXTUAL-CONVENTION
+    STATUS      current
+    DESCRIPTION
+            "This TC describes the format of a port identifier string.
+            Objects of this type are always used with an associated
+            LldpPortIdSubtype object, which identifies the format of the
+            particular LldpPortId object instance.
+
+            If the associated LldpPortIdSubtype object has a value of
+            'interfaceAlias(1)', then the octet string identifies a
+            particular instance of the ifAlias object (defined in IETF
+            RFC 2863).  If the particular ifAlias object does not contain
+            any values, another port identifier type should be used.
+
+            If the associated LldpPortIdSubtype object has a value of
+            'portComponent(2)', then the octet string identifies a
+            particular instance of the entPhysicalAlias object (defined
+            in IETF RFC 2737) for a port or backplane component.
+
+            If the associated LldpPortIdSubtype object has a value of
+            'macAddress(3)', then this string identifies a particular
+            unicast source address (encoded in network byte order
+            and IEEE 802.3 canonical bit order) associated with the port
+            (IEEE Std 802-2001).
+
+            If the associated LldpPortIdSubtype object has a value of
+            'networkAddress(4)', then this string identifies a network
+            address associated with the port.  The first octet contains
+            the IANA AddressFamilyNumbers enumeration value for the
+            specific address type, and octets 2 through N contain the
+            networkAddress address value in network byte order.
+
+            If the associated LldpPortIdSubtype object has a value of
+            'interfaceName(5)', then the octet string identifies a
+            particular instance of the ifName object (defined in IETF
+            RFC 2863).  If the particular ifName object does not contain
+            any values, another port identifier type should be used.
+
+            If the associated LldpPortIdSubtype object has a value of
+            'agentCircuitId(6)', then this string identifies a agent-local
+            identifier of the circuit (defined in RFC 3046).
+
+            If the associated LldpPortIdSubtype object has a value of
+            'local(7)', then this string identifies a locally
+            assigned port ID."
+    SYNTAX      OCTET STRING (SIZE (1..255))
+
+LldpManAddrIfSubtype ::= TEXTUAL-CONVENTION
+    STATUS      current
+    DESCRIPTION
+            "This TC describes the basis of a particular type of
+            interface associated with the management address.
+
+            The enumeration 'unknown(1)' represents the case where the
+            interface is not known.
+
+            The enumeration 'ifIndex(2)' represents interface identifier
+            based on the ifIndex MIB object.
+
+            The enumeration 'systemPortNumber(3)' represents interface
+            identifier based on the system port numbering convention."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.5"
+            
+    SYNTAX  INTEGER {
+            unknown(1),
+            ifIndex(2),
+            systemPortNumber(3)
+    }
+
+LldpManAddress ::= TEXTUAL-CONVENTION
+    STATUS      current
+    DESCRIPTION
+            "The value of a management address associated with the LLDP
+            agent that may be used to reach higher layer entities to
+            assist discovery by network management.
+
+            It should be noted that appropriate security credentials,
+            such as SNMP engineId, may be required to access the LLDP
+            agent using a management address.  These necessary credentials
+            should be known by the network management and the objects
+            associated with the credentials are not included in the
+            LLDP agent."
+    SYNTAX      OCTET STRING (SIZE (1..31))
+
+LldpSystemCapabilitiesMap ::= TEXTUAL-CONVENTION
+    STATUS      current
+    DESCRIPTION
+            "This TC describes the system capabilities.
+
+            The bit 'other(0)' indicates that the system has capabilities
+            other than those listed below.
+
+            The bit 'repeater(1)' indicates that the system has repeater
+            capability.
+
+            The bit 'bridge(2)' indicates that the system has bridge
+            capability.
+
+            The bit 'wlanAccessPoint(3)' indicates that the system has 
+            WLAN access point capability.
+
+            The bit 'router(4)' indicates that the system has router
+            capability.
+
+            The bit 'telephone(5)' indicates that the system has telephone
+            capability.
+
+            The bit 'docsisCableDevice(6)' indicates that the system has
+            DOCSIS Cable Device capability (IETF RFC 2669 & 2670).
+
+            The bit 'stationOnly(7)' indicates that the system has only
+            station capability and nothing else."
+    SYNTAX  BITS {
+            other(0),
+            repeater(1),
+            bridge(2),
+            wlanAccessPoint(3),
+            router(4),
+            telephone(5),
+            docsisCableDevice(6),
+            stationOnly(7)
+    }
+
+LldpPortNumber ::= TEXTUAL-CONVENTION
+    DISPLAY-HINT "d"
+    STATUS     current 
+    DESCRIPTION
+            "Each port contained in the chassis (that is known to the
+            LLDP agent) is uniquely identified by a port number.
+
+            A port number has no mandatory relationship to an
+            InterfaceIndex object (of the interfaces MIB, IETF RFC 2863).
+            If the LLDP agent is a IEEE 802.1D, IEEE 802.1Q bridge, the
+            LldpPortNumber will have the same value as the dot1dBasePort
+            object (defined in IETF RFC 1493) associated corresponding
+            bridge port.  If the system hosting LLDP agent is not an
+            IEEE 802.1D or an IEEE 802.1Q bridge, the LldpPortNumber
+            will have the same value as the corresponding interface's
+            InterfaceIndex object.
+
+            Port numbers should be in the range of 1 and 4096 since a
+            particular port is also represented by the corresponding
+            port number bit in LldpPortList."
+    SYNTAX 	Integer32(1..4096)
+
+LldpPortList ::= TEXTUAL-CONVENTION
+    STATUS      current
+    DESCRIPTION
+            "Each octet within this value specifies a set of eight ports,
+            with the first octet specifying ports 1 through 8, the second
+            octet specifying ports 9 through 16, etc.  Within each octet,
+            the most significant bit represents the lowest numbered port,
+            and the least significant bit represents the highest numbered
+            port.  Thus, each port of the system is represented by a
+            single bit within the value of this object.  If that bit has
+            a value of '1' then that port is included in the set of ports;
+            the port is not included if its bit has a value of '0'."
+    REFERENCE 
+            "IETF RFC 2674 section 5"
+    SYNTAX  OCTET STRING(SIZE(0..512))
+
+-- 
+-- ***********************************************************
+-- 
+--                  L L D P    C O N F I G 
+-- 
+-- *********************************************************** 
+--
+
+lldpMessageTxInterval OBJECT-TYPE
+    SYNTAX      Integer32(5..32768)
+    UNITS       "seconds"
+    MAX-ACCESS  read-write
+    STATUS      current
+    DESCRIPTION
+            "The interval at which LLDP frames are transmitted on
+            behalf of this LLDP agent.
+
+            The default value for lldpMessageTxInterval object is
+            30 seconds.
+
+            The value of this object must be restored from non-volatile
+            storage after a re-initialization of the management system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.3.3"
+    DEFVAL     { 30 }
+    ::= { lldpConfiguration 1 }
+
+lldpMessageTxHoldMultiplier OBJECT-TYPE
+    SYNTAX      Integer32(2..10)
+    MAX-ACCESS  read-write
+    STATUS      current
+    DESCRIPTION
+            "The time-to-live value expressed as a multiple of the
+            lldpMessageTxInterval object.  The actual time-to-live value
+            used in LLDP frames, transmitted on behalf of this LLDP agent,
+            can be expressed by the following formula: TTL = min(65535,
+            (lldpMessageTxInterval * lldpMessageTxHoldMultiplier)) For
+            example, if the value of lldpMessageTxInterval is '30', and
+            the value of lldpMessageTxHoldMultiplier is '4', then the
+            value '120' is encoded in the TTL field in the LLDP header.
+
+            The default value for lldpMessageTxHoldMultiplier object is 4.
+
+            The value of this object must be restored from non-volatile
+            storage after a re-initialization of the management system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.3.3"
+    DEFVAL      { 4 }    
+    ::= { lldpConfiguration 2 }
+
+lldpReinitDelay OBJECT-TYPE
+    SYNTAX      Integer32(1..10)
+    UNITS       "seconds"
+    MAX-ACCESS  read-write
+    STATUS      current
+    DESCRIPTION
+            "The lldpReinitDelay indicates the delay (in units of
+            seconds) from when lldpPortConfigAdminStatus object of a
+            particular port becomes 'disabled' until re-initialization
+            will be attempted.
+
+            The default value for lldpReintDelay object is two seconds.
+
+            The value of this object must be restored from non-volatile
+            storage after a re-initialization of the management system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.3.3"
+    DEFVAL      { 2 }    
+    ::= { lldpConfiguration 3 }
+
+lldpTxDelay OBJECT-TYPE
+    SYNTAX      Integer32(1..8192)
+    UNITS       "seconds"
+    MAX-ACCESS  read-write
+    STATUS      current
+    DESCRIPTION
+            "The lldpTxDelay indicates the delay (in units
+            of seconds) between successive LLDP frame transmissions 
+            initiated by value/status changes in the LLDP local systems
+            MIB.  The recommended value for the lldpTxDelay is set by the
+            following  formula:
+
+               1 <= lldpTxDelay <= (0.25 * lldpMessageTxInterval)
+
+            The default value for lldpTxDelay object is two seconds.
+
+            The value of this object must be restored from non-volatile
+            storage after a re-initialization of the management system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.3.3"
+    DEFVAL      { 2 }    
+    ::= { lldpConfiguration 4 }
+
+lldpNotificationInterval OBJECT-TYPE
+    SYNTAX      Integer32(5..3600)
+    UNITS       "seconds"
+    MAX-ACCESS  read-write
+    STATUS      current
+    DESCRIPTION
+            "This object controls the transmission of LLDP notifications.
+
+            the agent must not generate more than one lldpRemTablesChange
+            notification-event in the indicated period, where a
+            'notification-event' is the transmission of a single
+            notification PDU type to a list of notification destinations.
+            If additional changes in lldpRemoteSystemsData object
+            groups occur within the indicated throttling period,
+            then these trap- events must be suppressed by the
+            agent. An NMS should periodically check the value of
+            lldpStatsRemTableLastChangeTime to detect any missed
+            lldpRemTablesChange notification-events, e.g. due to
+            throttling or transmission loss.
+
+            If notification transmission is enabled for particular ports,
+            the suggested default throttling period is 5 seconds.
+
+            The value of this object must be restored from non-volatile
+            storage after a re-initialization of the management system."
+    DEFVAL { 5 }
+    ::= { lldpConfiguration 5 }
+
+--
+-- lldpPortConfigTable: LLDP configuration on a per port basis
+--
+
+lldpPortConfigTable   OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpPortConfigEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The table that controls LLDP frame transmission on individual
+            ports."
+    ::= { lldpConfiguration 6 }
+
+lldpPortConfigEntry   OBJECT-TYPE
+    SYNTAX      LldpPortConfigEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "LLDP configuration information for a particular port.
+            This configuration parameter controls the transmission and
+            the reception of LLDP frames on those ports whose rows are
+            created in this table."
+     INDEX  { lldpPortConfigPortNum }
+    ::= { lldpPortConfigTable 1 }
+
+LldpPortConfigEntry ::= SEQUENCE {
+      lldpPortConfigPortNum            LldpPortNumber,
+      lldpPortConfigAdminStatus        INTEGER,
+      lldpPortConfigNotificationEnable TruthValue,
+      lldpPortConfigTLVsTxEnable       BITS }
+
+lldpPortConfigPortNum   OBJECT-TYPE
+    SYNTAX      LldpPortNumber 
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The index value used to identify the port component
+            (contained in the local chassis with the LLDP agent)
+            associated with this entry.
+
+            The value of this object is used as a port index to the
+            lldpPortConfigTable."
+    ::= { lldpPortConfigEntry 1 }
+
+lldpPortConfigAdminStatus  OBJECT-TYPE 
+    SYNTAX INTEGER { 
+       txOnly(1), 
+       rxOnly(2),
+       txAndRx(3),
+       disabled(4)
+    }
+    MAX-ACCESS read-write 
+    STATUS     current 
+    DESCRIPTION 
+            "The administratively desired status of the local LLDP agent.
+
+            If the associated lldpPortConfigAdminStatus object has a
+            value of 'txOnly(1)', then LLDP agent will transmit LLDP
+            frames on this port and it will not store any information
+            about the remote systems connected.
+         
+            If the associated lldpPortConfigAdminStatus object has a
+            value of 'rxOnly(2)', then the LLDP agent will receive,
+            but it will not transmit LLDP frames on this port.
+
+            If the associated lldpPortConfigAdminStatus object has a
+            value of 'txAndRx(3)', then the LLDP agent will transmit
+            and receive LLDP frames on this port.
+
+            If the associated lldpPortConfigAdminStatus object has a
+            value of 'disabled(4)', then LLDP agent will not transmit or
+            receive LLDP frames on this port.  If there is remote systems
+            information which is received on this port and stored in
+            other tables, before the port's lldpPortConfigAdminStatus
+            becomes disabled, then the information will naturally age out."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.1"
+    DEFVAL  { txAndRx }    
+   ::= { lldpPortConfigEntry 2 } 
+
+lldpPortConfigNotificationEnable OBJECT-TYPE 
+    SYNTAX     TruthValue
+    MAX-ACCESS read-write 
+    STATUS     current 
+    DESCRIPTION 
+            "The lldpPortConfigNotificationEnable controls, on a per
+            port basis,  whether or not notifications from the agent
+            are enabled. The value true(1) means that notifications are
+            enabled; the value false(2) means that they are not."
+    DEFVAL  { false }    
+   ::= { lldpPortConfigEntry 3 } 
+
+lldpPortConfigTLVsTxEnable OBJECT-TYPE
+    SYNTAX      BITS {
+            portDesc(0),
+            sysName(1),
+            sysDesc(2),
+            sysCap(3)
+    }
+    MAX-ACCESS  read-write
+    STATUS      current
+    DESCRIPTION
+            "The lldpPortConfigTLVsTxEnable, defined as a bitmap,
+            includes the basic set of LLDP TLVs whose transmission is
+            allowed on the local LLDP agent by the network management.
+            Each bit in the bitmap corresponds to a TLV type associated
+            with a specific optional TLV.
+
+            It should be noted that the organizationally-specific TLVs
+            are excluded from the lldpTLVsTxEnable bitmap.
+            
+            LLDP Organization Specific Information Extension MIBs should
+            have similar configuration object to control transmission
+            of their organizationally defined TLVs.
+
+            The bit 'portDesc(0)' indicates that LLDP agent should
+            transmit 'Port Description TLV'.
+
+            The bit 'sysName(1)' indicates that LLDP agent should transmit
+            'System Name TLV'.
+
+            The bit 'sysDesc(2)' indicates that LLDP agent should transmit
+            'System Description TLV'.
+
+            The bit 'sysCap(3)' indicates that LLDP agent should transmit
+            'System Capabilities TLV'.
+
+            There is no bit reserved for the management address TLV type
+            since transmission of management address TLVs are controlled
+            by another object, lldpConfigManAddrTable.
+
+            The default value for lldpPortConfigTLVsTxEnable object is
+            empty set, which means no enumerated values are set.
+
+            The value of this object must be restored from non-volatile
+            storage after a re-initialization of the management system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.2.1.1"
+    DEFVAL  { { } }
+    ::= { lldpPortConfigEntry 4 } 
+
+
+--
+-- lldpManAddrConfigTxPortsTable : selection of management addresses
+--                                 to be transmitted on a specified set
+--                                 of ports.
+-- 
+
+lldpConfigManAddrTable OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpConfigManAddrEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The table that controls selection of LLDP management address
+            TLV instances to be transmitted on individual ports."
+    ::= { lldpConfiguration 7 }
+
+lldpConfigManAddrEntry  OBJECT-TYPE
+    SYNTAX      LldpConfigManAddrEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "LLDP configuration information that specifies the set
+            of ports (represented as a PortList) on which the local
+            system management address instance will be transmitted.
+
+            This configuration object augments the lldpLocManAddrEntry,
+            therefore it is only present along with the management
+            address instance contained in the associated
+            lldpLocManAddrEntry entry.
+
+            Each active lldpConfigManAddrEntry must be restored from
+            non-volatile and re-created (along with the corresponding
+            lldpLocManAddrEntry) after a re-initialization of the
+            management system."
+    AUGMENTS { lldpLocManAddrEntry }
+    ::= { lldpConfigManAddrTable 1 }
+
+LldpConfigManAddrEntry  ::= SEQUENCE {
+    lldpConfigManAddrPortsTxEnable LldpPortList
+}
+
+lldpConfigManAddrPortsTxEnable  OBJECT-TYPE
+    SYNTAX        LldpPortList
+    MAX-ACCESS    read-write
+    STATUS        current
+    DESCRIPTION
+            "A set of ports that are identified by a PortList, in which
+            each port is represented as a bit.  The corresponding local
+            system management address instance will be transmitted on the
+            member ports of the lldpManAddrPortsTxEnable.  
+
+            The default value for lldpConfigManAddrPortsTxEnable object
+            is empty binary string, which means no ports are specified
+            for advertising indicated management address instance."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.2.1.1"
+    DEFVAL  { ''H }     -- empty binary string
+    ::= { lldpConfigManAddrEntry 1 }
+
+
+--
+--  *********************************************************** 
+--
+--                   L L D P    S T A T S 
+--
+--  *********************************************************** 
+--
+-- LLDP Stats Group
+
+lldpStatsRemTablesLastChangeTime OBJECT-TYPE
+    SYNTAX      TimeStamp
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The value of sysUpTime object (defined in IETF RFC 3418)
+            at the time an entry is created, modified, or deleted in the
+            in tables associated with the lldpRemoteSystemsData objects
+            and all LLDP extension objects associated with remote systems.
+
+            An NMS can use this object to reduce polling of the
+            lldpRemoteSystemsData objects."
+    ::= { lldpStatistics 1 }
+
+lldpStatsRemTablesInserts OBJECT-TYPE
+    SYNTAX      ZeroBasedCounter32
+    UNITS       "table entries"
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The number of times the complete set of information
+            advertised by a particular MSAP has been inserted into tables
+            contained in lldpRemoteSystemsData and lldpExtensions objects.
+
+            The complete set of information received from a particular
+            MSAP should be inserted into related tables.  If partial
+            information cannot be inserted for a reason such as lack
+            of resources, all of the complete set of information should
+            be removed.
+
+            This counter should be incremented only once after the
+            complete set of information is successfully recorded
+            in all related tables.  Any failures during inserting
+            information set which result in deletion of previously
+            inserted information should not trigger any changes in
+            lldpStatsRemTablesInserts since the insert is not completed
+            yet or or in lldpStatsRemTablesDeletes, since the deletion
+            would only be a partial deletion. If the failure was the
+            result of lack of resources, the lldpStatsRemTablesDrops
+            counter should be incremented once."
+    ::= { lldpStatistics 2 }
+
+lldpStatsRemTablesDeletes   OBJECT-TYPE
+    SYNTAX      ZeroBasedCounter32
+    UNITS       "table entries"
+    MAX-ACCESS  read-only
+    STATUS      current
+
+    DESCRIPTION
+            "The number of times the complete set of information
+            advertised by a particular MSAP has been deleted from
+            tables contained in lldpRemoteSystemsData and lldpExtensions
+            objects.
+
+            This counter should be incremented only once when the
+            complete set of information is completely deleted from all
+            related tables.  Partial deletions, such as deletion of
+            rows associated with a particular MSAP from some tables,
+            but not from all tables are not allowed, thus should not
+            change the value of this counter."
+    ::= { lldpStatistics 3 }
+
+lldpStatsRemTablesDrops  OBJECT-TYPE
+    SYNTAX      ZeroBasedCounter32
+    UNITS       "table entries"
+    MAX-ACCESS  read-only
+
+    STATUS      current
+    DESCRIPTION
+            "The number of times the complete set of information
+            advertised by a particular MSAP could not be entered into
+            tables contained in lldpRemoteSystemsData and lldpExtensions
+            objects because of insufficient resources."
+    ::= { lldpStatistics 4 }
+
+lldpStatsRemTablesAgeouts   OBJECT-TYPE
+    SYNTAX      ZeroBasedCounter32
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The number of times the complete set of information
+            advertised by a particular MSAP has been deleted from tables
+            contained in lldpRemoteSystemsData and lldpExtensions objects
+            because the information timeliness interval has expired.
+
+            This counter should be incremented only once when the complete
+            set of information is completely invalidated (aged out)
+            from all related tables.  Partial aging, similar to deletion
+            case, is not allowed, and thus, should not change the value
+            of this counter."
+    ::= { lldpStatistics 5 }
+
+--
+-- TX statistics
+--
+
+lldpStatsTxPortTable  OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpStatsTxPortEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION 
+            "A table containing LLDP transmission statistics for
+            individual ports.  Entries are not required to exist in
+            this table while the lldpPortConfigEntry object is equal to
+            'disabled(4)'."
+    ::= { lldpStatistics 6 } 
+
+lldpStatsTxPortEntry   OBJECT-TYPE
+     SYNTAX      LldpStatsTxPortEntry
+     MAX-ACCESS  not-accessible
+     STATUS      current
+     DESCRIPTION
+             "LLDP frame transmission statistics for a particular port.  
+             The port must be contained in the same chassis as the
+             LLDP agent.
+            
+             All counter values in a particular entry shall be
+             maintained on a continuing basis and shall not be deleted
+             upon expiration of rxInfoTTL timing counters in the LLDP
+             remote systems MIB of the receipt of a shutdown frame from
+             a remote LLDP agent.
+
+             All statistical counters associated with a particular
+             port on the local LLDP agent become frozen whenever the
+             adminStatus is disabled for the same port."
+     INDEX  { lldpStatsTxPortNum }
+     ::= { lldpStatsTxPortTable 1 } 
+
+LldpStatsTxPortEntry ::= SEQUENCE {      
+      lldpStatsTxPortNum                 LldpPortNumber,
+      lldpStatsTxPortFramesTotal         Counter32
+}
+
+lldpStatsTxPortNum   OBJECT-TYPE
+    SYNTAX      LldpPortNumber 
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The index value used to identify the port component
+            (contained in the local chassis with the LLDP agent)
+            associated with this entry.
+
+            The value of this object is used as a port index to the
+            lldpStatsTable."
+    ::= { lldpStatsTxPortEntry 1 } 
+
+lldpStatsTxPortFramesTotal  OBJECT-TYPE
+    SYNTAX        Counter32
+    MAX-ACCESS    read-only
+    STATUS        current
+    DESCRIPTION
+            "The number of LLDP frames transmitted by this LLDP agent
+            on the indicated port."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.2.1"
+    ::= { lldpStatsTxPortEntry 2 }
+
+--
+-- RX statistics
+--
+
+lldpStatsRxPortTable  OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpRxStatsPortEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION 
+            "A table containing LLDP reception statistics for individual
+            ports.  Entries are not required to exist in this table while
+            the lldpPortConfigEntry object is equal to 'disabled(4)'."
+    ::= { lldpStatistics 7 } 
+
+lldpStatsRxPortEntry   OBJECT-TYPE
+     SYNTAX      LldpRxStatsPortEntry
+     MAX-ACCESS  not-accessible
+     STATUS      current
+     DESCRIPTION
+             "LLDP frame reception statistics for a particular port.
+             The port must be contained in the same chassis as the
+             LLDP agent.
+            
+             All counter values in a particular entry shall be
+             maintained on a continuing basis and shall not be deleted
+             upon expiration of rxInfoTTL timing counters in the LLDP
+             remote systems MIB of the receipt of a shutdown frame from
+             a remote LLDP agent.
+
+             All statistical counters associated with a particular
+             port on the local LLDP agent become frozen whenever the
+             adminStatus is disabled for the same port."
+     INDEX  { lldpStatsRxPortNum }
+     ::= { lldpStatsRxPortTable 1 } 
+
+LldpRxStatsPortEntry ::= SEQUENCE {      
+      lldpStatsRxPortNum                   LldpPortNumber,
+      lldpStatsRxPortFramesDiscardedTotal  Counter32,
+      lldpStatsRxPortFramesErrors          Counter32,
+      lldpStatsRxPortFramesTotal           Counter32,
+      lldpStatsRxPortTLVsDiscardedTotal    Counter32,
+      lldpStatsRxPortTLVsUnrecognizedTotal Counter32,
+      lldpStatsRxPortAgeoutsTotal          ZeroBasedCounter32
+}
+
+lldpStatsRxPortNum   OBJECT-TYPE
+    SYNTAX      LldpPortNumber 
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The index value used to identify the port component
+            (contained in the local chassis with the LLDP agent)
+            associated with this entry.
+
+            The value of this object is used as a port index to the
+            lldpStatsTable."
+    ::= { lldpStatsRxPortEntry 1 } 
+
+lldpStatsRxPortFramesDiscardedTotal OBJECT-TYPE 
+    SYNTAX        Counter32
+    MAX-ACCESS read-only
+    STATUS     current 
+    DESCRIPTION 
+            "The number of LLDP frames received by this LLDP agent on
+            the indicated port, and then discarded for any reason.
+            This counter can provide an indication that LLDP header
+            formating problems may exist with the local LLDP agent in
+            the sending system or that LLDPDU validation problems may
+            exist with the local LLDP agent in the receiving system."
+   REFERENCE 
+            "IEEE 802.1AB-2005 10.5.2.2"
+   ::= { lldpStatsRxPortEntry 2 } 
+
+lldpStatsRxPortFramesErrors  OBJECT-TYPE
+    SYNTAX        Counter32
+    MAX-ACCESS    read-only
+    STATUS        current
+    DESCRIPTION
+            "The number of invalid LLDP frames received by this LLDP
+            agent on the indicated port, while this LLDP agent is enabled."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.2.2"
+    ::= { lldpStatsRxPortEntry 3 }
+
+lldpStatsRxPortFramesTotal OBJECT-TYPE
+    SYNTAX        Counter32
+    MAX-ACCESS    read-only
+    STATUS        current
+    DESCRIPTION
+            "The number of valid LLDP frames received by this LLDP agent
+            on the indicated port, while this LLDP agent is enabled."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.2.2"
+    ::= { lldpStatsRxPortEntry 4 }
+
+lldpStatsRxPortTLVsDiscardedTotal OBJECT-TYPE
+    SYNTAX        Counter32
+    MAX-ACCESS    read-only
+    STATUS        current
+    DESCRIPTION
+            "The number of LLDP TLVs discarded for any reason by this LLDP
+            agent on the indicated port."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.2.2"
+    ::= { lldpStatsRxPortEntry 5 }
+
+lldpStatsRxPortTLVsUnrecognizedTotal  OBJECT-TYPE
+    SYNTAX        Counter32
+    MAX-ACCESS    read-only
+    STATUS        current
+    DESCRIPTION
+            "The number of LLDP TLVs received on the given port that
+            are not recognized by this LLDP agent on the indicated port.
+            
+            An unrecognized TLV is referred to as the TLV whose type value
+            is in the range of reserved TLV types (000 1001 - 111 1110)
+            in Table 9.1 of IEEE Std 802.1AB-2005.  An unrecognized
+            TLV may be a basic management TLV from a later LLDP version."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.2.2"
+    ::= { lldpStatsRxPortEntry 6 }
+
+lldpStatsRxPortAgeoutsTotal   OBJECT-TYPE
+    SYNTAX      ZeroBasedCounter32
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The counter that represents the number of age-outs that
+            occurred on a given port.  An age-out is the number of
+            times the complete set of information advertised by a
+            particular MSAP has been deleted from tables contained in
+            lldpRemoteSystemsData and lldpExtensions objects because
+            the information timeliness interval has expired.
+
+            This counter is similar to lldpStatsRemTablesAgeouts, except
+            that the counter is on a per port basis.  This enables NMS to
+            poll tables associated with the lldpRemoteSystemsData objects
+            and all LLDP extension objects associated with remote systems
+            on the indicated port only.
+
+            This counter should be set to zero during agent initialization
+            and its value should not be saved in non-volatile storage.
+            When a port's admin status changes from 'disabled' to
+            'rxOnly', 'txOnly' or 'txAndRx', the counter associated with
+            the same port should reset to 0.  The agent should also flush
+            all remote system information associated with the same port.
+
+            This counter should be incremented only once when the
+            complete set of information is invalidated (aged out) from
+            all related tables on a particular port.  Partial aging
+            is not allowed, and thus, should not change the value of
+            this counter."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.5.2.2"
+    ::= { lldpStatsRxPortEntry 7 }
+
+--  ***********************************************************
+--
+--          L O C A L    S Y S T E M    D A T A
+--
+--  ***********************************************************
+
+lldpLocChassisIdSubtype  OBJECT-TYPE
+    SYNTAX      LldpChassisIdSubtype
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The type of encoding used to identify the chassis
+            associated with the local system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.2.2"
+    ::= { lldpLocalSystemData 1 }
+
+lldpLocChassisId  OBJECT-TYPE
+    SYNTAX      LldpChassisId
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the chassis component
+            associated with the local system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.2.3"
+    ::= { lldpLocalSystemData 2 }
+
+lldpLocSysName  OBJECT-TYPE
+    SYNTAX      SnmpAdminString (SIZE(0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the system name of the
+            local system.  If the local agent supports IETF RFC 3418,
+            lldpLocSysName object should have the same value of sysName
+            object."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.6.2"
+    ::= { lldpLocalSystemData 3 }
+
+lldpLocSysDesc  OBJECT-TYPE
+    SYNTAX      SnmpAdminString (SIZE(0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the system description
+            of the local system.  If the local agent supports IETF RFC 3418,
+            lldpLocSysDesc object should have the same value of sysDesc
+            object."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.7.2"
+    ::= { lldpLocalSystemData 4 }
+
+lldpLocSysCapSupported OBJECT-TYPE
+    SYNTAX      LldpSystemCapabilitiesMap
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The bitmap value used to identify which system capabilities
+            are supported on the local system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.8.1"
+    ::= { lldpLocalSystemData 5 }
+
+lldpLocSysCapEnabled  OBJECT-TYPE
+    SYNTAX      LldpSystemCapabilitiesMap
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The bitmap value used to identify which system capabilities
+            are enabled on the local system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.8.2"
+    ::= { lldpLocalSystemData 6 }
+
+
+--
+-- lldpLocPortTable : Port specific Local system data
+--
+
+lldpLocPortTable OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpLocPortEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This table contains one or more rows per port information
+            associated with the local system known to this agent."
+    ::= { lldpLocalSystemData 7 }
+
+lldpLocPortEntry OBJECT-TYPE
+    SYNTAX      LldpLocPortEntry 
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "Information about a particular port component.
+
+            Entries may be created and deleted in this table by the
+            agent."
+    INDEX   { lldpLocPortNum }
+    ::= { lldpLocPortTable 1 }
+
+LldpLocPortEntry ::= SEQUENCE {
+      lldpLocPortNum                LldpPortNumber,
+      lldpLocPortIdSubtype          LldpPortIdSubtype,
+      lldpLocPortId                 LldpPortId,
+      lldpLocPortDesc               SnmpAdminString
+}
+
+lldpLocPortNum  OBJECT-TYPE
+    SYNTAX      LldpPortNumber
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The index value used to identify the port component
+            (contained in the local chassis with the LLDP agent)
+            associated with this entry.
+            
+            The value of this object is used as a port index to the
+            lldpLocPortTable."
+    ::= { lldpLocPortEntry 1 }
+
+lldpLocPortIdSubtype  OBJECT-TYPE
+    SYNTAX      LldpPortIdSubtype
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The type of port identifier encoding used in the associated
+            'lldpLocPortId' object."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.3.2"
+    ::= { lldpLocPortEntry 2 }
+
+lldpLocPortId  OBJECT-TYPE
+    SYNTAX      LldpPortId
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the port component
+            associated with a given port in the local system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.3.3"
+    ::= { lldpLocPortEntry 3 }
+
+lldpLocPortDesc  OBJECT-TYPE
+    SYNTAX      SnmpAdminString (SIZE(0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the 802 LAN station's port
+            description associated with the local system.  If the local
+            agent supports IETF RFC 2863, lldpLocPortDesc object should
+            have the same value of ifDescr object."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.5.2"
+    ::= { lldpLocPortEntry 4 }
+
+--
+-- lldpLocManAddrTable : Management addresses of the local system
+--
+
+lldpLocManAddrTable OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpLocManAddrEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This table contains management address information on the
+            local system known to this agent."
+    ::= { lldpLocalSystemData 8 }
+
+lldpLocManAddrEntry OBJECT-TYPE
+    SYNTAX      LldpLocManAddrEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "Management address information about a particular chassis
+            component.  There may be multiple management addresses
+            configured on the system identified by a particular
+            lldpLocChassisId.  Each management address should have
+            distinct 'management address type' (lldpLocManAddrSubtype) and
+            'management address' (lldpLocManAddr.)
+
+            Entries may be created and deleted in this table by the
+            agent."
+    INDEX   { lldpLocManAddrSubtype,
+              lldpLocManAddr }
+    ::= { lldpLocManAddrTable 1 }
+
+LldpLocManAddrEntry ::= SEQUENCE {
+      lldpLocManAddrSubtype    AddressFamilyNumbers,
+      lldpLocManAddr           LldpManAddress,
+      lldpLocManAddrLen        Integer32,
+      lldpLocManAddrIfSubtype  LldpManAddrIfSubtype,
+      lldpLocManAddrIfId       Integer32,
+      lldpLocManAddrOID        OBJECT IDENTIFIER
+}
+
+lldpLocManAddrSubtype  OBJECT-TYPE
+    SYNTAX      AddressFamilyNumbers
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The type of management address identifier encoding used in
+            the associated 'lldpLocManagmentAddr' object."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.3"
+    ::= { lldpLocManAddrEntry 1 }
+
+lldpLocManAddr  OBJECT-TYPE
+    SYNTAX      LldpManAddress
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the management address
+            component associated with the local system.  The purpose of
+            this address is to contact the management entity."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.4"
+    ::= { lldpLocManAddrEntry 2 }
+
+lldpLocManAddrLen  OBJECT-TYPE
+    SYNTAX      Integer32
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The total length of the management address subtype and the
+            management address fields in LLDPDUs transmitted by the
+            local LLDP agent.
+
+            The management address length field is needed so that the
+            receiving systems that do not implement SNMP will not be
+            required to implement an iana family numbers/address length
+            equivalency table in order to decode the management adress."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.2"
+    ::= { lldpLocManAddrEntry 3 }
+
+
+lldpLocManAddrIfSubtype  OBJECT-TYPE
+    SYNTAX      LldpManAddrIfSubtype
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The enumeration value that identifies the interface numbering
+            method used for defining the interface number, associated
+            with the local system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.5"
+    ::= { lldpLocManAddrEntry 4 }
+
+lldpLocManAddrIfId  OBJECT-TYPE
+    SYNTAX      Integer32
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The integer value used to identify the interface number
+            regarding the management address component associated with
+            the local system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.6"
+    ::= { lldpLocManAddrEntry 5 }
+
+lldpLocManAddrOID  OBJECT-TYPE
+    SYNTAX      OBJECT IDENTIFIER
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The OID value used to identify the type of hardware component
+            or protocol entity associated with the management address
+            advertised by the local system agent."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.8"
+    ::= { lldpLocManAddrEntry 6 }
+
+
+--  ***********************************************************
+--
+--          R E M O T E    S Y S T E M S    D A T A
+--
+--  ***********************************************************
+
+lldpRemTable OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpRemEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This table contains one or more rows per physical network
+            connection known to this agent.  The agent may wish to ensure
+            that only one lldpRemEntry is present for each local port,
+            or it may choose to maintain multiple lldpRemEntries for
+            the same local port.
+
+            The following procedure may be used to retrieve remote
+            systems information updates from an LLDP agent:
+
+               1. NMS polls all tables associated with remote systems
+                  and keeps a local copy of the information retrieved.
+                  NMS polls periodically the values of the following
+                  objects:
+                     a. lldpStatsRemTablesInserts
+                     b. lldpStatsRemTablesDeletes
+                     c. lldpStatsRemTablesDrops
+                     d. lldpStatsRemTablesAgeouts
+                     e. lldpStatsRxPortAgeoutsTotal for all ports.
+
+               2. LLDP agent updates remote systems MIB objects, and
+                  sends out notifications to a list of notification
+                  destinations.
+
+               3. NMS receives the notifications and compares the new
+                  values of objects listed in step 1.  
+
+                  Periodically, NMS should poll the object
+                  lldpStatsRemTablesLastChangeTime to find out if anything
+                  has changed since the last poll.  if something has
+                  changed, NMS will poll the objects listed in step 1 to
+                  figure out what kind of changes occurred in the tables.
+
+                  if value of lldpStatsRemTablesInserts has changed,
+                  then NMS will walk all tables by employing TimeFilter
+                  with the last-polled time value.  This request will
+                  return new objects or objects whose values are updated
+                  since the last poll.
+
+                  if value of lldpStatsRemTablesAgeouts has changed,
+                  then NMS will walk the lldpStatsRxPortAgeoutsTotal and
+                  compare the new values with previously recorded ones.
+                  For ports whose lldpStatsRxPortAgeoutsTotal value is
+                  greater than the recorded value, NMS will have to
+                  retrieve objects associated with those ports from
+                  table(s) without employing a TimeFilter (which is
+                  performed by specifying 0 for the TimeFilter.)
+
+                  lldpStatsRemTablesDeletes and lldpStatsRemTablesDrops
+                  objects are provided for informational purposes."
+    ::= { lldpRemoteSystemsData 1 }
+
+lldpRemEntry OBJECT-TYPE
+    SYNTAX      LldpRemEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "Information about a particular physical network connection.
+            Entries may be created and deleted in this table by the agent,
+            if a physical topology discovery process is active."
+    INDEX   {
+           lldpRemTimeMark,
+           lldpRemLocalPortNum,
+           lldpRemIndex
+    }
+    ::= { lldpRemTable 1 }
+
+LldpRemEntry ::= SEQUENCE {
+      lldpRemTimeMark           TimeFilter,
+      lldpRemLocalPortNum       LldpPortNumber,
+      lldpRemIndex              Integer32,
+      lldpRemChassisIdSubtype   LldpChassisIdSubtype,
+      lldpRemChassisId          LldpChassisId,
+      lldpRemPortIdSubtype      LldpPortIdSubtype,
+      lldpRemPortId             LldpPortId,
+      lldpRemPortDesc           SnmpAdminString,
+      lldpRemSysName            SnmpAdminString,
+      lldpRemSysDesc            SnmpAdminString,
+      lldpRemSysCapSupported    LldpSystemCapabilitiesMap,
+      lldpRemSysCapEnabled      LldpSystemCapabilitiesMap
+}
+
+lldpRemTimeMark  OBJECT-TYPE
+    SYNTAX      TimeFilter
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "A TimeFilter for this entry.  See the TimeFilter textual
+            convention in IETF RFC 2021 and 
+            http://www.ietf.org/IESG/Implementations/RFC2021-Implementation.txt
+            to see how TimeFilter works."
+    REFERENCE 
+            "IETF RFC 2021 section 6"
+    ::= { lldpRemEntry 1 }
+
+lldpRemLocalPortNum  OBJECT-TYPE
+    SYNTAX      LldpPortNumber
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The index value used to identify the port component
+            (contained in the local chassis with the LLDP agent)
+            associated with this entry.  The lldpRemLocalPortNum
+            identifies the port on which the remote system information
+            is received.
+
+            The value of this object is used as a port index to the
+            lldpRemTable."
+    ::= { lldpRemEntry 2 }
+
+lldpRemIndex  OBJECT-TYPE
+    SYNTAX      Integer32(1..2147483647)
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This object represents an arbitrary local integer value used
+            by this agent to identify a particular connection instance,
+            unique only for the indicated remote system.
+
+            An agent is encouraged to assign monotonically increasing
+            index values to new entries, starting with one, after each
+            reboot.  It is considered unlikely that the lldpRemIndex
+            will wrap between reboots."
+    ::= { lldpRemEntry 3 }
+
+lldpRemChassisIdSubtype  OBJECT-TYPE
+    SYNTAX      LldpChassisIdSubtype
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The type of encoding used to identify the chassis associated
+            with the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.2.2"
+    ::= { lldpRemEntry 4 }
+
+lldpRemChassisId  OBJECT-TYPE
+    SYNTAX      LldpChassisId
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the chassis component
+            associated with the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.2.3"
+    ::= { lldpRemEntry 5 }
+
+lldpRemPortIdSubtype  OBJECT-TYPE
+    SYNTAX      LldpPortIdSubtype
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The type of port identifier encoding used in the associated
+            'lldpRemPortId' object."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.3.2"
+    ::= { lldpRemEntry 6 }
+
+lldpRemPortId  OBJECT-TYPE
+    SYNTAX      LldpPortId
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the port component
+            associated with the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.3.3"
+    ::= { lldpRemEntry 7 }
+
+lldpRemPortDesc  OBJECT-TYPE
+    SYNTAX      SnmpAdminString (SIZE(0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the description of
+            the given port associated with the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.5.2"
+    ::= { lldpRemEntry 8 }
+
+lldpRemSysName  OBJECT-TYPE
+    SYNTAX      SnmpAdminString (SIZE(0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the system name of the
+            remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.6.2"
+    ::= { lldpRemEntry 9 }
+
+lldpRemSysDesc  OBJECT-TYPE
+    SYNTAX      SnmpAdminString (SIZE(0..255))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the system description
+            of the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.7.2"
+    ::= { lldpRemEntry 10 }
+
+lldpRemSysCapSupported OBJECT-TYPE
+    SYNTAX      LldpSystemCapabilitiesMap
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The bitmap value used to identify which system capabilities
+            are supported on the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.8.1"
+    ::= { lldpRemEntry 11 }
+
+lldpRemSysCapEnabled  OBJECT-TYPE
+    SYNTAX      LldpSystemCapabilitiesMap
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The bitmap value used to identify which system capabilities
+            are enabled on the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.8.2"
+    ::= { lldpRemEntry 12 }
+
+--
+-- lldpRemManAddrTable : Management addresses of the remote system
+--
+
+lldpRemManAddrTable OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpRemManAddrEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This table contains one or more rows per management address
+            information on the remote system learned on a particular port
+            contained in the local chassis known to this agent."
+    ::= { lldpRemoteSystemsData 2 }
+
+lldpRemManAddrEntry OBJECT-TYPE
+    SYNTAX      LldpRemManAddrEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "Management address information about a particular chassis
+            component.  There may be multiple management addresses
+            configured on the remote system identified by a particular
+            lldpRemIndex whose information is received on
+            lldpRemLocalPortNum of the local system.  Each management
+            address should have distinct 'management address
+            type' (lldpRemManAddrSubtype) and 'management address'
+            (lldpRemManAddr.)
+
+            Entries may be created and deleted in this table by the
+            agent."
+    INDEX   { lldpRemTimeMark,
+              lldpRemLocalPortNum,
+              lldpRemIndex,
+              lldpRemManAddrSubtype,
+              lldpRemManAddr
+ }
+    ::= { lldpRemManAddrTable 1 }
+
+LldpRemManAddrEntry ::= SEQUENCE {
+      lldpRemManAddrSubtype     AddressFamilyNumbers,
+      lldpRemManAddr            LldpManAddress,
+      lldpRemManAddrIfSubtype   LldpManAddrIfSubtype,
+      lldpRemManAddrIfId        Integer32,
+      lldpRemManAddrOID         OBJECT IDENTIFIER
+}
+
+lldpRemManAddrSubtype  OBJECT-TYPE
+    SYNTAX      AddressFamilyNumbers
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The type of management address identifier encoding used in
+            the associated 'lldpRemManagmentAddr' object."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.3"
+    ::= { lldpRemManAddrEntry 1 }
+
+lldpRemManAddr  OBJECT-TYPE
+    SYNTAX      LldpManAddress
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the management address
+            component associated with the remote system.  The purpose
+            of this address is to contact the management entity."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.4"
+    ::= { lldpRemManAddrEntry 2 }
+
+lldpRemManAddrIfSubtype  OBJECT-TYPE
+    SYNTAX      LldpManAddrIfSubtype
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The enumeration value that identifies the interface numbering
+            method used for defining the interface number, associated
+            with the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.5"
+    ::= { lldpRemManAddrEntry 3 }
+
+lldpRemManAddrIfId  OBJECT-TYPE
+    SYNTAX      Integer32
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The integer value used to identify the interface number
+            regarding the management address component associated with
+            the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.6"
+    ::= { lldpRemManAddrEntry 4 }
+
+lldpRemManAddrOID  OBJECT-TYPE
+    SYNTAX      OBJECT IDENTIFIER
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The OID value used to identify the type of hardware component
+            or protocol entity associated with the management address
+            advertised by the remote system agent."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.9.8"
+    ::= { lldpRemManAddrEntry 5 }
+
+--
+-- lldpRemUnknownTLVTable : Unrecognized TLV information 
+--
+lldpRemUnknownTLVTable  OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpRemUnknownTLVEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This table contains information about an incoming TLV which
+            is not recognized by the receiving LLDP agent.  The TLV may
+            be from a later version of the basic management set.
+
+            This table should only contain TLVs that are found in
+            a single LLDP frame.  Entries in this table, associated
+            with an MAC service access point (MSAP, the access point
+            for MAC services provided to the LCC sublayer, defined
+            in IEEE 100, which is also identified with a particular
+            lldpRemLocalPortNum, lldpRemIndex pair) are overwritten with
+            most recently received unrecognized TLV from the same MSAP,
+            or they will naturally age out when the rxInfoTTL timer
+            (associated with the MSAP) expires."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.3.2"
+    ::= { lldpRemoteSystemsData 3 }
+
+lldpRemUnknownTLVEntry OBJECT-TYPE
+    SYNTAX      LldpRemUnknownTLVEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "Information about an unrecognized TLV received from a
+            physical network connection.  Entries may be created and
+            deleted in this table by the agent, if a physical topology
+            discovery process is active."
+    INDEX   {
+           lldpRemTimeMark,
+           lldpRemLocalPortNum,
+           lldpRemIndex,
+           lldpRemUnknownTLVType 
+    }
+    ::= { lldpRemUnknownTLVTable 1 }
+
+LldpRemUnknownTLVEntry ::= SEQUENCE {
+      lldpRemUnknownTLVType     Integer32,
+      lldpRemUnknownTLVInfo     OCTET STRING
+}
+
+lldpRemUnknownTLVType OBJECT-TYPE
+    SYNTAX      Integer32(9..126)
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This object represents the value extracted from the type
+            field of the TLV."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.3.5"
+    ::= { lldpRemUnknownTLVEntry 1 }
+
+lldpRemUnknownTLVInfo OBJECT-TYPE
+    SYNTAX      OCTET STRING (SIZE(0..511))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "This object represents the value extracted from the value
+            field of the TLV."
+    REFERENCE 
+            "IEEE 802.1AB-2005 10.3.5"
+    ::= { lldpRemUnknownTLVEntry 2 }
+
+------------------------------------------------------------------------------
+-- Remote Systems Extension Table - Organizationally-Defined Information 
+------------------------------------------------------------------------------
+lldpRemOrgDefInfoTable OBJECT-TYPE
+    SYNTAX      SEQUENCE OF LldpRemOrgDefInfoEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This table contains one or more rows per physical network
+            connection which advertises the organizationally defined
+            information.
+
+            Note that this table contains one or more rows of
+            organizationally defined information that is not recognized
+            by the local agent.
+
+            If the local system is capable of recognizing any
+            organizationally defined information, appropriate extension
+            MIBs from the organization should be used for information
+            retrieval."
+    ::= { lldpRemoteSystemsData 4 }
+
+lldpRemOrgDefInfoEntry OBJECT-TYPE
+    SYNTAX      LldpRemOrgDefInfoEntry
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "Information about the unrecognized organizationally
+            defined information advertised by the remote system.
+            The lldpRemTimeMark, lldpRemLocalPortNum, lldpRemIndex,
+            lldpRemOrgDefInfoOUI, lldpRemOrgDefInfoSubtype, and
+            lldpRemOrgDefInfoIndex are indexes to this table.  If there is
+            an lldpRemOrgDefInfoEntry associated with a particular remote
+            system identified by the lldpRemLocalPortNum and lldpRemIndex,
+            there must be an lldpRemEntry associated with the same
+            instance (i.e, using same indexes.)  When the lldpRemEntry
+            for the same index is removed from the lldpRemTable, the
+            associated lldpRemOrgDefInfoEntry should be removed from
+            the lldpRemOrgDefInfoTable.
+
+            Entries may be created and deleted in this table by the
+            agent."
+    INDEX   { lldpRemTimeMark,
+              lldpRemLocalPortNum,
+              lldpRemIndex,
+              lldpRemOrgDefInfoOUI,
+              lldpRemOrgDefInfoSubtype,
+              lldpRemOrgDefInfoIndex }
+    ::= { lldpRemOrgDefInfoTable 1 }
+
+LldpRemOrgDefInfoEntry ::= SEQUENCE {
+      lldpRemOrgDefInfoOUI         OCTET STRING,
+      lldpRemOrgDefInfoSubtype     Integer32,
+      lldpRemOrgDefInfoIndex       Integer32,
+      lldpRemOrgDefInfo            OCTET STRING
+}
+
+lldpRemOrgDefInfoOUI  OBJECT-TYPE
+    SYNTAX      OCTET STRING (SIZE(3))  
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The Organizationally Unique Identifier (OUI), as defined
+            in IEEE std 802-2001, is a 24 bit (three octets) globally
+            unique assigned number referenced by various standards,
+            of the information received from the remote system."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.1.3"
+    ::= { lldpRemOrgDefInfoEntry 1 }
+
+lldpRemOrgDefInfoSubtype  OBJECT-TYPE
+    SYNTAX      Integer32(1..255)
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "The integer value used to identify the subtype of the
+            organizationally defined information received from the
+            remote system.
+
+            The subtype value is required to identify different instances
+            of organizationally defined information that could not be
+            retrieved without a unique identifier that indicates the
+            particular type of information contained in the information
+            string."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.1.4"
+    ::= { lldpRemOrgDefInfoEntry 2 }
+
+lldpRemOrgDefInfoIndex  OBJECT-TYPE
+    SYNTAX      Integer32(1..2147483647)
+    MAX-ACCESS  not-accessible
+    STATUS      current
+    DESCRIPTION
+            "This object represents an arbitrary local integer value
+            used by this agent to identify a particular unrecognized
+            organizationally defined information instance, unique only
+            for the lldpRemOrgDefInfoOUI and lldpRemOrgDefInfoSubtype
+            from the same remote system.
+
+            An agent is encouraged to assign monotonically increasing
+            index values to new entries, starting with one, after each
+            reboot.  It is considered unlikely that the
+            lldpRemOrgDefInfoIndex will wrap between reboots."
+    ::= { lldpRemOrgDefInfoEntry 3 }
+
+lldpRemOrgDefInfo  OBJECT-TYPE
+    SYNTAX      OCTET STRING(SIZE(0..507))
+    MAX-ACCESS  read-only
+    STATUS      current
+    DESCRIPTION
+            "The string value used to identify the organizationally
+            defined information of the remote system.  The encoding for
+            this object should be as defined for SnmpAdminString TC."
+    REFERENCE 
+            "IEEE 802.1AB-2005 9.5.1.5"
+    ::= { lldpRemOrgDefInfoEntry 4 }
+
+
+--
+-- ***********************************************************
+-- 
+--        L L D P   M I B   N O T I F I C A T I O N S
+-- 
+-- *********************************************************** 
+--
+
+lldpNotificationPrefix OBJECT IDENTIFIER ::= { lldpNotifications 0 }
+
+lldpRemTablesChange NOTIFICATION-TYPE
+    OBJECTS {
+        lldpStatsRemTablesInserts,
+        lldpStatsRemTablesDeletes,
+        lldpStatsRemTablesDrops,
+        lldpStatsRemTablesAgeouts
+    }
+    STATUS        current
+    DESCRIPTION
+            "A lldpRemTablesChange notification is sent when the value
+            of lldpStatsRemTableLastChangeTime changes.  It can be
+            utilized by an NMS to trigger LLDP remote systems table
+            maintenance polls.
+
+            Note that transmission of lldpRemTablesChange
+            notifications are throttled by the agent, as specified by the
+            'lldpNotificationInterval' object."
+   ::= { lldpNotificationPrefix 1 }
+
+
+--
+-- ***********************************************************
+-- 
+--           L L D P   M I B   C O N F O R M A N C E 
+-- 
+-- *********************************************************** 
+--
+
+lldpCompliances OBJECT IDENTIFIER ::= { lldpConformance 1 }
+lldpGroups      OBJECT IDENTIFIER ::= { lldpConformance 2 }
+
+-- compliance statements
+
+lldpCompliance MODULE-COMPLIANCE
+    STATUS  current
+    DESCRIPTION
+            "The compliance statement for SNMP entities which implement
+            the LLDP MIB."
+    MODULE  -- this module
+        MANDATORY-GROUPS { lldpConfigGroup, 
+                           lldpConfigRxGroup, 
+                           lldpConfigTxGroup, 
+                           lldpStatsRxGroup, 
+                           lldpStatsTxGroup, 
+                           lldpLocSysGroup,
+                           lldpRemSysGroup,
+                           lldpNotificationsGroup
+        }
+    ::= { lldpCompliances 1 }
+
+-- MIB groupings
+
+lldpConfigGroup    OBJECT-GROUP
+    OBJECTS {
+        lldpPortConfigAdminStatus
+    }
+    STATUS  current
+    DESCRIPTION
+            "The collection of objects which are used to configure the
+            LLDP implementation behavior.
+
+            This group is mandatory for agents which implement the LLDP."
+    ::= { lldpGroups 1 }
+
+lldpConfigRxGroup    OBJECT-GROUP
+    OBJECTS {
+        lldpNotificationInterval,
+        lldpPortConfigNotificationEnable
+    }
+    STATUS  current
+    DESCRIPTION
+            "The collection of objects which are used to configure the
+            LLDP implementation behavior.
+
+            This group is mandatory for agents which implement the LLDP
+            and have the capability of receiving LLDP frames."
+    ::= { lldpGroups 2 }
+
+lldpConfigTxGroup    OBJECT-GROUP
+    OBJECTS {
+        lldpMessageTxInterval,
+        lldpMessageTxHoldMultiplier,
+        lldpReinitDelay,
+        lldpTxDelay,
+        lldpPortConfigTLVsTxEnable,
+        lldpConfigManAddrPortsTxEnable
+    }
+    STATUS  current
+    DESCRIPTION
+            "The collection of objects which are used to configure the
+            LLDP implementation behavior.
+
+            This group is mandatory for agents which implement the LLDP
+            and have the capability of transmitting LLDP frames."
+    ::= { lldpGroups 3 }
+
+lldpStatsRxGroup    OBJECT-GROUP
+    OBJECTS {
+        lldpStatsRemTablesLastChangeTime,
+        lldpStatsRemTablesInserts,
+        lldpStatsRemTablesDeletes,
+        lldpStatsRemTablesDrops,
+        lldpStatsRemTablesAgeouts,
+        lldpStatsRxPortFramesDiscardedTotal,
+        lldpStatsRxPortFramesErrors,
+        lldpStatsRxPortFramesTotal,
+        lldpStatsRxPortTLVsDiscardedTotal,
+        lldpStatsRxPortTLVsUnrecognizedTotal,
+        lldpStatsRxPortAgeoutsTotal
+    }
+    STATUS  current
+    DESCRIPTION
+            "The collection of objects which are used to represent LLDP
+            reception statistics.
+
+            This group is mandatory for agents which implement the LLDP
+            and have the capability of receiving LLDP frames."
+    ::= { lldpGroups 4 }
+
+lldpStatsTxGroup    OBJECT-GROUP
+    OBJECTS {
+        lldpStatsTxPortFramesTotal
+    }
+    STATUS  current
+    DESCRIPTION
+            "The collection of objects which are used to represent LLDP
+            transmission statistics.
+
+            This group is mandatory for agents which implement the LLDP
+            and have the capability of transmitting LLDP frames."
+    ::= { lldpGroups 5 }
+
+lldpLocSysGroup  OBJECT-GROUP
+    OBJECTS {
+        lldpLocChassisIdSubtype,
+        lldpLocChassisId,
+        lldpLocPortIdSubtype,
+        lldpLocPortId,
+        lldpLocPortDesc,
+        lldpLocSysDesc,
+        lldpLocSysName,
+        lldpLocSysCapSupported,
+        lldpLocSysCapEnabled,
+        lldpLocManAddrLen,
+        lldpLocManAddrIfSubtype,
+        lldpLocManAddrIfId,
+        lldpLocManAddrOID
+    }
+    STATUS  current
+    DESCRIPTION
+            "The collection of objects which are used to represent LLDP
+            Local System Information.  
+            
+            This group is mandatory for agents which implement the LLDP
+            and have the capability of transmitting LLDP frames."
+    ::= { lldpGroups 6 }
+
+lldpRemSysGroup  OBJECT-GROUP
+    OBJECTS {
+        lldpRemChassisIdSubtype,
+        lldpRemChassisId,
+        lldpRemPortIdSubtype,
+        lldpRemPortId,
+        lldpRemPortDesc,
+        lldpRemSysName,
+        lldpRemSysDesc,
+        lldpRemSysCapSupported,
+        lldpRemSysCapEnabled,
+        lldpRemManAddrIfSubtype,
+        lldpRemManAddrIfId,
+        lldpRemManAddrOID,
+        lldpRemUnknownTLVInfo,
+        lldpRemOrgDefInfo 
+    }
+    STATUS  current
+    DESCRIPTION
+            "The collection of objects which are used to represent
+            LLDP Remote Systems Information.  The objects represent the
+            information associated with the basic TLV set.  Please note
+            that even the agent doesn't implement some of the optional
+            TLVs, it shall recognize all the optional TLV information
+            that the remote system may advertise.
+            
+            This group is mandatory for agents which implement the LLDP
+            and have the capability of receiving LLDP frames."
+    ::= { lldpGroups 7 }
+
+lldpNotificationsGroup  NOTIFICATION-GROUP
+    NOTIFICATIONS {
+        lldpRemTablesChange 
+    }
+    STATUS  current
+    DESCRIPTION
+            "The collection of notifications used to indicate LLDP MIB
+            data consistency and general status information.
+
+            This group is mandatory for agents which implement the LLDP
+            and have the capability of receiving LLDP frames."
+    ::= { lldpGroups 8 }
+
+END
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/zones/reverse/192.0.2/asdf.test	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,1 @@
+../../../hosts/asdf.test
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/etc/zones/reverse/192.0.2/test	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,1 @@
+../../../hosts/test
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/__init__.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,3 @@
+# namespace package
+from pkgutil import extend_path
+__path__ = extend_path(__path__, __name__)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dhcp/config.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,299 @@
+"""
+    Simple parser for ISC dhcpd config files.
+"""
+
+import logging; log = logging.getLogger('pvl.dhcp.config')
+
+class DHCPConfigParser (object) :
+    """
+        Simplistic parser for a dhcpd.leases file.
+
+        Doesn't implement the full spec, but a useful approximation.
+    """
+
+    @classmethod
+    def load (cls, file) :
+        return cls().parse_file(file)
+
+    def __init__ (self) :
+        self.stack = []
+        self.block = None
+        self.items = []
+        self.blocks = []
+    
+    @classmethod
+    def split (cls, line) :
+        """
+            Split given line-data.
+            
+            >>> split = DHCPConfigParser.split
+            >>> split('foo bar')
+            ['foo', 'bar']
+            >>> split('"foo"')
+            ['foo']
+            >>> split('foo "asdf quux" bar')
+            ['foo', 'asdf quux', 'bar']
+            >>> split('foo "asdf quux"')
+            ['foo', 'asdf quux']
+        """
+
+        # parse out one str
+        if '"' in line :
+            log.debug("%s", line)
+
+            # crude
+            pre, line = line.split('"', 1)
+            data, post = line.rsplit('"', 1)
+
+            return pre.split() + [data] + post.split()
+        else :
+            return line.split()
+
+    @classmethod
+    def lex (self, line) :
+        """
+            Yield tokens from the given lines.
+
+            >>> lex = DHCPConfigParser.lex
+            >>> list(lex('foo;'))
+            [('item', ['foo'])]
+            >>> list(item for line in ['foo {', ' bar;', '}'] for item in lex(line))
+            [('open', ['foo']), ('item', ['bar']), ('close', None)]
+
+        """
+
+        log.debug("%s", line)
+
+        # comments?
+        if '#' in line :
+            line, comment = line.split('#', 1)
+        else :
+            comment = None
+
+        # clean?
+        line = line.strip()
+
+        # parse
+        if not line :
+            # ignore, empty/comment
+            return
+        
+        elif line.startswith('uid') :
+            # XXX: too hard to parse properly
+            return
+
+        elif '{' in line :
+            decl, line = line.split('{', 1)
+
+            # we are in a new decl
+            yield 'open', self.split(decl)
+       
+        elif ';' in line :
+            param, line = line.split(';', 1)
+            
+            # a stanza
+            yield 'item', self.split(param)
+        
+        elif '}' in line :
+            close, line = line.split('}', 1)
+
+            if close.strip() :
+                log.warn("Predata on close: %s", close)
+
+            # end
+            yield 'close', None
+    
+        else :
+            log.warn("Unknown line: %s", line)
+            return
+
+        # got the whole line?
+        if line.strip() :
+            log.warn("Data remains: %s", line)
+
+    def push_block (self, block) :
+        """
+            Open new block.
+        """
+
+        self.stack.append((self.block, self.items, self.blocks))
+
+        self.block = block
+        self.items = []
+        self.blocks = []
+
+    def feed_item (self, item) :
+        """
+            Add item to block
+        """
+
+        self.items.append(item)
+
+    def pop_block (self) :
+        """
+            Close block. Returns
+                (block, [items])
+        """
+
+        assert self.block
+
+        block = (self.block, self.items, self.blocks)
+
+        self.block, self.items, self.blocks = self.stack.pop(-1)
+
+        self.blocks.append(block)
+
+        return block
+
+    def parse_line (self, line) :
+        """
+            Parse given line, yielding any complete blocks that come out.
+
+            Yields (block, [ lines ]) tuples.
+
+            >>> parser = DHCPConfigParser()
+            >>> list(parser.parse_lines(['foo {', ' bar;', ' quux asdf;', '}']))
+            [(['foo'], [['bar'], ['quux', 'asdf']], [])]
+
+            >>> parser = DHCPConfigParser()
+            >>> list(parser.parse_line('foo {'))
+            []
+            >>> list(parser.parse_lines([' bar;', ' quux asdf;']))
+            []
+            >>> list(parser.parse_line('}'))
+            [(['foo'], [['bar'], ['quux', 'asdf']], [])]
+        """
+
+        for token, args in self.lex(line) :
+            #log.debug("%s: %s [block=%s]", token, args, self.block)
+
+            if token == 'open' :
+                # open new block
+                block = args
+
+                if self.block :
+                    log.debug("nested block: %s > %s", self.block, block)
+                else :
+                    log.debug("open block: %s", block)
+
+                self.push_block(block)
+            
+            elif token == 'close' :
+                log.debug("close block: %s", self.block)
+
+                # collected block items
+                yield self.pop_block()
+
+            # must be within block!
+            elif token == 'item' :
+                item = args
+
+                log.debug("block %s item: %s", self.block, item)
+                self.feed_item(item)
+
+            else :
+                # ???
+                raise KeyError("Unknown token: {0}: {1}".format(token, args))
+    
+    def parse_lines (self, lines) :
+        """
+            Trivial wrapper around parse to parse multiple lines.
+        """
+
+        for line in lines :
+            for item in self.parse_line(line) :
+                yield item
+
+    def parse_file (self, file) :
+        """
+            Parse an entire file, returning (items, blocks) lists.
+
+            >>> DHCPConfigParser().parse_file(['foo;', 'barfoo {', 'bar;', '}'])
+            ([['foo']], [(['barfoo'], [['bar']], [])])
+        """
+
+        for line in file :
+            for item in self.parse_line(line) :
+                log.debug("%s", item)
+
+        assert not self.block
+
+        return self.items, self.blocks
+
+def build_field (value):
+    """
+        Build a single field as part of a dhcp.conf line.
+
+        >>> print build_field('foo')
+        foo
+        >>> print build_field('foo bar')
+        "foo bar"
+    """
+
+    if any(c.isspace() for c in value):
+        # quoted
+        return '"{value}"'.format(value=value)
+    else:
+        return value
+
+def build_line (item, end, indent=0):
+    """
+        Build a structured line.
+
+        >>> print build_line(['foo'], ';')
+        foo;
+        >>> print build_line(['host', 'foo'], ' {')
+        host foo {
+        >>> print build_line(['foo', 'bar quux'], ';', indent=1)
+            foo "bar quux";
+    """
+
+    return '    '*indent + ' '.join(build_field(field) for field in item) + end
+
+def build_item (item, **opts):
+    """
+        Build a single parameter line.
+
+        >>> print build_item(['foo'])
+        foo;
+    """
+
+    return build_line(item, end=';', **opts)
+
+def build_block (block, items, blocks=(), indent=0, comment=None):
+    """
+        Build a complete block.
+
+        >>> for line in build_block(('host', 'foo'), [('hardware', 'ethernet', '00:11:22:33:44:55')], comment="Testing"): print line
+        # Testing
+        host foo {
+            hardware ethernet 00:11:22:33:44:55;
+        }
+        >>> for line in build_block(('group', ), [('next-server', 'booter')], [ \
+                    (('host', 'foo'), [('hardware', 'ethernet', '00:11:22:33:44:55')], ()) \
+                ]): print line
+        group {
+            next-server booter;
+        <BLANKLINE>
+            host foo {
+                hardware ethernet 00:11:22:33:44:55;
+            }
+        }
+    """
+
+    if comment:
+        yield build_line((), end="# {comment}".format(comment=comment), indent=indent)
+
+    yield build_line(block, end=' {', indent=indent)
+    
+    for item in items:
+        yield build_item(item, indent=indent+1)
+
+    for subblock, subitems, subblocks in blocks:
+        yield ''
+
+        for line in build_block(subblock, subitems, subblocks, indent=indent+1):
+            yield line
+
+    yield build_line((), end='}', indent=indent)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dhcp/hosts.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,134 @@
+"""
+    Track active DHCP hosts on network by dhcp messages.
+"""
+
+import logging; log = logging.getLogger('pvl.dhcp.hosts')
+
+# XXX: from db.dhcp_leases instead?
+import pvl.verkko.db as db
+
+class DHCPHostsDatabase (object) :
+    """
+        pvl.verkko.Database dhcp_hosts model for updates.
+    """
+
+    def __init__ (self, db) :
+        self.db = db
+
+    def create (self) :
+        """
+            CREATE TABLEs
+        """
+
+        log.info("Creating database tables: dhcp_hosts")
+        db.dhcp_hosts.create(self.db.engine, checkfirst=True)
+
+    def select (self, distinct=(db.dhcp_hosts.c.gw, db.dhcp_hosts.c.ip), interval=None) :
+        """
+            SELECT unique gw/ip hosts, for given interval.
+        """
+
+        query = db.select(distinct, distinct=True)
+
+        if interval :
+            # timedelta
+            query = query.where(db.func.now() - db.dhcp_hosts.c.last_seen < interval)
+
+        return self.db.select(query)
+
+    def insert (self, attrs) :
+        """
+            INSERT new host
+        """
+
+        query = db.dhcp_hosts.insert().values(
+                ip          = attrs['ip'],
+                mac         = attrs['mac'],
+                gw          = attrs['gw'],
+
+                first_seen  = attrs['timestamp'],
+                count       = 1,
+
+                last_seen   = attrs['timestamp'],
+                state       = attrs['state'],
+                
+                name        = attrs.get('name'),
+                error       = attrs.get('error'),
+        )
+        
+        # -> id
+        return self.db.insert(query)
+
+    def update (self, attrs) :
+        """
+            UPDATE existing host, or return False if not found.
+        """
+
+        table = db.dhcp_hosts
+
+        query = table.update()
+        query = query.where((table.c.ip == attrs['ip']) & (table.c.mac == attrs['mac']) & (table.c.gw == attrs['gw']))
+        query = query.values(
+                count       = db.func.coalesce(table.c.count, 0) + 1,
+
+                # set
+                last_seen   = attrs['timestamp'],
+                state       = attrs['state'],
+        )
+        
+        if 'name' in attrs :
+            query = query.values(name = attrs['name'])
+        
+        if 'error' in attrs :
+            query = query.values(error = attrs['error'])
+
+        # any matched rows?
+        return self.db.update(query)
+
+    def __call__ (self, item) :
+        """
+            Process given DHCP syslog message to update the hosts table.
+        """
+
+        attrs = {}
+        
+        # ignore unless we have enough info to fully identify the client
+        # this means that we omit DHCPDISCOVER messages, but we get the OFFER/REQUEST/ACK
+        if any(name not in item for name in ('lease', 'hwaddr', 'gateway')) :
+            # ignore; we require these
+            return
+
+        # do not override error from request on NAK; clear otherwise
+        # TODO: DHCPINFORM from 192.168.x.y with error -> rogue dhcp?
+        if item.get('type') == 'DHCPNAK' :
+            pass
+        else :
+            attrs['error'] = item.get('error-type') or item.get('error')
+
+        # do not override name unless known
+        if item.get('name') :
+            attrs['name'] = item.get('name')
+
+        # db: syslog
+        ATTR_MAP = (
+            ('ip',          'lease'),
+            ('mac',         'hwaddr'),
+            ('gw',          'gateway'),
+
+            ('timestamp',   'timestamp'),
+            ('state',       'type'),
+        )
+
+        # generic attrs
+        for key, name in ATTR_MAP :
+            attrs[key] = item.get(name)
+
+        # update existing?
+        if self.update(attrs) :
+            log.info("Update: %s", attrs)
+
+        else :
+            # new
+            log.info("Insert: %s", attrs)
+            self.insert(attrs)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dhcp/leases.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,353 @@
+"""
+    DHCP dhcpd.leases handling/tracking
+"""
+
+import pvl.syslog.tail # TailFile
+
+from datetime import datetime
+from pvl.dhcp.config import DHCPConfigParser
+
+import logging; log = logging.getLogger('pvl.dhcp.leases')
+
+DHCPD_LEASES = '/var/lib/dhcp/dhcpd.leases'
+
+class DHCPLeases (object) :
+    """
+        Process log-structured leases file, updated by dhcpd.
+    """
+
+    LEASE_DATES = ('starts', 'ends', 'tstp', 'tsfp', 'atsfp', 'cltt')
+
+    # default format
+    LEASE_DATE_NEVER = 'never'
+    LEASE_DATE_FMT_DEFAULT = '%w %Y/%m/%d %H:%M:%S'
+
+    lease_date_fmt = LEASE_DATE_FMT_DEFAULT
+
+    def __init__ (self, path=DHCPD_LEASES) :
+        """
+            path        - path to dhcpd.leases file
+        """
+
+        # tail; handles file re-writes
+        self.source = pvl.syslog.tail.Tail(path)
+
+        # parser state
+        self.parser = DHCPConfigParser()
+
+        # initial leases state
+        self._leases = None
+
+    def reset (self) :
+        """
+            Reset state, if we started to read a new file.
+        """
+
+        self._leases = {}
+
+    def process_lease_item_date (self, args) :
+        """
+            Process lease-item date spec into datetime.
+
+            Returns None if 'never'.
+        """
+
+        data = ' '.join(args)
+
+        if data == self.LEASE_DATE_NEVER :
+            return None
+        else :
+            return datetime.strptime(data, self.lease_date_fmt)
+
+    def process_lease_item (self, lease, item) :
+        """
+            Process a single item from the lease, updating the lease dict
+        """
+
+        item = list(item)
+
+        name = item.pop(0)
+        subname = item[0] if item else None
+
+        if name in self.LEASE_DATES :
+            lease[name] = self.process_lease_item_date(item)
+
+        elif name == 'hardware':
+            # args
+            lease['hwtype'], lease['hwaddr'] = item
+        
+        elif name == 'uid' :
+            lease['uid'], = item
+
+        elif name == 'client-hostname' :
+            lease['client-hostname'], = item
+        
+        elif name == 'abandoned' :
+            lease['abandoned'] = True
+
+        elif name == 'binding' :
+            _state, lease['binding-state'] = item
+
+        elif name == 'next' and subname == 'binding' :
+            _binding, _state, lease['next-binding-state'] = item
+
+        else :
+            log.warn("unknown lease item: %s: %s", name, item)
+
+    def process_lease (self, lease_name, items) :
+        """
+            Process given lease block to update our state.
+
+            Returns the lease object, and a possible old lease.
+        """
+
+        # replace any existing
+        lease = self._leases[lease_name] = {}
+
+        # meta
+        lease['lease'] = lease_name
+
+        # parse items
+        for item in items :
+            try :
+                self.process_lease_item(lease, item)
+
+            except Exception as ex:
+                log.warn("Failed to process lease item: %s: %s:", lease_name, item, exc_info=True)
+        
+        # k
+        log.debug("%-15s: %s", lease_name, lease)
+
+        return lease
+
+    def log_lease (self, lease, old_lease=None) :
+        """
+            Log given lease transition on stdout.
+        """
+
+        # log
+        if old_lease :
+            log.info("%-15s: %20s @ %8s <- %-8s @ %20s", old_lease['lease'],
+                old_lease.get('ends', '???'),
+                old_lease.get('next-binding-state', ''),    # optional
+                old_lease.get('binding-state', '???'), 
+                old_lease.get('starts', '???'),
+            )
+
+        log.info("%-15s: %20s @ %8s -> %-8s @ %20s", lease['lease'], 
+                lease.get('starts', '???'),
+                lease.get('binding-state', '???'), 
+                lease.get('next-binding-state', ''),    # optional
+                lease.get('ends', '???'),
+        )
+
+    def process_block (self, blockdata, log_leases=False) :
+        """
+            Process given block (from DHCPConfigParser.parse()), to update state.
+        """
+
+        block, items = blockdata
+
+        type = block.pop(0)
+        args = block
+
+        if type == 'lease' :
+            if len(args) != 1 :
+                return log.warn("lease block with weird args, ignore: %s", args)
+            
+            # the lease address
+            lease, = args
+
+            log.debug("lease: %s: %s", lease, items)
+            
+            if lease in self._leases :
+                old = self._leases[lease]
+            else :
+                old = None
+
+            new = self.process_lease(lease, items)
+
+            if log_leases :
+                self.log_lease(new, old)
+
+            return new
+
+        else :
+            log.warn("unknown block: %s: %s", type, args)
+
+    def readleases (self) :
+        """
+            Read new lines from the leases database and update our state.
+
+            Yields changed leases. On startup and on periodic database reset, all leases are yielded.
+        """
+        
+        # handle file replace by reading until EOF
+        sync = False
+#        leases = []
+
+        if self._leases is None :
+            # initial sync
+            self.reset()
+            sync = True
+        
+        # parse in any new lines from TailFile... yields None if the file was replaced
+        for line in self.source.readlines(eof_mark=True) :
+            if line is None :
+                log.info("Reading new dhcpd.leases")
+
+                # resync
+                self.reset()
+                sync = True
+
+            else :
+                # parse
+                for blockdata in self.parser.parse_line(line) :
+                    # don't log if syncing, only on normal updates (next tail-cycle)
+                    lease = self.process_block(blockdata, log_leases=(not sync))
+
+                    #if not sync :
+                    #    leases.append(lease)
+                    yield lease
+
+#        if sync :
+#            return True, self.leases.values()
+#        else :
+#            return False, leases
+
+    __iter__ = readleases
+
+    def leases (self) :
+        """
+            Iterate over all leases.
+        """
+
+        return self._leases.itervalues()
+
+    # utils
+    def lease_state (self, lease) :
+        """
+            Get state for lease.
+        """
+
+        # count by state
+        starts = lease.get('starts')
+        state = lease.get('binding-state')
+        next_state = lease.get('next-binding-state')
+        ends = lease.get('ends')
+
+        #log.debug("%-15s: %s: %8s -> %-8s: %s", ip, starts, state, next_state or '', ends)
+        
+        # XXX: datetime UTC or local?
+        if next_state and ends and ends < datetime.now() :
+            state = next_state
+
+        return state
+
+# XXX: from db.dhcp_leases instead?
+import pvl.verkko.db as db
+
+class DHCPLeasesDatabase (object) :
+    """
+        pvl.verkko.Database dhcp_leases model for updates.
+    """
+
+    def __init__ (self, db) :
+        """
+            db      - pvl.verkko.Database
+        """
+
+        self.db = db
+
+    def create (self) :
+        """
+            CREATE TABLEs
+        """
+
+        log.info("Creating database tables: dhcp_leases")
+        db.dhcp_leases.create(self.db.engine, checkfirst=True)
+
+    def update (self, lease) :
+        """
+            Try an extend an existing lease?
+        """
+
+        c = db.dhcp_leases.c
+
+        ip = lease['lease']
+        mac = lease.get('hwaddr')
+        starts = lease['starts']
+        ends = lease.get('ends')
+
+        update = db.dhcp_leases.update()
+        
+        # XXX: if ends is None?
+        if mac :
+            # renew lease..?
+            update = update.where((c.ip == ip) & (c.mac == mac) & ((starts < c.ends) | (c.ends == None)))
+        else :
+            # new state for lease..?
+            update = update.where((c.ip == ip) & ((starts < c.ends) | (c.ends == ends)))
+
+        update = update.values(
+                state       = lease['binding-state'],
+                next        = lease.get('next-binding-state'),
+                ends        = ends,
+        )
+
+        if lease.get('client-hostname') :
+            update = update.values(hostname = lease['client-hostname'])
+
+        return self.db.update(update) > 0
+
+    def insert (self, lease) :
+        """
+            Record a new lease.
+        """
+
+        c = db.dhcp_leases.c
+
+        query = db.dhcp_leases.insert().values(
+            ip          = lease['lease'],
+            mac         = lease['hwaddr'],
+            hostname    = lease.get('client-hostname'),
+
+            starts      = lease['starts'],
+            ends        = lease.get('ends'),
+
+            state       = lease['binding-state'],
+            next        = lease.get('next-binding-state'),
+        )
+
+        return self.db.insert(query)
+
+    def __call__ (self, lease) :
+        """
+            Process given DHCP lease to update currently active lease, or insert a new one.
+
+            XXX: transaction? *leases?
+        """
+
+        # update existing?
+        if self.update(lease) :
+            log.info("Update: %s", lease)
+
+        elif lease.get('hwaddr') :
+            # new
+            id = self.insert(lease)
+
+            log.info("Insert: %s -> %d", lease, id)
+
+        else :
+            # may be a free lease
+            log.warn("Ignored lease: %s", lease)
+
+
+if __name__ == '__main__' :
+    import logging
+
+    logging.basicConfig()
+
+    import doctest
+    doctest.testmod()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dhcp/rule.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,184 @@
+"""
+    Match DHCP clients by network.
+"""
+
+import optparse
+import configobj
+
+from pvl.verkko.utils import IPv4Address, IPv4Network
+
+import logging; log = logging.getLogger('pvl.dhcp.rule')
+
+def parser (parser) :
+    """
+        Optparse options for DHCPRule
+    """
+
+    parser.set_defaults(
+            dhcp_network        = [],
+            dhcp_gateway        = [],
+    )
+ 
+    parser = optparse.OptionGroup(parser, "DHCP host/lease matching")
+
+    parser.add_option('--dhcp-rules',               metavar='CONF',
+            help="dhcp plugin instances by network/gateway")
+
+    parser.add_option('--dhcp-network',             action='store_true',
+            help="dhcp plugin instance by network")
+
+    parser.add_option('--dhcp-gateway',             action='store_true',
+            help="dhcp plugin instance by gateway")
+   
+    return parser
+
+def apply (options) :
+    """
+        Return DHCPRule from options.
+    """
+
+    if options.dhcp_rules :
+        return DHCPRule.load(options, open(options.dhcp_rules))
+    else :
+        return DHCPRule()
+
+class DHCPRule (object) :
+    """
+        A rule matching DHCP hosts/leases by gateway/network.
+
+        Note that leases don't have a gateway, but they're assumed to be valid, so we just ignore any gateway criteria for for unknown gateways.
+    """
+
+
+    @classmethod
+    def load (cls, options, file, name=None) :
+        """
+            Load from config file.
+        """
+        
+        config = configobj.ConfigObj(file)
+
+        return cls.load_section(options, name, config)
+
+    @classmethod
+    def load_section (cls, options, name, section) :
+        """
+            Rule from sub-sections and section.
+        """
+
+        # recurse
+        rules = tuple(cls.load_section(options, subsection, section[subsection]) for subsection in section.sections)
+
+        # rule
+        attrs = dict((name, section[name]) for name in section.scalars)
+
+        try :
+            return cls.config(options, name, rules, **attrs)
+
+        except ValueError as ex :
+            raise ValueError("[%s] %s" % (name, ex))
+
+    @classmethod
+    def config (cls, options, name, rules, gateway=None, network=None, interval=None) :
+        """
+            Rule from section.
+        """
+
+        if interval :
+            log.warn("%s: interval: not implemented", name)
+
+        if network and options.dhcp_network :
+            network = IPv4Network(network)
+        else :
+            network = None
+
+        if gateway and options.dhcp_gateway :
+            gateway = gateway
+        else :
+            gateway = None
+
+        return cls(name, rules,
+                gateway     = gateway, 
+                network     = network,
+        )
+
+    def __init__ (self, name=None, rules=(), gateway=None, network=None) :
+        """
+            Match as name by gateway/network.
+        """
+
+        self.name = name
+        self.rules = rules
+
+        self.gateway = gateway
+        self.network = network
+
+        log.info("%s: gateway=%s, network=%s: %s", name, gateway, network, ' '.join(str(rule) for rule in rules))
+
+    def match (self, host) :
+        """
+            Match against given host.
+        """
+
+        if self.gateway :
+            gateway = host.get('gw')
+
+            if gateway and gateway != self.gateway :
+                gateway = False
+
+        else :
+            gateway = None
+
+        if self.network :
+            network = host.get('ip')
+            
+            if network and network not in self.network :
+                network = False
+        else :
+            network = None
+        
+        # decide
+        if network is False or gateway is False :
+            # negative
+            return False
+
+        elif network or gateway :
+            # (partial) positive
+            return True
+
+        else :
+            # unknown
+            return None
+
+    def apply (self, host) :
+        """
+            Match { gw: str, ip: IPv4Address } against our rule and any sub rules, returning matching DHCPHostRule, or None.
+        """
+
+        match = self.match(host)
+
+        log.debug("%s: match: %s: %s", self, host, match)
+            
+        if match is False :
+            # negative
+            return
+
+        for rule in self.rules :
+            apply = rule.apply(host)
+
+            if apply :
+                return apply
+        
+        log.debug("%s: apply: %s", self, host)
+        
+        if match :
+            # positive
+            return self
+        else :
+            # unknown
+            return None
+
+    def __str__ (self) :
+        return self.name or ''
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dhcp/syslog.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,224 @@
+"""
+    Parse ISC dhcpd messages from pvl.syslog.
+"""
+
+from pvl.invoke import merge # XXX
+
+import re
+
+import logging; log = logging.getLogger('pvl.dhcp.syslog')
+
+# TODO: use pvl.syslog.rule.SyslogRule?
+class DHCPSyslogParser (object) :
+    """
+        Parse SyslogMessages from SyslogParser for ISC dhcp semantics.
+
+        TODO: BOOTREQUEST from <hwaddr> via <gateway>
+    """
+
+    ## various message types sent/recieved by dhcpd
+    # from server/dhcp.c
+    TYPE_NAMES = (
+        "DHCPDISCOVER",
+        "DHCPOFFER",
+        "DHCPREQUEST",
+        "DHCPDECLINE",
+        "DHCPACK",
+        "DHCPNAK",
+        "DHCPRELEASE",
+        "DHCPINFORM",
+        "type 9",
+        "DHCPLEASEQUERY",
+        "DHCPLEASEUNASSIGNED",
+        "DHCPLEASEUNKNOWN",
+        "DHCPLEASEACTIVE"
+    )
+
+    # message-parsing regexp..
+    RECV_MESSAGE_RE = (
+        # dhcpdiscover/ack_lease: info/error
+        #   hwaddr:     <no identifier>
+        #   hostname:   Hostname Unsuitable for Printing
+        #   error:
+        #               peer holds all free leases
+        #               network %s: no free leases
+        re.compile(r'(?P<type>DHCPDISCOVER) from (?P<hwaddr>.+?)( \((?P<hostname>.+?)\))? via (?P<gateway>.+?)(: (?P<error>.+?))?$'),
+
+        # dhcprequest
+        #   error:
+        #               wrong network.
+        #               ignored (not authoritative).
+        #               ignored (unknown subnet).
+        #               lease %s unavailable.
+        #               unknown lease %s.
+        re.compile(r'(?P<type>DHCPREQUEST) for (?P<lease>.+?)( \((?P<server>.+?)\))? from (?P<hwaddr>.+?)( \((?P<hostname>.+?)\))? via (?P<gateway>.+?)(: (?P<error>.+?))?$'),
+
+        # dhcprelease
+        re.compile(r'(?P<type>DHCPRELEASE) of (?P<lease>.+?) from (?P<hwaddr>.+?)( \((?P<hostname>.+?)\))? via (?P<gateway>.+?) \((?P<found>.+?)\)$'),
+
+        # dhcpdecline
+        #   status:
+        #       abandoned
+        #       not found
+        #       ignored
+        re.compile(r'(?P<type>DHCPDECLINE) of (?P<lease>.+?) from (?P<hwaddr>.+?)( \((?P<hostname>.+?)\))? via (?P<gateway>.+?): (?P<status>.+?)$'),
+
+        # dhcpinform
+        #   error:
+        #       ignored (null source address).
+        #       unknown subnet for relay address %s
+        #       unknown subnet for %s address %s
+        #       not authoritative for subnet %s
+        #
+        # TODO: DHCPINFORM with error indicates rogue dhcp
+        re.compile(r'(?P<type>DHCPINFORM) from (?P<lease>.+?) via (?P<gateway>.+?)(: (?P<error>.+?))?$'),
+        
+        # dhcpleasequery
+        re.compile(r'(?P<type>DHCPLEASEQUERY) from (?P<server>.+?)( for (?P<key_type>IP|client-id|MAC address) (?P<key>.+?))?(: (?P<error>.+?))?$'),
+
+        # dhcp: generic/unknown packet
+        re.compile(r'(?P<type>\w+) from (?P<hwaddr>.+?) via (?P<gateway>.+?): (?P<error>.+?)$'),
+    )
+
+    SEND_MESSAGE_RE = (
+        # dhcp_reply
+        re.compile(r'(?P<type>DHCPACK|DHCPOFFER|BOOTREPLY) on (?P<lease>.+?) to (?P<hwaddr>.+?)( \((?P<hostname>.+?)\))? via (?P<gateway>.+?)$'),
+
+        # dhcpinform
+        #   hwaddr:     <no client hardware address>
+        re.compile(r'(?P<type>DHCPACK) to (?P<lease>.+?) \((?P<hwaddr>.+?)\) via (?P<gateway>.+?)$'),
+
+        # nak_lease
+        re.compile(r'(?P<type>DHCPNAK) on (?P<lease>.+?) to (?P<hwaddr>.+?) via (?P<gateway>.+?)$'),
+
+        # dhcpleasequery
+        re.compile(r'(?P<type>DHCPLEASEUNKNOWN|DHCPLEASEACTIVE|DHCPLEASEUNASSIGNED) to (?P<lease>.+?) for (?P<key_type>IP|client-id|MAC address) (?P<key>.+?) \((?P<count>\d+) associated IPs\)$'),
+    )
+
+    MESSAGE_ERROR_RE = (
+        ('peer-all-free-leases',    re.compile('peer holds all free leases')),
+        ('no-free-leases',          re.compile(r'network (?P<network>.+?): no free leases')),
+        ('wrong-network',           re.compile(r'wrong network')),
+        ('ignored-not-auth',        re.compile(r'ignored \(not authoritative\)')),
+        ('ignored-unknown-subnet',  re.compile(r'ignored \(unknown subnet\)')),
+        ('lease-unavailable',       re.compile(r'lease (?P<lease>.+?) unavailable')),
+        ('lease-unknown',           re.compile(r'unknown lease (?P<lease>.+?).$')),
+    )
+
+    ERROR_RE = (
+        # find_lease
+        ('duplicate-uid-lease', 
+            re.compile(r'uid lease (?P<client>.+?) for client (?P<hwaddr>.+?) is duplicate on (?P<shared_network>.+?)$')),
+
+        # dhcprelease
+        ('dhcprelease-requested-address', 
+            re.compile(r'DHCPRELEASE from (?P<hwaddr>.+?) specified requested-address.')),
+
+        # ???
+        ('unexpected-icmp-echo-reply',
+            re.compile(r'unexpected ICMP Echo Reply from (?P<client>.+?)$')),
+        
+        ('host-unknown',
+            re.compile(r'(?P<host>.+?): host unknown.')),
+    )
+
+    IGNORE_RE = (
+        re.compile(r'Wrote (?P<count>\d+) (?P<what>.+?) to leases file.'),
+    )
+
+    def parse (self, line) :
+        """
+            Match line against our regexps, returning a
+
+                {
+                    tag:        send/recv/error,
+                    type:       ...,
+                    [error]:    ...,
+                    ...
+                }
+
+            dict if matched
+
+            Returns False if the message is ignored, or None if the no regexp matched.
+        """
+
+        for tag, re_list in (
+            ('recv',    self.RECV_MESSAGE_RE),
+            ('send',    self.SEND_MESSAGE_RE),
+        ) :
+            for re in re_list :
+                # test
+                match = re.match(line)
+
+                if match :
+                    data = match.groupdict()
+                    data['tag'] = tag
+
+                    return data
+                
+        # error?
+        for type, re in self.ERROR_RE:
+            match = re.match(line)
+
+            if match : 
+                data = match.groupdict()
+                data['tag'] = 'error'
+                data['type'] = type
+
+                return data
+
+        # ignore
+        for re in self.IGNORE_RE :
+            if re.match(line) :
+                # ignore
+                return False
+
+        # unknown
+        return None
+
+    def parse_error (self, error) :
+        """
+            Match given error status from send/recv against known types, returning a type name or None.
+        """
+
+        for type, re in self.MESSAGE_ERROR_RE :
+            match = re.match(error)
+
+            if match :
+                return type
+        
+        # nope
+        return None
+
+    def process (self, source) :
+        """
+            Process syslog items from given source, yielding parsed DHCP items.
+        """
+
+        for item in source :
+            dhcp_item = self.parse(item['msg'])
+
+            log.debug("%s: %s", item, dhcp_item)
+            
+            if not dhcp_item :
+                # ignore
+                continue
+
+            item = merge(item, dhcp_item)
+
+            if item.get('error') :
+                item['error-type'] = self.parse_error(item['error'])
+            
+            yield item
+    
+    __call__ = process
+
+
+if __name__ == '__main__' :
+    import logging
+
+    logging.basicConfig()
+
+    import doctest
+    doctest.testmod()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dns/__init__.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,22 @@
+
+__version__ = '0.1'
+
+from pvl.dns.generate import (
+        parse_generate_field,
+        parse_generate_range,
+)
+from pvl.dns.labels import (
+        fqdn,
+        join,
+        split,
+        relative,
+)
+from pvl.dns.reverse import (
+        reverse_label,
+        parse_prefix,
+)
+from pvl.dns.zone import (
+        ZoneLineError,
+        ZoneDirective,
+        ZoneRecord,
+)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dns/generate.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,140 @@
+import logging
+
+log = logging.getLogger('pvl.dns.generate')
+
+class OffsetValue (object) :
+    """
+        Magic for $GENERATE offsets.
+
+        >>> OffsetValue(0)[1]
+        1
+        >>> OffsetValue(10)[5]
+        15
+    """
+
+    def __init__ (self, base) :
+        self.base = base
+
+    def __getitem__ (self, offset) :
+        return self.base + offset
+
+def parse_generate_field (field) :
+    """
+        Parse a $GENERATE lhs/rhs field:
+            $
+            ${<offset>[,<width>[,<base>]]}
+            \$
+            $$
+
+        Returns a wrapper that builds the field-value when called with the index.
+        
+        >>> parse_generate_field("foo")(1)
+        'foo'
+        >>> parse_generate_field("foo-$")(1)
+        'foo-1'
+        >>> parse_generate_field("foo-$$")(1)
+        'foo-$'
+        >>> parse_generate_field("\$")(1)
+        '$'
+        >>> parse_generate_field("10.0.0.${100}")(1)
+        '10.0.0.101'
+        >>> parse_generate_field("foo-${0,2,d}")(1)
+        'foo-01'
+
+    """
+
+    input = field
+    expr = []
+
+    while '$' in field :
+        # defaults
+        offset = 0
+        width = 0
+        base = 'd'
+        escape = False
+
+        # different forms
+        if '${' in field :
+            pre, body = field.split('${', 1)
+            body, post = body.split('}', 1)
+
+            # parse body
+            parts = body.split(',')
+
+            # offset
+            offset = int(parts.pop(0))
+
+            # width
+            if parts :
+                width = int(parts.pop(0))
+
+            # base
+            if parts :
+                base = parts.pop(0)
+            
+            if parts:
+                # fail
+                raise ValueError("extra data in ${...} body: {0!r}", parts)
+
+        elif '$$' in field :
+            pre, post = field.split('$$', 1)
+            escape = True
+
+        elif '\\$' in field :
+            pre, post = field.split('\\$', 1)
+            escape = True
+
+        else :
+            pre, post = field.split('$', 1)
+        
+        expr.append(pre)
+
+        if escape :
+            expr.append('$')
+
+        else :
+            # meta-format
+            fmt = '{value[%d]:0%d%s}' % (offset, width, base)
+
+            log.debug("field=%r -> pre=%r, fmt=%r, post=%r", field, expr, fmt, post)
+
+            expr.append(fmt)
+
+        field = post
+
+    # final
+    if field :
+        expr.append(field)
+    
+    # combine
+    expr = ''.join(expr)
+
+    log.debug("%s: %s", input, expr)
+
+    # processed
+    def value_func (value) :
+        # magic wrapper to implement offsets
+        return expr.format(value=OffsetValue(value))
+    
+    return value_func
+
+def parse_generate_range (field) :
+    """
+        Parse a <start>-<stop>[/<step>] field
+    """
+
+    if '/' in field :
+        field, step = field.split('/')
+        step = int(step)
+    else :
+        step = 1
+
+    start, stop = field.split('-')
+    start = int(start)
+    stop = int(stop)
+
+    log.debug("  range: start=%r, stop=%r, step=%r", start, stop, step)
+
+    # inclusive
+    return range(start, stop + 1, step)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dns/labels.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,97 @@
+# TODO: support fqdns in parts
+def join (*parts) :
+    """
+        Join a domain name from labels.
+    """
+
+    return '.'.join(str(part) for part in parts)
+
+def fqdn (*parts) :
+    """
+        Return an FQND from parts, ending in .
+    """
+
+    fqdn = join(*parts)
+
+    # we may be given an fqdn in parts
+    if not fqdn.endswith('.') :
+        fqdn += '.'
+    
+    return fqdn
+
+def contains (origin, fqdn):
+    """
+        Determine if the given FQDN is within the given origin.
+    """
+
+    return origin == '.' or fqdn.endswith('.' + origin)
+
+def split (origin, fqdn):
+    """
+        Determine the relative label from the given zone origin to the given host fqnd.
+    """
+
+    if origin == '.':
+        return fqdn[:-1]
+
+    elif fqdn.endswith('.' + origin) :
+        # strip
+        return fqdn[:(len(fqdn) - len(origin) - 1)]
+    else:
+        raise ValueError("{fqdn} outside of zone {origin}".format(fqdn=fqdn, origin=origin))
+
+def relative (origin, domain, name) :
+    """
+        relative relative label @origin for name@domain
+
+        Raises ValueError if name is outside of origin
+
+        >>> print relative(None, None, 'fqdn')
+        fqdn.
+        >>> print relative(None, 'domain', 'host')
+        host.domain.
+        >>> print relative('origin', 'domain', 'host')
+        Traceback (most recent call last):
+            ...
+        ValueError: host: domain domain out of zone origin.
+        >>> print relative('origin', 'origin', 'host')
+        host
+        >>> print relative('origin', 'domain.origin', 'host')
+        host.domain
+        >>> print relative('origin', 'domainorigin', 'host')
+        Traceback (most recent call last):
+            ...
+        ValueError: host: domain domainorigin out of zone origin.
+        >>> print relative('origin', None, 'host.domain')
+        Traceback (most recent call last):
+            ...
+        ValueError: host.domain: fqdn host.domain. out of zone origin.
+        >>> print relative('.', 'domain', 'host')
+        host.domain
+    """
+
+    if origin:
+        origin = fqdn(origin)
+    
+    if domain:
+        host_fqdn = fqdn(name, domain)
+    else:
+        host_fqdn = fqdn(name)
+
+
+    if not origin:
+        return host_fqdn
+
+    elif domain == origin:
+         return name
+
+    elif contains(origin, host_fqdn):
+        return split(origin, host_fqdn)
+
+    elif domain:
+        raise ValueError("{name}: domain {domain} out of zone {origin}".format(name=name, domain=domain, origin=origin))
+
+    else:
+        raise ValueError("{name}: fqdn {fqdn} out of zone {origin}".format(name=name, fqdn=host_fqdn, origin=origin))
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dns/reverse.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,144 @@
+import ipaddr
+import math
+
+def reverse_ipv4 (ip) :
+    """
+        Return in-addr.arpa reverse for given IPv4 prefix.
+    """
+
+    # parse
+    octets = tuple(int(part) for part in ip.split('.'))
+
+    for octet in octets :
+        assert 0 <= octet <= 255
+
+    return '.'.join([str(octet) for octet in reversed(octets)] + ['in-addr', 'arpa'])
+
+def reverse_ipv6 (ip6) :
+    """
+        Return ip6.arpa reverse for given IPv6 prefix.
+    """
+
+    # XXX: this is broken for fd80::1?
+    parts = [int(part, 16) for part in ip6.split(':')]
+    parts = ['{0:04x}'.format(part) for part in parts]
+    parts = ''.join(parts)
+
+    return '.'.join(tuple(reversed(parts)) + ( 'ip6', 'arpa'))
+
+def reverse_label (prefix, address) :
+    """
+        Determine the correct label for the given IP address within the reverse zone for the given prefix.
+
+        This includes all suffix octets (partially) covered by the prefix.
+    """
+
+    assert prefix.version == address.version
+    assert address in prefix
+    
+    hostbits = prefix.max_prefixlen - prefix.prefixlen
+
+    if prefix.version == 4 :
+        # pack into octets
+        octets = [ord(x) for x in address.packed]
+
+        # take the suffix
+        octets = octets[-int(math.ceil(hostbits / 8.0)):]
+        
+        # reverse in decimal
+        return '.'.join(reversed(["{0:d}".format(x) for x in octets]))
+
+    elif prefix.version == 6 :
+        # pack into nibbles
+        nibbles = [((ord(x) >> 4) & 0xf, ord(x) & 0xf) for x in address.packed]
+        nibbles = [nibble for nibblepair in nibbles for nibble in nibblepair]
+
+        # take the suffix
+        nibbles = nibbles[-(hostbits / 4):]
+        
+        # reverse in hex
+        return '.'.join(reversed(["{0:x}".format(x) for x in nibbles]))
+
+    else :
+        raise ValueError("unsupported address version: %s" % (prefix, ))
+
+def _split_ipv6_parts (prefix) :
+    """
+        Split a partial IPv6 address into hexadecimal nibbles
+    """
+
+    if prefix.endswith('::'):
+        prefix = prefix[:-2]
+
+    for hextet in prefix.split(':') :
+        for nibble in hextet.rjust(4, '0') :
+            yield nibble
+
+def _build_ipv6_parts (parts) :
+    """
+        Group an iterable of hexadecimal nibbles into hextets.
+    """
+
+    for i in xrange(0, len(parts), 4) :
+        yield ''.join(parts[i:i+4])
+    
+    # suffix ::
+    if len(parts) < 32 :
+        yield ''
+        yield ''
+
+def parse_prefix (prefix) :
+    """
+        Return an ipaddr.IPNetwork from given filesystem-compatbile IPv4/IPv6 prefix-ish variant.
+
+        Supports partial IPv4 prefixes on octet boundaries.
+        Supports partial IPv6 prefixes on nibble boundaries.
+        Supports IPv4 prefxies using "-" as the prefix separator in place of "/".
+
+        >>> parse_prefix('127.0.0.0/8')
+        IPv4Network('127.0.0.0/8')
+        >>> parse_prefix('192.0.2.128/26')
+        IPv4Network('192.0.2.128/26')
+        >>> parse_prefix('192.0.2.128-26')
+        IPv4Network('192.0.2.128/26')
+        >>> parse_prefix('127.')
+        IPv4Network('127.0.0.0/8')
+        >>> parse_prefix('10')
+        IPv4Network('10.0.0.0/8')
+        >>> parse_prefix('192.168')
+        IPv4Network('192.168.0.0/16')
+        >>> parse_prefix('fe80::')
+        IPv6Network('fe80::/16')
+        >>> parse_prefix('2001:db8::')
+        IPv6Network('2001:db8::/32')
+        >>> parse_prefix('2001:db8:1:2')
+        IPv6Network('2001:db8:1:2::/64')
+    """
+
+    if '/' in prefix :
+        return ipaddr.IPNetwork(prefix)
+    
+    elif '-' in prefix :
+        return ipaddr.IPNetwork(prefix.replace('-', '/'))
+
+    elif '.' in prefix or prefix.isdigit() :
+        parts = prefix.rstrip('.').split('.')
+        prefixlen = len(parts) * 8
+        
+        return ipaddr.IPv4Network('{prefix}/{prefixlen}'.format(
+            prefix      = '.'.join(parts + ['0' for i in xrange(4 - len(parts))]),
+            prefixlen   = prefixlen,
+        ))
+   
+    elif ':' in prefix :
+        parts = list(_split_ipv6_parts(prefix))
+        prefixlen = len(parts) * 4
+
+        return ipaddr.IPv6Network('{prefix}/{prefixlen}'.format(
+            prefix      = ':'.join(_build_ipv6_parts(parts)),
+            prefixlen   = prefixlen,
+        ))
+
+    else :
+        raise ValueError("Unrecognized IP prefix string: %s" % (prefix, ))
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dns/serial.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,134 @@
+"""
+    Generating zone serials.
+"""
+
+import datetime
+
+import logging; log = logging.getLogger('pvl.dns.serial')
+
+# date fmt to use in serial
+DATE_FMT = '%Y%m%d'
+DATE_LEN = 8
+
+SERIAL_FMT = "{date:8}{count:02}"
+SERIAL_LEN = 10
+
+def format_serial (date, count) :
+    """
+        Format serial as string.
+
+        >>> format_serial(datetime.date(2013, 9, 10), 0)
+        '2013091000'
+        >>> format_serial(datetime.date(2013, 9, 10), 1)
+        '2013091001'
+    """
+
+    assert 0 <= count <= 99
+
+    return SERIAL_FMT.format(date=date.strftime(DATE_FMT), count=count)
+
+def next_serial (date, count) :
+    """
+        Return serial with next count.
+
+        >>> next_serial(datetime.date(2013, 9, 10), 1)
+        '2013091002'
+        >>> next_serial(datetime.date(2013, 9, 10), 99)
+        '2013091100'
+    """
+
+
+    # check
+    if count < 99 :
+        return format_serial(date, count + 1)
+    else:
+        serial = str(int(format_serial(date, count)) + 1)
+
+        log.warn("Serial count rollover: %s, %s; fallback -> %s", date, count, serial)
+
+        return serial
+
+def update_serial (serial, today=None) :
+    """
+        Parse given serial number (string), returning an updated serial, based on date.
+
+        Raises ValueError on invalid (non-numeric) serial.
+
+        >>> print update_serial('', today=datetime.date(2013, 9, 10))
+        2013091001
+        >>> print update_serial('13', today=datetime.date(2013, 9, 10))
+        14
+        >>> print update_serial('2013083501', today=datetime.date(2013, 9, 10))
+        2013083502
+        >>> print update_serial('2013083102', today=datetime.date(2013, 9, 10))
+        2013091001
+        >>> print update_serial('2013091002', today=datetime.date(2013, 9, 10))
+        2013091003
+        >>> print update_serial('2013091102', today=datetime.date(2013, 9, 10))
+        2013091103
+    """
+    
+    if not today:
+        today = datetime.date.today()
+
+    # handle
+    if not serial :
+        # fresh
+        log.info("Setting initial serial: %s01", today)
+        
+        return format_serial(today, 1)
+
+    elif len(serial) != SERIAL_LEN :
+        log.warn("Invalid serial format: %s", serial)
+        
+        value = int(serial)
+        serial = str(value + 1)
+
+        log.info("Incrementing serial: %d -> %s", value, serial)
+
+        return serial
+
+    else :
+        # parse
+        value = int(serial)
+
+        try :
+            date = datetime.datetime.strptime(serial[:DATE_LEN], DATE_FMT).date()
+            count = int(serial[DATE_LEN:])
+
+        except ValueError, e :
+            # invalid date/count format?
+            log.warn("Unable to parse serial: %s: %s", serial, e)
+
+            serial = str(value + 1)
+
+            log.info("Incrementing serial: %d -> %s", value, serial)
+
+            return serial
+            
+        log.debug("old serial=%s, value=%d, date=%s, count=%s", serial, value, date, count)
+        
+    # update
+    if date < today :
+        log.info("Updating to today: %s -> %s", date, today)
+
+        # update date
+        return format_serial(today, 1)
+
+    elif date == today :
+        # keep date, update count
+        log.info("Updating today's count: %s, %s", date, count)
+        
+        # handle count rollover
+        return next_serial(date, count)
+
+    elif date > today :
+        # keep, update count
+        serial = next_serial(date, count)
+
+        log.warn("Serial in future; incrementing count: %s, %s -> %s", date, count, serial)
+
+        return serial
+
+    else :
+        raise Exception("Impossible serial: %s:%s", date, count)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/dns/zone.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,500 @@
+#!/usr/bin/env python
+
+"""
+    Process zonefiles.
+"""
+
+import codecs
+import datetime
+import logging
+import math
+import os.path
+
+log = logging.getLogger('pvl.dns.zone')
+
+class ZoneError (Exception) :
+    pass
+
+class ZoneLineError (ZoneError) :
+    """
+        ZoneLine-related error
+    """
+
+    def __init__ (self, line, msg, *args, **kwargs) :
+        super(ZoneLineError, self).__init__("%s: %s" % (line, msg.format(*args, **kwargs)))
+
+def process_generate (line, origin, parts) :
+    """
+        Process a 
+            $GENERATE <start>-<stop>[/<step>] lhs [ttl] [class] type rhs [comment]
+        directive into a series of ZoneResource's.
+
+        Raises ZoneLineError
+    """
+
+    parts = list(parts)
+    
+    try:
+        range = parse_generate_range(parts.pop(0))
+
+        lhs_func = parse_generate_field(parts.pop(0), line=line)
+        rhs_func = parse_generate_field(parts.pop(-1), line=line)
+    except ValueError as error:
+        raise ZoneLineError(line, "{error}", error=error)
+
+    body = parts
+
+    for i in range :
+        # build
+        parts = [lhs_func(i)] + body + [rhs_func(i)]
+
+        log.debug(" %03d: %r", i, parts)
+
+        # parse
+        yield ZoneRecord.parse(line, parts=parts, origin=origin)
+
+
+class ZoneLine (object) :
+    """
+        A line parsed from a zonefile.
+    """
+
+    @classmethod
+    def load (cls, file, ttl=None, origin=None, expand_generate=False, expand_include=False, **opts) :
+        """
+            Parse ZoneLine, ZoneRecord items from the given zonefile.
+        """
+
+        name = None
+
+        for line in cls.parse(file, **opts) :
+            if not line.parts :
+                log.debug("%s: skip empty line", line)
+
+            elif line.line.startswith('$') :
+                # control record
+                directive = ZoneDirective.parse(line,
+                        origin      = origin,
+                        comment     = line.comment,
+                )
+
+                if directive.directive == 'ORIGIN' :
+                    # update
+                    origin, = directive.arguments
+                    
+                    log.info("%s: origin: %s", line, origin)
+                    
+                    yield line, None
+
+                elif directive.directive == 'TTL' :
+                    ttl, = directive.arguments
+                    
+                    log.info("%s: ttl: %s", line, ttl)
+                    
+                    yield line, None
+                
+                elif directive.directive == 'GENERATE' :
+                    if expand_generate :
+                        # process...
+                        log.info("%s: generate: %s", line, directive.arguments)
+
+                        for record in process_generate(line, origin, directive.arguments) :
+                            yield line, record
+                    else :
+                        yield line, None
+
+                elif directive.directive == 'INCLUDE' :
+                    if expand_include :
+                        include, = directive.arguments
+
+                        path = os.path.join(os.path.dirname(file.name), include)
+                        
+                        log.info("%s: include: %s: %s", line, include, path)
+
+                        for record in cls.load(open(path)) :
+                            yield line, record
+                    else :
+                        yield line, None
+
+                else :
+                    log.warn("%s: skip unknown control record: %r", line, directive)
+                    yield line, None
+                
+            else :
+                # normal record?
+                record = ZoneRecord.parse(line,
+                        name    = name,
+                        origin  = origin,
+                        ttl     = ttl,
+                        comment = line.comment,
+                )
+
+                if record :
+                    yield line, record
+                    
+                    # keep name across lines
+                    name = record.name
+
+                else :
+                    # unknown
+                    log.warning("%s: skip unknown line: %s", line, line.line)
+
+                    yield line, None
+     
+
+    @classmethod
+    def parse (cls, file, filename=None, line_timestamp_prefix=None) :
+        """
+            Yield ZoneLines lexed from a file.
+        """
+        
+        if not filename :
+            filename = file.name
+        
+        multiline_start = None
+        multiline_parts = None
+        
+        for lineno, raw_line in enumerate(file) :
+            raw_line = raw_line.rstrip('\n')
+
+            # possible mtime prefix for line
+            timestamp = None
+
+            if line_timestamp_prefix :
+                if ': ' not in raw_line :
+                    raise ZoneError("%s:%d: Missing timestamp prefix: %s" % (filename, lineno, raw_line))
+
+                # split prefix
+                prefix, raw_line = raw_line.split(': ', 1)
+
+                # parse it out
+                timestamp = datetime.datetime.strptime(prefix, cls.PARSE_DATETIME_FORMAT)
+
+                log.debug("%s:%d: ts=%r", filename, lineno, ts)
+            
+            log.debug("%s:%d: %s", filename, lineno, raw_line)
+            
+            # capture indent from raw line
+            indent = raw_line.startswith(' ') or raw_line.startswith('\t')
+            line = raw_line.strip()
+
+            # parse comment
+            if ';' in line:
+                line, comment = line.split(';', 1)
+
+                line = line.strip()
+                comment = comment.strip()
+            else :
+                comment = None
+           
+            log.debug("%s:%d: indent=%r, line=%r, comment=%r", filename, lineno, indent, line, comment)
+
+            # split (quoted) fields
+            if '"' in line :
+                pre, data, post = line.split('"', 2)
+                parts = pre.split() + [data] + post.split()
+               
+            else :
+                parts = line.split()
+
+            # handle multi-line statements...
+            if '(' in parts :
+                assert not multiline_start
+
+                log.debug("%s:%d: Start of multi-line statement: %s", filename, lineno, line)
+
+                multiline_start = (lineno, timestamp, indent, comment)
+                multiline_line = raw_line
+                multiline_parts = []
+
+            if multiline_start:
+                log.debug("%s:%d: Multi-line statement: %s", filename, lineno, line)
+                
+                # XXX: some better way to do this
+                multiline_parts.extend([part for part in parts if part not in set('()')])
+                multiline_line += raw_line
+
+            if ')' in parts :
+                assert multiline_start
+
+                log.debug("%s:%d: End of multi-line statement: %s", filename, lineno, line)
+                
+                lineno, timestamp, indent, comment = multiline_start
+                raw_line = multiline_line
+                parts = multiline_parts
+
+                multiline_start = multiline_line = multiline_parts = None
+        
+            # parse
+            if multiline_start:
+                pass
+            else:
+                yield ZoneLine(filename, lineno, raw_line, indent, parts, comment, timestamp=timestamp)
+
+    file = None
+    lineno = None
+
+    # data
+    indent = None # was the line indented?
+    parts = None # split line fields
+
+    # optional
+    timestamp = None
+    comment = None
+
+    PARSE_DATETIME_FORMAT = '%Y-%m-%d'
+    
+    def __init__ (self, file, lineno, line, indent, parts, comment=None, timestamp=None) :
+        # source
+        self.file = file
+        self.lineno = lineno
+        self.line = line
+        
+        # parse data
+        self.indent = indent
+        self.parts = parts
+        
+        # metadata
+        self.timestamp = timestamp
+        self.comment = comment
+
+    def __unicode__ (self) :
+        return u"{indent}{parts}".format(
+                indent      = u"\t" if self.indent else '',
+                parts       = u'\t'.join(self.parts),
+        )
+
+    def __repr__ (self) :
+        return "{file}:{lineno}".format(file=self.file, lineno=self.lineno)
+
+class ZoneDirective (object) :
+    """
+        An $DIRECTIVE in a zonefile.
+    """
+    
+    # context
+    line    = None
+    origin  = None
+
+    # fields
+    directive   = None
+    arguments   = None
+    
+    @classmethod
+    def parse (cls, line, **opts) :
+        # control record
+        args = list(line.parts)
+        directive = args[0][1:]
+        arguments = args[1:]
+
+        return cls.build(line, directive, *arguments, **opts)
+
+    @classmethod
+    def build (cls, line, directive, *arguments, **opts) :
+        return cls(directive, arguments,
+                line        = line,
+                **opts
+        )
+
+    def __init__ (self, directive, arguments, line=None, origin=None, comment=None) :
+        self.directive  = directive
+        self.arguments  = arguments
+
+        self.line = line
+        self.origin = origin
+        self.comment = comment
+
+    def __unicode__ (self) :
+        """
+            Construct a zonefile-format line...
+        """
+
+        if self.comment :
+            comment = '\t; ' + self.comment
+        else :
+            comment = ''
+            
+        return u"${directive}\t{arguments}{comment}".format(
+                directive   = self.directive,
+                arguments   = '\t'.join(self.arguments),
+                comment     = comment,
+        )
+
+    def __repr__ (self) :
+        return '%s(%s)' % (self.__class__.__name__, ', '.join(repr(arg) for arg in (
+            (self.directive) + tuple(self.arguments)
+        )))
+
+
+class ZoneRecord (object) :
+    """
+        A record from a zonefile.
+    """
+    
+    # context
+    line = None # the underlying line
+    origin = None # possible $ORIGIN context
+
+    # record fields
+    name = None
+    ttl = None  # optional
+    cls = None  # optional
+    type = None
+    data = None # list of data fields
+    
+    @classmethod
+    def load (cls, file, **opts) :
+        """
+            Yield ZoneRecords from a file.
+        """
+
+        for line, record in ZoneLine.load(file, **opts) :
+            if record :
+                yield record
+            else :
+                log.warn("%s: unparsed line: %s", file.name, line)
+
+    @classmethod
+    def parse (cls, line, name=None, parts=None, ttl=None, **opts) :
+        """
+            Build a ZoneRecord from a ZoneLine.
+
+                name        - default for name, if continuing previous line
+
+            Return: (name, ZoneRecord)
+        """
+
+        if parts is None :
+            parts = list(line.parts)
+
+        if not parts :
+            # skip
+            return
+        
+        if line.indent :
+            # indented lines keep name from previous record
+            pass
+
+        else :
+            name = parts.pop(0)
+        
+        if len(parts) < 2 :
+            raise ZoneLineError(line, "Too few parts to parse: {0!r}", line.data)
+
+        # parse ttl/cls/type
+        _cls = None
+
+        if parts and parts[0][0].isdigit() :
+            ttl = parts.pop(0)
+
+        if parts and parts[0].upper() in ('IN', 'CH') :
+            _cls = parts.pop(0)
+
+        # always have type
+        type = parts.pop(0)
+
+        # remaining parts are data
+        data = parts
+
+        log.debug("  ttl=%r, cls=%r, type=%r, data=%r", ttl, _cls, type, data)
+
+        return cls.build(line, name, ttl, _cls, type, data, **opts)
+    
+    @classmethod
+    def build (cls, line, name, ttl, _cls, type, data, **opts) :
+        return cls(name, type, data,
+            ttl     = ttl,
+            cls     = _cls,
+            line    = line,
+            **opts
+        )
+
+    @classmethod
+    def A (cls, name, ip4, **opts) :
+        return cls(str(name), 'A', [str(ip4)], **opts)
+
+    @classmethod
+    def AAAA (cls, name, ip6, **opts) :
+        return cls(str(name), 'AAAA', [str(ip6)], **opts)
+
+    @classmethod
+    def CNAME (cls, name, host, **opts) :
+        return cls(str(name), 'CNAME', [str(host)], **opts)
+
+    @classmethod
+    def TXT (cls, name, text, **opts) :
+        return cls(str(name), 'TXT',
+            [u'"{0}"'.format(text.replace('"', '\\"'))], 
+            **opts
+        )
+
+    @classmethod
+    def PTR (cls, name, ptr, **opts) :
+        return cls(str(name), 'PTR', [str(ptr)], **opts)
+
+    @classmethod
+    def MX (cls, name, priority, mx, **opts) :
+        return cls(str(name), 'MX', [int(priority), str(mx)], **opts)
+
+    def __init__ (self, name, type, data, ttl=None, cls=None, line=None, origin=None, comment=None) :
+        self.name = name
+        self.type = type
+        self.data = data
+        
+        self.ttl = ttl
+        self.cls = cls
+        
+        self.line = line
+        self.origin = origin
+        self.comment = comment
+
+    def __unicode__ (self) :
+        """
+            Construct a zonefile-format line..."
+        """
+
+        if self.comment :
+            comment = '\t; ' + self.comment
+        else :
+            comment = ''
+            
+        return u"{name:25} {ttl:4} {cls:2} {type:5} {data}{comment}".format(
+                name    = self.name or '',
+                ttl     = self.ttl or '',
+                cls     = self.cls or '',
+                type    = self.type,
+                data    = ' '.join(unicode(data) for data in self.data),
+                comment = comment,
+        )
+
+    def __repr__ (self) :
+        return '%s(%s)' % (self.__class__.__name__, ', '.join(repr(arg) for arg in (
+            self.name, self.type, self.data
+        )))
+
+class SOA (ZoneRecord) :
+    @classmethod
+    def build (cls, line, name, ttl, _cls, type, data, **opts) :
+        assert name == '@'
+
+        return cls(*data,
+            ttl     = ttl,
+            cls     = cls,
+            line    = line,
+            **opts
+        )
+
+    def __init__ (self, master, contact, serial, refresh, retry, expire, nxttl, **opts) :
+        super(SOA, self).__init__('@', 'SOA',
+            [master, contact, serial, refresh, retry, expire, nxttl],
+            **opts
+        )
+
+        self.master = master
+        self.contact = contact
+        self.serial = serial
+        self.refresh = refresh
+        self.retry = retry
+        self.expire = expire
+        self.nxttl = nxttl
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/hosts/__init__.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,10 @@
+__version__ = '0.8.0-dev'
+
+from pvl.hosts.config import (
+        optparser,
+        apply,
+)
+from pvl.hosts.host import (
+        HostError,
+        Host,
+)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/hosts/config.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,368 @@
+"""
+    Load Hosts from config files.
+"""
+
+import configobj
+import logging; log = logging.getLogger('pvl.hosts')
+import optparse
+import os.path
+import pvl.args
+import pvl.dns
+import sys
+
+from pvl.hosts.host import Host
+
+def optparser (parser):
+    hosts = optparse.OptionGroup(parser, "Hosts config files")
+    hosts.add_option('--hosts-charset',         metavar='CHARSET',  default='utf-8', 
+            help="Encoding used for host files")
+
+    hosts.add_option('--hosts-domain',          metavar='DOMAIN',
+            help="Default domain for hosts. Default uses config file basename")
+
+    hosts.add_option('--hosts-include',         metavar='PATH',
+            help="Optional path for hosts includes, in addition to the host config dir")
+    
+    return hosts
+
+class HostConfigError (Exception):
+    """
+        Generic error for file path.
+    """
+
+    def __init__ (self, config, error):
+        self.config = config
+        self.error = error
+
+    def __str__ (self):
+        return "{self.config}: {self.error}".format(self=self)        
+
+class HostConfigObjError (Exception):
+    """
+        An error from ConfigObj for a config file path.
+    """
+
+    def __init__ (self, config, error):
+        self.config = config
+        self.error = error
+
+        self.line_contents = error.line
+
+    def __str__ (self):
+        return "{self.config}:{self.error.line_number}: {self.error.message}".format(self=self)        
+
+def parse_expand(name):
+    """
+        Parse a name containing an optional expansion part.
+
+            name:           hostname containing optional "{...}" part
+
+        Returns (name, range or None).
+    """
+
+    if '{' in name:
+        # consume the first {...} token as the range
+        pre, name = name.split('{', 1)
+        range, post = name.split('}', 1)
+        
+        # if there's a second {...} token, it will be re-composed into ${...}
+        name = pre + "$" + post
+        
+        # TODO: raise HostConfigError
+        range = pvl.dns.parse_generate_range(range)
+    else:
+        range = None
+
+    return name, range
+
+def parse_config_field(field):
+    """
+        Parse structured config fields.
+
+            [<extension> ":"] <field> ["." <instance>]
+    """
+
+    if ':' in field :
+        extension, field = field.split(':', 1)
+    else:
+        extension = None
+
+    if '.' in field :
+        field, instance = field.split('.')
+    else :
+        instance = None
+    
+    return extension, field, instance
+
+def apply_host (name, domain, config):
+    """
+        Return Host from an (expanded) config section.
+            
+            name        - (expanded) name of host
+            domain      - domain for host
+            config      - host config fields to parse
+        
+        Raises ValueError.
+    """
+
+    fields = { }
+    extensions = fields['extensions'] = { }
+
+    for field, value in config.iteritems():
+        extension, field, instance = parse_config_field(field)
+
+        if extension:
+            f = extensions.setdefault(extension, {})
+        else:
+            f = fields
+        
+        if not instance and field not in f:
+            f[field] = value
+
+        elif field not in f:
+            f[field] = {instance: value}
+        elif isinstance(f[field], dict):
+            f.setdefault(field, {})[instance] = value
+        else:
+            raise ValueError("override instanced {field} value: {value}".format(field=field, value=value))
+    
+    return Host.build(name, domain, **fields)
+
+def apply_hosts (parent, name, config):
+    """
+        Yield Hosts from a given config section.
+            
+            parent      - parent filename/section containing this host item, or None.
+                          used for domain
+            name        - name of the section (or file) containing this host item.
+                          used for hostname
+            config      - host parameters to parse
+        
+        Raises ValueError.
+    """
+    
+    if '@' in name:
+        name, domain = name.split('@', 1)
+        log.debug("%s: using explicit domain: %s", name, domain)
+    elif '.' in name:
+        log.debug("%s: using as fqdn without domain", name)
+        domain = None
+    elif parent:
+        log.debug("%s: default domain to section: %s", name, parent)
+        domain = parent
+    else:
+        # XXX: impossible?
+        raise ValueError("no domain given")
+    
+    # expand?
+    name, range = parse_expand(name)
+    
+    if range:
+        generate_name = pvl.dns.parse_generate_field(name)
+        
+        # expand all fields
+        generate_config = {field: pvl.dns.parse_generate_field(value) for field, value in config.iteritems()}
+
+        for i in range:
+            yield apply_host(generate_name(i), domain, 
+                    {field: value(i) for field, value in generate_config.iteritems()},
+            )
+
+    else:
+        # single host
+        yield apply_host(name, domain, config)
+
+def parse_config_includes (options, config_path, includes, **opts):
+    """
+        Yield file paths from a given config's include=... value
+    """
+    
+    # relative
+    include_paths = [os.path.dirname(config_path)]
+    
+    if options.hosts_include:
+        include_paths.append(options.hosts_include)
+
+    for include in includes:
+        for include_path in include_paths:
+            path = os.path.join(include_path, include)
+
+            if os.path.exists(path):
+                break
+        else:
+            raise HostConfigError(config_path, "Unable to find include {include} in include path: {include_path}".format(
+                    include=include,
+                    include_path=' '.join(include_paths),
+            ))
+
+
+        log.info("%s: include: %s", config_path, path)
+        yield path
+
+def apply_hosts_configs (options, path, name, config, parent=None, defaults={}):
+    """
+        Load hosts from a configobj.Section (which can be the top-level ConfigObj).
+
+            options         global options
+            path            filesystem path of file (for errors)
+            name            name of this section/file
+            config          configobj.Section
+            parent          parent section from included files or --hosts-domain
+            defaults        hierarchial section defaults
+    """
+    
+    # items in this section
+    section = dict(defaults)
+    for scalar in config.scalars:
+        section[scalar] = config[scalar]
+
+    # process includes?
+    if 'include' in section:
+        includes = section.pop('include').split()
+
+        includes = list(parse_config_includes(options, path, includes))
+
+        # within our domain context
+        for host in apply_hosts_files(options, includes, parent=name):
+            yield host
+    else:
+        includes = None
+
+    if config.sections:
+        # this is a top-level section that includes hosts
+        if parent:
+            log.info("%s: @%s@%s", path, name, parent)
+
+            name = pvl.dns.join(name, parent)
+        else:
+            log.info("%s: @%s", path, name)
+
+        # recurse until we hit a scalar-only section representing a host
+        for section_name in config.sections:
+            log.debug("%s: %s: %s", path, name, section_name)
+
+            for host in apply_hosts_configs(options, path, section_name, config[section_name], parent=name, defaults=section):
+                yield host
+
+    elif parent:
+        # this is a host section
+        log.debug("%s: %s@%s", path, name, parent)
+        
+        try:
+            for host in apply_hosts(parent, name, section):
+                log.info("%s: %s", path, host)
+
+                yield host
+        
+        except ValueError as error:
+            log.exception("%s: %s: %s", path, parent, name)
+
+            raise HostConfigError(path, "{parent}: {name}: {error}".format(parent=parent, name=name, error=error))
+
+    elif includes:
+        # includes-only zone
+        pass
+
+    elif section:
+        raise HostConfigError(path, "Top-level hosts are only allowed in included confs")
+    else:
+        # empty file
+        log.info("%s: skip empty conf", path)
+
+def apply_hosts_config (options, file, **opts):
+    """
+        Load Hosts from a file path.
+            
+            file            - opened file object, with .name attribute
+
+        Raises
+            HostConfigError
+            HostConfigObjError
+    """
+   
+    # use file basename as default domain
+    path = file.name
+    name = os.path.basename(path)
+
+    try:
+        config = configobj.ConfigObj(file,
+                raise_errors    = True, # raise ConfigPObjError immediately
+                interpolation   = 'Template',
+                encoding        = options.hosts_charset,
+        )
+    except configobj.ConfigObjError as ex:
+        raise HostConfigObjError(path, ex)
+    
+    return apply_hosts_configs(options, path, name, config, **opts)
+
+def apply_hosts_file (options, path, **opts):
+    """
+        Load Hosts from a file path.
+    """
+
+    try:
+        file = open(path)
+    except IOError as ex:
+        raise HostConfigError(path, ex.strerror)
+
+    for host in apply_hosts_config(options, file, **opts):
+        yield host
+
+def apply_hosts_directory (options, root, **opts):
+    """
+        Load Hosts from a directory, loading each file within the directory.
+
+        Skips .dotfiles.
+    """
+
+    for name in os.listdir(root):
+        path = os.path.join(root, name)
+
+        if name.startswith('.'):
+            log.debug("%s: skip dotfile: %s", root, name)
+            continue
+
+        if os.path.isdir(path):
+            log.debug("%s: skip directory: %s", root, name)
+            continue
+
+        for host in apply_hosts_file(options, path, **opts):
+            yield host
+
+def apply_hosts_files (options, files, **opts):
+    """
+        Load Hosts from files.
+
+            files:[str]     list of filesystem paths, which may be directories or files
+    """
+
+    for path in files:
+        if os.path.isdir(path):
+            for host in apply_hosts_directory(options, path, **opts):
+                yield host
+        else:
+            for host in apply_hosts_file(options, path, **opts):
+                yield host
+
+def apply (options, args):
+    """
+        Load Hosts from arguments.
+
+        Exits with status=2 if loading the confs fails.
+    """
+    
+    try:
+        # load hosts from configs
+        hosts = list(apply_hosts_files(options, args))
+    except HostConfigObjError as error:
+        log.error("%s", error)
+        log.error("\t%s", error.line_contents)
+        sys.exit(2)
+
+    except HostConfigError as error:
+        log.error("%s", error)
+        sys.exit(2)
+
+    # stable ordering
+    return sorted(hosts, key=Host.sort_key)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/hosts/dhcp.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,87 @@
+import pvl.dhcp.config
+import pvl.hosts.host
+
+class HostDHCPError(pvl.hosts.host.HostError):
+    pass
+
+def dhcp_host_options (host, ethernet):
+    """
+        Yield specific dhcp.conf host { ... } parameters for build_block()
+    """
+
+    yield 'option', 'host-name', host.name
+    yield 'hardware', 'ethernet', ethernet
+
+    if host.ip:
+        yield 'fixed-address', str(host.ip)
+      
+    if not host.boot:
+        next_server = filename = None
+    elif host.boot.startswith('/'):
+        next_server = None
+        filename = host.boot[1:]
+    elif host.boot.endswith(':'):
+        next_server = host.boot[:-1]
+        filename = None
+    elif ':' in host.boot :
+        next_server, filename = host.boot.split(':', 1)
+    else :
+        raise HostError(host, "invalid boot={host.boot}".format(host=host))
+
+    if next_server:
+        yield 'next-server', next_server
+    
+    if filename:
+        yield 'filename', filename
+
+def dhcp_host (host):
+    """
+        Yield (block, items, **opts) tuples for pvl.dhcp.config.build_block().
+    """
+
+    if set(host.ethernet) == set([None]) :
+        host_fmt = "{host.name}"
+    elif host.ethernet :
+        host_fmt = "{host.name}-{index}"
+    else :
+        # nothing to be seen here
+        return
+ 
+    if host.owner :
+        comment = u"Owner: {host.owner}".format(host=host)
+    else:
+        comment = None
+
+    for index, ethernet in host.ethernet.iteritems() :
+        name = host_fmt.format(host=host, index=index)
+
+        yield ('host', name), list(dhcp_host_options(host, ethernet)), dict(comment=comment)
+    
+def dhcp_hosts (hosts):
+    """
+
+        Verifies that there are no dupliate hosts.
+    """
+
+    blocks = { }
+
+    for host in hosts:
+        for block, items, opts in dhcp_host(host):
+            if block in blocks:
+                raise HostDHCPError(host, "hosts on multiple networks must use unique ethernet.XXX=... naming: {other}".format(block=block, other=blocks[block]))
+
+            blocks[block] = host
+
+            yield block, items, opts
+
+def apply_hosts_dhcp (hosts):
+    """
+        Generate dhcp.conf output lines for the set of hosts.
+    """
+    
+    for block, items, opts in dhcp_hosts(hosts):
+        for line in pvl.dhcp.config.build_block(block, items, **opts):
+            yield line
+        
+        yield ''
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/hosts/host.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,207 @@
+import collections
+import ipaddr
+import logging; log = logging.getLogger('pvl.hosts.host')
+import pvl.dns
+
+class HostError (Exception):
+    """
+        An error associated with some specific Host.
+    """
+
+    def __init__(self, host, error):
+        """
+            host    : Host which caused error
+            error   : Exception or str message
+        """
+        self.host = host
+        self.error = error
+
+    def __str__ (self):
+        return "{self.host}: {self.error}".format(self=self)
+
+def parse_bool(value):
+    """
+         Normalize optional boolean value.
+    """
+
+    if value is None:
+        return None
+    elif value:
+        return True
+    else:
+        return False
+
+def parse_ip(value, type):
+    if value:
+        return type(value)
+    else:
+        return None
+        
+def parse_list(value):
+    """
+        Parse list of strings.
+    """
+
+    if value:
+        return value.split()
+    else:
+        return ()
+
+def parse_location(location, domain):
+    """
+        Parse location@domain.
+    """
+
+    if not location:
+        return None
+
+    if '@' in location:
+        location, location_domain = location.split('@', 1)
+    else:
+        location_domain = domain
+    
+    return (location, location_domain)
+
+def parse_ethernet(value):
+    """
+        Normalize ethernet str.
+    """
+
+    return ':'.join('%02x' % int(x, 16) for x in value.split(':'))
+
+def parse_str(value):
+    """
+        Normalize optional string value.
+    """
+
+    if value is None:
+        # omit
+        return None
+
+    elif value:
+        return str(value)
+
+    else:
+        # empty value
+        return False
+
+def parse_dict(value, parse):
+    if isinstance(value, dict):
+        values = value
+    else:
+        values = {None: value}
+
+    return { instance: parse(value) for instance, value in values.iteritems() }
+
+class Host (object) :
+    """
+        A host is a network node that can have multiple ethernet interfaces, and multiple IP addresses in different domains.
+    """
+
+    # the label used for alias4/6 hosts
+    ALIAS4_FMT = '{host}-ipv4'
+    ALIAS6_FMT = '{host}-ipv6'
+   
+    @classmethod
+    def build (cls, name, domain,
+            ip=None, ip6=None,
+            ethernet={ },
+            owner=None,
+            location=None,
+            alias=None, alias4=None, alias6=None,
+            forward=None, reverse=None,
+            down=None,
+            boot=None,
+            extensions=None,
+    ) :
+        """
+            Return a Host initialized from data attributes.
+
+            This handles all string parsing to our data types.
+        """
+
+        return cls(name,
+                domain      = domain,
+                ip          = parse_ip(ip, ipaddr.IPv4Address),
+                ip6         = parse_ip(ip6, ipaddr.IPv6Address),
+                ethernet    = parse_dict(ethernet,  parse_ethernet),
+                owner       = owner,
+                location    = parse_location(location, domain),
+                alias       = parse_list(alias),
+                alias4      = parse_list(alias4),
+                alias6      = parse_list(alias6),
+                forward     = parse_str(forward),
+                reverse     = parse_str(reverse),
+                down        = parse_bool(down),
+                boot        = boot,
+                extensions  = extensions,
+        )
+
+    def __init__ (self, name, domain,
+            ip=None, ip6=None,
+            ethernet={ },
+            owner=None,
+            location=None,
+            alias=(), alias4=(), alias6=(),
+            forward=None, reverse=None,
+            down=None,
+            boot=None,
+            extensions={},
+    ):
+        """
+            name        - str
+            domain      - str
+            ip          - ipaddr.IPv4Address
+            ip6         - ipaddr.IPv6Address
+            ethernet    - { index: ethernet }
+            alias       - [ str ]: generate CNAMEs for given relative names
+            owner       - str: LDAP uid
+            location    - None or (name, domain)
+            alias4      - [ str ]: generate additional A records for given relative names
+            alias6      - [ str ]: generate additional AAAA records for given relative names
+            forward     - None: generate forward zone A/AAAA records per ip/ip6
+                          False: omit A/AAAA records (and any alias= CNAMEs)
+                          str: generate forward zone CNAME to given fqdn
+            reverse     - None: generate reverse zone PTR records per ip/ip6
+                          False: omit PTR records for ip/ip6
+                          str: generate IPv4 reverse zone CNAME to given fqdn, and omit IPv6 PTR
+            down        - mark as offline for polling
+        """
+
+        self.name = name
+        self.domain = domain
+        self.ip = ip
+        self.ip6 = ip6
+        self.ethernet = ethernet
+        self.alias = alias
+        self.alias4 = alias4
+        self.alias6 = alias6
+        self.owner = owner
+        self.location = location
+        self.boot = boot
+        self.forward = forward
+        self.reverse = reverse
+        self.down = down
+        self.extensions = extensions
+
+    def sort_key (self):
+        """
+            Stable sort ordering
+        """
+
+        if self.ip:
+            return self.ip
+        else:
+            # sorts first
+            return ipaddr.IPAddress(0)
+
+    def fqdn (self):
+        if self.domain:
+            return pvl.dns.fqdn(self.name, self.domain)
+        else:
+            return pvl.dns.fqdn(self.name)
+    
+    def __str__ (self):
+        return "{self.name}@{domain}".format(self=self,
+                domain      = self.domain or '',
+        )
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/hosts/tests.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,699 @@
+import ipaddr
+import pvl.args
+import unittest
+
+from pvl.hosts import config, dhcp, zone
+from pvl.hosts.host import Host
+from StringIO import StringIO
+
+class ConfFile(StringIO):
+    def __init__(self, name, buffer):
+        StringIO.__init__(self, buffer)
+        self.name = name
+
+class TestConfig(unittest.TestCase):
+    def setUp(self):
+        self.options = pvl.args.options(
+                hosts_charset   = 'utf-8',
+                hosts_domain    = None,
+                hosts_include   = None,
+        )
+
+    def assertHostEqual(self, host, host_str, attrs):
+        self.assertEquals(str(host), host_str)
+
+        for attr, value in attrs.iteritems():
+            self.assertEquals(getattr(host, attr), value)
+
+    def assertHostsEqual(self, hosts, expected):
+        hosts = list(hosts)
+
+        for host, expect in zip(hosts, expected):
+            host_str, attrs = expect
+
+            self.assertHostEqual(host, host_str, attrs)
+
+        self.assertEqual(len(hosts), len(expected))
+ 
+    def testApplyHostConfigDict(self):
+        host = config.apply_host('foo', 'test', {
+            'ethernet.eth0': '00:11:22:33:44:55',
+        })
+
+        self.assertHostEqual(host, 'foo@test', dict(
+                ethernet    = { 'eth0': '00:11:22:33:44:55' }
+        ))
+
+    def testApplyHostConfigDictMulti(self):
+        host = config.apply_host('foo', 'test', {
+            'ethernet.eth0': '00:11:22:33:44:55',
+            'ethernet.eth1': '00:11:22:33:44:66',
+        })
+
+        self.assertHostEqual(host, 'foo@test', dict(
+                ethernet    = {
+                    'eth0': '00:11:22:33:44:55',
+                    'eth1': '00:11:22:33:44:66',
+                }
+        ))
+   
+    def testApplyHostsConfigErrorDict(self):
+        with self.assertRaises(ValueError):
+            config.apply_host('test', 'foo', {
+                'ethernet': 'foo',
+                'ethernet.eth0': 'bar',
+            })
+
+    def testApplyHostConfigExtensions(self):
+        host = config.apply_host('foo', 'test', {
+            'link:50':          'foo@test',
+            'link:uplink.49':   'bar@test',
+        })
+
+        self.assertHostEqual(host, 'foo@test', dict(
+                extensions = {
+                    'link': {
+                        '50': 'foo@test',
+                        'uplink': { '49': 'bar@test' },
+                    },
+                },
+        ))
+   
+    def testApplyHostFqdn(self):
+        self.assertHostsEqual(config.apply_hosts('test', 'asdf@foo.test', { }), [
+                ('asdf@foo.test', dict()),
+        ])
+
+        self.assertHostsEqual(config.apply_hosts('test', 'asdf.test2', { }), [
+                ('asdf.test2@', dict()),
+        ])
+
+    def testApplyHostExpand(self):
+        self.assertHostsEqual(config.apply_hosts('test', 'asdf{1-3}', { 'ip': '10.100.100.$' }), [
+                ('asdf1@test', dict(ip=ipaddr.IPAddress('10.100.100.1'))),
+                ('asdf2@test', dict(ip=ipaddr.IPAddress('10.100.100.2'))),
+                ('asdf3@test', dict(ip=ipaddr.IPAddress('10.100.100.3'))),
+        ])
+
+    def testApplyHostsFileError(self):
+        with self.assertRaises(config.HostConfigError):
+            list(config.apply_hosts_files(self.options, ['nonexistant']))
+
+    def testApplyHostsConfig(self):
+        conf_file = ConfFile('test', """
+[foo]
+    ip = 127.0.0.1
+
+[bar]
+    ip = 127.0.0.2
+        """)
+        
+        self.assertHostsEqual(config.apply_hosts_config(self.options, conf_file), [
+                ('foo@test', dict(ip=ipaddr.IPAddress('127.0.0.1'))),
+                ('bar@test', dict(ip=ipaddr.IPAddress('127.0.0.2'))),
+        ])
+
+    def testApplyHostsConfigNested(self):
+        conf_file = ConfFile('test', """
+[asdf]
+    [[foo]]
+        ip = 127.0.0.1
+
+[quux]
+    [[bar]]
+        ip = 127.0.0.2
+        """)
+
+        self.assertHostsEqual(config.apply_hosts_config(self.options, conf_file), [
+                ('foo@asdf.test', dict(ip=ipaddr.IPAddress('127.0.0.1'))),
+                ('bar@quux.test', dict(ip=ipaddr.IPAddress('127.0.0.2'))),
+        ])
+
+    def testApplyIncludes(self):
+        self.assertHostsEqual(config.apply_hosts_files(self.options, ['etc/hosts/test']), [
+                ('foo@test', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.1'),
+                )),
+                ('bar@test', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.2'),
+                )),
+        ])
+
+    def testApplyIncludePath(self):
+        self.options.hosts_include = 'etc/hosts'
+        self.assertHostsEqual(config.apply_hosts_files(self.options, ['etc/zones/forward/test']), [
+                ('quux@asdf.test', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.5'),
+                )),
+                ('foo@test', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.1'),
+                )),
+                ('bar@test', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.2'),
+                )),
+        ])
+
+    def testApply(self):
+        self.assertHostsEqual(config.apply(self.options, ['etc/hosts/example.com']), [
+                ('foo@example.com', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.1'),
+                    ethernet    = {None: '00:11:22:33:44:55'},
+                )),
+                ('bar@example.com', dict(
+                    ip          = ipaddr.IPAddress('192.0.2.2'),
+                    ethernet    = {None: '01:23:45:67:89:ab'},
+                )),
+        ])
+
+class TestZoneMixin(object):
+    def assertZoneEquals(self, rrs, expected):
+        gather = { }
+
+        for rr in rrs:
+            key = (rr.name.lower(), rr.type.upper())
+
+            self.assertNotIn(key, gather)
+
+            gather[key] = rr.data
+
+        self.assertDictEqual(gather, expected)
+
+
+class TestForwardZone(TestZoneMixin, unittest.TestCase):
+    def testHostOutOfOrigin(self):
+        h = Host.build('host', 'domain', 
+                ip  = '10.0.0.1',
+        )
+
+        self.assertZoneEquals(zone.host_forward(h, 'test'), { })
+
+    def testHostIP(self):
+        h = Host.build('host', 'domain',
+                ip  = '192.0.2.1',
+                ip6 = '2001:db8::192.0.2.1',
+        )
+
+        self.assertZoneEquals(zone.host_forward(h, 'domain'), {
+            ('host', 'A'): ['192.0.2.1'],
+            ('host', 'AAAA'): ['2001:db8::c000:201'],
+        })
+    
+    def testHostAlias(self):
+        h = Host.build('host', 'domain',
+                ip      = '192.0.2.1',
+                alias   = 'test *.test',
+        )
+
+        self.assertEquals(h.alias, ['test', '*.test'])
+
+        self.assertZoneEquals(zone.host_forward(h, 'domain'), {
+            ('host', 'A'): ['192.0.2.1'],
+            ('test', 'CNAME'): ['host'],
+            ('*.test', 'CNAME'): ['host'],
+        })
+
+    def testHostAlias46(self):
+        h = Host.build('host', 'domain',
+                ip      = '192.0.2.1',
+                ip6     = '2001:db8::192.0.2.1',
+                alias4  = 'test4',
+                alias6  = 'test6',
+        )
+
+        self.assertZoneEquals(zone.host_forward(h, 'domain'), {
+            ('host', 'A'): ['192.0.2.1'],
+            ('host', 'AAAA'): ['2001:db8::c000:201'],
+            ('test4', 'A'): ['192.0.2.1'],
+            ('test6', 'AAAA'): ['2001:db8::c000:201'],
+        })
+
+    def testHostAlias4Missing(self):
+        h = Host.build('host', 'domain',
+                ip6     = '2001:db8::192.0.2.1',
+                alias4  = 'test4',
+                alias6  = 'test6',
+        )
+
+        with self.assertRaises(zone.HostZoneError):
+            self.assertZoneEquals(zone.host_forward(h, 'domain'), { })
+
+    def testHostAlias6Missing(self):
+        h = Host.build('host', 'domain',
+                ip      = '192.0.2.1',
+                alias4  = 'test4',
+                alias6  = 'test6',
+        )
+
+        with self.assertRaises(zone.HostZoneError):
+            self.assertZoneEquals(zone.host_forward(h, 'domain'), { })
+
+    def testHostFQDN(self):
+        h = Host.build('host.example.net', None,
+                ip          = '192.0.2.3',
+        )
+
+        self.assertZoneEquals(zone.host_forward(h, 'example.com'), {
+
+        })
+
+    def testHostDelegate(self):
+        h = Host.build('host', 'example.com',
+                forward = 'host.example.net',
+        )
+
+        self.assertZoneEquals(zone.host_forward(h, 'example.com'), {
+            ('host', 'CNAME'): ['host.example.net.'],
+        })
+
+    def testHostForwardAlias(self):
+        h = Host.build('host', 'domain',
+                forward = 'host.example.net',
+                alias   = 'test',
+        )
+
+        self.assertZoneEquals(zone.host_forward(h, 'domain'), {
+            ('host', 'CNAME'): ['host.example.net.'],
+            ('test', 'CNAME'): ['host'],
+        })
+
+    def testHostLocation(self):
+        h = Host.build('host', 'domain',
+                ip          = '192.0.2.1',
+                location    = 'test',
+        )
+
+        self.assertEquals(h.location, ('test', 'domain'))
+
+        self.assertZoneEquals(zone.host_forward(h, 'domain'), {
+            ('host', 'A'): ['192.0.2.1'],
+            ('test', 'CNAME'): ['host'],
+        })
+
+    def testHostLocationDomain(self):
+        h = Host.build('host', 'foo.domain',
+                ip          = '192.0.2.1',
+                location    = 'test@bar.domain',
+        )
+
+        self.assertEquals(h.location, ('test', 'bar.domain'))
+
+        self.assertZoneEquals(zone.host_forward(h, 'domain'), {
+            ('host.foo', 'A'): ['192.0.2.1'],
+            ('test.bar', 'CNAME'): ['host.foo'],
+        })
+
+    def testHostLocationDomainOutOfOrigin(self):
+        h = Host.build('host', 'foo.domain',
+                ip          = '192.0.2.1',
+                location    = 'test@bar.domain',
+        )
+
+        self.assertEquals(h.location, ('test', 'bar.domain'))
+
+        with self.assertRaises(zone.HostZoneError):
+            self.assertZoneEquals(zone.host_forward(h, 'foo.domain'), {
+                ('host', 'A'): ['192.0.2.1'],
+            })
+        
+        # TODO
+        #self.assertZoneEquals(zone.host_forward(h, 'bar.domain'), {
+        #    ('test', 'CNAME'): ['host.foo'],
+        #})
+
+    def testHostsForward(self):
+        hosts = [
+                Host.build('foo', 'domain',
+                    ip      = '192.0.2.1',
+                    ip6     = '2001:db8::192.0.2.1',
+                    alias   = 'test',
+                ),
+                Host.build('bar', 'domain',
+                    ip      = '192.0.2.2',
+                ),
+                Host.build('quux', 'example',
+                    ip      = '192.0.2.3',
+                ),
+        ]
+                
+        rrs = zone.apply_hosts_forward(hosts, 'domain', add_origin=True)
+    
+        # handle the $ORIGIN directive
+        rd = next(rrs)
+
+        self.assertEquals(unicode(rd), '$ORIGIN\tdomain.')
+
+        self.assertZoneEquals(rrs, {
+            ('foo', 'A'): ['192.0.2.1'],
+            ('foo', 'AAAA'): ['2001:db8::c000:201'],
+            ('test', 'CNAME'): ['foo'],
+            ('bar', 'A'): ['192.0.2.2'],
+        })
+
+    def testHostsConflict(self):
+        hosts = [
+                Host.build('foo', 'domain',
+                    ip      = '192.0.2.1',
+                ),
+                Host.build('foo', 'domain',
+                    ip      = '192.0.2.2',
+                )
+        ]
+        
+        with self.assertRaises(zone.HostZoneError):
+            self.assertZoneEquals(zone.apply_hosts_forward(hosts, 'domain'), { })
+
+    def testHostsAliasConflict(self):
+        hosts = [
+                Host.build('foo', 'domain',
+                    ip          = '192.0.2.1',
+                ),
+                Host.build('bar', 'domain',
+                    ip          = '192.0.2.2',
+                    alias       = 'foo',
+                )
+        ]
+        
+        # with A first
+        with self.assertRaises(zone.HostZoneError):
+            self.assertZoneEquals(zone.apply_hosts_forward(hosts, 'domain'), { })
+    
+        # also with CNAME first
+        with self.assertRaises(zone.HostZoneError):
+            self.assertZoneEquals(zone.apply_hosts_forward(reversed(hosts), 'domain'), { })
+
+    def testHostsAlias4Conflict(self):
+        hosts = [
+                Host.build('foo', 'domain',
+                    ip          = '192.0.2.1',
+                ),
+                Host.build('bar', 'domain',
+                    ip          = '192.0.2.2',
+                    alias4      = 'foo',
+                )
+        ]
+        
+        with self.assertRaises(zone.HostZoneError):
+            self.assertZoneEquals(zone.apply_hosts_forward(hosts, 'domain'), { })
+    
+
+class TestReverseZone(TestZoneMixin, unittest.TestCase):
+    def testHostIP(self):
+        h = Host.build('host', 'domain',
+                ip  = '192.0.2.1',
+                ip6 = '2001:db8::192.0.2.1',
+        )
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.2.1/24'))), {
+            ('1', 'PTR'): ['host.domain.'],
+        })
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8::/64'))), {
+            ('1.0.2.0.0.0.0.c.0.0.0.0.0.0.0.0', 'PTR'): ['host.domain.'],
+        })
+
+    def testHostIP4(self):
+        h = Host.build('host', 'domain',
+                ip  = '192.0.2.1',
+        )
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.2.1/24'))), {
+            ('1', 'PTR'): ['host.domain.'],
+        })
+        
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.0.0/16'))), {
+            ('1.2', 'PTR'): ['host.domain.'],
+        })
+        
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.0.0/12'))), {
+            ('1.2.0', 'PTR'): ['host.domain.'],
+        })
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8::/64'))), {
+
+        })
+
+    def testHostIP6(self):
+        h = Host.build('host', 'domain',
+                ip6 = '2001:db8::192.0.2.1',
+        )
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.2.1/24'))), {
+        })
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8::/64'))), {
+            ('1.0.2.0.0.0.0.c.0.0.0.0.0.0.0.0', 'PTR'): ['host.domain.'],
+        })
+
+    def testHostIPOutOfPrefix(self):
+        h = Host.build('host', 'domain',
+                ip  = '192.0.2.1',
+                ip6 = '2001:db8::192.0.2.1',
+        )
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.1.0/24'))), {
+
+        })
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8:1::/64'))), {
+
+        })
+
+    def testHostFQDN(self):
+        h = Host.build('host.example.net', None,
+                ip          = '192.0.2.3',
+                ip6         = '2001:db8::192.0.2.3',
+        )
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.2.1/24'))), {
+            ('3', 'PTR'): ['host.example.net.'],
+
+        })
+        
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8::/64'))), {
+            ('3.0.2.0.0.0.0.c.0.0.0.0.0.0.0.0', 'PTR'): ['host.example.net.'],
+        })
+
+    def testHostDelegate(self):
+        h = Host.build('host', 'example.com',
+                ip      = '192.0.2.1',
+                ip6     = '2001:db8::192.0.2.1',
+                forward = '',
+                reverse = '1.0/28.2.0.192.in-addr.arpa',
+        )
+
+        self.assertZoneEquals(zone.host_forward(h, 'example.com'), {
+
+        })
+
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('192.0.2.1/24'))), {
+            ('1', 'CNAME'): ['1.0/28.2.0.192.in-addr.arpa.'],
+        })
+        
+        self.assertZoneEquals((rr for ip, rr in zone.host_reverse(h, ipaddr.IPNetwork('2001:db8::/64'))), {
+
+        })
+
+    def testHosts(self):
+        hosts = [
+                Host.build('foo', 'domain',
+                    ip      = '192.0.2.1',
+                ),
+                Host.build('bar', 'domain',
+                    ip      = '192.0.2.2',
+                )
+        ]
+        
+        self.assertZoneEquals(zone.apply_hosts_reverse(hosts, ipaddr.IPNetwork('192.0.2.1/24')), {
+            ('1', 'PTR'): ['foo.domain.'],
+            ('2', 'PTR'): ['bar.domain.'],
+        })
+        
+        # in ip order
+        self.assertZoneEquals(zone.apply_hosts_reverse(reversed(hosts), ipaddr.IPNetwork('192.0.2.1/24')), {
+            ('1', 'PTR'): ['foo.domain.'],
+            ('2', 'PTR'): ['bar.domain.'],
+        })
+
+    def testHostsConflict(self):
+        hosts = [
+                Host.build('foo', 'domain',
+                    ip      = '192.0.2.1',
+                ),
+                Host.build('bar', 'domain',
+                    ip      = '192.0.2.1',
+                )
+        ]
+        
+        with self.assertRaises(zone.HostZoneError):
+            self.assertZoneEquals(zone.apply_hosts_reverse(hosts, ipaddr.IPNetwork('192.0.2.1/24')), { })
+
+    def testHostsGenerateUnknown(self):
+        hosts = [
+                Host.build('foo', 'domain',
+                    ip      = '192.0.2.1',
+                ),
+                Host.build('bar', 'domain',
+                    ip      = '192.0.2.5',
+                ),
+        ]
+        
+        self.assertZoneEquals(zone.apply_hosts_reverse(hosts, ipaddr.IPNetwork('192.0.2.1/29'),
+                unknown_host = 'ufc',
+                unknown_domain = 'domain',
+        ), {
+            ('1', 'PTR'): ['foo.domain.'],
+            ('2', 'PTR'): ['ufc.domain.'],
+            ('3', 'PTR'): ['ufc.domain.'],
+            ('4', 'PTR'): ['ufc.domain.'],
+            ('5', 'PTR'): ['bar.domain.'],
+            ('6', 'PTR'): ['ufc.domain.'],
+        })
+
+class TestDhcp(unittest.TestCase):
+    def assertBlocksEqual(self, blockdefs, expected):
+        for (_block, _items, _opts), (block, items, opts) in zip(blockdefs, expected):
+            self.assertEqual(_block, block)
+            self.assertItemsEqual(_items, items)
+
+            if opts is not None:
+                self.assertEqual(_opts, opts)
+        
+        self.assertEqual(len(blockdefs), len(expected))
+    
+    def testHost(self):
+        host = Host.build('foo', 'test',
+                ip          = '192.0.2.1',
+                ethernet    = '00:11:22:33:44:55',
+                owner       = 'foo',
+        )
+
+        self.assertBlocksEqual(list(dhcp.dhcp_host(host)), [
+            (('host', 'foo'), [
+                ('option', 'host-name', "foo"),
+                ('fixed-address', '192.0.2.1'),
+                ('hardware', 'ethernet', '00:11:22:33:44:55'),
+                ], dict(comment="Owner: foo"))
+        ])
+
+    def testHostStatic(self):
+        host = Host.build('foo', 'test',
+                ip          = '192.0.2.1',
+        )
+
+        self.assertBlocksEqual(list(dhcp.dhcp_host(host)), [
+
+        ])
+
+    def testHostDynamic(self):
+        host = Host.build('foo', 'test',
+                ethernet    = '00:11:22:33:44:55',
+        )
+
+        self.assertBlocksEqual(list(dhcp.dhcp_host(host)), [
+            (('host', 'foo'), [
+                ('option', 'host-name', "foo"),
+                ('hardware', 'ethernet', '00:11:22:33:44:55'),
+            ], None)
+        ])
+
+    def testHostBoot(self):
+        hosts = [
+                Host.build('foo1', 'test',
+                        ethernet    = '00:11:22:33:44:55',
+                        boot        = 'boot.lan:debian/wheezy/pxelinux.0',
+                ),
+                Host.build('foo2', 'test',
+                        ethernet    = '00:11:22:33:44:55',
+                        boot        = 'boot.lan:',
+                ),
+                Host.build('foo3', 'test',
+                        ethernet    = '00:11:22:33:44:55',
+                        boot        = '/debian/wheezy/pxelinux.0',
+                ),
+        ]
+
+        self.assertBlocksEqual(list(dhcp.dhcp_hosts(hosts)), [
+            (('host', 'foo1'), [
+                ('option', 'host-name', "foo1"),
+                ('hardware', 'ethernet', '00:11:22:33:44:55'),
+                ('next-server', 'boot.lan'),
+                ('filename', 'debian/wheezy/pxelinux.0'),
+            ], None),
+            (('host', 'foo2'), [
+                ('option', 'host-name', "foo2"),
+                ('hardware', 'ethernet', '00:11:22:33:44:55'),
+                ('next-server', 'boot.lan'),
+            ], None),
+            (('host', 'foo3'), [
+                ('option', 'host-name', "foo3"),
+                ('hardware', 'ethernet', '00:11:22:33:44:55'),
+                ('filename', 'debian/wheezy/pxelinux.0'),
+            ], None),
+        ])
+
+    def testHosts(self):
+        hosts = [
+                Host.build('foo', 'test',
+                        ip          = '192.0.2.1',
+                        ethernet    = '00:11:22:33:44:55',
+                ),
+                Host.build('bar', 'test',
+                        ip          = '192.0.2.2',
+                        ethernet    = '01:23:45:67:89:ab',
+                ),
+        ]
+
+        self.assertBlocksEqual(list(dhcp.dhcp_hosts(hosts)), [
+            (('host', 'foo'), [
+                ('option', 'host-name', "foo"),
+                ('fixed-address', '192.0.2.1'),
+                ('hardware', 'ethernet', '00:11:22:33:44:55'),
+            ], None),
+            (('host', 'bar'), [
+                ('option', 'host-name', "bar"),
+                ('fixed-address', '192.0.2.2'),
+                ('hardware', 'ethernet', '01:23:45:67:89:ab'),
+            ], None),
+        ])
+
+    def testHostConflict(self):
+        hosts = [
+                Host.build('foo', 'test1',
+                        ethernet    = '00:11:22:33:44:55',
+                ),
+                Host.build('foo', 'test2',
+                        ethernet    = '01:23:45:67:89:ab',
+                ),
+        ]
+        
+        with self.assertRaises(dhcp.HostDHCPError):
+            list(dhcp.dhcp_hosts(hosts))
+
+    def testHostMultinet(self):
+        hosts = [
+                Host.build('foo', 'test1',
+                    ip              = '192.0.1.1',
+                    ethernet        = { 'eth1': '00:11:22:33:44:55' },
+                ),
+                Host.build('foo', 'test2',
+                    ip              = '192.0.2.1',
+                    ethernet        = { 'eth2': '01:23:45:67:89:ab' },
+                ),
+        ]
+        
+        self.assertBlocksEqual(list(dhcp.dhcp_hosts(hosts)), [
+                (('host', 'foo-eth1'), [
+                    ('option', 'host-name', "foo"),
+                    ('fixed-address', '192.0.1.1'),
+                    ('hardware', 'ethernet', '00:11:22:33:44:55'),
+                ], None),
+                (('host', 'foo-eth2'), [
+                    ('option', 'host-name', "foo"),
+                    ('fixed-address', '192.0.2.1'),
+                    ('hardware', 'ethernet', '01:23:45:67:89:ab'),
+                ], None),
+        ])
+
+
+if __name__ == '__main__':
+    unittest.main()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/hosts/zone.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,205 @@
+"""
+    Generate zonefile records from hosts
+"""
+
+import ipaddr
+import logging; log = logging.getLogger('pvl.hosts.zone')
+import pvl.dns
+import pvl.hosts.host
+
+class HostZoneError(pvl.hosts.host.HostError):
+    pass
+
+# TODO: generate location alias CNAMEs even if host itself is outside origin?
+def host_forward (host, origin):
+    """
+        Yield ZoneRecords for hosts within the given zone origin
+    """
+
+    try:
+        label = pvl.dns.relative(origin, host.domain, host.name)
+    except ValueError as error:
+        log.info("%s: skip: %s", host, error)
+        return
+
+    if host.forward:
+        forward = pvl.dns.fqdn(host.forward)
+
+        log.info("%s: forward: %s", host, forward)
+
+        yield pvl.dns.ZoneRecord.CNAME(label, forward)
+    
+    elif host.forward is None:
+        # forward
+        if host.ip :
+            log.info("%s: ip: %s@%s A %s", host, label, origin, host.ip)
+
+            yield pvl.dns.ZoneRecord.A(label, host.ip)
+
+        if host.ip6 :
+            log.info("%s: ip6: %s@%s AAAA %s", host, label, origin, host.ip6)
+
+            yield pvl.dns.ZoneRecord.AAAA(label, host.ip6)
+
+    else:
+        log.info("%s: skip forward", host)
+        return
+
+    if host.location:
+        location_alias, location_domain = host.location
+        
+        try:
+            yield pvl.dns.ZoneRecord.CNAME(pvl.dns.relative(origin, location_domain, location_alias), label)
+        except ValueError as error:
+            raise HostZoneError(host, error)
+
+    for alias in host.alias:
+        yield pvl.dns.ZoneRecord.CNAME(pvl.dns.relative(origin, host.domain, alias), label)
+
+    for alias in host.alias4:
+        if not host.ip:
+            raise HostZoneError(host, "alias4={host.alias4} without ip=".format(host=host))
+
+        yield pvl.dns.ZoneRecord.A(pvl.dns.relative(origin, host.domain, alias), host.ip)
+
+    for alias in host.alias6:
+        if not host.ip6:
+            raise HostZoneError(host, "alias6={host.alias6} without ip6=".format(host=host))
+
+        yield pvl.dns.ZoneRecord.AAAA(pvl.dns.relative(origin, host.domain, alias), host.ip6)
+
+def host_reverse (host, prefix) :
+    """
+        Yield (ipaddr.IPAddress, ZoneRecord) tuples for host within given prefix's reverse-dns zone.
+    """
+
+    if prefix.version == 4 :
+        ip = host.ip
+        
+        # reverse= is IPv4-only
+        reverse = host.reverse
+
+    elif prefix.version == 6 :
+        ip = host.ip6
+        
+        # if reverse= is set, always omit, for lack of reverse6=
+        reverse = None if host.reverse is None else False
+
+    else :
+        raise ValueError("%s: unknown ip version: %s" % (prefix, prefix.version))
+
+    if not ip :
+        log.debug("%s: no ip%d", host, prefix.version)
+        return
+
+    if ip not in prefix :
+        log.debug("%s: %s out of prefix: %s", host, ip, prefix)
+        return
+    
+    # relative label
+    label = pvl.dns.reverse_label(prefix, ip)
+   
+    if reverse:
+        alias = pvl.dns.fqdn(reverse)
+        
+        log.info("%s %s[%s]: CNAME %s", host, prefix, ip, alias)
+
+        yield ip, pvl.dns.zone.ZoneRecord.CNAME(label, alias)
+
+    elif reverse is None :
+        fqdn = host.fqdn()
+
+        log.info("%s %s[%s]: PTR %s", host, prefix, ip, fqdn)
+
+        yield ip, pvl.dns.zone.ZoneRecord.PTR(label, fqdn)
+
+    else:
+        log.info("%s %s[%s]: omit", host, prefix, ip)
+ 
+def apply_hosts_forward (hosts, origin,
+        add_origin  = False,
+) :
+    """
+        Generate DNS ZoneRecords for for hosts within the given zone origin.
+
+        Verifies that there are no overlapping name/type records, or CNAME records from aliases.
+
+            hosts: [Host]       - Host's to render
+            origin: str         - generate records relative to given zone origin
+            add_origin: bool    - generate an explicit $ORIGIN directive
+
+        Yields ZoneRecords in Host-order
+    """
+
+    if add_origin:
+        yield pvl.dns.ZoneDirective.build(None, 'ORIGIN', pvl.dns.fqdn(origin))
+
+    by_name = dict()
+    by_name_type = dict()
+    
+    for host in hosts:
+        for rr in host_forward(host, origin) :
+            if (rr.name, 'CNAME') in by_name_type:
+                raise HostZoneError(host, "CNAME {cname} conflict: {rr}".format(cname=by_name_type[rr.name, 'CNAME'].name, rr=rr))
+            elif rr.type == 'CNAME' and rr.name in by_name:
+                raise HostZoneError(host, "CNAME {cname} conflict: {rr}".format(cname=rr.name, rr=by_name[rr.name]))
+            elif (rr.name, rr.type) in by_name_type:
+                raise HostZoneError(host, "{type} {name} conflict: {rr}".format(type=rr.type, name=rr.name, rr=by_name_type[rr.name, rr.type]))
+            
+            by_name[rr.name] = rr
+            by_name_type[rr.name, rr.type] = rr
+            
+            # preserve ordering
+            yield rr
+
+def apply_hosts_reverse (hosts, prefix,
+        unknown_host    = None,
+        unknown_domain  = None,
+) :
+    """
+        Generate DNS ZoneRecords within the given prefix's reverse-dns zone for hosts.
+
+            hosts: [Host]               - Host's to render PTRs for
+            prefix: ipaddr.IPNetwork    - IPv4/IPv6 prefix to render PTRs for within associated in-addr.arpa/ip6.arpa zone
+            unknown_host: str           - render a PTR to the given host @unknown_domain for unassigned IPs within prefix
+            unknown_domain: str         - required if unknown_host is given
+
+        Yields ZoneRecords in IPAddress-order
+    """
+        
+    if unknown_host and not unknown_domain:
+        raise ValueError("unknown_host requires unknown_domain=")
+    
+    # collect data for records
+    by_ip = dict()
+
+    for host in hosts:
+        for ip, rr in host_reverse(host, prefix) :
+            if ip in by_ip :
+                raise HostZoneError(host, "{host}: IP {ip} conflict: {other}".format(host=host, ip=ip, other=by_ip[ip]))
+            
+            # do not retain order
+            by_ip[ip] = rr
+
+    if unknown_host :
+        # enumerate all of them
+        iter_ips = prefix.iterhosts()
+    else :
+        iter_ips = sorted(by_ip)
+
+    for ip in iter_ips :
+        if ip in by_ip :
+            yield by_ip[ip]
+
+        elif unknown_host:
+            # synthesize a record
+            label = pvl.dns.reverse_label(prefix, ip)
+            fqdn = pvl.dns.fqdn(unknown_host, unknown_domain)
+
+            log.info("%s %s[%s]: unused PTR %s", unknown_host, ip, prefix, fqdn)
+
+            yield pvl.dns.ZoneRecord.PTR(label, fqdn)
+
+        else:
+            continue
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/snmp/bridge.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,98 @@
+"""
+    Requirements:
+        memoized-property
+
+    Setup:
+        ./opt/bin/build-pysnmp-mib -o usr/mibs/BRIDGE-MIB.py etc/mibs/rfc1493.mib
+
+    Run:
+        PYSNMP_MIB_DIRS=usr/mibs/ ./opt/bin/python ...
+
+    SNMP:
+        BRIDGE-MIB::dot1dTpFdbTable
+        Q-BRIDGE-MIB::dot1qTpFdbTable
+        Q-BRIDGE-MIB::dot1qVlanCurrentTable
+
+"""
+
+from pvl.snmp import snmp
+from pvl.snmp.snmp import pysnmp
+
+from memoized_property import memoized_property
+
+import logging; log = logging.getLogger('pvl.snmp.vlan')
+
+DOT1D_TP_AGING_TIME = pysnmp.MibVariable('BRIDGE-MIB', 'dot1dTpAgingTime', 0)
+DOT1D_TP_FDB_PORT = pysnmp.MibVariable('BRIDGE-MIB', 'dot1dTpFdbPort')
+
+DOT1Q_VLAN_FDB_ID = pysnmp.MibVariable('Q-BRIDGE-MIB', 'dot1qVlanFdbId') # [dot1qVlanIndex]
+
+DOT1Q_TP_FDB_PORT = pysnmp.MibVariable('Q-BRIDGE-MIB', 'dot1qTpFdbPort') # [dot1qFdbId, dot1qTpFdbAddress]
+
+def macaddr (value) :
+    """
+        Excepts a MAC address from an SNMP OctetString.
+    """
+
+    return ':'.join('{octet:02x}'.format(octet=c) for c in value.asNumbers())
+
+class BridgeAgent (snmp.SNMPAgent) :
+    """
+        Query Bridge configuration.
+
+        XXX: this is not VLAN-aware!
+    """
+
+    def ping (self) :
+        for name, value in self.get(DOT1D_TP_AGING_TIME) :
+            # XXX: ????
+            if value.tagSet == pysnmp.rfc1905.NoSuchInstance.tagSet :
+                continue
+
+            return True
+
+    def fdb_ports (self) :
+        """
+            Map hosts in the brige FDB to specific ports.
+        """
+
+        for idx, data in self.table(DOT1D_TP_FDB_PORT) :
+            addr, = idx
+            port = data[DOT1D_TP_FDB_PORT]
+            
+            yield macaddr(addr), int(port)
+
+    def vlan_fdb (self) :
+        """
+            Get FDB id -> vlan mappings.
+
+                (fdb, vlan)
+        """
+
+        for idx, data in self.table(DOT1Q_VLAN_FDB_ID) :
+            time, vlan = idx
+            fdb = int(data[DOT1Q_VLAN_FDB_ID])
+
+            yield fdb, vlan
+
+    def vlan_fdb_ports (self) :
+        """
+            Get per-vlan host -> port mappings.
+
+                (macaddr, port, vlan)
+        """
+
+        fdb_to_vlan = dict(self.vlan_fdb())
+
+        for idx, data in self.table(DOT1Q_TP_FDB_PORT) :
+            fdb, addr = idx
+            port = data[DOT1Q_TP_FDB_PORT]
+
+            vlan = fdb_to_vlan.get(fdb)
+
+            yield macaddr(addr), int(port), vlan
+
+
+if __name__ == '__main__':
+    import doctest
+    doctest.testmod()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/snmp/lldp.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,142 @@
+"""
+    Requirements:
+        memoized-property
+
+    Setup:
+        ./opt/bin/build-pysnmp-mib -o usr/mibs/LLDP-MIB.py etc/mibs/LLDP-MIB
+
+    Run:
+        PYSNMP_MIB_DIRS=usr/mibs/ ./opt/bin/python ...
+    
+    SNMP:
+        LLDP-MIB::lldpLocalSystemData
+        LLDP-MIB::lldpRemTable
+"""
+
+from pvl.snmp import snmp
+from pvl.snmp.snmp import pysnmp
+
+from memoized_property import memoized_property
+
+import logging; log = logging.getLogger('pvl.snmp.lldp')
+
+def macaddr (value) :
+    """
+        Excepts a MAC address from an SNMP OctetString.
+    """
+
+    return ':'.join('{octet:02x}'.format(octet=c) for c in value.asNumbers())
+
+class LLDPAgent (snmp.SNMPAgent) :
+    """
+        Query LLDP info from a remote agent.
+    """
+
+    @classmethod
+    def _chassis_id (cls, chassis_id, subtype) :
+        log.debug("%s: %r", subtype, chassis_id)
+        
+        # XXX: reference names from LLDP-MIB.py
+        if subtype == 4:
+            return macaddr(chassis_id)
+        else :
+            return chassis_id
+ 
+    @classmethod
+    def _port_id (cls, port_id, subtype, desc) :
+        log.debug("%s: %r (%s)", subtype, port_id, desc)
+        
+        # XXX: reference names from LLDP-MIB.py
+        if subtype == 5: # interfaceName -> IF-MIB::ifName ?
+            return str(port_id)
+        elif subtype == 3 : # macAddress
+            if desc :
+                # prefer desc in this case
+                return desc
+            else :
+                return macaddr(port_id)
+        elif subtype == 7 : # local
+            return str(port_id) # XXX: integer?
+        else :
+            log.warn("unknown subtype=%d: %r", subtype, port_id)
+
+            return port_id
+       
+    LLDP_LOC_CHASSIS_ID = pysnmp.MibVariable('LLDP-MIB', 'lldpLocChassisId')
+    LLDP_LOC_CHASSIS_ID_SUBTYPE = pysnmp.MibVariable('LLDP-MIB', 'lldpLocChassisIdSubtype')
+    LLDP_LOC_SYS_NAME = pysnmp.MibVariable('LLDP-MIB', 'lldpLocSysName')
+
+    @memoized_property
+    def local (self) :
+        """
+            Describe the local system.
+        """
+
+        for idx, data in self.table(
+                self.LLDP_LOC_CHASSIS_ID,
+                self.LLDP_LOC_CHASSIS_ID_SUBTYPE,
+                self.LLDP_LOC_SYS_NAME,
+        ) :
+            return {
+                    'chassis':  self._chassis_id(data[self.LLDP_LOC_CHASSIS_ID], data[self.LLDP_LOC_CHASSIS_ID_SUBTYPE]),
+                    'sys_name': str(data[self.LLDP_LOC_SYS_NAME]),
+            }
+
+    LLDP_LOC_PORT_DESC = pysnmp.MibVariable('LLDP-MIB', 'lldpLocPortDesc')
+    LLDP_LOC_PORT_ID = pysnmp.MibVariable('LLDP-MIB', 'lldpLocPortId')
+    LLDP_LOC_PORT_ID_SUBTYPE = pysnmp.MibVariable('LLDP-MIB', 'lldpLocPortIdSubtype')
+
+    @memoized_property
+    def ports (self) :
+        """
+            Describe the local ports.
+        """
+
+        ports = { }
+
+        for idx, data in self.table(
+                self.LLDP_LOC_PORT_DESC,
+                self.LLDP_LOC_PORT_ID,
+                self.LLDP_LOC_PORT_ID_SUBTYPE,
+        ) :
+            port, = idx
+            
+            ports[int(port)] = {
+                    'port_id': int(port),
+                    'port': self._port_id(data[self.LLDP_LOC_PORT_ID], data[self.LLDP_LOC_PORT_ID_SUBTYPE], data[self.LLDP_LOC_PORT_DESC]),
+            }
+
+        return ports
+
+    def port (self, port) :
+        return self.ports[int(port)]
+
+    LLDP_REM_CHASSIS_ID = pysnmp.MibVariable('LLDP-MIB', 'lldpRemChassisId')
+    LLDP_REM_CHASSIS_ID_SUBTYPE = pysnmp.MibVariable('LLDP-MIB', 'lldpRemChassisIdSubtype')
+    LLDP_REM_SYS_NAME = pysnmp.MibVariable('LLDP-MIB', 'lldpRemSysName')
+    LLDP_REM_PORT_ID = pysnmp.MibVariable('LLDP-MIB', 'lldpRemPortId')
+    LLDP_REM_PORT_ID_SUBTYPE = pysnmp.MibVariable('LLDP-MIB', 'lldpRemPortIdSubtype')
+    LLDP_REM_PORT_DESC = pysnmp.MibVariable('LLDP-MIB', 'lldpRemPortDesc')
+
+    def remotes (self) :
+        """
+            Describe remote systems, indexed by local port.
+        """
+
+        for idx, data in self.table(
+                self.LLDP_REM_CHASSIS_ID,
+                self.LLDP_REM_CHASSIS_ID_SUBTYPE,
+                self.LLDP_REM_SYS_NAME,
+                self.LLDP_REM_PORT_ID,
+                self.LLDP_REM_PORT_ID_SUBTYPE,
+                self.LLDP_REM_PORT_DESC,
+        ) :
+            time, port, idx = idx
+
+            yield int(port), {
+                'chassis':  self._chassis_id(data[self.LLDP_REM_CHASSIS_ID], data[self.LLDP_REM_CHASSIS_ID_SUBTYPE]),
+                'sys_name': str(data[self.LLDP_REM_SYS_NAME]),
+                'port':     self._port_id(data[self.LLDP_REM_PORT_ID], data[self.LLDP_REM_PORT_ID_SUBTYPE], data[self.LLDP_REM_PORT_DESC]),
+            }
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/snmp/snmp.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,133 @@
+"""
+    Requirements:
+        pysnmp
+        pysnmp-mibs
+"""
+
+import logging; log = logging.getLogger('pvl.snmp.snmp')
+import optparse
+
+from pysnmp.entity.rfc3413.oneliner import cmdgen as pysnmp
+import collections
+
+def options (parser) :
+    parser = optparse.OptionGroup(parser, "SNMP Agent")
+
+    parser.add_option('--snmp-community',
+            help="SNMPv2 read community")
+
+    return parser
+
+class SNMPError (Exception) :
+    pass
+
+class SNMPEngineError (SNMPError) :
+    """
+        Internal SNMP Engine error (?)
+    """
+
+class SNMPAgent (object) :
+    """
+        GET SNMP shit from a remote host.
+    """
+
+    SNMP_PORT = 161
+    snmp_cmdgen = pysnmp.CommandGenerator()
+
+    @classmethod
+    def apply (cls, options, host, community=None) :
+        port = cls.SNMP_PORT
+
+        if community is None :
+            community = options.snmp_community
+
+
+        if '@' in host :
+            community, host = host.split('@', 1)
+        
+        if ':' in host :
+            host, port = host.rsplit(':', 1)
+
+        return cls(
+                pysnmp.CommunityData(community),
+                pysnmp.UdpTransportTarget((host, port))
+        )
+
+    def __init__ (self, security, transport) :
+        self.security = security
+        self.transport = transport
+
+    def get (self, *request) :
+        """
+            request = (
+                pysnmp.MibVariable('IF-MIB', 'ifInOctets', 1),
+            )
+        """
+
+        opts = dict(
+                lookupNames     = True,
+                lookupValues    = True,
+        )
+
+        try :
+            error, error_status, error_index, response = self.snmp_cmdgen.getCmd(self.security, self.transport,  *request, **opts)
+        except pysnmp.error.PySnmpError as ex :
+            raise SNMPEngineError(ex)
+
+        if error :
+            raise SNMPEngineError(error)
+        
+        if error_status :
+            raise SNMPError(errorStatus.prettyPrint())
+        
+        return response
+        #for name, value in response :
+        #    yield name.getMibSymbol(), value.prettyPrint()
+
+    def walk (self, *request) :
+        """
+            request = (
+                    pysnmp.MibVariable('IF-MIB', 'ifInOctets'),
+            )
+        """
+
+        opts = dict(
+                lookupNames     = True,
+                lookupValues    = True,
+        )
+
+        try :
+            error, error_status, error_index, responses = self.snmp_cmdgen.nextCmd(self.security, self.transport, *request, **opts)
+        except pysnmp.error.PySnmpError as ex :
+            raise SNMPEngineError(ex)
+
+        if error :
+            raise SNMPEngineError(error)
+        
+        if error_status :
+            raise SNMPError(errorStatus.prettyPrint())
+        
+        return responses
+        #for response in responses:
+        #    for name, value in response :
+        #        yield name.getMibSymbol(), value.prettyPrint()
+
+    def table (self, *columns) :
+        """
+            Given [oid] returns { idx: { oid: value } }
+        """
+
+        data = collections.defaultdict(dict)
+
+        for row in self.walk(*columns) :
+            log.debug("%s", row)
+
+            for column, (field, value) in zip(columns, row) :
+                mib, sym, idx = field.getMibSymbol()
+
+                log.debug("%s::%s[%s]: %s: %s", mib, sym, ', '.join(str(x) for x in idx), column, value)
+                
+                data[idx][column] = value
+            
+        return data.items()
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/snmp/traps.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,66 @@
+"""
+    Trap handling
+"""
+
+TRAP_TYPE = {
+    # Link Down
+    2: 'IF-MIB::linkDown',
+    
+    # Link Up
+    3: 'IF-MIB::linkUp',
+}
+
+# use subtype
+TRAP_TYPE_ENTERPRISE = 6
+
+VALUE_TYPE = {
+
+}
+
+def parse_snmptrapd_log (line):
+    """
+        Parse a line of data logged by snmptrapd using the following formats:
+
+            format1     %B %N %w %q %W\t%v\n
+            format2     %B\t%v\n
+    """
+
+    values = { }
+
+    items = line.split('\t')
+
+    header = items.pop(0)
+    
+    if ' ' in header:
+        # XXX: some kind of compat wrapping of SNMPv1 TRAPs to fit the SNMPv2-TRAP model
+        host, enterprise, trap_type, trap_subtype, trap_descr = header.split(' ', 4)
+
+        trap_type = int(trap_type)
+
+        values['SNMPv2-MIB::snmpTrapEnterprise.0'] = enterprise
+
+        if trap_type == TRAP_TYPE_ENTERPRISE:
+            # XXX: no idea why
+            if trap_subtype.startswith('.'):
+                trap_oid = enterprise + '.0' + trap_subtype
+            else:
+                trap_oid = trap_subtype
+        else:
+            trap_oid = TRAP_TYPE.get(trap_type, trap_type)
+
+        values['SNMPv2-MIB::snmpTrapOID.0'] = trap_oid
+    else:
+        host = header
+
+    for item in items:
+        key, value = item.split(' = ', 1)
+        value_type, value = value.split(': ', 1)
+
+        func = VALUE_TYPE.get(value_type)
+
+        if func:
+            value = func(value)
+        
+        values[key] = value
+    
+    return host, values
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/pvl/snmp/vlan.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,88 @@
+"""
+    Requirements:
+        memoized-property
+
+    Setup:
+        ./opt/bin/build-pysnmp-mib -o usr/mibs/Q-BRIDGE-MIB.py etc/mibs/rfc2674_q.mib
+
+    Run:
+        PYSNMP_MIB_DIRS=usr/mibs/ ./opt/bin/python ...
+
+    SNMP:
+        Q-BRIDGE-MIB::dot1qVlanCurrentTable
+
+"""
+
+from pvl.snmp import snmp
+from pvl.snmp.snmp import pysnmp
+
+from memoized_property import memoized_property
+
+import logging; log = logging.getLogger('pvl.snmp.vlan')
+
+DOT1Q_NUM_VLANS = pysnmp.MibVariable('Q-BRIDGE-MIB', 'dot1qNumVlans')
+DOT1Q_VLAN_CURRENT_EGRESS_PORTS = pysnmp.MibVariable('Q-BRIDGE-MIB', 'dot1qVlanCurrentEgressPorts')
+DOT1Q_VLAN_CURRENT_UNTAGGED_PORTS = pysnmp.MibVariable('Q-BRIDGE-MIB', 'dot1qVlanCurrentUntaggedPorts')
+DOT1Q_VLAN_STATIC_NAME = pysnmp.MibVariable('Q-BRIDGE-MIB', 'dot1qVlanStaticName')
+
+def portlist (value) :
+    r"""
+        Unpack a OctetString bitmask into bit offsets.
+
+        >>> list(portlist('\x80'))
+        [1]
+        >>> list(portlist('\x01'))
+        [8]
+    """
+
+    for octet_idx, byte in enumerate(value) :
+        octet = ord(byte)
+
+        for bit_idx in xrange(0, 8) :
+            if octet & (1 << (7 - bit_idx)) :
+                yield octet_idx * 8 + bit_idx + 1
+
+class VLANAgent (snmp.SNMPAgent) :
+    """
+        Query VLAN configuration.
+    """
+
+    @memoized_property
+    def count (self) :
+        for name, value in self.get(DOT1Q_NUM_VLANS) :
+            # XXX: ????
+            if value.tagSet == pysnmp.rfc1905.NoSuchInstance.tagSet :
+                continue
+
+            return int(value)
+
+    def names (self) :
+        """
+                (vlan, name)
+        """
+
+        for idx, data in self.table(DOT1Q_VLAN_STATIC_NAME) :
+            vlan, = idx
+
+            yield int(vlan), str(data[DOT1Q_VLAN_STATIC_NAME])
+
+    def vlan_ports (self) :
+        """
+            Get per-vlan port configs.
+
+                (vlan, (tagged, untagged))
+        """
+
+        for idx, data in self.table(DOT1Q_VLAN_CURRENT_EGRESS_PORTS, DOT1Q_VLAN_CURRENT_UNTAGGED_PORTS) :
+            time, vlan = idx
+
+            egress = set(portlist(data[DOT1Q_VLAN_CURRENT_EGRESS_PORTS]))
+            untagged = set(portlist(data[DOT1Q_VLAN_CURRENT_UNTAGGED_PORTS]))
+
+            tagged = egress - untagged
+            
+            yield int(vlan), (tagged, untagged)
+
+if __name__ == '__main__':
+    import doctest
+    doctest.testmod()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/setup.py	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+# encoding: utf-8
+
+from distutils.core import setup
+from glob import glob
+
+def _globs (*pats) :
+    for pat in pats :
+        for file in glob(pat) :
+            yield file
+
+def globs (*pats) :
+    return list(_globs(*pats))
+
+# TODO: fix to use PEP-396 once available:
+#   https://www.python.org/dev/peps/pep-0396/#classic-distutils
+for line in open('pvl/hosts/__init__.py'):
+    if '__version__' in line:
+        _, line_version = line.split('=')
+        __version__ = line_version.strip().strip("''")
+
+setup(
+    name            = 'pvl-hosts',
+    version         = __version__,
+    description     = "DNS/DHCP hosts management",
+    url             = 'http://verkko.paivola.fi/hg/pvl-hosts',
+
+    author          = "Tero Marttila",
+    author_email    = "terom@paivola.fi",
+    
+    # deps
+    install_requires    = [
+        # pvl.args
+        # pvl.invoke
+        'pvl-common',
+
+        # pvl.hosts
+        # TODO: replace with ipaddress for py3 forward-compat
+        'ipaddr',
+    ],
+    extras_require = {
+        # pvl.hosts-import
+        'import': [
+            'pvl-ldap',
+        ],
+
+        # pvl.dhcp-leases/syslog
+        'db': [
+            'sqlalchemy',
+        ],
+    },
+    
+    # pvl/
+    namespace_packages = [ 'pvl' ],
+    packages    = [
+        'pvl.dhcp',
+        'pvl.dns',
+        'pvl.hosts',
+    ],
+    
+    # bin/
+    scripts     = globs(
+        'bin/pvl.dhcp-*',
+        'bin/pvl.dns-*',
+        'bin/pvl.hosts-*',
+   ),
+)
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test.sh	Thu Feb 26 19:49:10 2015 +0200
@@ -0,0 +1,31 @@
+COVERAGE=opt/bin/coverage
+DOCTEST=(
+    pvl/dhcp/config.py
+    pvl/snmp/vlan.py
+    pvl/dns/serial.py
+    pvl/dns/labels.py
+    pvl/dns/reverse.py
+    pvl/dns/generate.py
+)
+
+UNITTEST=(
+    pvl.hosts.tests
+)
+
+coverage() {
+    echo "$ $FUNCNAME $@" >&2
+
+    $COVERAGE "$@"
+}
+
+coverage erase
+
+for import in ${UNITTEST[@]}; do
+    coverage run -a -m unittest $import
+done
+
+for py in ${DOCTEST[@]}; do
+    coverage run -a -m doctest $py
+done
+
+coverage html