aboutsummaryrefslogtreecommitdiff
path: root/lib/mlibc/options/posix/include/netinet/tcp.h
diff options
context:
space:
mode:
authorIan Moffett <ian@osmora.org>2024-03-07 17:28:00 -0500
committerIan Moffett <ian@osmora.org>2024-03-07 17:28:32 -0500
commitbd5969fc876a10b18613302db7087ef3c40f18e1 (patch)
tree7c2b8619afe902abf99570df2873fbdf40a4d1a1 /lib/mlibc/options/posix/include/netinet/tcp.h
parenta95b38b1b92b172e6cc4e8e56a88a30cc65907b0 (diff)
lib: Add mlibc
Signed-off-by: Ian Moffett <ian@osmora.org>
Diffstat (limited to 'lib/mlibc/options/posix/include/netinet/tcp.h')
-rw-r--r--lib/mlibc/options/posix/include/netinet/tcp.h37
1 files changed, 37 insertions, 0 deletions
diff --git a/lib/mlibc/options/posix/include/netinet/tcp.h b/lib/mlibc/options/posix/include/netinet/tcp.h
new file mode 100644
index 0000000..9d64d7a
--- /dev/null
+++ b/lib/mlibc/options/posix/include/netinet/tcp.h
@@ -0,0 +1,37 @@
+#ifndef _NETINET_TCP_H
+#define _NETINET_TCP_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Define some macros using same ABI as Linux
+#define TCP_NODELAY 1
+#define TCP_MAXSEG 2
+#define TCP_KEEPIDLE 4
+#define TCP_KEEPINTVL 5
+#define TCP_KEEPCNT 6
+#define TCP_DEFER_ACCEPT 9
+#define TCP_CONGESTION 13
+#define TCP_FASTOPEN 23
+
+#define TCP_ESTABLISHED 1
+#define TCP_SYN_SENT 2
+#define TCP_SYN_RECV 3
+#define TCP_FIN_WAIT1 4
+#define TCP_FIN_WAIT2 5
+#define TCP_TIME_WAIT 6
+#define TCP_CLOSE 7
+#define TCP_CLOSE_WAIT 8
+#define TCP_LAST_ACK 9
+#define TCP_LISTEN 10
+#define TCP_CLOSING 11
+#define TCP_QUICKACK 12
+
+#define SOL_TCP 6
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif // _NETINET_TCP_H