[ap-utils] wrong len_val if reply is large?

Roman Festchook ap-utils@lists.polesye.net
Mon, 12 May 2003 10:39:26 +0300


On þÅÔ 08 ôÒÁ 2003 17:07, Lars Gaarden wrote:
> Roman,
>
> I'm trying to read the list of known APs from a smartBridges airPoint
> in client bridge mode, but it seems like the len_val in the varbinds
> struct is incorrect for the reply. The value is 3, but I think it
> should be closer to 0x0300.
Why?

> See code snippet below:
>
> ----
> void
> getCBstats(void)
> {
> 	char KnownAP[] = { 0x2B, 0x06, 0x01, 0x04, 0x01, 0x83, 0x1A,
>                             0x01, 0x02, 0x07, 0x01, 0x00};
>          varbind knownaps[1];
>          knownaps[0].oid = KnownAP;
>          knownaps[0].len_oid = sizeof(KnownAP);
>          knownaps[0].type = NULL_VALUE;
>          knownaps[0].len_val = 0;
>          printf("Length %d\n", knownaps[0].len_val);
> }
> ---
Please explain this - can't understand:(

-- 
Roman Festchook
Network Engineer
RF2-UANIC FRA11-RIPE