--===============2095839237==
Content-Type: multipart/alternative;
boundary="=_f5e918b401f707ccc9ae6960c776eb79"

--=_f5e918b401f707ccc9ae6960c776eb79
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 7bit

Hi Dave,    I'm able to get multiple attributes for scalars, however i've some problem with tablular objects. When ever    I issue a snmpget for multiple attributes of tabular type the response would be as follows:snmpget -v 3 -u myuser -l authNoPriv -a MD5 -A mypassword -IR localhost MytableUserLabel.1 MytableId.1MY-MIB::MytableUserLabel.1 = Wrong Type (should be OCTET STRING): INTEGER: 1MY-MIB::MytableId.1 = No Such Instance currently exists at this OIDI found that the request which master is sending to the subagent is not as that of scalar objects.while debugging I found from the scalar objects that, 2 requests will be sent for 2 different scalar objects. Butthis is not the case in table objects. Its sending 2 different requests with a single table object(in the above case 1st object.)What could be wrong here??My mib2c code for MODE GET of tablular objects  which i've slightly modified is as follows:case MODE_GET:    &
nbsp;   for (request = requests; request; request = request->next) {            table_entry = (struct MyTable_entry *)                netsnmp_extract_iterator_context(request);             table_info = netsnmp_extract_table_info(request);            switch (table_info->colnum) {            case COLUMN_MYTABLEID:                Response_handle(unsigned char *Buffer,int size, netsnmp_request_info *requests);                break;            case COLUMN_MYTABLEUSERLABEL:&n
bsp;               Response_handle(unsigned char *Buffer,int size, netsnmp_request_info *requests);                            break;            default:                                       snmp_set_var_typed_value(request->requestvb,                                          SNMP_NOSUCHOBJECT, NULL, 0);      &nbsp
;     }        }        break;On Wed, 23 Jan 2008 09:53:40 +0000 "Dave Shield" wrote On 23 Jan 2008 09:39:14 -0000, girish wrote: > But what I doubt is if we send a get request with multiple attributes in > a single request how it will be handled by the Master. All the varbinds will be processed, and the results returned in the same order as the original request. > How it will forward it to the subagent. The varbinds that are relevant to a particular subagent will be forwarded to that subagent. Those that are registered within the main agent will be handled internally. The master agent stiches everything together in the right order, before returning the response. > How actually this handled at master side??? I'm sorry - I don't have the time to explain the inner workings of the agent. Please just believe me that Everything Just Work
s. (In fact, it relies on the 'next_variable' links of the 'requestvb' structure - which is why you shouldn't be following these. Your MIB module should work with the 'request->next' links, which follow the varbinds relevant to your module. Anything else is None Of Your Business). Dave ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ 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/...net-snmp-users


Regards,
Girish
--=_f5e918b401f707ccc9ae6960c776eb79
Content-Type: text/html; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Dave,
    I'm able to get multiple attributes for sc=
alars, however i've some problem with tablular objects. When ever
&nbs=
p;   I issue a snmpget for multiple attributes of tabular type th=
e response would be as follows:
snmpget -v 3 -u myuser -l authNoPriv -=
a MD5 -A mypassword -IR localhost MytableUserLabel.1 MytableId.1
MY-MI=
B::MytableUserLabel.1 =3D Wrong Type (should be OCTET STRING): INTEGER: 1 r />MY-MIB::MytableId.1 =3D No Such Instance currently exists at this OID r />
I found that the request which master is sending to the subagent =
is not as that of scalar objects.
while debugging I found from the sca=
lar objects that, 2 requests will be sent for 2 different scalar objects. B=
ut
this is not the case in table objects. Its sending 2 different requ=
ests with a single table object(in the above
case 1st object.)
W=
hat could be wrong here??
My mib2c code for MODE GET of tablular objec=
ts  which i've slightly modified is as follows:

case MODE_G=
ET:
        for (request =3D reques=
ts; request; request =3D request->next) {
    &=
nbsp;       table_entry =3D (struct MyTable_e=
ntry *)
          &n=
bsp;     netsnmp_extract_iterator_context(request);
/>            table_=
info =3D netsnmp_extract_table_info(request);

   =
         switch (table_info->col=
num) {
          &nb=
sp; case COLUMN_MYTABLEID:
       &=
nbsp;        Response_handle(unsigned ch=
ar *Buffer,int size, netsnmp_request_info *requests);
  &nbs=
p;             =
break;
          &nb=
sp; case COLUMN_MYTABLEUSERLABEL:
      =
          Response_handle(unsi=
gned char *Buffer,int size, netsnmp_request_info *requests);  &nb=
sp;        
  &nbsp=
;             b=
reak;
          &nbs=
p; default:
         &nbs=
p;             =

           &nb=
sp;    snmp_set_var_typed_value(request->requestvb,
=
            &nb=
sp;            =
            &nb=
sp;   SNMP_NOSUCHOBJECT, NULL, 0);
    &=
nbsp;       }
    &n=
bsp;   }
        break; r />
On Wed, 23 Jan 2008 09:53:40 +0000 "Dave Shield" wrote
On=
23 Jan 2008 09:39:14 -0000, girish wrote:
> But what I doubt is=
if we send a get request with multiple attributes in
> a single =
request how it will be handled by the Master.

All the varbin=
ds will be processed, and the results returned in the same
order as =
the original request.

> How it will forward it to the s=
ubagent.

The varbinds that are relevant to a particular suba=
gent will be forwarded
to that subagent. Those that are registered=
within the main agent will
be handled internally.

=
The master agent stiches everything together in the right order,
be=
fore returning the response.


> How actually t=
his handled at master side???

I'm sorry - I don't have the t=
ime to explain the inner workings of
the agent. Please just believ=
e me that Everything Just Works.

(In fact, it relies on th=
e 'next_variable' links of the 'requestvb'
structure - which is why =
you shouldn't be following these. Your
MIB module should work with=
the 'request->next' links, which
follow the varbinds relevant to=
your module. Anything else is
None Of Your Business).

/> Dave

---------------------------------------------------=
----------------------
This SF.net email is sponsored by: Microsoft<=
br /> Defy all challenges. Microsoft(R) Visual Studio 2008.
http://=
clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
___________________=
____________________________
Net-snmp-users mailing list
Net-=
snmp-users@lists.sourceforge.net
Please see the following page to un=
subscribe or change other options:
https://lists.sourceforge.net/lis=
ts/listinfo/net-snmp-users

=20


Regards,

Girish
ding=3D0 style=3D'font-family:Verdana;font-size:11px;line-height:15px;'>
>

iff.com/signature-home.htm/1050715198@Middle5/2031747_2024537/2031627/1?PAR=
TNER=3D3&OAS_QUERY=3Dnull' target=3Dnew > ff.com/cgi-bin/AdWorks/adimage.cgi/2031747_2024537/creative_2031627.gif' a=
lt=3D'Monster' border=3D0>

--=_f5e918b401f707ccc9ae6960c776eb79--


--===============2095839237==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--===============2095839237==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
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/...net-snmp-users

--===============2095839237==--