diff smpp-send/main.c @ 223:f11c3e40c87a

new program smpp-send
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 05 Aug 2023 12:24:31 -0800
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/smpp-send/main.c	Sat Aug 05 12:24:31 2023 -0800
@@ -0,0 +1,32 @@
+/*
+ * This C file is the main module for smpp-send test program.
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+char *trx_socket;
+
+char src_addr[21], dest_addr[21];
+u_char src_ton = 1, src_npi = 1, dest_ton = 1, dest_npi = 1;
+u_char esm_class, pid_byte, dcs_byte;
+u_char prio_flag, reg_deliv, replace_flag;
+
+char input_line[512];
+int input_lineno;
+
+main(argc, argv)
+	char **argv;
+{
+	if (argc > 2) {
+		fprintf(stderr, "usage: %s [trx-local-socket]\n", argv[0]);
+		exit(1);
+	}
+	if (argc > 1)
+		trx_socket = argv[1];
+	for (input_lineno = 1; fgets(input_line, sizeof input_line, stdin);
+	     input_lineno++)
+		process_input_line();
+	exit(0);
+}