On 20/09/06, Leo Lei <[EMAIL PROTECTED]> wrote:
> are there any example illustrating the usage of the view OID mask? i have 
> read the part of
> view directive in the snmpd.conf(5)
> and the vacmViewTreeFamilyMask definition in VACM rfc, but i can't understand 
> it. thanks.

The latest version of the source (currently available as 5.4.pre1) has
a re-written snmpd.conf(5) description of the view token, to expand on
the role of the MASK field.
This now reads as follows:

        view VNAME TYPE OID [MASK]
              defines a named "view" - a subset of the overall OID tree.  This
              is  most  commonly a single subtree, but several view directives
              can be given with the same view name, to build up a more complex
              collection  of OIDs.  TYPE is either included or excluded, which
              can again define a more complex view (e.g by  excluding  certain
              sensitive objects from an otherwise accessible subtree).

              MASK  is  a  list  of hex octets (optionally separated by '.' or
              ':') with the set bits indicating which  subidentifiers  in  the
              view  OID  to match against.  If not specified, this defaults to
              matching the OID exactly (all bits set), thus defining a  simple
              OID subtree.  So:
                     view iso1 included .iso  0xf0
                     view iso2 included .iso
                     view iso3 included .iso.org.dod.mgmt  0xf0

              would  all  define  the  same  view,  covering  the whole of the
              'iso(1)' subtree (with the third example ignoring the subidenti-
              fiers not covered by the mask).

              More  usefully, the mask can be used to define a view covering a
              particular row (or rows) in a table,  by  matching  against  the
              appropriate  table index value, but skipping the column subiden-
              tifier:

                     view ifRow4 included .1.3.6.1.2.1.2.2.1.0.4  0xff:a0

              Note that a mask longer than 8 bits must use ':' to separate the
              individual octets.


Is that any more helpful?

Dave

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to