summaryrefslogtreecommitdiff
path: root/cleopatre/devkit/tests/stub/libmme
diff options
context:
space:
mode:
authorOlivier Dufour2012-10-15 09:26:07 +0200
committerOlivier Dufour2012-10-17 17:41:37 +0200
commitff1b586b3a50829a0dc263844208776280f77311 (patch)
tree3fd7b2e44b497f19addf72d056ff883d55cb5537 /cleopatre/devkit/tests/stub/libmme
parent814f397b234a850b3e0d4f40ec98e0311255c76b (diff)
cleo/app/managerd: update onlined to work with libmme, closes #3381
Diffstat (limited to 'cleopatre/devkit/tests/stub/libmme')
-rw-r--r--cleopatre/devkit/tests/stub/libmme/src/mme.c119
1 files changed, 60 insertions, 59 deletions
diff --git a/cleopatre/devkit/tests/stub/libmme/src/mme.c b/cleopatre/devkit/tests/stub/libmme/src/mme.c
index 942a99433e..7ecf495801 100644
--- a/cleopatre/devkit/tests/stub/libmme/src/mme.c
+++ b/cleopatre/devkit/tests/stub/libmme/src/mme.c
@@ -111,6 +111,7 @@ mme_error_t mme_init (mme_ctx_t *ctx, const mmtype_t mmtype, unsigned char *buff
ctx->tail = 0;
ctx->status = MME_STATUS_OK;
+ ctx->oui = MME_OUI_SPIDCOM;
return MME_SUCCESS;
}
@@ -151,17 +152,17 @@ mme_error_t mme_send (mme_ctx_t *ctx, mme_send_type_t type, char *iface, unsigne
unsigned char software_version[64] = "eoc-alpha0-1";
BEGIN_MME_PAYLOAD (VS_EOC_GET_TOPO_3_STA)
- SET_PAYLOAD_BYTE(3, 0x00) /* result */
- SET_PAYLOAD_BYTE(4, 0x03) /* number of STAs */
- SET_PAYLOAD_BUFFER(5, mac, 6) /* MAC address of STA0 */
- SET_PAYLOAD_BYTE(11, 0x02) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(12, 0x14) /* STA-CCo attenuation */
- SET_PAYLOAD_BUFFER(13, mac1, 6) /* MAC address of STA1 */
- SET_PAYLOAD_BYTE(19, 0x00) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(20, 0x00) /* STA-CCo attenuation */
- SET_PAYLOAD_BUFFER(21, mac2, 6) /* MAC address of STA2 */
- SET_PAYLOAD_BYTE(27, 0x02) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(28, 0x05) /* STA-CCo attenuation */
+ SET_PAYLOAD_BYTE(0, 0x00) /* result */
+ SET_PAYLOAD_BYTE(1, 0x03) /* number of STAs */
+ SET_PAYLOAD_BUFFER(2, mac, 6) /* MAC address of STA0 */
+ SET_PAYLOAD_BYTE(8, 0x02) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(9, 0x14) /* STA-CCo attenuation */
+ SET_PAYLOAD_BUFFER(10, mac1, 6) /* MAC address of STA1 */
+ SET_PAYLOAD_BYTE(16, 0x00) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(17, 0x00) /* STA-CCo attenuation */
+ SET_PAYLOAD_BUFFER(18, mac2, 6) /* MAC address of STA2 */
+ SET_PAYLOAD_BYTE(24, 0x02) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(25, 0x05) /* STA-CCo attenuation */
END_MME_PAYLOAD
BEGIN_MME_PAYLOAD (VS_EOC_CM_NW_STATS_3_STA)
@@ -175,69 +176,69 @@ mme_error_t mme_send (mme_ctx_t *ctx, mme_send_type_t type, char *iface, unsigne
END_MME_PAYLOAD
BEGIN_MME_PAYLOAD (VS_EOC_GET_DEVICE_INFO)
- SET_PAYLOAD_BYTE(3, 0x00) /* result */
- SET_PAYLOAD_BUFFER(4, model_number, 64) /* model_number */
- SET_PAYLOAD_BUFFER(68, software_version, 64) /* software_version */
- SET_PAYLOAD_BYTE(132, 0x0A) /* downstream_attenuation */
- SET_PAYLOAD_BYTE(133, 0x04) /* port amount */
+ SET_PAYLOAD_BYTE(0, 0x00) /* result */
+ SET_PAYLOAD_BUFFER(1, model_number, 64) /* model_number */
+ SET_PAYLOAD_BUFFER(65, software_version, 64) /* software_version */
+ SET_PAYLOAD_BYTE(129, 0x0A) /* downstream_attenuation */
+ SET_PAYLOAD_BYTE(130, 0x04) /* port amount */
END_MME_PAYLOAD
BEGIN_MME_PAYLOAD (VS_EOC_GET_DEVICE_INFO_WRONG_RES)
- SET_PAYLOAD_BYTE(3, 0x01) /* result */
- SET_PAYLOAD_BUFFER(4, model_number, 64) /* model_number */
- SET_PAYLOAD_BUFFER(68, software_version, 64) /* software_version */
- SET_PAYLOAD_BYTE(132, 0x0A) /* downstream_attenuation */
- SET_PAYLOAD_BYTE(133, 0x04) /* port amount */
+ SET_PAYLOAD_BYTE(0, 0x01) /* result */
+ SET_PAYLOAD_BUFFER(1, model_number, 64) /* model_number */
+ SET_PAYLOAD_BUFFER(65, software_version, 64) /* software_version */
+ SET_PAYLOAD_BYTE(129, 0x0A) /* downstream_attenuation */
+ SET_PAYLOAD_BYTE(130, 0x04) /* port amount */
END_MME_PAYLOAD
BEGIN_MME_PAYLOAD (VS_EOC_GET_TOPO_3_STA_WRONG_RES)
- SET_PAYLOAD_BYTE(3, 0x01) /* result */
- SET_PAYLOAD_BYTE(4, 0x03) /* number of STAs */
- SET_PAYLOAD_BUFFER(5, mac, 6) /* MAC address of STA0 */
- SET_PAYLOAD_BYTE(11, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(12, 0x14) /* STA-CCo attenuation */
- SET_PAYLOAD_BUFFER(13, mac1, 6) /* MAC address of STA1 */
- SET_PAYLOAD_BYTE(19, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(20, 0x09) /* STA-CCo attenuation */
- SET_PAYLOAD_BUFFER(21, mac2, 6) /* MAC address of STA2 */
- SET_PAYLOAD_BYTE(27, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(28, 0x05) /* STA-CCo attenuation */
+ SET_PAYLOAD_BYTE(0, 0x01) /* result */
+ SET_PAYLOAD_BYTE(1, 0x03) /* number of STAs */
+ SET_PAYLOAD_BUFFER(2, mac, 6) /* MAC address of STA0 */
+ SET_PAYLOAD_BYTE(8, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(9, 0x14) /* STA-CCo attenuation */
+ SET_PAYLOAD_BUFFER(10, mac1, 6) /* MAC address of STA1 */
+ SET_PAYLOAD_BYTE(16, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(17, 0x09) /* STA-CCo attenuation */
+ SET_PAYLOAD_BUFFER(18, mac2, 6) /* MAC address of STA2 */
+ SET_PAYLOAD_BYTE(24, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(25, 0x05) /* STA-CCo attenuation */
END_MME_PAYLOAD
BEGIN_MME_PAYLOAD (VS_EOC_GET_TOPO_STA_NR_TOO_SMALL)
- SET_PAYLOAD_BYTE(3, 0x00) /* result */
- SET_PAYLOAD_BYTE(4, 0x01) /* number of STAs */
- SET_PAYLOAD_BUFFER(5, mac, 6) /* MAC address of STA0 */
- SET_PAYLOAD_BYTE(11, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(12, 0x14) /* STA-CCo attenuation */
- SET_PAYLOAD_BUFFER(13, mac1, 6) /* MAC address of STA1 */
- SET_PAYLOAD_BYTE(19, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(20, 0x09) /* STA-CCo attenuation */
- SET_PAYLOAD_BUFFER(21, mac2, 6) /* MAC address of STA2 */
- SET_PAYLOAD_BYTE(27, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(28, 0x05) /* STA-CCo attenuation */
+ SET_PAYLOAD_BYTE(0, 0x00) /* result */
+ SET_PAYLOAD_BYTE(1, 0x01) /* number of STAs */
+ SET_PAYLOAD_BUFFER(2, mac, 6) /* MAC address of STA0 */
+ SET_PAYLOAD_BYTE(8, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(9, 0x14) /* STA-CCo attenuation */
+ SET_PAYLOAD_BUFFER(10, mac1, 6) /* MAC address of STA1 */
+ SET_PAYLOAD_BYTE(16, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(17, 0x09) /* STA-CCo attenuation */
+ SET_PAYLOAD_BUFFER(18, mac2, 6) /* MAC address of STA2 */
+ SET_PAYLOAD_BYTE(24, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(25, 0x05) /* STA-CCo attenuation */
END_MME_PAYLOAD
BEGIN_MME_PAYLOAD (VS_EOC_GET_TOPO_STA_NR_TOO_BIG)
- SET_PAYLOAD_BYTE(3, 0x00) /* result */
- SET_PAYLOAD_BYTE(4, 0x05) /* number of STAs */
- SET_PAYLOAD_BUFFER(5, mac, 6) /* MAC address of STA0 */
- SET_PAYLOAD_BYTE(11, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(12, 0x14) /* STA-CCo attenuation */
- SET_PAYLOAD_BUFFER(13, mac1, 6) /* MAC address of STA1 */
- SET_PAYLOAD_BYTE(19, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(20, 0x09) /* STA-CCo attenuation */
- SET_PAYLOAD_BUFFER(21, mac2, 6) /* MAC address of STA2 */
- SET_PAYLOAD_BYTE(27, 0x01) /* STA allowed / not allowed */
- SET_PAYLOAD_BYTE(28, 0x05) /* STA-CCo attenuation */
+ SET_PAYLOAD_BYTE(0, 0x00) /* result */
+ SET_PAYLOAD_BYTE(1, 0x05) /* number of STAs */
+ SET_PAYLOAD_BUFFER(2, mac, 6) /* MAC address of STA0 */
+ SET_PAYLOAD_BYTE(8, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(9, 0x14) /* STA-CCo attenuation */
+ SET_PAYLOAD_BUFFER(10, mac1, 6) /* MAC address of STA1 */
+ SET_PAYLOAD_BYTE(16, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(17, 0x09) /* STA-CCo attenuation */
+ SET_PAYLOAD_BUFFER(18, mac2, 6) /* MAC address of STA2 */
+ SET_PAYLOAD_BYTE(24, 0x01) /* STA allowed / not allowed */
+ SET_PAYLOAD_BYTE(25, 0x05) /* STA-CCo attenuation */
END_MME_PAYLOAD
BEGIN_MME_PAYLOAD (VS_EOC_GET_DEVICE_INFO_1)
- SET_PAYLOAD_BYTE(3, 0x00) /* result */
- SET_PAYLOAD_BUFFER(4, model_number, 64) /* model_number */
- SET_PAYLOAD_BUFFER(68, software_version, 64) /* software_version */
- SET_PAYLOAD_BYTE(132, 0x0A) /* downstream_attenuation */
- SET_PAYLOAD_BYTE(133, 0x04) /* port amount */
+ SET_PAYLOAD_BYTE(0, 0x00) /* result */
+ SET_PAYLOAD_BUFFER(1, model_number, 64) /* model_number */
+ SET_PAYLOAD_BUFFER(65, software_version, 64) /* software_version */
+ SET_PAYLOAD_BYTE(129, 0x0A) /* downstream_attenuation */
+ SET_PAYLOAD_BYTE(130, 0x04) /* port amount */
END_MME_PAYLOAD
BEGIN_MME_PAYLOAD (VS_EOC_CM_NW_STATS_3_STA_1)