summaryrefslogtreecommitdiffstats
path: root/tinySMS/include/tinysms/tpdu
diff options
context:
space:
mode:
Diffstat (limited to 'tinySMS/include/tinysms/tpdu')
-rwxr-xr-xtinySMS/include/tinysms/tpdu/tsms_tpdu_command.h92
-rwxr-xr-xtinySMS/include/tinysms/tpdu/tsms_tpdu_deliver.h81
-rwxr-xr-xtinySMS/include/tinysms/tpdu/tsms_tpdu_report.h75
-rwxr-xr-xtinySMS/include/tinysms/tpdu/tsms_tpdu_status_report.h190
-rwxr-xr-xtinySMS/include/tinysms/tpdu/tsms_tpdu_submit.h89
5 files changed, 260 insertions, 267 deletions
diff --git a/tinySMS/include/tinysms/tpdu/tsms_tpdu_command.h b/tinySMS/include/tinysms/tpdu/tsms_tpdu_command.h
index 655dc00..fe79bb2 100755
--- a/tinySMS/include/tinysms/tpdu/tsms_tpdu_command.h
+++ b/tinySMS/include/tinysms/tpdu/tsms_tpdu_command.h
@@ -2,19 +2,19 @@
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
+*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
-*
+*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-*
+*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
@@ -36,58 +36,56 @@
TSMS_BEGIN_DECLS
-/** TP-Command-Type (TP-CT) as per 3GPP TS 23.040 section 9.2.3.19.
+/** TP-Command-Type (TP-CT) as per 3GPP TS 23.040 section 9.2.3.19.
* An 8-bit field.
*/
-typedef enum tsms_tpdu_cmd_e
-{
- tsms_tpdu_cmd_rel = 0x00, /**< Enquiry relating to previously submitted short message. */
- tsms_tpdu_cmd_cancel = 0x01, /**< Cancel Status Report Request relating to previously submitted short message. */
- tsms_tpdu_cmd_delete = 0x02, /**< Delete previously submitted Short Message. */
- tsms_tpdu_cmd_enable_status = 0x03, /**< Enable Status Report Request relating to previously submitted short message. */
- /* 00000100..00011111 ==> Reserved */
- /* 11100000..11111111 ==> Values specific for each SC */
+typedef enum tsms_tpdu_cmd_e {
+ tsms_tpdu_cmd_rel = 0x00, /**< Enquiry relating to previously submitted short message. */
+ tsms_tpdu_cmd_cancel = 0x01, /**< Cancel Status Report Request relating to previously submitted short message. */
+ tsms_tpdu_cmd_delete = 0x02, /**< Delete previously submitted Short Message. */
+ tsms_tpdu_cmd_enable_status = 0x03, /**< Enable Status Report Request relating to previously submitted short message. */
+ /* 00000100..00011111 ==> Reserved */
+ /* 11100000..11111111 ==> Values specific for each SC */
}
tsms_tpdu_cmd_t;
/** SMS TPDU SMS-COMMAND message as per 3GPP TS 23.040 section 9.2.2.4.
*/
-typedef struct tsms_tpdu_command_s
-{
- TSMS_DECLARE_TPDU_MESSAGE;
-
- tsms_address_t* smsc;
-
- /** TP-User-Data-Header-Indication (O - 1b)
- * Parameter indicating that the TP-CD field contains a Header. */
- unsigned udhi:1;
- /** TP Status Report Request (O - 1b)
- * Parameter indicating if the SMS Command is requesting a status report. */
- unsigned srr:1;
- /** TP Message Reference (M - I)
- * Parameter identifying the SMS COMMAND. */
- uint8_t mr;
- /** TP Protocol Identifier (M - o)
- * Parameter identifying the above layer protocol, if any. */
- //(base)uint8_t pid;
- /** TP Command Type (M - o)
- * Parameter specifying which operation is to be performed on a SM.
- * See section 9.2.3.19 */
- tsms_tpdu_cmd_t ct;
- /** TP Message Number (M - o)
- * Parameter indicating which SM in the SC to operate on.
- * See section 9.2.3.18 */
- uint8_t mn;
- /** TP Destination Address (M - 2-12o)
- * Parameter indicating the Destination Address to which the TP Command refers. */
- tsms_address_t* da;
- /** TP Command Data Length (M - o)
- * Parameter indicating the length of the TP-CD field in octets. */
- //(base)uint8_t cdl;
- /** TP Command Data (O - o)
- * Parameter containing user data. */
- //(base)uint8_t cd;
+typedef struct tsms_tpdu_command_s {
+ TSMS_DECLARE_TPDU_MESSAGE;
+
+ tsms_address_t* smsc;
+
+ /** TP-User-Data-Header-Indication (O - 1b)
+ * Parameter indicating that the TP-CD field contains a Header. */
+ unsigned udhi:1;
+ /** TP Status Report Request (O - 1b)
+ * Parameter indicating if the SMS Command is requesting a status report. */
+ unsigned srr:1;
+ /** TP Message Reference (M - I)
+ * Parameter identifying the SMS COMMAND. */
+ uint8_t mr;
+ /** TP Protocol Identifier (M - o)
+ * Parameter identifying the above layer protocol, if any. */
+ //(base)uint8_t pid;
+ /** TP Command Type (M - o)
+ * Parameter specifying which operation is to be performed on a SM.
+ * See section 9.2.3.19 */
+ tsms_tpdu_cmd_t ct;
+ /** TP Message Number (M - o)
+ * Parameter indicating which SM in the SC to operate on.
+ * See section 9.2.3.18 */
+ uint8_t mn;
+ /** TP Destination Address (M - 2-12o)
+ * Parameter indicating the Destination Address to which the TP Command refers. */
+ tsms_address_t* da;
+ /** TP Command Data Length (M - o)
+ * Parameter indicating the length of the TP-CD field in octets. */
+ //(base)uint8_t cdl;
+ /** TP Command Data (O - o)
+ * Parameter containing user data. */
+ //(base)uint8_t cd;
}
tsms_tpdu_command_t;
diff --git a/tinySMS/include/tinysms/tpdu/tsms_tpdu_deliver.h b/tinySMS/include/tinysms/tpdu/tsms_tpdu_deliver.h
index 6413bda..09d1dd6 100755
--- a/tinySMS/include/tinysms/tpdu/tsms_tpdu_deliver.h
+++ b/tinySMS/include/tinysms/tpdu/tsms_tpdu_deliver.h
@@ -2,19 +2,19 @@
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
+*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
-*
+*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-*
+*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
@@ -39,46 +39,45 @@ TSMS_BEGIN_DECLS
/** SMS TPDU SMS-DELIVER message as per 3GPP TS 23.040 section 9.2.2.1.
*/
-typedef struct tsms_tpdu_deliver_s
-{
- TSMS_DECLARE_TPDU_MESSAGE;
+typedef struct tsms_tpdu_deliver_s {
+ TSMS_DECLARE_TPDU_MESSAGE;
- tsms_address_t* smsc;
+ tsms_address_t* smsc;
- /** TP More Messages to Send (M - 1b)
- * Parameter indicating whether or not there are more messages to send. */
- unsigned mms:1;
- /** TP-Loop-Prevention (O - 1b)
- * Parameter indicating that SMS applications should inhibit forwarding or automatic message generation that could cause infinite looping. */
- unsigned lp:2;
- /** TP Reply Path (M - 1b)
- * Parameter indicating the request for Reply Path.
- Section 9.2.3.28 */
- unsigned rp:1;
- /** TP User Data Header Indicator (O - 1b)
- * Parameter indicating that the TP UD field contains a Header. */
- unsigned udhi:1;
- /** TP Status Report Indicator (O - 1b)
- * Parameter indicating if the SME has requested a status report. */
- unsigned sri:1;
- /** TP Originating Address (M - 2-12o)
- * Address of the originating SME. */
- tsms_address_t* oa;
- /** TP Protocol Identifier (M - o)
- * Parameter identifying the above layer protocol, if any. */
- //(base)uint8_t pid;
- /** TP Data Coding Scheme (M - o)
- * Parameter identifying the coding scheme within the TP-User-Data. */
- //(base)uint8_t dcs;
- /** TP Service Centre Time Stamp (M - 7o)
- * Parameter identifying time when the SC received the message. */
- uint8_t scts[7];
- /** TP User Data Length (M - I)
- * Parameter indicating the length of the TP User Data field to follow. */
- //(base)uint8_t udl;
- /** TP User Data (O - v)
- * User data. */
- //(base)tsk_buffer_t* ud;
+ /** TP More Messages to Send (M - 1b)
+ * Parameter indicating whether or not there are more messages to send. */
+ unsigned mms:1;
+ /** TP-Loop-Prevention (O - 1b)
+ * Parameter indicating that SMS applications should inhibit forwarding or automatic message generation that could cause infinite looping. */
+ unsigned lp:2;
+ /** TP Reply Path (M - 1b)
+ * Parameter indicating the request for Reply Path.
+ Section 9.2.3.28 */
+ unsigned rp:1;
+ /** TP User Data Header Indicator (O - 1b)
+ * Parameter indicating that the TP UD field contains a Header. */
+ unsigned udhi:1;
+ /** TP Status Report Indicator (O - 1b)
+ * Parameter indicating if the SME has requested a status report. */
+ unsigned sri:1;
+ /** TP Originating Address (M - 2-12o)
+ * Address of the originating SME. */
+ tsms_address_t* oa;
+ /** TP Protocol Identifier (M - o)
+ * Parameter identifying the above layer protocol, if any. */
+ //(base)uint8_t pid;
+ /** TP Data Coding Scheme (M - o)
+ * Parameter identifying the coding scheme within the TP-User-Data. */
+ //(base)uint8_t dcs;
+ /** TP Service Centre Time Stamp (M - 7o)
+ * Parameter identifying time when the SC received the message. */
+ uint8_t scts[7];
+ /** TP User Data Length (M - I)
+ * Parameter indicating the length of the TP User Data field to follow. */
+ //(base)uint8_t udl;
+ /** TP User Data (O - v)
+ * User data. */
+ //(base)tsk_buffer_t* ud;
}
tsms_tpdu_deliver_t;
diff --git a/tinySMS/include/tinysms/tpdu/tsms_tpdu_report.h b/tinySMS/include/tinysms/tpdu/tsms_tpdu_report.h
index 0eb1874..d42279c 100755
--- a/tinySMS/include/tinysms/tpdu/tsms_tpdu_report.h
+++ b/tinySMS/include/tinysms/tpdu/tsms_tpdu_report.h
@@ -2,19 +2,19 @@
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
+*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
-*
+*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-*
+*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
@@ -40,41 +40,40 @@ TSMS_BEGIN_DECLS
/** SMS TPDU SMS-DELIVER-REPORT or SMS-SUBMIT-REPORT
* message as per 3GPP TS 23.040 section 9.2.2.1a or 9.2.2.2a.
*/
-typedef struct tsms_tpdu_report_s
-{
- TSMS_DECLARE_TPDU_MESSAGE;
-
- tsms_address_t* smsc;
-
- /** Indicates whether the Report is for RP-ERROR or not (RP-ACK).*/
- tsk_bool_t error;
-
- /** TP-User-Data-Header-Indication (O - 1b)
- * Parameter indicating that the TP-UD field contains a Header. */
- unsigned udhi:1;
- /** TP Failure Cause (M - I)
- * Parameter indicating the reason for SMS DELIVER/SUBMIT failure.
- See clause 9.2.3.22 */
- uint8_t fcs;
- /** TP Parameter Indicator (M - o)
- * Parameter indicating the presence of any of the optional parameters which follow. */
- uint8_t pi;
- /** TP Service Centre Time Stamp (M - 7o)
- * Parameter identifying the time when the SC received the SMS DELIVER/SUBMIT.
- * See clause 9.2.3.11. */
- uint8_t scts[7];
- /** TP Protocol Identifier (O - o)
- * See clause 9.2.3.9. */
- //(base)uint8_t pid;
- /** TP Data Coding Scheme (O - o)
- * See clause 9.2.3.10. */
- //(base)uint8_t dcs;
- /** TP User Data Length (O- o)
- * See clause 9.2.3.16. */
- //(base)uint8_t udl;
- /** TP User Data (O - v)
- * User data. */
- //(base)tsk_buffer_t* ud;
+typedef struct tsms_tpdu_report_s {
+ TSMS_DECLARE_TPDU_MESSAGE;
+
+ tsms_address_t* smsc;
+
+ /** Indicates whether the Report is for RP-ERROR or not (RP-ACK).*/
+ tsk_bool_t error;
+
+ /** TP-User-Data-Header-Indication (O - 1b)
+ * Parameter indicating that the TP-UD field contains a Header. */
+ unsigned udhi:1;
+ /** TP Failure Cause (M - I)
+ * Parameter indicating the reason for SMS DELIVER/SUBMIT failure.
+ See clause 9.2.3.22 */
+ uint8_t fcs;
+ /** TP Parameter Indicator (M - o)
+ * Parameter indicating the presence of any of the optional parameters which follow. */
+ uint8_t pi;
+ /** TP Service Centre Time Stamp (M - 7o)
+ * Parameter identifying the time when the SC received the SMS DELIVER/SUBMIT.
+ * See clause 9.2.3.11. */
+ uint8_t scts[7];
+ /** TP Protocol Identifier (O - o)
+ * See clause 9.2.3.9. */
+ //(base)uint8_t pid;
+ /** TP Data Coding Scheme (O - o)
+ * See clause 9.2.3.10. */
+ //(base)uint8_t dcs;
+ /** TP User Data Length (O- o)
+ * See clause 9.2.3.16. */
+ //(base)uint8_t udl;
+ /** TP User Data (O - v)
+ * User data. */
+ //(base)tsk_buffer_t* ud;
}
tsms_tpdu_report_t;
diff --git a/tinySMS/include/tinysms/tpdu/tsms_tpdu_status_report.h b/tinySMS/include/tinysms/tpdu/tsms_tpdu_status_report.h
index 001127d..8eae0a7 100755
--- a/tinySMS/include/tinysms/tpdu/tsms_tpdu_status_report.h
+++ b/tinySMS/include/tinysms/tpdu/tsms_tpdu_status_report.h
@@ -2,19 +2,19 @@
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
+*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
-*
+*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-*
+*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
@@ -40,105 +40,103 @@ TSMS_BEGIN_DECLS
/** 3GPP TS 23.040 v910 section 9.2.3.15 (TP-ST).
* Used in SMS-STATUS-REPORT message.
*/
-typedef enum tsms_tpdu_status_type_e
-{
- /*== Short message transaction completed ==*/
- tsms_tpdu_status_received = 0x00, /**< Short message received by the SME. */
- tsms_tpdu_status_forwarded = 0x01, /**< Short message forwarded by the SC to the SME but the SC is unable to confirm delivery. */
- tsms_tpdu_status_replaced = 0x02, /**< Short message replaced by the SC. */
- /* 0000011..0001111 Reserved */
- /* 0010000..0011111 Values specific to each SC */
-
- /*== Temporary error, SC still trying to transfer SM ==*/
- tsms_tpdu_status_congestion = 0x20, /**< Congestion. */
- tsms_tpdu_status_busy = 0x21, /**< ME busy. */
- tsms_tpdu_status_no_response = 0x22, /**< No response from SME. */
- tsms_tpdu_status_serv_rejected = 0x23, /**< Service rejected. */
- tsms_tpdu_status_no_qos = 0x24, /**< Quality of service not available. */
- tsms_tpdu_status_error_in_sme= 0x25, /**< Error in SME. */
- /* 0100110..0101111 Reserved */
- /* 0110000..0111111 Values specific to each SC */
-
- /*== Permanent error, SC is not making any more transfer attempts ==*/
- tsms_tpdu_status_remote_error = 0x40, /**< Remote procedure error. */
- tsms_tpdu_status_incompatible_dest = 0x41, /**< Incompatible destination. */
- tsms_tpdu_status_conn_rejected = 0x42, /**< Connection rejected by SME. */
- tsms_tpdu_status_not_obtainable = 0x43, /**< Not obtainable. */
- tsms_tpdu_status_no_qos_2 = 0x44, /**< Quality of service not available. */
- tsms_tpdu_status_no_inter_avail = 0x45, /**< No interworking available. */
- tsms_tpdu_status_vp_expired = 0x46, /**< SM Validity Period Expired. */
- tsms_tpdu_status_deleted_by_orig = 0x47, /**< SM Deleted by originating SME. */
- tsms_tpdu_status_deleted_by_admin = 0x48, /**< SM Deleted by SC Administration. */
- tsms_tpdu_status_sm_not_exist = 0x49, /**< SM does not exist (The SM may have previously existed in the SC but the SC no longer has knowledge of it or the SM may never have previously existed in the SC). */
- /* 1001010..1001111 Reserved */
- /* 1010000..1011111 Values specific to each SC */
-
- /*== Temporary error, SC is not making any more transfer attempts ==*/
- tsms_tpdu_status_congestion_3 = 0x50, /**< Congestion. */
- tsms_tpdu_status_busy_3 = 0x51, /**< SME busy. */
- tsms_tpdu_status_no_response_3 = 0x52, /**< No response from SME. */
- tsms_tpdu_status_serv_rejected_3 = 0x53, /**< Service rejected. */
- tsms_tpdu_status_temp_no_qos_3 = 0x54, /**< Quality of service not available. */
- tsms_tpdu_status_error_in_sme_3 = 0x55, /**< Error in SME. */
- /* 1100110..1101001 Reserved */
- /* 1101010..1101111 Reserved */
- /* 1110000..1111111 Values specific to each SC */
+typedef enum tsms_tpdu_status_type_e {
+ /*== Short message transaction completed ==*/
+ tsms_tpdu_status_received = 0x00, /**< Short message received by the SME. */
+ tsms_tpdu_status_forwarded = 0x01, /**< Short message forwarded by the SC to the SME but the SC is unable to confirm delivery. */
+ tsms_tpdu_status_replaced = 0x02, /**< Short message replaced by the SC. */
+ /* 0000011..0001111 Reserved */
+ /* 0010000..0011111 Values specific to each SC */
+
+ /*== Temporary error, SC still trying to transfer SM ==*/
+ tsms_tpdu_status_congestion = 0x20, /**< Congestion. */
+ tsms_tpdu_status_busy = 0x21, /**< ME busy. */
+ tsms_tpdu_status_no_response = 0x22, /**< No response from SME. */
+ tsms_tpdu_status_serv_rejected = 0x23, /**< Service rejected. */
+ tsms_tpdu_status_no_qos = 0x24, /**< Quality of service not available. */
+ tsms_tpdu_status_error_in_sme= 0x25, /**< Error in SME. */
+ /* 0100110..0101111 Reserved */
+ /* 0110000..0111111 Values specific to each SC */
+
+ /*== Permanent error, SC is not making any more transfer attempts ==*/
+ tsms_tpdu_status_remote_error = 0x40, /**< Remote procedure error. */
+ tsms_tpdu_status_incompatible_dest = 0x41, /**< Incompatible destination. */
+ tsms_tpdu_status_conn_rejected = 0x42, /**< Connection rejected by SME. */
+ tsms_tpdu_status_not_obtainable = 0x43, /**< Not obtainable. */
+ tsms_tpdu_status_no_qos_2 = 0x44, /**< Quality of service not available. */
+ tsms_tpdu_status_no_inter_avail = 0x45, /**< No interworking available. */
+ tsms_tpdu_status_vp_expired = 0x46, /**< SM Validity Period Expired. */
+ tsms_tpdu_status_deleted_by_orig = 0x47, /**< SM Deleted by originating SME. */
+ tsms_tpdu_status_deleted_by_admin = 0x48, /**< SM Deleted by SC Administration. */
+ tsms_tpdu_status_sm_not_exist = 0x49, /**< SM does not exist (The SM may have previously existed in the SC but the SC no longer has knowledge of it or the SM may never have previously existed in the SC). */
+ /* 1001010..1001111 Reserved */
+ /* 1010000..1011111 Values specific to each SC */
+
+ /*== Temporary error, SC is not making any more transfer attempts ==*/
+ tsms_tpdu_status_congestion_3 = 0x50, /**< Congestion. */
+ tsms_tpdu_status_busy_3 = 0x51, /**< SME busy. */
+ tsms_tpdu_status_no_response_3 = 0x52, /**< No response from SME. */
+ tsms_tpdu_status_serv_rejected_3 = 0x53, /**< Service rejected. */
+ tsms_tpdu_status_temp_no_qos_3 = 0x54, /**< Quality of service not available. */
+ tsms_tpdu_status_error_in_sme_3 = 0x55, /**< Error in SME. */
+ /* 1100110..1101001 Reserved */
+ /* 1101010..1101111 Reserved */
+ /* 1110000..1111111 Values specific to each SC */
}
tsms_tpdu_status_type_t;
/** SMS TPDU SMS-STATUS-REPORT message as per 3GPP TS 23.040 section 9.2.2.3.
*/
-typedef struct tsms_tpdu_status_report_s
-{
- TSMS_DECLARE_TPDU_MESSAGE;
-
- tsms_address_t* smsc;
-
- /** TP User Data Header Indicator (O - 1b)
- * Parameter indicating that the TP UD field contains a Header. */
- unsigned udhi:1;
- /** TP More Messages to Send (M - 1b)
- * Parameter indicating whether or not there are more messages to send. */
- unsigned mms:1;
- /** TP-Loop-Prevention (O - 1b)
- * Parameter indicating that SMS applications should inhibit forwarding or automatic message generation that could cause infinite looping.
- Section 9.2.3.28 */
- unsigned lp:1;
- /** TP Status Report Qualifier (M - 1b)
- * Parameter indicating whether the previously submitted TPDU was an SMS-SUBMIT or an SMS COMMAND. */
- unsigned srq:1;
- /** TP Message Reference (M - I)
- * Parameter identifying the previously submitted SMS SUBMIT or SMS COMMAND.
- * See section 9.2.3.26. */
- unsigned mr;
- /** TP Recipient Address (M - 2-12o)
- * Address of the recipient of the previously submitted mobile originated short message. */
- tsms_address_t* ra;
- /** TP Service Centre Time Stamp (M - 7o)
- * Parameter identifying time when the SC received the previously sent SMS SUBMIT. */
- uint8_t scts[7];
- /** TP Discharge Time (M 7o)
- * Parameter identifying the time associated with a particular TP ST outcome. */
- uint8_t dt[7];
- /** TP Status (M - o)
- * Parameter identifying the status of the previously sent mobile originated short message. */
- tsms_tpdu_status_type_t st;
- /** TP-Parameter-Indicator (O - o)
- * Parameter indicating the presence of any of the optional parameters which follow. */
- uint8_t pi;
- /** TP Protocol Identifier (O - o)
- * See clause 9.2.3.9. TP-PID of original SMS-SUBMIT. */
- //(base)uint8_t pid;
- /** TP Data Coding Scheme (O - o)
- * See clause 9.2.3.10. */
- //(base)uint8_t dcs;
- /** TP User Data Length (O- o)
- * See clause 9.2.3.16. */
- //(base)uint8_t udl;
- /** TP User Data (O - v)
- * User data. See clause 9.2.3.24. */
- //(base)uint8_t* ud;
+typedef struct tsms_tpdu_status_report_s {
+ TSMS_DECLARE_TPDU_MESSAGE;
+
+ tsms_address_t* smsc;
+
+ /** TP User Data Header Indicator (O - 1b)
+ * Parameter indicating that the TP UD field contains a Header. */
+ unsigned udhi:1;
+ /** TP More Messages to Send (M - 1b)
+ * Parameter indicating whether or not there are more messages to send. */
+ unsigned mms:1;
+ /** TP-Loop-Prevention (O - 1b)
+ * Parameter indicating that SMS applications should inhibit forwarding or automatic message generation that could cause infinite looping.
+ Section 9.2.3.28 */
+ unsigned lp:1;
+ /** TP Status Report Qualifier (M - 1b)
+ * Parameter indicating whether the previously submitted TPDU was an SMS-SUBMIT or an SMS COMMAND. */
+ unsigned srq:1;
+ /** TP Message Reference (M - I)
+ * Parameter identifying the previously submitted SMS SUBMIT or SMS COMMAND.
+ * See section 9.2.3.26. */
+ unsigned mr;
+ /** TP Recipient Address (M - 2-12o)
+ * Address of the recipient of the previously submitted mobile originated short message. */
+ tsms_address_t* ra;
+ /** TP Service Centre Time Stamp (M - 7o)
+ * Parameter identifying time when the SC received the previously sent SMS SUBMIT. */
+ uint8_t scts[7];
+ /** TP Discharge Time (M 7o)
+ * Parameter identifying the time associated with a particular TP ST outcome. */
+ uint8_t dt[7];
+ /** TP Status (M - o)
+ * Parameter identifying the status of the previously sent mobile originated short message. */
+ tsms_tpdu_status_type_t st;
+ /** TP-Parameter-Indicator (O - o)
+ * Parameter indicating the presence of any of the optional parameters which follow. */
+ uint8_t pi;
+ /** TP Protocol Identifier (O - o)
+ * See clause 9.2.3.9. TP-PID of original SMS-SUBMIT. */
+ //(base)uint8_t pid;
+ /** TP Data Coding Scheme (O - o)
+ * See clause 9.2.3.10. */
+ //(base)uint8_t dcs;
+ /** TP User Data Length (O- o)
+ * See clause 9.2.3.16. */
+ //(base)uint8_t udl;
+ /** TP User Data (O - v)
+ * User data. See clause 9.2.3.24. */
+ //(base)uint8_t* ud;
}
tsms_tpdu_status_report_t;
diff --git a/tinySMS/include/tinysms/tpdu/tsms_tpdu_submit.h b/tinySMS/include/tinysms/tpdu/tsms_tpdu_submit.h
index 4191a8f..c965bdf 100755
--- a/tinySMS/include/tinysms/tpdu/tsms_tpdu_submit.h
+++ b/tinySMS/include/tinysms/tpdu/tsms_tpdu_submit.h
@@ -2,19 +2,19 @@
* Copyright (C) 2009 Mamadou Diop.
*
* Contact: Mamadou Diop <diopmamadou(at)doubango.org>
-*
+*
* This file is part of Open Source Doubango Framework.
*
* DOUBANGO is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
-*
+*
* DOUBANGO is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
-*
+*
* You should have received a copy of the GNU General Public License
* along with DOUBANGO.
*
@@ -39,50 +39,49 @@ TSMS_BEGIN_DECLS
/** SMS @a SMS-SUBMIT message as per 3GPP TS 23.040 section 9.2.2.2
*/
-typedef struct tsms_tpdu_submit_s
-{
- TSMS_DECLARE_TPDU_MESSAGE;
+typedef struct tsms_tpdu_submit_s {
+ TSMS_DECLARE_TPDU_MESSAGE;
- tsms_address_t* smsc;
+ tsms_address_t* smsc;
- /** TP Reject Duplicates (M - 1b)
- * Parameter indicating whether or not the SC shall accept an SMS SUBMIT for an
- * SM still held in the SC which has the same TP MR and the same TP DA as a
- * previously submitted SM from the same OA. */
- unsigned rd:1;
- /** TP Validity Period Format (M - 2b)
- * Parameter indicating whether or not the TP VP field is present. */
- tsms_tpdu_vpf_t vpf;
- /** TP Reply Path (M - 1b)
- * Parameter indicating the request for Reply Path. */
- unsigned rp:1;
- /** TP User Data Header Indicator (O - 1b)
- * Parameter indicating that the TP UD field contains a Header. */
- unsigned udhi:1;
- /** TP Status Report Request (O - 1b)
- * Parameter indicating if the MS is requesting a status report. */
- unsigned srr:1;
- /** TP Message Reference (M - I)
- * Parameter identifying the SMS SUBMIT. */
- uint8_t mr;
- /** TP Destination Address (M - 2-12o)
- * Address of the destination SME. */
- tsms_address_t* da;
- /** TP Protocol Identifier (M - o)
- * Parameter identifying the above layer protocol, if any. */
- //(base)uint8_t pid;
- /** TP Data Coding Scheme (M - o)
- * Parameter identifying the coding scheme within the TP User Data. */
- //(base)uint8_t dcs;
- /** TP Validity Period (O - o/7o)
- * Parameter identifying the time from where the message is no longer valid. */
- uint8_t vp[7];
- /** TP User Data Length (M - I)
- * Parameter indicating the length of the TP User Data field to follow. */
- //(base)uint8_t udl;
- /** TP User Data (O - v)
- * User data. */
- //(base)tsk_buffer_t* ud;
+ /** TP Reject Duplicates (M - 1b)
+ * Parameter indicating whether or not the SC shall accept an SMS SUBMIT for an
+ * SM still held in the SC which has the same TP MR and the same TP DA as a
+ * previously submitted SM from the same OA. */
+ unsigned rd:1;
+ /** TP Validity Period Format (M - 2b)
+ * Parameter indicating whether or not the TP VP field is present. */
+ tsms_tpdu_vpf_t vpf;
+ /** TP Reply Path (M - 1b)
+ * Parameter indicating the request for Reply Path. */
+ unsigned rp:1;
+ /** TP User Data Header Indicator (O - 1b)
+ * Parameter indicating that the TP UD field contains a Header. */
+ unsigned udhi:1;
+ /** TP Status Report Request (O - 1b)
+ * Parameter indicating if the MS is requesting a status report. */
+ unsigned srr:1;
+ /** TP Message Reference (M - I)
+ * Parameter identifying the SMS SUBMIT. */
+ uint8_t mr;
+ /** TP Destination Address (M - 2-12o)
+ * Address of the destination SME. */
+ tsms_address_t* da;
+ /** TP Protocol Identifier (M - o)
+ * Parameter identifying the above layer protocol, if any. */
+ //(base)uint8_t pid;
+ /** TP Data Coding Scheme (M - o)
+ * Parameter identifying the coding scheme within the TP User Data. */
+ //(base)uint8_t dcs;
+ /** TP Validity Period (O - o/7o)
+ * Parameter identifying the time from where the message is no longer valid. */
+ uint8_t vp[7];
+ /** TP User Data Length (M - I)
+ * Parameter indicating the length of the TP User Data field to follow. */
+ //(base)uint8_t udl;
+ /** TP User Data (O - v)
+ * User data. */
+ //(base)tsk_buffer_t* ud;
}
tsms_tpdu_submit_t;
OpenPOWER on IntegriCloud