- if (ap_type == ATMEL410) {
- memcpy(&str410, varbinds[0].value,
- sizeof(struct sysDeviceInfo_ATMEL410));
- StructVersion = str410.StructVersion;
- MacAddress = str410.MacAddress;
- RegulatoryDomain = str410.RegulatoryDomain;
- ProductType = str410.ProductType;
- OEMName = str410.OEMName;
- OEMID = str410.OEMID;
- ProductName = str410.ProductName;
- HardwareRevision = str410.HardwareRevision;
- } else { /* ATMEL12350 */
- memcpy(&str12350, varbinds[0].value,
- sizeof(struct sysDeviceInfo_ATMEL12350));
- StructVersion = str12350.StructVersion;
- MacAddress = str12350.MacAddress;
- Channel = str12350.Channel;
- RegulatoryDomain = str12350.RegulatoryDomain;
- ProductType = str12350.ProductType;
- OEMName = str12350.OEMName;
- OEMID = str12350.OEMID;
- ProductName = str12350.ProductName;
- HardwareRevision = str12350.HardwareRevision;
- PID_VID = str12350.PID_VID;
- sysOIDSize = str12350.sysOIDSize;
- sysOID = str12350.sysOID;
- CountryCode = str12350.CountryCode;
- ChannelInformation = str12350.ChannelInformation;
- TxPower = str12350.TxPower;
+ st_len = varbinds[0].len_val;
+
+ if (st_len == 92 || st_len == 128) { /* SHORTst */
+ memcpy(&str128, varbinds[0].value,
+ sizeof(struct sysDeviceInfo_128));
+ StructVersion = str128.StructVersion;
+ MacAddress = str128.MacAddress;
+ RegulatoryDomain = str128.RegulatoryDomain;
+ ProductType = str128.ProductType;
+ OEMName = str128.OEMName;
+ OEMID = str128.OEMID;
+ ProductName = str128.ProductName;
+ HardwareRevision = str128.HardwareRevision;
+ } else { /* st_len == 160 => LONGst */
+ memcpy(&str160, varbinds[0].value,
+ sizeof(struct sysDeviceInfo_160));
+ StructVersion = str160.StructVersion;
+ MacAddress = str160.MacAddress;
+ Channel = str160.Channel;
+ RegulatoryDomain = str160.RegulatoryDomain;
+ ProductType = str160.ProductType;
+ OEMName = str160.OEMName;
+ OEMID = str160.OEMID;
+ ProductName = str160.ProductName;
+ HardwareRevision = str160.HardwareRevision;
+ PID_VID = str160.PID_VID;
+ sysOIDSize = str160.sysOIDSize;
+ sysOID = str160.sysOID;
+ CountryCode = str160.CountryCode;
+ ChannelInformation = str160.ChannelInformation;
+ TxPower = str160.TxPower;