All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yang Gu <gyagp0@gmail.com>
To: ofono@ofono.org
Subject: [PATCH 6/8] teststk: Add cases for send sms parser
Date: Wed, 26 May 2010 22:39:12 +0800	[thread overview]
Message-ID: <1274884754-12977-6-git-send-email-yang.gu@intel.com> (raw)
In-Reply-To: <1274884754-12977-1-git-send-email-yang.gu@intel.com>

[-- Attachment #1: Type: text/plain, Size: 53472 bytes --]

---
 src/smsutil.c       |    3 +
 unit/test-stkutil.c | 1767 ++++++++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 1748 insertions(+), 22 deletions(-)

diff --git a/src/smsutil.c b/src/smsutil.c
index 6f8e9c5..29bd881 100644
--- a/src/smsutil.c
+++ b/src/smsutil.c
@@ -1276,6 +1276,9 @@ static gboolean decode_submit(const unsigned char *pdu, int len,
 	if ((len - offset) < expected)
 		return FALSE;
 
+	if (expected > (int)sizeof(out->submit.ud))
+		return FALSE;
+
 	memcpy(out->submit.ud, pdu+offset, expected);
 
 	return TRUE;
diff --git a/unit/test-stkutil.c b/unit/test-stkutil.c
index 2999412..77e05c4 100644
--- a/unit/test-stkutil.c
+++ b/unit/test-stkutil.c
@@ -34,9 +34,40 @@
 #include <ofono/types.h>
 #include "smsutil.h"
 #include "stkutil.h"
+#include "util.h"
 
 #define MAX_ITEM 100
 
+struct sms_submit_test {
+	gboolean rd;
+	enum sms_validity_period_format vpf;
+	gboolean rp;
+	gboolean udhi;
+	gboolean srr;
+	guint8 mr;
+	struct sms_address daddr;
+	guint8 pid;
+	guint8 dcs;
+	struct sms_validity_period vp;
+	guint8 udl;
+	guint8 ud[160];
+};
+
+struct sms_test {
+	struct sms_address sc_addr;
+	enum sms_type type;
+	union {
+		struct sms_deliver deliver;
+		struct sms_deliver_ack_report deliver_ack_report;
+		struct sms_deliver_err_report deliver_err_report;
+		struct sms_submit_test submit;
+		struct sms_submit_ack_report submit_ack_report;
+		struct sms_submit_err_report submit_err_report;
+		struct sms_command command;
+		struct sms_status_report status_report;
+	};
+};
+
 static gboolean g_mem_equal(const unsigned char *v1, const unsigned char *v2,
 				unsigned int len)
 {
@@ -172,15 +203,73 @@ static void check_response_length(const struct stk_response_length *command,
 }
 
 /* Defined in TS 102.223 Section 8.13 */
-static void check_gsm_sms_tpdu(const struct sms *command,
-					const struct sms *test)
+static void check_gsm_sms(const struct sms *command,
+					const struct sms_test *test)
 {
-	g_assert(command->submit.mr == test->submit.mr);
-	g_assert(command->submit.udl == test->submit.udl);
-	check_common_text(command->submit.daddr.address,
-					test->submit.daddr.address);
-	g_assert(g_mem_equal(command->submit.ud, test->submit.ud,
-					test->submit.udl));
+	switch (test->type) {
+	case SMS_TYPE_SUBMIT: {
+		const struct sms_submit *cs = &command->submit;
+		const struct sms_submit_test *ts = &test->submit;
+		enum sms_charset charset;
+
+		g_assert(cs->rd == ts->rd);
+		g_assert(cs->vpf == ts->vpf);
+		g_assert(cs->rp == ts->rp);
+		g_assert(cs->udhi == ts->udhi);
+		g_assert(cs->srr == ts->srr);
+		g_assert(cs->mr == ts->mr);
+
+		g_assert(cs->daddr.number_type == cs->daddr.number_type);
+		g_assert(cs->daddr.numbering_plan == cs->daddr.numbering_plan);
+		g_assert(g_str_equal(cs->daddr.address, ts->daddr.address));
+
+		g_assert(cs->pid == ts->pid);
+		g_assert(cs->dcs == ts->dcs);
+
+		switch (ts->vpf) {
+		case SMS_VALIDITY_PERIOD_FORMAT_RELATIVE:
+			g_assert(cs->vp.relative == ts->vp.relative);
+			break;
+		case SMS_VALIDITY_PERIOD_FORMAT_ABSOLUTE: {
+			const struct sms_scts *ca = &cs->vp.absolute;
+			const struct sms_scts *ta = &ts->vp.absolute;
+			g_assert(ca->year == ta->year);
+			g_assert(ca->month == ta->month);
+			g_assert(ca->day == ta->day);
+			g_assert(ca->hour == ta->hour);
+			g_assert(ca->minute == ta->minute);
+			g_assert(ca->second == ta->second);
+			g_assert(ca->timezone == ta->timezone);
+			break;
+		}
+		case SMS_VALIDITY_PERIOD_FORMAT_ENHANCED:
+			g_assert(g_mem_equal(cs->vp.enhanced,
+							ts->vp.enhanced, 7));
+			break;
+		default:
+			break;
+		}
+
+		g_assert(cs->udl == ts->udl);
+
+		sms_dcs_decode(ts->dcs, NULL, &charset, NULL, NULL);
+
+		if (charset == SMS_CHARSET_8BIT)
+			g_assert(g_str_equal(cs->ud, ts->ud));
+		else {
+			GSList *sms_list = NULL;
+			char *message;
+			sms_list = g_slist_prepend(sms_list, (void *)command);
+			message = sms_decode_text(sms_list);
+			g_assert(g_str_equal(message, ts->ud));
+			g_free(message);
+		}
+
+		break;
+	}
+	default:
+		g_assert(FALSE);
+	}
 }
 
 /* Defined in TS 102.223 Section 8.15 */
@@ -7596,7 +7685,7 @@ struct send_sms_test {
 	unsigned char qualifier;
 	char *alpha_id;
 	struct stk_address address;
-	struct sms gsm_sms;
+	struct sms_test gsm_sms;
 	struct stk_common_byte_array cdma_sms;
 	struct stk_icon_id icon_id;
 	struct stk_text_attribute text_attr;
@@ -7605,15 +7694,615 @@ struct send_sms_test {
 
 /* 3GPP TS 31.124 Section 27.22.4.10.1.4.2 */
 static unsigned char send_sms_111[] = { 0xD0, 0x37, 0x81, 0x03, 0x01, 0x13,
-					0x00, 0x82, 0x02, 0x81, 0x83, 0x85,
-					0x07, 0x53, 0x65, 0x6E, 0x64, 0x20,
-					0x53, 0x4D, 0x86, 0x09, 0x91, 0x11,
-					0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
-					0xF8, 0x8B, 0x18, 0x01, 0x00, 0x09,
-					0x91, 0x10, 0x32, 0x54, 0x76, 0xF8,
-					0x40, 0xF4, 0x0C, 0x54, 0x65, 0x73,
-					0x74, 0x20, 0x4D, 0x65, 0x73, 0x73,
-					0x61, 0x67, 0x65 };
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x07, 0x53, 0x65, 0x6E,
+						0x64, 0x20, 0x53, 0x4D, 0x86,
+						0x09, 0x91, 0x11, 0x22, 0x33,
+						0x44, 0x55, 0x66, 0x77, 0xF8,
+						0x8B, 0x18, 0x01, 0x00, 0x09,
+						0x91, 0x10, 0x32, 0x54, 0x76,
+						0xF8, 0x40, 0xF4, 0x0C, 0x54,
+						0x65, 0x73, 0x74, 0x20, 0x4D,
+						0x65, 0x73, 0x73, 0x61, 0x67,
+						0x65 };
+
+static unsigned char send_sms_121[] = { 0xD0, 0x32, 0x81, 0x03, 0x01, 0x13,
+						0x01, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x07, 0x53, 0x65, 0x6E,
+						0x64, 0x20, 0x53, 0x4D, 0x86,
+						0x09, 0x91, 0x11, 0x22, 0x33,
+						0x44, 0x55, 0x66, 0x77, 0xF8,
+						0x8B, 0x13, 0x01, 0x00, 0x09,
+						0x91, 0x10, 0x32, 0x54, 0x76,
+						0xF8, 0x40, 0xF4, 0x07, 0x53,
+						0x65, 0x6E, 0x64, 0x20, 0x53,
+						0x4D };
+
+static unsigned char send_sms_131[] = { 0xD0, 0x3D, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0D, 0x53, 0x68, 0x6F,
+						0x72, 0x74, 0x20, 0x4D, 0x65,
+						0x73, 0x73, 0x61, 0x67, 0x65,
+						0x86, 0x09, 0x91, 0x11, 0x22,
+						0x33, 0x44, 0x55, 0x66, 0x77,
+						0xF8, 0x8B, 0x18, 0x01, 0x00,
+						0x09, 0x91, 0x10, 0x32, 0x54,
+						0x76, 0xF8, 0x40, 0xF0, 0x0D,
+						0x53, 0xF4, 0x5B, 0x4E, 0x07,
+						0x35, 0xCB, 0xF3, 0x79, 0xF8,
+						0x5C, 0x06 };
+
+static unsigned char send_sms_141[] = { 0xD0, 0x81, 0xFD, 0x81, 0x03, 0x01,
+						0x13, 0x01, 0x82, 0x02, 0x81,
+						0x83, 0x85, 0x38, 0x54, 0x68,
+						0x65, 0x20, 0x61, 0x64, 0x64,
+						0x72, 0x65, 0x73, 0x73, 0x20,
+						0x64, 0x61, 0x74, 0x61, 0x20,
+						0x6F, 0x62, 0x6A, 0x65, 0x63,
+						0x74, 0x20, 0x68, 0x6F, 0x6C,
+						0x64, 0x73, 0x20, 0x74, 0x68,
+						0x65, 0x20, 0x52, 0x50, 0x11,
+						0x44, 0x65, 0x73, 0x74, 0x69,
+						0x6E, 0x61, 0x74, 0x69, 0x6F,
+						0x6E, 0x11, 0x41, 0x64, 0x64,
+						0x72, 0x65, 0x73, 0x73, 0x86,
+						0x09, 0x91, 0x11, 0x22, 0x33,
+						0x44, 0x55, 0x66, 0x77, 0xF8,
+						0x8B, 0x81, 0xAC, 0x01, 0x00,
+						0x09, 0x91, 0x10, 0x32, 0x54,
+						0x76, 0xF8, 0x40, 0xF4, 0xA0,
+						0x54, 0x77, 0x6F, 0x20, 0x74,
+						0x79, 0x70, 0x65, 0x73, 0x20,
+						0x61, 0x72, 0x65, 0x20, 0x64,
+						0x65, 0x66, 0x69, 0x6E, 0x65,
+						0x64, 0x3A, 0x20, 0x2D, 0x20,
+						0x41, 0x20, 0x73, 0x68, 0x6F,
+						0x72, 0x74, 0x20, 0x6D, 0x65,
+						0x73, 0x73, 0x61, 0x67, 0x65,
+						0x20, 0x74, 0x6F, 0x20, 0x62,
+						0x65, 0x20, 0x73, 0x65, 0x6E,
+						0x74, 0x20, 0x74, 0x6F, 0x20,
+						0x74, 0x68, 0x65, 0x20, 0x6E,
+						0x65, 0x74, 0x77, 0x6F, 0x72,
+						0x6B, 0x20, 0x69, 0x6E, 0x20,
+						0x61, 0x6E, 0x20, 0x53, 0x4D,
+						0x53, 0x2D, 0x53, 0x55, 0x42,
+						0x4D, 0x49, 0x54, 0x20, 0x6D,
+						0x65, 0x73, 0x73, 0x61, 0x67,
+						0x65, 0x2C, 0x20, 0x6F, 0x72,
+						0x20, 0x61, 0x6E, 0x20, 0x53,
+						0x4D, 0x53, 0x2D, 0x43, 0x4F,
+						0x4D, 0x4D, 0x41, 0x4E, 0x44,
+						0x20, 0x6D, 0x65, 0x73, 0x73,
+						0x61, 0x67, 0x65, 0x2C, 0x20,
+						0x77, 0x68, 0x65, 0x72, 0x65,
+						0x20, 0x74, 0x68, 0x65, 0x20,
+						0x75, 0x73, 0x65, 0x72, 0x20,
+						0x64, 0x61, 0x74, 0x61, 0x20,
+						0x63, 0x61, 0x6E, 0x20, 0x62,
+						0x65, 0x20, 0x70, 0x61, 0x73,
+						0x73, 0x65, 0x64, 0x20, 0x74,
+						0x72, 0x61, 0x6E, 0x73, 0x70 };
+
+static unsigned char send_sms_151[] = { 0xD0, 0x81, 0xE9, 0x81, 0x03, 0x01,
+						0x13, 0x00, 0x82, 0x02, 0x81,
+						0x83, 0x85, 0x38, 0x54, 0x68,
+						0x65, 0x20, 0x61, 0x64, 0x64,
+						0x72, 0x65, 0x73, 0x73, 0x20,
+						0x64, 0x61, 0x74, 0x61, 0x20,
+						0x6F, 0x62, 0x6A, 0x65, 0x63,
+						0x74, 0x20, 0x68, 0x6F, 0x6C,
+						0x64, 0x73, 0x20, 0x74, 0x68,
+						0x65, 0x20, 0x52, 0x50, 0x20,
+						0x44, 0x65, 0x73, 0x74, 0x69,
+						0x6E, 0x61, 0x74, 0x69, 0x6F,
+						0x6E, 0x20, 0x41, 0x64, 0x64,
+						0x72, 0x65, 0x73, 0x73, 0x86,
+						0x09, 0x91, 0x11, 0x22, 0x33,
+						0x44, 0x55, 0x66, 0x77, 0xF8,
+						0x8B, 0x81, 0x98, 0x01, 0x00,
+						0x09, 0x91, 0x10, 0x32, 0x54,
+						0x76, 0xF8, 0x40, 0xF0, 0xA0,
+						0xD4, 0xFB, 0x1B, 0x44, 0xCF,
+						0xC3, 0xCB, 0x73, 0x50, 0x58,
+						0x5E, 0x06, 0x91, 0xCB, 0xE6,
+						0xB4, 0xBB, 0x4C, 0xD6, 0x81,
+						0x5A, 0xA0, 0x20, 0x68, 0x8E,
+						0x7E, 0xCB, 0xE9, 0xA0, 0x76,
+						0x79, 0x3E, 0x0F, 0x9F, 0xCB,
+						0x20, 0xFA, 0x1B, 0x24, 0x2E,
+						0x83, 0xE6, 0x65, 0x37, 0x1D,
+						0x44, 0x7F, 0x83, 0xE8, 0xE8,
+						0x32, 0xC8, 0x5D, 0xA6, 0xDF,
+						0xDF, 0xF2, 0x35, 0x28, 0xED,
+						0x06, 0x85, 0xDD, 0xA0, 0x69,
+						0x73, 0xDA, 0x9A, 0x56, 0x85,
+						0xCD, 0x24, 0x15, 0xD4, 0x2E,
+						0xCF, 0xE7, 0xE1, 0x73, 0x99,
+						0x05, 0x7A, 0xCB, 0x41, 0x61,
+						0x37, 0x68, 0xDA, 0x9C, 0xB6,
+						0x86, 0xCF, 0x66, 0x33, 0xE8,
+						0x24, 0x82, 0xDA, 0xE5, 0xF9,
+						0x3C, 0x7C, 0x2E, 0xB3, 0x40,
+						0x77, 0x74, 0x59, 0x5E, 0x06,
+						0xD1, 0xD1, 0x65, 0x50, 0x7D,
+						0x5E, 0x96, 0x83, 0xC8, 0x61,
+						0x7A, 0x18, 0x34, 0x0E, 0xBB,
+						0x41, 0xE2, 0x32, 0x08, 0x1E,
+						0x9E, 0xCF, 0xCB, 0x64, 0x10,
+						0x5D, 0x1E, 0x76, 0xCF, 0xE1 };
+
+static unsigned char send_sms_161[] = { 0xD0, 0x81, 0xFD, 0x81, 0x03, 0x01,
+						0x13, 0x00, 0x82, 0x02, 0x81,
+						0x83, 0x85, 0x81, 0xE6, 0x54,
+						0x77, 0x6F, 0x20, 0x74, 0x79,
+						0x70, 0x65, 0x73, 0x20, 0x61,
+						0x72, 0x65, 0x20, 0x64, 0x65,
+						0x66, 0x69, 0x6E, 0x65, 0x64,
+						0x3A, 0x20, 0x2D, 0x20, 0x41,
+						0x20, 0x73, 0x68, 0x6F, 0x72,
+						0x74, 0x20, 0x6D, 0x65, 0x73,
+						0x73, 0x61, 0x67, 0x65, 0x20,
+						0x74, 0x6F, 0x20, 0x62, 0x65,
+						0x20, 0x73, 0x65, 0x6E, 0x74,
+						0x20, 0x74, 0x6F, 0x20, 0x74,
+						0x68, 0x65, 0x20, 0x6E, 0x65,
+						0x74, 0x77, 0x6F, 0x72, 0x6B,
+						0x20, 0x69, 0x6E, 0x20, 0x61,
+						0x6E, 0x20, 0x53, 0x4D, 0x53,
+						0x2D, 0x53, 0x55, 0x42, 0x4D,
+						0x49, 0x54, 0x20, 0x6D, 0x65,
+						0x73, 0x73, 0x61, 0x67, 0x65,
+						0x2C, 0x20, 0x6F, 0x72, 0x20,
+						0x61, 0x6E, 0x20, 0x53, 0x4D,
+						0x53, 0x2D, 0x43, 0x4F, 0x4D,
+						0x4D, 0x41, 0x4E, 0x44, 0x20,
+						0x6D, 0x65, 0x73, 0x73, 0x61,
+						0x67, 0x65, 0x2C, 0x20, 0x77,
+						0x68, 0x65, 0x72, 0x65, 0x20,
+						0x74, 0x68, 0x65, 0x20, 0x75,
+						0x73, 0x65, 0x72, 0x20, 0x64,
+						0x61, 0x74, 0x61, 0x20, 0x63,
+						0x61, 0x6E, 0x20, 0x62, 0x65,
+						0x20, 0x70, 0x61, 0x73, 0x73,
+						0x65, 0x64, 0x20, 0x74, 0x72,
+						0x61, 0x6E, 0x73, 0x70, 0x61,
+						0x72, 0x65, 0x6E, 0x74, 0x6C,
+						0x79, 0x3B, 0x20, 0x2D, 0x20,
+						0x41, 0x20, 0x73, 0x68, 0x6F,
+						0x72, 0x74, 0x20, 0x6D, 0x65,
+						0x73, 0x73, 0x61, 0x67, 0x65,
+						0x20, 0x74, 0x6F, 0x20, 0x62,
+						0x65, 0x20, 0x73, 0x65, 0x6E,
+						0x74, 0x20, 0x74, 0x6F, 0x20,
+						0x74, 0x68, 0x65, 0x20, 0x6E,
+						0x65, 0x74, 0x77, 0x6F, 0x72,
+						0x6B, 0x20, 0x69, 0x6E, 0x20,
+						0x61, 0x6E, 0x20, 0x53, 0x4D,
+						0x53, 0x2D, 0x53, 0x55, 0x42,
+						0x4D, 0x49, 0x54, 0x20, 0x8B,
+						0x09, 0x01, 0x00, 0x02, 0x91,
+						0x10, 0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_171[] = { 0xD0, 0x30, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x00, 0x86, 0x09, 0x91,
+						0x11, 0x22, 0x33, 0x44, 0x55,
+						0x66, 0x77, 0xF8, 0x8B, 0x18,
+						0x01, 0x00, 0x09, 0x91, 0x10,
+						0x32, 0x54, 0x76, 0xF8, 0x40,
+						0xF4, 0x0C, 0x54, 0x65, 0x73,
+						0x74, 0x20, 0x4D, 0x65, 0x73,
+						0x73, 0x61, 0x67, 0x65 };
+
+static unsigned char send_sms_181[] = { 0xD0, 0x2E, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x86, 0x09, 0x91, 0x11, 0x22,
+						0x33, 0x44, 0x55, 0x66, 0x77,
+						0xF8, 0x8B, 0x18, 0x01, 0x00,
+						0x09, 0x91, 0x10, 0x32, 0x54,
+						0x76, 0xF8, 0x40, 0xF4, 0x0C,
+						0x54, 0x65, 0x73, 0x74, 0x20,
+						0x4D, 0x65, 0x73, 0x73, 0x61,
+						0x67, 0x65 };
+
+static unsigned char send_sms_211[] = { 0xD0, 0x55, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x19, 0x80, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15, 0x86, 0x09, 0x91,
+						0x11, 0x22, 0x33, 0x44, 0x55,
+						0x66, 0x77, 0xF8, 0x8B, 0x24,
+						0x01, 0x00, 0x09, 0x91, 0x10,
+						0x32, 0x54, 0x76, 0xF8, 0x40,
+						0x08, 0x18, 0x04, 0x17, 0x04,
+						0x14, 0x04, 0x20, 0x04, 0x10,
+						0x04, 0x12, 0x04, 0x21, 0x04,
+						0x22, 0x04, 0x12, 0x04, 0x23,
+						0x04, 0x19, 0x04, 0x22, 0x04,
+						0x15 };
+
+static unsigned char send_sms_212[] = { 0xD0, 0x4B, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x0F, 0x81, 0x0C, 0x08,
+						0x97, 0x94, 0xA0, 0x90, 0x92,
+						0xA1, 0xA2, 0x92, 0xA3, 0x99,
+						0xA2, 0x95, 0x86, 0x09, 0x91,
+						0x11, 0x22, 0x33, 0x44, 0x55,
+						0x66, 0x77, 0xF8, 0x8B, 0x24,
+						0x01, 0x00, 0x09, 0x91, 0x10,
+						0x32, 0x54, 0x76, 0xF8, 0x40,
+						0x08, 0x18, 0x04, 0x17, 0x04,
+						0x14, 0x04, 0x20, 0x04, 0x10,
+						0x04, 0x12, 0x04, 0x21, 0x04,
+						0x22, 0x04, 0x12, 0x04, 0x23,
+						0x04, 0x19, 0x04, 0x22, 0x04,
+						0x15 };
+
+static unsigned char send_sms_213[] = { 0xD0, 0x4C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x82, 0x0C, 0x04,
+						0x10, 0x87, 0x84, 0x90, 0x80,
+						0x82, 0x91, 0x92, 0x82, 0x93,
+						0x89, 0x92, 0x85, 0x86, 0x09,
+						0x91, 0x11, 0x22, 0x33, 0x44,
+						0x55, 0x66, 0x77, 0xF8, 0x8B,
+						0x24, 0x01, 0x00, 0x09, 0x91,
+						0x10, 0x32, 0x54, 0x76, 0xF8,
+						0x40, 0x08, 0x18, 0x04, 0x17,
+						0x04, 0x14, 0x04, 0x20, 0x04,
+						0x10, 0x04, 0x12, 0x04, 0x21,
+						0x04, 0x22, 0x04, 0x12, 0x04,
+						0x23, 0x04, 0x19, 0x04, 0x22,
+						0x04, 0x15 };
+
+static unsigned char send_sms_311[] = { 0xD0, 0x3B, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x07, 0x4E, 0x4F, 0x20,
+						0x49, 0x43, 0x4F, 0x4E, 0x86,
+						0x09, 0x91, 0x11, 0x22, 0x33,
+						0x44, 0x55, 0x66, 0x77, 0xF8,
+						0x8B, 0x18, 0x01, 0x00, 0x09,
+						0x91, 0x10, 0x32, 0x54, 0x76,
+						0xF8, 0x40, 0xF4, 0x0C, 0x54,
+						0x65, 0x73, 0x74, 0x20, 0x4D,
+						0x65, 0x73, 0x73, 0x61, 0x67,
+						0x65, 0x9E, 0x02, 0x00, 0x01 };
+
+static unsigned char send_sms_321[] = { 0xD0, 0x3B, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x07, 0x53, 0x65, 0x6E,
+						0x64, 0x20, 0x53, 0x4D, 0x86,
+						0x09, 0x91, 0x11, 0x22, 0x33,
+						0x44, 0x55, 0x66, 0x77, 0xF8,
+						0x8B, 0x18, 0x01, 0x00, 0x09,
+						0x91, 0x10, 0x32, 0x54, 0x76,
+						0xF8, 0x40, 0xF4, 0x0C, 0x54,
+						0x65, 0x73, 0x74, 0x20, 0x4D,
+						0x65, 0x73, 0x73, 0x61, 0x67,
+						0x65, 0x1E, 0x02, 0x01, 0x01 };
+
+static unsigned char send_sms_411[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x00, 0xB4 };
+
+static unsigned char send_sms_412[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_421[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x01, 0xB4 };
+
+static unsigned char send_sms_422[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_431[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x02, 0xB4 };
+
+static unsigned char send_sms_432[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_441[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x04, 0xB4 };
+
+static unsigned char send_sms_442[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x00, 0xB4 };
+
+static unsigned char send_sms_443[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_451[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x08, 0xB4 };
+
+static unsigned char send_sms_452[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x00, 0xB4 };
+
+static unsigned char send_sms_453[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_461[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x10, 0xB4 };
+
+static unsigned char send_sms_462[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x00, 0xB4 };
+
+static unsigned char send_sms_463[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_471[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x20, 0xB4 };
+
+static unsigned char send_sms_472[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x00, 0xB4 };
+
+static unsigned char send_sms_473[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_481[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x40, 0xB4 };
+
+static unsigned char send_sms_482[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x00, 0xB4 };
+
+static unsigned char send_sms_483[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_491[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x80, 0xB4 };
+
+static unsigned char send_sms_492[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x00, 0xB4 };
+
+static unsigned char send_sms_493[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x33, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_4101[] = { 0xD0, 0x2C, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x31, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20, 0xD0,
+						0x04, 0x00, 0x10, 0x00, 0xB4 };
+
+static unsigned char send_sms_4102[] = { 0xD0, 0x26, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x10, 0x54, 0x65, 0x78,
+						0x74, 0x20, 0x41, 0x74, 0x74,
+						0x72, 0x69, 0x62, 0x75, 0x74,
+						0x65, 0x20, 0x32, 0x8B, 0x09,
+						0x01, 0x00, 0x02, 0x91, 0x10,
+						0x40, 0xF0, 0x01, 0x20 };
+
+static unsigned char send_sms_511[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x05, 0x80, 0x4E, 0x2D,
+						0x4E, 0x00, 0x86, 0x09, 0x91,
+						0x11, 0x22, 0x33, 0x44, 0x55,
+						0x66, 0x77, 0xF8, 0x8B, 0x10,
+						0x01, 0x00, 0x09, 0x91, 0x10,
+						0x32, 0x54, 0x76, 0xF8, 0x40,
+						0x08, 0x04, 0x4E, 0x2D, 0x4E,
+						0x00 };
+
+static unsigned char send_sms_512[] = { 0xD0, 0x2D, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x05, 0x81, 0x02, 0x9C,
+						0xAD, 0x80, 0x86, 0x09, 0x91,
+						0x11, 0x22, 0x33, 0x44, 0x55,
+						0x66, 0x77, 0xF8, 0x8B, 0x10,
+						0x01, 0x00, 0x09, 0x91, 0x10,
+						0x32, 0x54, 0x76, 0xF8, 0x40,
+						0x08, 0x04, 0x4E, 0x2D, 0x4E,
+						0x00 };
+
+static unsigned char send_sms_513[] = { 0xD0, 0x2E, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x06, 0x82, 0x02, 0x4E,
+						0x00, 0xAD, 0x80, 0x86, 0x09,
+						0x91, 0x11, 0x22, 0x33, 0x44,
+						0x55, 0x66, 0x77, 0xF8, 0x8B,
+						0x10, 0x01, 0x00, 0x09, 0x91,
+						0x10, 0x32, 0x54, 0x76, 0xF8,
+						0x40, 0x08, 0x04, 0x4E, 0x2D,
+						0x4E, 0x00 };
+
+static unsigned char send_sms_611[] = { 0xD0, 0x35, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x09, 0x80, 0x00, 0x38,
+						0x00, 0x30, 0x30, 0xEB, 0x00,
+						0x30, 0x86, 0x09, 0x91, 0x11,
+						0x22, 0x33, 0x44, 0x55, 0x66,
+						0x77, 0xF8, 0x8B, 0x14, 0x01,
+						0x00, 0x09, 0x91, 0x10, 0x32,
+						0x54, 0x76, 0xF8, 0x40, 0x08,
+						0x08, 0x00, 0x38, 0x00, 0x30,
+						0x30, 0xEB, 0x00, 0x31 };
+
+static unsigned char send_sms_612[] = { 0xD0, 0x33, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x07, 0x81, 0x04, 0x61,
+						0x38, 0x31, 0xEB, 0x31, 0x86,
+						0x09, 0x91, 0x11, 0x22, 0x33,
+						0x44, 0x55, 0x66, 0x77, 0xF8,
+						0x8B, 0x14, 0x01, 0x00, 0x09,
+						0x91, 0x10, 0x32, 0x54, 0x76,
+						0xF8, 0x40, 0x08, 0x08, 0x00,
+						0x38, 0x00, 0x30, 0x30, 0xEB,
+						0x00, 0x32 };
+
+static unsigned char send_sms_613[] = { 0xD0, 0x34, 0x81, 0x03, 0x01, 0x13,
+						0x00, 0x82, 0x02, 0x81, 0x83,
+						0x85, 0x08, 0x82, 0x04, 0x30,
+						0xA0, 0x38, 0x32, 0xCB, 0x32,
+						0x86, 0x09, 0x91, 0x11, 0x22,
+						0x33, 0x44, 0x55, 0x66, 0x77,
+						0xF8, 0x8B, 0x14, 0x01, 0x00,
+						0x09, 0x91, 0x10, 0x32, 0x54,
+						0x76, 0xF8, 0x40, 0x08, 0x08,
+						0x00, 0x38, 0x00, 0x30, 0x30,
+						0xEB, 0x00, 0x33 };
 
 static struct send_sms_test send_sms_data_111 = {
 	.pdu = send_sms_111,
@@ -7629,12 +8318,958 @@ static struct send_sms_test send_sms_data_111 = {
 		{.submit = {
 			.mr = 0x00,
 			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF4,
 			.udl = 12,
 			.ud = "Test Message"
 		} }
 	}
 };
 
+static struct send_sms_test send_sms_data_121 = {
+	.pdu = send_sms_121,
+	.pdu_len = sizeof(send_sms_121),
+	.qualifier = 0x01,
+	.alpha_id = "Send SM",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 7,
+			.ud = "Send SM"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_131 = {
+	.pdu = send_sms_131,
+	.pdu_len = sizeof(send_sms_131),
+	.qualifier = 0x00,
+	.alpha_id = "Short Message",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 13,
+			.ud = "Short Message"
+		} }
+	},
+};
+
+static struct send_sms_test send_sms_data_141 = {
+	.pdu = send_sms_141,
+	.pdu_len = sizeof(send_sms_141),
+	.qualifier = 0x01,
+	.alpha_id = "The address data object holds the RP_Destination_Address",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 160,
+			.ud = "Two types are defined: - A short message to be "
+				"sent to the network in an SMS-SUBMIT message, "
+				"or an SMS-COMMAND message, where the user "
+				"data can be passed transp"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_151 = {
+	.pdu = send_sms_151,
+	.pdu_len = sizeof(send_sms_151),
+	.qualifier = 0x00,
+	.alpha_id = "The address data object holds the RP Destination Address",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 160,
+			.ud = "Two types are defined: - A short message to be "
+				"sent to the network in an SMS-SUBMIT message, "
+				"or an SMS-COMMAND message, where the user "
+				"data can be passed transp"
+		} }
+	}
+};
+
+/* There should be a space after alpha_id */
+static struct send_sms_test send_sms_data_161 = {
+	.pdu = send_sms_161,
+	.pdu_len = sizeof(send_sms_161),
+	.qualifier = 0x00,
+	.alpha_id = "Two types are defined: - A short message to be sent to "
+			"the network in an SMS-SUBMIT message, or an "
+			"SMS-COMMAND message, where the user data can be "
+			"passed transparently; - A short message to be sent "
+			"to the network in an SMS-SUBMIT ",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_171 = {
+	.pdu = send_sms_171,
+	.pdu_len = sizeof(send_sms_171),
+	.qualifier = 0x00,
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF4,
+			.udl = 12,
+			.ud = "Test Message"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_181 = {
+	.pdu = send_sms_181,
+	.pdu_len = sizeof(send_sms_181),
+	.qualifier = 0x00,
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF4,
+			.udl = 12,
+			.ud = "Test Message"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_211 = {
+	.pdu = send_sms_211,
+	.pdu_len = sizeof(send_sms_211),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 24,
+			.ud = "ЗДРАВСТВУЙТЕ"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_212 = {
+	.pdu = send_sms_212,
+	.pdu_len = sizeof(send_sms_212),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 24,
+			.ud = "ЗДРАВСТВУЙТЕ"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_213 = {
+	.pdu = send_sms_213,
+	.pdu_len = sizeof(send_sms_213),
+	.qualifier = 0x00,
+	.alpha_id = "ЗДРАВСТВУЙТЕ",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 24,
+			.ud = "ЗДРАВСТВУЙТЕ"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_311 = {
+	.pdu = send_sms_311,
+	.pdu_len = sizeof(send_sms_311),
+	.qualifier = 0x00,
+	.alpha_id = "NO ICON",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF4,
+			.udl = 12,
+			.ud = "Test Message"
+		} }
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_SELF_EXPLANATORY,
+		.id = 0x01
+	}
+};
+
+static struct send_sms_test send_sms_data_321 = {
+	.pdu = send_sms_321,
+	.pdu_len = sizeof(send_sms_321),
+	.qualifier = 0x00,
+	.alpha_id = "Send SM",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0xF4,
+			.udl = 12,
+			.ud = "Test Message"
+		} }
+	},
+	.icon_id = {
+		.qualifier = STK_ICON_QUALIFIER_TYPE_NON_SELF_EXPLANATORY,
+		.id = 0x01
+	}
+};
+
+static struct send_sms_test send_sms_data_411 = {
+	.pdu = send_sms_411,
+	.pdu_len = sizeof(send_sms_411),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_412 = {
+	.pdu = send_sms_412,
+	.pdu_len = sizeof(send_sms_412),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_421 = {
+	.pdu = send_sms_421,
+	.pdu_len = sizeof(send_sms_421),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x01, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_422 = {
+	.pdu = send_sms_422,
+	.pdu_len = sizeof(send_sms_422),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_431 = {
+	.pdu = send_sms_431,
+	.pdu_len = sizeof(send_sms_431),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x02, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_432 = {
+	.pdu = send_sms_432,
+	.pdu_len = sizeof(send_sms_432),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_441 = {
+	.pdu = send_sms_441,
+	.pdu_len = sizeof(send_sms_441),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x04, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_442 = {
+	.pdu = send_sms_442,
+	.pdu_len = sizeof(send_sms_442),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_443 = {
+	.pdu = send_sms_443,
+	.pdu_len = sizeof(send_sms_443),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_451 = {
+	.pdu = send_sms_451,
+	.pdu_len = sizeof(send_sms_451),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x08, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_452 = {
+	.pdu = send_sms_452,
+	.pdu_len = sizeof(send_sms_452),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_453 = {
+	.pdu = send_sms_453,
+	.pdu_len = sizeof(send_sms_453),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_461 = {
+	.pdu = send_sms_461,
+	.pdu_len = sizeof(send_sms_461),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x10, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_462 = {
+	.pdu = send_sms_462,
+	.pdu_len = sizeof(send_sms_462),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_463 = {
+	.pdu = send_sms_463,
+	.pdu_len = sizeof(send_sms_463),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_471 = {
+	.pdu = send_sms_471,
+	.pdu_len = sizeof(send_sms_471),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x20, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_472 = {
+	.pdu = send_sms_472,
+	.pdu_len = sizeof(send_sms_472),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_473 = {
+	.pdu = send_sms_473,
+	.pdu_len = sizeof(send_sms_473),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_481 = {
+	.pdu = send_sms_481,
+	.pdu_len = sizeof(send_sms_481),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x40, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_482 = {
+	.pdu = send_sms_482,
+	.pdu_len = sizeof(send_sms_482),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_483 = {
+	.pdu = send_sms_483,
+	.pdu_len = sizeof(send_sms_483),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_491 = {
+	.pdu = send_sms_491,
+	.pdu_len = sizeof(send_sms_491),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x80, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_492 = {
+	.pdu = send_sms_492,
+	.pdu_len = sizeof(send_sms_492),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_493 = {
+	.pdu = send_sms_493,
+	.pdu_len = sizeof(send_sms_493),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 3",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_4101 = {
+	.pdu = send_sms_4101,
+	.pdu_len = sizeof(send_sms_4101),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 1",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	},
+	.text_attr = {
+		.len = 4,
+		.attributes = { 0x00, 0x10, 0x00, 0xB4 }
+	}
+};
+
+static struct send_sms_test send_sms_data_4102 = {
+	.pdu = send_sms_4102,
+	.pdu_len = sizeof(send_sms_4102),
+	.qualifier = 0x00,
+	.alpha_id = "Text Attribute 2",
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "01",
+			.pid = 0x40,
+			.dcs = 0xF0,
+			.udl = 1,
+			.ud = " "
+		} }
+	}
+};
+
+/* The TP-UDL should be 4, instead of 24 */
+static struct send_sms_test send_sms_data_511 = {
+	.pdu = send_sms_511,
+	.pdu_len = sizeof(send_sms_511),
+	.qualifier = 0x00,
+	.alpha_id = "中一",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 4,
+			.ud = "中一"
+		} }
+	}
+};
+
+/* The TP-UDL should be 4, instead of 24 */
+static struct send_sms_test send_sms_data_512 = {
+	.pdu = send_sms_512,
+	.pdu_len = sizeof(send_sms_512),
+	.qualifier = 0x00,
+	.alpha_id = "中一",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 4,
+			.ud = "中一"
+		} }
+	}
+};
+
+/* The TP-UDL should be 4, instead of 24 */
+static struct send_sms_test send_sms_data_513 = {
+	.pdu = send_sms_513,
+	.pdu_len = sizeof(send_sms_513),
+	.qualifier = 0x00,
+	.alpha_id = "中一",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 4,
+			.ud = "中一"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_611 = {
+	.pdu = send_sms_611,
+	.pdu_len = sizeof(send_sms_611),
+	.qualifier = 0x00,
+	.alpha_id = "80ル0",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 8,
+			.ud = "80ル1"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_612 = {
+	.pdu = send_sms_612,
+	.pdu_len = sizeof(send_sms_612),
+	.qualifier = 0x00,
+	.alpha_id = "81ル1",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 8,
+			.ud = "80ル2"
+		} }
+	}
+};
+
+static struct send_sms_test send_sms_data_613 = {
+	.pdu = send_sms_613,
+	.pdu_len = sizeof(send_sms_613),
+	.qualifier = 0x00,
+	.alpha_id = "82ル2",
+	.address = {
+		.ton_npi = 0x91,
+		.number = "112233445566778"
+	},
+	.gsm_sms = {
+		{}, SMS_TYPE_SUBMIT,
+		{.submit = {
+			.mr = 0x00,
+			.daddr.address = "012345678",
+			.pid = 0x40,
+			.dcs = 0x08,
+			.udl = 8,
+			.ud = "80ル3"
+		} }
+	}
+};
+
 static void test_send_sms(gconstpointer data)
 {
 	const struct send_sms_test *test = data;
@@ -7653,11 +9288,11 @@ static void test_send_sms(gconstpointer data)
 
 	check_alpha_id(command->send_sms.alpha_id, test->alpha_id);
 	check_address(&command->send_sms.address, &test->address);
-	check_gsm_sms_tpdu(&command->send_sms.gsm_sms, &test->gsm_sms);
+	check_gsm_sms(&command->send_sms.gsm_sms, &test->gsm_sms);
 	check_cdma_sms_tpdu(&command->send_sms.cdma_sms, &test->cdma_sms);
-	check_icon_id(&command->select_item.icon_id, &test->icon_id);
-	check_text_attr(&command->select_item.text_attr, &test->text_attr);
-	check_frame_id(&command->select_item.frame_id, &test->frame_id);
+	check_icon_id(&command->send_sms.icon_id, &test->icon_id);
+	check_text_attr(&command->send_sms.text_attr, &test->text_attr);
+	check_frame_id(&command->send_sms.frame_id, &test->frame_id);
 
 	stk_command_free(command);
 }
@@ -15022,6 +16657,94 @@ int main(int argc, char **argv)
 
 	g_test_add_data_func("/teststk/Send SMS 1.1.1",
 				&send_sms_data_111, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 1.2.1",
+				&send_sms_data_121, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 1.3.1",
+				&send_sms_data_131, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 1.4.1",
+				&send_sms_data_141, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 1.5.1",
+				&send_sms_data_151, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 1.6.1",
+				&send_sms_data_161, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 1.7.1",
+				&send_sms_data_171, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 1.8.1",
+				&send_sms_data_181, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 2.1.1",
+				&send_sms_data_211, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 2.1.2",
+				&send_sms_data_212, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 2.1.3",
+				&send_sms_data_213, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 3.1.1",
+				&send_sms_data_311, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 3.2.1",
+				&send_sms_data_321, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.1.1",
+				&send_sms_data_411, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.1.2",
+				&send_sms_data_412, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.2.1",
+				&send_sms_data_421, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.2.2",
+				&send_sms_data_422, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.3.1",
+				&send_sms_data_431, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.3.2",
+				&send_sms_data_432, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.4.1",
+				&send_sms_data_441, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.4.2",
+				&send_sms_data_442, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.4.3",
+				&send_sms_data_443, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.5.1",
+				&send_sms_data_451, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.5.2",
+				&send_sms_data_452, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.5.3",
+				&send_sms_data_453, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.6.1",
+				&send_sms_data_461, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.6.2",
+				&send_sms_data_462, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.6.3",
+				&send_sms_data_463, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.7.1",
+				&send_sms_data_471, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.7.2",
+				&send_sms_data_472, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.7.3",
+				&send_sms_data_473, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.8.1",
+				&send_sms_data_481, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.8.2",
+				&send_sms_data_482, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.8.3",
+				&send_sms_data_483, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.9.1",
+				&send_sms_data_491, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.9.2",
+				&send_sms_data_492, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.9.3",
+				&send_sms_data_493, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.10.1",
+				&send_sms_data_4101, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 4.10.2",
+				&send_sms_data_4102, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 5.1.1",
+				&send_sms_data_511, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 5.1.2",
+				&send_sms_data_512, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 5.1.3",
+				&send_sms_data_513, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 6.1.1",
+				&send_sms_data_611, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 6.1.2",
+				&send_sms_data_612, test_send_sms);
+	g_test_add_data_func("/teststk/Send SMS 6.1.3",
+				&send_sms_data_613, test_send_sms);
 
 	g_test_add_data_func("/teststk/Send SMS response 1.1.1",
 				&send_sms_response_data_111,
-- 
1.7.0.4


  parent reply	other threads:[~2010-05-26 14:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-26 14:39 [PATCH 1/8] stk: Make parse_dataobj not consume extra data Yang Gu
2010-05-26 14:39 ` [PATCH 2/8] stk: Add parser for launch browser commands Yang Gu
2010-05-26 14:39 ` [PATCH 3/8] teststk: Add check of len in byte array Yang Gu
2010-05-26 14:39 ` [PATCH 4/8] teststk: Use check_common_text() to check string Yang Gu
2010-05-26 14:39 ` [PATCH 5/8] stk: Fix the parser of send sms Yang Gu
2010-05-26 14:39 ` Yang Gu [this message]
2010-05-26 14:39 ` [PATCH 7/8] teststk: Add test for launch browser parser Yang Gu
2010-05-26 14:39 ` [PATCH 8/8] Move destructor prior to return Yang Gu
2010-05-27 17:48 ` [PATCH 1/8] stk: Make parse_dataobj not consume extra data Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1274884754-12977-6-git-send-email-yang.gu@intel.com \
    --to=gyagp0@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.