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

Lars Gaarden ap-utils@lists.polesye.net
Thu, 08 May 2003 16:07:50 +0200


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.

See code snippet below:

	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);