view OID mask?

2006-09-20 Thread Leo Lei
hi,
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.


--
Leo Lei
2006-09-20



-
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.phpp=sourceforgeCID=DEVDEV
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: view OID mask?

2006-09-20 Thread Dave Shield
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.phpp=sourceforgeCID=DEVDEV
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Re: view OID mask?

2006-09-20 Thread Leo Lei
Dave Shield£º

thank you!

i had mistaken the word sub-identifier, for example, for view OID ifEntry, i 
had thought
the sub-identifers is 1(ifIndex) - 22(ifSpecific) under ifEntry.

=== 2006-09-20 16:00:30 ===


 view ifRow4 included .1.3.6.1.2.1.2.2.1.0.4  0xff:a0
for the latest 3 sub-identifiers, the corresponding bits can be 
0010  or 1010 , so, the mask can be 0xff:a0 or 0xff:20;

right?


= = = = = = = = = = = = = = = = = = = =

Leo Lei
2006-09-20



-
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.phpp=sourceforgeCID=DEVDEV___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Re: view OID mask?

2006-09-20 Thread Dave Shield
On 20/09/06, Leo Lei [EMAIL PROTECTED] wrote:
 i had mistaken the word sub-identifier, for example, for view OID ifEntry, 
 i had thought
 the sub-identifers is 1(ifIndex) - 22(ifSpecific) under ifEntry.

No - the term subidentifier refer to the individual numbers (or
names) within an OID.
So *each* of 1, 3, 6, 1, etc are subidentifiers.

There is one particular subidentifier within an OID that will refer to
the column object,
but this is no more (and no less) a subidentifier than any of the others.


  view ifRow4 included .1.3.6.1.2.1.2.2.1.0.4  0xff:a0
 for the latest 3 sub-identifiers, the corresponding bits can be
 0010  or 1010 , so, the mask can be 0xff:a0 or 0xff:20;

 right?

I don't fully understand what you're asking here, but your bit
patterns don't look right.

The idea of the ifRow4 view is to match any OID of the form
.1.3.6.1.2.1.2.2.1.x.4
(ignoring the column subidentifier) i.e. the row with index '4'.

Setting this against a bit pattern of the relevant subidentifiers gives:

.1.3.6.1.2.1.2.2.1.0.4
 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0   = 0xff:a0

So the second octet of the mask is 0xa0
I don't know where you get 0x20 from, but it looks completely bogus.

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.phpp=sourceforgeCID=DEVDEV
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: view OID mask?

2006-09-20 Thread Leo Lei
Dave Shield£º



=== 2006-09-20 16:50:44 ===

The idea of the ifRow4 view is to match any OID of the form
.1.3.6.1.2.1.2.2.1.x.4
(ignoring the column subidentifier) i.e. the row with index '4'.

Setting this against a bit pattern of the relevant subidentifiers gives:

.1.3.6.1.2.1.2.2.1.0.4
 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0   = 0xff:a0

So the second octet of the mask is 0xa0
for the sub-identifier ifTable.1,   i think we can set the corresponding mask 
bit to 1(exact match)
or 0(wildcard), cause it's the only mib node for administrative purpose under 
ifTable.

so i get 0xff:a0 or 0xff:20
1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0   = 0xff:a0
1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0   = 0xff:20

= = = = = = = = = = = = = = = = = = = =

Leo Lei
2006-09-20



-
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.phpp=sourceforgeCID=DEVDEV___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: view OID mask?

2006-09-20 Thread Dave Shield
On 20/09/06, Leo Lei [EMAIL PROTECTED] wrote:
 for the sub-identifier ifTable.1,   i think we can set the corresponding mask 
 bit to 1(exact match)
 or 0(wildcard), cause it's the only mib node for administrative purpose under 
 ifTable.

 so i get 0xff:a0 or 0xff:20
 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0   = 0xff:a0
 1 1 1 1 1 1 1 1 0 0 1 0 0 0 0 0   = 0xff:20

OK - I see what you mean.  Yes, you could do that.
It's somewhat counter-intuitive, completely unnecessary and likely to
cause confusion,
but it should work.

By the same argument, you could probably omit most of the high-end
mask bits as well,
since all management information tends to be sited under .1.3.6.1 etc
But I wouldn't advise doing that either.

I am a Bear of Very Little Brain, and Prefer to Keep Things Simple.   :-)

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.phpp=sourceforgeCID=DEVDEV
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Re: view OID mask?

2006-09-20 Thread John Rouillard
On Wed, Sep 20, 2006 at 09:50:50AM +0100, Dave Shield wrote:
 On 20/09/06, Leo Lei [EMAIL PROTECTED] wrote:
 The idea of the ifRow4 view is to match any OID of the form
 .1.3.6.1.2.1.2.2.1.x.4
 (ignoring the column subidentifier) i.e. the row with index '4'.
 
 Setting this against a bit pattern of the relevant subidentifiers gives:
 
 .1.3.6.1.2.1.2.2.1.0.4
  1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0   = 0xff:a0
 
 So the second octet of the mask is 0xa0
 I don't know where you get 0x20 from, but it looks completely bogus.

Dave, 

I was scratching my head until I saw the text above.  I think putting
the example and explantion above in the man page would make it much
clearer.

-- 
-- rouilj

John Rouillard
System Administrator
Renesys Corporation
603-643-9300 x 111

-
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.phpp=sourceforgeCID=DEVDEV
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users


Re: Re: view OID mask?

2006-09-20 Thread Dave Shield
On 20/09/06, John Rouillard [EMAIL PROTECTED] wrote:
 I was scratching my head until I saw the text above.

Even with the newer man page text (as quoted earlier in this thread) ?
Oh :-(

  I think putting
 the example and explantion above in the man page would make it much
 clearer.

Fair enough.
I'll do that then.

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.phpp=sourceforgeCID=DEVDEV
___
Net-snmp-users mailing list
Net-snmp-users@lists.sourceforge.net
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users