aboutsummaryrefslogtreecommitdiffstats
path: root/test_pdu/submit_sm_resp_test.c
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2012-11-07 08:32:31 +0100
committerHarald Welte <laforge@gnumonks.org>2012-11-07 08:32:31 +0100
commit4b233b4f3b22f79c2bdd60703d309c9929f74ab6 (patch)
tree91b2622eb54d509b5c78896aca56babc120f1b7b /test_pdu/submit_sm_resp_test.c
initial import of libsmpp34-1.101.10
Diffstat (limited to 'test_pdu/submit_sm_resp_test.c')
-rw-r--r--test_pdu/submit_sm_resp_test.c59
1 files changed, 59 insertions, 0 deletions
diff --git a/test_pdu/submit_sm_resp_test.c b/test_pdu/submit_sm_resp_test.c
new file mode 100644
index 0000000..dd94a45
--- /dev/null
+++ b/test_pdu/submit_sm_resp_test.c
@@ -0,0 +1,59 @@
+
+/*
+ * Copyright (C) 2006 Raul Tremsal
+ * File : submit_sm_resp_test.c
+ * Author: Raul Tremsal <ultraismo@yahoo.com>
+ *
+ * This file is part of libsmpp34 (c-open-smpp3.4 library).
+ *
+ * The libsmpp34 library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of the
+ * License, or (at your option) any later version.
+ *
+ * This library 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 Lesser General Public
+ * License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this library; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ */
+
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#include <netinet/in.h>
+
+#ifdef __linux__
+#include <stdint.h>
+#endif
+
+#include "smpp34.h"
+#include "smpp34_structs.h"
+#include "smpp34_params.h"
+#include "core.h"
+
+
+int
+main( int argc, char *argv[] )
+{
+
+ submit_sm_resp_t a;
+ submit_sm_resp_t b;
+
+ memset(&a, 0, sizeof(submit_sm_resp_t));
+ memset(&b, 0, sizeof(submit_sm_resp_t));
+
+ /* Init PDU ***********************************************************/
+ b.command_length = 0;
+ b.command_id = SUBMIT_SM_RESP;
+ b.command_status = ESME_ROK;
+ b.sequence_number = 1;
+ snprintf((char*)b.message_id, sizeof(b.message_id), "%s", "88898239379");
+
+ doTest(SUBMIT_SM_RESP, &a, &b);
+ return( 0 );
+};