annotate smpp-send/main.c @ 268:d6630a2d6e80

doc: beginning of numbering plan documentation
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 13 Nov 2023 18:20:57 -0800
parents f11c3e40c87a
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
223
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
1 /*
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
2 * This C file is the main module for smpp-send test program.
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
3 */
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
4
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
5 #include <sys/types.h>
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
6 #include <stdio.h>
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
7 #include <stdlib.h>
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
8
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
9 char *trx_socket;
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
10
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
11 char src_addr[21], dest_addr[21];
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
12 u_char src_ton = 1, src_npi = 1, dest_ton = 1, dest_npi = 1;
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
13 u_char esm_class, pid_byte, dcs_byte;
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
14 u_char prio_flag, reg_deliv, replace_flag;
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
15
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
16 char input_line[512];
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
17 int input_lineno;
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
18
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
19 main(argc, argv)
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
20 char **argv;
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
21 {
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
22 if (argc > 2) {
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
23 fprintf(stderr, "usage: %s [trx-local-socket]\n", argv[0]);
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
24 exit(1);
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
25 }
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
26 if (argc > 1)
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
27 trx_socket = argv[1];
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
28 for (input_lineno = 1; fgets(input_line, sizeof input_line, stdin);
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
29 input_lineno++)
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
30 process_input_line();
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
31 exit(0);
f11c3e40c87a new program smpp-send
Mychaela Falconia <falcon@freecalypso.org>
parents:
diff changeset
32 }