Fw: type BITS displays extra data

Kathy McLeod <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <OF12025FB2.FF814F13-ON862576F0.0058CC9B-862576F0.00597ACC@us.ibm.com>
Hi again -

Based on note below, I am using the following constants for values 0, 1, 2,
and 3:

static char bits[] = {0x80, 0x40, 0x20, 0x10};

Here is my table:

 index lldpPortConfigAdminStatus lldpPortConfigNotificationEnable
lldpPortConfigTLVsTxEnable
     1                         1                                0
"80 "
     2                         2                                1
"40 "
     3                         3                                0
"20 "
     4                         4                                1
"10 "

Here are my gets with the -Oe flag, which seems to show which bit number
the setting corresponds to.  Is this the expected output from these
commands?

snmpget -v 2c -Oe -c private localhost
LLDP-MIB::lldpPortConfigTable.1.4.4LLDP-MIB::lldpPortConfigTLVsTxEnable.4 =
BITS: 10 3
snmpget -v 2c -Oe -c private localhost LLDP-MIB::lldpPortConfigTable.1.4.3
LLDP-MIB::lldpPortConfigTLVsTxEnable.3 = BITS: 20 2
snmpget -v 2c -Oe -c private localhost LLDP-MIB::lldpPortConfigTable.1.4.2
LLDP-MIB::lldpPortConfigTLVsTxEnable.2 = BITS: 40 1
snmpget -v 2c -Oe -c private localhost LLDP-MIB::lldpPortConfigTable.1.4.1
LLDP-MIB::lldpPortConfigTLVsTxEnable.1 = BITS: 80 0

But here are my gets without that flag - why do they show portDesc and
sysName, etc.?

snmpget -v 2c  -c private localhost LLDP-MIB::lldpPortConfigTable.1.4.1
LLDP-MIB::lldpPortConfigTLVsTxEnable.1 = BITS: 80 portDesc(0)
snmpget -v 2c  -c private localhost LLDP-MIB::lldpPortConfigTable.1.4.2
LLDP-MIB::lldpPortConfigTLVsTxEnable.2 = BITS: 40 sysName(1)
snmpget -v 2c  -c private localhost LLDP-MIB::lldpPortConfigTable.1.4.3
LLDP-MIB::lldpPortConfigTLVsTxEnable.3 = BITS: 20 sysDesc(2)
snmpget -v 2c  -c private localhost LLDP-MIB::lldpPortConfigTable.1.4.4
LLDP-MIB::lldpPortConfigTLVsTxEnable.4 = BITS: 10 sysCap(3)

Thanks.


Kathy McLeod

----- Forwarded by Kathy McLeod/Rochester/IBM on 03/24/2010 11:09 AM -----
                                                                           
             Kathy                                                         
             McLeod/Rochester/                                             
             IBM@IBMUS                                                  To 
                                       [email protected] 
             03/23/2010 10:58          t                                   
             AM                                                         cc 
                                                                           
                                                                   Subject 
                                       Re: Fw: type BITS displays extra    
                                       data                                
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           
                                                                           




The -Oe works swell!  Thanks.

The ORing was just a short-cut to generate some values quickly in bit
strings - eventually we will get the actual data.

I only found some sketchy info on BITS.  I must have misread it as the most
significant bytes instead of bits.  Just to make sure I have make the
correct change, would the value of "1" be 10000000, etc.?

Thanks again!


Kathy McLeod
Dept S82  CCB - SNMP
IBM Rochester, MN
(507) 253-4803



             Dave Shield
             <D.T.Shield@liver
             pool.ac.uk>                                                To
             Sent by:                  Kathy McLeod/Rochester/IBM@IBMUS
             dave.shield@googl                                          cc
             email.com                 [email protected]
                                       t
                                                                   Subject
             03/23/2010 10:37          Re: Fw: type BITS displays extra
             AM                        data










On 23 March 2010 15:08, Kathy McLeod <[email protected]> wrote:
> I read the etiquette section and I know we are not supposed to nag the
> developers and keep re-posting the same note, but I think this one fell
> thru the cracks.

Four days is not really a crack.


>     I need to get this displaying properly soon.

I suspect that the client is trying to display the name of the set bits.
Try adding the flag '-Oe' to the command to suppress this.

   (I don't know why this is being reported as '6' and '7'
    rather than docsisCableDevice(6) and stationOnly(7))



You might also look again at how you are setting the chosen bits.
Remember that BITS enumerations start at the most significant
bit of the string - not the least.
   (And ORing something against the value 0 is unlikely to have much
effect!)

Dave



------------------------------------------------------------------------------

Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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


------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.