summaryrefslogtreecommitdiffhomepage
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/tools/manual/.keep0
-rw-r--r--public/tools/manual/manual.json19
-rw-r--r--public/tools/manual/src/.keep0
-rw-r--r--public/tools/manual/src/CommandLine.cc13
-rw-r--r--public/tools/manual/vendor/.keep0
-rw-r--r--public/tools/ping/.keep0
-rw-r--r--public/tools/ping/ping.json19
-rw-r--r--public/tools/ping/src/.keep0
-rw-r--r--public/tools/ping/src/CommandLine.cc29
-rw-r--r--public/tools/ping/vendor/.keep0
10 files changed, 80 insertions, 0 deletions
diff --git a/public/tools/manual/.keep b/public/tools/manual/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/manual/.keep
diff --git a/public/tools/manual/manual.json b/public/tools/manual/manual.json
new file mode 100644
index 00000000..04626145
--- /dev/null
+++ b/public/tools/manual/manual.json
@@ -0,0 +1,19 @@
+{
+ "compiler_path": "clang++",
+ "compiler_std": "c++20",
+ "headers_path": [
+ "./",
+ "../../../dev/kernel",
+ "../../../public/frameworks/",
+ "../../../dev/",
+ "./"
+ ],
+ "sources_path": [],
+ "output_name": "./dist/manual",
+ "cpp_macros": [
+ "kSampleFWVersion=0x0100",
+ "kSampleFWVersionHighest=0x0100",
+ "kSampleFWVersionLowest=0x0100",
+ "__NE_SDK__"
+ ]
+} \ No newline at end of file
diff --git a/public/tools/manual/src/.keep b/public/tools/manual/src/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/manual/src/.keep
diff --git a/public/tools/manual/src/CommandLine.cc b/public/tools/manual/src/CommandLine.cc
new file mode 100644
index 00000000..0d9c4136
--- /dev/null
+++ b/public/tools/manual/src/CommandLine.cc
@@ -0,0 +1,13 @@
+#include <user/SystemCalls.h>
+
+SInt32 _NeMain(SInt32 argc, Char* argv[]) {
+ SCI_UNUSED(argc);
+ SCI_UNUSED(argv);
+
+ if (argc < 2) {
+ PrintOut(nullptr, "HELP: manual <tutorial_name>\n");
+ return EXIT_FAILURE;
+ }
+
+ return EXIT_SUCCESS;
+} \ No newline at end of file
diff --git a/public/tools/manual/vendor/.keep b/public/tools/manual/vendor/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/manual/vendor/.keep
diff --git a/public/tools/ping/.keep b/public/tools/ping/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/ping/.keep
diff --git a/public/tools/ping/ping.json b/public/tools/ping/ping.json
new file mode 100644
index 00000000..d8d4133a
--- /dev/null
+++ b/public/tools/ping/ping.json
@@ -0,0 +1,19 @@
+{
+ "compiler_path": "clang++",
+ "compiler_std": "c++20",
+ "headers_path": [
+ "./",
+ "../../../dev/kernel",
+ "../../../public/frameworks/",
+ "../../../dev/",
+ "./"
+ ],
+ "sources_path": [],
+ "output_name": "./dist/ping",
+ "cpp_macros": [
+ "kSampleFWVersion=0x0100",
+ "kSampleFWVersionHighest=0x0100",
+ "kSampleFWVersionLowest=0x0100",
+ "__NE_SDK__"
+ ]
+} \ No newline at end of file
diff --git a/public/tools/ping/src/.keep b/public/tools/ping/src/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/ping/src/.keep
diff --git a/public/tools/ping/src/CommandLine.cc b/public/tools/ping/src/CommandLine.cc
new file mode 100644
index 00000000..9aae0ea9
--- /dev/null
+++ b/public/tools/ping/src/CommandLine.cc
@@ -0,0 +1,29 @@
+#include <user/SystemCalls.h>
+
+SInt32 _NeMain(SInt32 argc, Char* argv[]) {
+ SCI_UNUSED(argc);
+
+ if (argc < 2) {
+ PrintOut(nullptr, "HELP: ping <hostname>\n");
+ return EXIT_FAILURE;
+ }
+
+ PrintOut(nullptr, "Pinging %s...\n", argv[1]);
+
+ for (SizeT i = 0U; i < 4; ++i) {
+ SInt32 result = 0;
+
+ if (result != 0) {
+ PrintOut(nullptr, "Request timed out.\n");
+ return EXIT_FAILURE;
+ }
+
+ SInt32 bytes = 64; // Simulated response size
+ SInt32 time = 100 + (i * 10); // Simulated response time
+ SInt32 ttl = 64;
+
+ PrintOut(nullptr, "Reply from %s: bytes=%i time=%ims TTL=%i\n", argv[1], bytes, time, ttl);
+ }
+
+ return EXIT_SUCCESS;
+} \ No newline at end of file
diff --git a/public/tools/ping/vendor/.keep b/public/tools/ping/vendor/.keep
new file mode 100644
index 00000000..e69de29b
--- /dev/null
+++ b/public/tools/ping/vendor/.keep