aboutsummaryrefslogtreecommitdiff
path: root/src/protocol/tcp
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-09-09 03:14:50 +0200
committerXavier Del Campo Romero <xavi92@disroot.org>2025-09-18 01:08:14 +0200
commitc11cb04929f28853142b14339b66f561ca028f36 (patch)
treea77a3ddcc1d01028e4077cb295b9b41f594c5d52 /src/protocol/tcp
First commitHEADmaster
Diffstat (limited to 'src/protocol/tcp')
-rw-r--r--src/protocol/tcp/CMakeLists.txt13
-rw-r--r--src/protocol/tcp/alloc.c20
-rw-r--r--src/protocol/tcp/free.c19
-rw-r--r--src/protocol/tcp/rx.c21
-rw-r--r--src/protocol/tcp/tx.c21
5 files changed, 94 insertions, 0 deletions
diff --git a/src/protocol/tcp/CMakeLists.txt b/src/protocol/tcp/CMakeLists.txt
new file mode 100644
index 0000000..0caec18
--- /dev/null
+++ b/src/protocol/tcp/CMakeLists.txt
@@ -0,0 +1,13 @@
+# wip, a small TCP/IP stack.
+# Copyright (C) 2025 Xavier Del Campo Romero
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+target_sources(${PROJECT_NAME} PRIVATE
+ alloc.c
+ free.c
+ rx.c
+ tx.c
+)
diff --git a/src/protocol/tcp/alloc.c b/src/protocol/tcp/alloc.c
new file mode 100644
index 0000000..c90f1c9
--- /dev/null
+++ b/src/protocol/tcp/alloc.c
@@ -0,0 +1,20 @@
+/*
+ * wip, a small TCP/IP stack.
+ * Copyright (C) 2025 Xavier Del Campo Romero
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+#include <wip/wip.h>
+#include <wip/prv/log.h>
+#include <wip/prv/tcp.h>
+#include <wip/prv/tcp/types.h>
+#include <stddef.h>
+
+void *wip_tcp_alloc(struct wip *const w)
+{
+ wip_log("%s: TODO\n", __func__);
+ return NULL;
+}
diff --git a/src/protocol/tcp/free.c b/src/protocol/tcp/free.c
new file mode 100644
index 0000000..ddde038
--- /dev/null
+++ b/src/protocol/tcp/free.c
@@ -0,0 +1,19 @@
+/*
+ * wip, a small TCP/IP stack.
+ * Copyright (C) 2025 Xavier Del Campo Romero
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+#include <wip/wip.h>
+#include <wip/prv/log.h>
+#include <wip/prv/tcp.h>
+#include <wip/prv/tcp/types.h>
+#include <stddef.h>
+
+void wip_tcp_free(struct wip *const w, void *const args)
+{
+ wip_log("%s: TODO\n", __func__);
+}
diff --git a/src/protocol/tcp/rx.c b/src/protocol/tcp/rx.c
new file mode 100644
index 0000000..6b23546
--- /dev/null
+++ b/src/protocol/tcp/rx.c
@@ -0,0 +1,21 @@
+/*
+ * wip, a small TCP/IP stack.
+ * Copyright (C) 2025 Xavier Del Campo Romero
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+#include <wip/wip.h>
+#include <wip/prv/log.h>
+#include <wip/prv/tcp.h>
+#include <wip/prv/tcp/types.h>
+#include <stddef.h>
+
+enum wip_state wip_tcp_rx(struct wip *const wip, const void *const buf,
+ const size_t n, void *const args)
+{
+ wip_log("%s: TODO\n");
+ return WIP_OK;
+}
diff --git a/src/protocol/tcp/tx.c b/src/protocol/tcp/tx.c
new file mode 100644
index 0000000..55524e3
--- /dev/null
+++ b/src/protocol/tcp/tx.c
@@ -0,0 +1,21 @@
+/*
+ * wip, a small TCP/IP stack.
+ * Copyright (C) 2025 Xavier Del Campo Romero
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at https://mozilla.org/MPL/2.0/.
+ */
+
+#include <wip/wip.h>
+#include <wip/prv/log.h>
+#include <wip/prv/tcp.h>
+#include <wip/prv/tcp/types.h>
+#include <stddef.h>
+
+int wip_tcp_tx(struct wip *const wip, void *const buf, const size_t n,
+ void *const args)
+{
+ wip_log("%s: TODO\n");
+ return 0;
+}