libwmc: add testcases that talk to the device

This commit is contained in:
Dan Williams
2011-11-11 12:21:41 -06:00
parent 83c9058376
commit ae3f1cd578
9 changed files with 293 additions and 30 deletions
+17
View File
@@ -18,10 +18,13 @@
#ifndef LIBWMC_PROTOCOL_H
#define LIBWMC_PROTOCOL_H
#define WMC_CMD_MARKER ((u_int8_t) 0xC8)
enum {
WMC_CMD_DEVICE_INFO = 0x06,
WMC_CMD_IP_INFO = 0x0A,
WMC_CMD_STATUS = 0x0B,
WMC_CMD_INIT = 0x0D,
WMC_CMD_EPS_BEARER_INFO = 0x4D,
};
@@ -33,6 +36,20 @@ struct WmcCmdHeader {
} __attribute__ ((packed));
typedef struct WmcCmdHeader WmcCmdHeader;
/* Used on newer devices like the UML290 */
struct WmcCmdInit2 {
WmcCmdHeader hdr;
u_int8_t _unknown1[14];
} __attribute__ ((packed));
typedef struct WmcCmdInit2 WmcCmdInit2;
struct WmcCmdInit2Rsp {
WmcCmdHeader hdr;
u_int8_t _unknown1[4];
} __attribute__ ((packed));
typedef struct WmcCmdInit2Rsp WmcCmdInit2Rsp;
struct WmcCmdDeviceInfoRsp {
WmcCmdHeader hdr;
u_int8_t _unknown1[27];