aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorDavid M. Syzdek <david.syzdek@acsalaska.com>2020-01-29 15:03:22 -0900
committerDavid M. Syzdek <david.syzdek@acsalaska.com>2020-01-29 15:16:49 -0900
commit878841ae526732f414359c1314874c7400b17185 (patch)
tree883bf17c69f008c059ecb07b3a448b38e5e893ba /src
parent0190f4bc192c862c9f9a031149c78033155bf810 (diff)
downloadakcom-udpecho-878841ae526732f414359c1314874c7400b17185.tar.gz
akcom-udpecho-878841ae526732f414359c1314874c7400b17185.tar.bz2
akcom-udpecho-878841ae526732f414359c1314874c7400b17185.tar.xz
akcom-udpecho-878841ae526732f414359c1314874c7400b17185.zip
Adding framework
Diffstat (limited to 'src')
-rw-r--r--src/akcom-udpecho.c120
-rw-r--r--src/akcom-udpechod.c120
2 files changed, 240 insertions, 0 deletions
diff --git a/src/akcom-udpecho.c b/src/akcom-udpecho.c
new file mode 100644
index 0000000..e5d9d5e
--- /dev/null
+++ b/src/akcom-udpecho.c
@@ -0,0 +1,120 @@
1/*
2 * Alaska Communications UDP Echo Tools
3 * Copyright (C) 2020 Alaska Communications
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * 3. Neither the name of the copyright holder nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32/**
33 * @file akcom-udpecho.c UDP echo client
34 */
35/*
36 * Simple Build:
37 * export CFLAGS='-Wall -Wno-unknown-pragmas'
38 * gcc ${CFLAGS} -c akcom-udpecho.c
39 * gcc ${CFLAGS} -o akcom-udpecho akcom-udpecho.o
40 *
41 * Libtool Build:
42 * export CFLAGS='-Wall -Wno-unknown-pragmas'
43 * libtool --mode=compile --tag=CC gcc ${CFLAGS} -c akcom-udpecho.c
44 * libtool --mode=link --tag=CC gcc ${CFLAGS} -o akcom-udpecho \
45 * akcom-udpecho.lo
46 *
47 * Libtool Clean:
48 * libtool --mode=clean rm -f akcom-udpecho.lo akcom-udpecho
49 */
50#define _AKCOM_UDP_ECHO_CLIENT_C 1
51
52///////////////
53// //
54// Headers //
55// //
56///////////////
57#pragma mark - Headers
58
59#include <stdio.h>
60#include <stdlib.h>
61#include <unistd.h>
62#include <string.h>
63#include <strings.h>
64#include <time.h>
65#include <getopt.h>
66#include <assert.h>
67
68
69///////////////////
70// //
71// Definitions //
72// //
73///////////////////
74#pragma mark - Definitions
75
76
77/////////////////
78// //
79// Datatypes //
80// //
81/////////////////
82#pragma mark - Datatypes
83
84
85/////////////////
86// //
87// Variables //
88// //
89/////////////////
90#pragma mark - Variables
91
92
93//////////////////
94// //
95// Prototypes //
96// //
97//////////////////
98#pragma mark - Prototypes
99
100// main statement
101int main(int argc, char * argv[]);
102
103
104/////////////////
105// //
106// Functions //
107// //
108/////////////////
109#pragma mark - Functions
110
111// main statement
112int main(int argc, char * argv[])
113{
114 if (argc < 0)
115 printf("hello %s\n", argv[0]);
116 return(0);
117}
118
119
120/* end of source file */
diff --git a/src/akcom-udpechod.c b/src/akcom-udpechod.c
new file mode 100644
index 0000000..b9765f5
--- /dev/null
+++ b/src/akcom-udpechod.c
@@ -0,0 +1,120 @@
1/*
2 * Alaska Communications UDP Echo Tools
3 * Copyright (C) 2020 Alaska Communications
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions are
7 * met:
8 *
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * 3. Neither the name of the copyright holder nor the names of its
17 * contributors may be used to endorse or promote products derived from
18 * this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
21 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
27 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
28 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
29 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
30 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */
32/**
33 * @file akcom-udpechod.c UDP echo server
34 */
35/*
36 * Simple Build:
37 * export CFLAGS='-Wall -Wno-unknown-pragmas'
38 * gcc ${CFLAGS} -c akcom-udpechod.c
39 * gcc ${CFLAGS} -o akcom-udpechod akcom-udpechod.o
40 *
41 * Libtool Build:
42 * export CFLAGS='-Wall -Wno-unknown-pragmas'
43 * libtool --mode=compile --tag=CC gcc ${CFLAGS} -c akcom-udpechod.c
44 * libtool --mode=link --tag=CC gcc ${CFLAGS} -o akcom-udpechod \
45 * akcom-udpechod.lo
46 *
47 * Libtool Clean:
48 * libtool --mode=clean rm -f akcom-udpechod.lo akcom-udpechod
49 */
50#define _AKCOM_UDP_ECHO_SERVER_C 1
51
52///////////////
53// //
54// Headers //
55// //
56///////////////
57#pragma mark - Headers
58
59#include <stdio.h>
60#include <stdlib.h>
61#include <unistd.h>
62#include <string.h>
63#include <strings.h>
64#include <time.h>
65#include <getopt.h>
66#include <assert.h>
67
68
69///////////////////
70// //
71// Definitions //
72// //
73///////////////////
74#pragma mark - Definitions
75
76
77/////////////////
78// //
79// Datatypes //
80// //
81/////////////////
82#pragma mark - Datatypes
83
84
85/////////////////
86// //
87// Variables //
88// //
89/////////////////
90#pragma mark - Variables
91
92
93//////////////////
94// //
95// Prototypes //
96// //
97//////////////////
98#pragma mark - Prototypes
99
100// main statement
101int main(int argc, char * argv[]);
102
103
104/////////////////
105// //
106// Functions //
107// //
108/////////////////
109#pragma mark - Functions
110
111// main statement
112int main(int argc, char * argv[])
113{
114 if (argc < 0)
115 printf("hello %s\n", argv[0]);
116 return(0);
117}
118
119
120/* end of source file */