--===============0458505553==
Content-Type: multipart/alternative;
boundary="=_53f3bc7931474da9aa105bcacc989c29"

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

>What does the code *around* this fragment look like? >In particular, how is the variable 'requestvb' assigned?Here is the code which handles response:Response_handle(unsigned char *Buffer,int size, netsnmp_request_info *requests){    ptr = (unsigned char *)pbuf;        netsnmp_variable_list *Vbsvd = NULL;        for (Vbsvd = requests->requestvb; Vbsvd; Vbsvd = Vbsvd->next_variable )        if(*((unsigned int *)ptr) != EXCEPTION_NO_SUCH_INSTANCE)    {        type= *((int *)ptr);        switch(type)          {              case TYPE_STRING:                    snmp_set_var_typed_value(requestvb,AS
N_OCTET_STR,(u_char *) ptr, str_len);                    break;                    case TYPE_INT:                    snmp_set_var_typed_value(requestvb,ASN_INTEGER, (u_char *) ptr, sizeof(INT));                    break;                                        case TYPE_IPADDR:                    snmp_set_var_typed_value(re
questvb,ASN_IPADDRESS, (u_char *) ptr, sizeof(unsigned long));                break;                                default:                    return SNMP_ERR_RESOURCEUNAVAILABLE;                    break;                }        }        return SNMP_ERR_NOERROR;        }and requestvb at the time of debugging looks like this(for the 1st attribute): (gdb) p *requestvb$6 = {next_variable = 0x0, name = 0x
b7a393b0, name_length = 13, type = 5 '\005', val = {integer = 0xb7a395b0,     string = 0xb7a395b0 "", objid = 0xb7a395b0, bitstring = 0xb7a395b0 "", counter64 = 0xb7a395b0, floatVal = 0xb7a395b0,     doubleVal = 0xb7a395b0}, val_len = 0, name_loc = {1, 3, 6, 1, 1, 1, 144, 1, 122, 1, 1, 4, 0 <repeats 116 times>},   buf = '\0' <repeats 39 times>, data = 0x0, dataFreeHook = 0, index = 0}>
Please *always* give a sensible amount of context.
Sorry for this.

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


>What does the code *around* this fragment look like?
>I=
n particular, how is the variable 'requestvb' assigned?
Here is the co=
de which handles response:
Response_handle(unsigned char *Buffer,int s=
ize, netsnmp_request_info *requests)
{
    ptr =3D=
(unsigned char *)pbuf;
        net=
snmp_variable_list *Vbsvd =3D NULL;
     &nbs=
p;  for (Vbsvd =3D requests->requestvb; Vbsvd; Vbsvd =3D Vbsvd->=
next_variable )
        if(*((unsig=
ned int *)ptr) !=3D EXCEPTION_NO_SUCH_INSTANCE)
    { r />        type=3D *((int *)ptr);
&nbsp=
;       switch(type)
    &nbsp=
;     {
          &n=
bsp;   case TYPE_STRING:
     &nbsp=
;            &n=
bsp; snmp_set_var_typed_value(requestvb,ASN_OCTET_STR,( u_char *) ptr, str_l=
en);
          &nbsp=
;         break;

 &=
nbsp;           &nbs=
p;      case TYPE_INT:
   &nbs=
p;            &=
nbsp;   snmp_set_var_typed_value(requestvb,ASN_INTEGER, (u_char *=
) ptr, sizeof(INT));
        &=
nbsp;           break; />            =
       
    &n=
bsp;           &nbsp=
;   case TYPE_IPADDR:
      &n=
bsp;           &nbsp=
; snmp_set_var_typed_value(requestvb,ASN_IPADDRESS, (u_char *) ptr, sizeof(=
unsigned long));
         &nbs=
p;      break;
     &nbsp=
;         
  &=
nbsp;             de=
fault:
          &nb=
sp;         return SNMP_ERR_RESOURC=
EUNAVAILABLE;
         &n=
bsp;          break;

/>            &=
nbsp;   }
        }
=
        return SNMP_ERR_NOERROR; &n=
bsp;     
}

and requestvb at the =
time of debugging looks like this(for the 1st attribute):

(g=
db) p *requestvb
$6 =3D {next_variable =3D 0x0, name =3D 0xb7a393b0, n=
ame_length =3D 13, type =3D 5 '=0005', val =3D {integer =3D 0xb7a395b0, />    string =3D 0xb7a395b0 "", objid =3D 0xb7a395b0, bitst=
ring =3D 0xb7a395b0 "", counter64 =3D 0xb7a395b0, floatVal =3D 0xb7a395b0, =

    doubleVal =3D 0xb7a395b0}, val_len =3D 0, name_loc=
=3D {1, 3, 6, 1, 1, 1, 144, 1, 122, 1, 1, 4, 0 <repeats 116 times>},=

  buf =3D '=00' <repeats 39 times>, data =3D 0x0, dataFre=
eHook =3D 0, index =3D 0}

>
Please *always* give a sensible amount of context.

Sorry for this.



Regards,

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

iff.com/signature-home.htm/1050715198@Middle5/2027411_2020222/2027231/1?PAR=
TNER=3D3&OAS_QUERY=3Dnull' target=3Dnew > ff.com/cgi-bin/AdWorks/adimage.cgi/2027411_2020222/creative_2027231.gif' a=
lt=3D'Tata Aig' border=3D0>

--=_53f3bc7931474da9aa105bcacc989c29--


--===============0458505553==
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/
--===============0458505553==
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

--===============0458505553==--