summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/fastboot.h21
-rw-r--r--include/net/fastboot_tcp.h14
-rw-r--r--include/net/fastboot_udp.h14
-rw-r--r--include/net/ldpaa_eth.h15
-rw-r--r--include/net/tcp.h16
5 files changed, 54 insertions, 26 deletions
diff --git a/include/net/fastboot.h b/include/net/fastboot.h
deleted file mode 100644
index 68602095d2b..00000000000
--- a/include/net/fastboot.h
+++ /dev/null
@@ -1,21 +0,0 @@
-/* SPDX-License-Identifier: BSD-2-Clause
- *
- * Copyright (C) 2016 The Android Open Source Project
- */
-
-#ifndef __NET_FASTBOOT_H__
-#define __NET_FASTBOOT_H__
-
-/**********************************************************************/
-/*
- * Global functions and variables.
- */
-
-/**
- * Wait for incoming fastboot comands.
- */
-void fastboot_start_server(void);
-
-/**********************************************************************/
-
-#endif /* __NET_FASTBOOT_H__ */
diff --git a/include/net/fastboot_tcp.h b/include/net/fastboot_tcp.h
new file mode 100644
index 00000000000..6cf29d52e93
--- /dev/null
+++ b/include/net/fastboot_tcp.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2023 The Android Open Source Project
+ */
+
+#ifndef __NET_FASTBOOT_TCP_H__
+#define __NET_FASTBOOT_TCP_H__
+
+/**
+ * Wait for incoming tcp fastboot comands.
+ */
+void fastboot_tcp_start_server(void);
+
+#endif /* __NET_FASTBOOT_TCP_H__ */
diff --git a/include/net/fastboot_udp.h b/include/net/fastboot_udp.h
new file mode 100644
index 00000000000..d4382c0a0e0
--- /dev/null
+++ b/include/net/fastboot_udp.h
@@ -0,0 +1,14 @@
+/* SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2016 The Android Open Source Project
+ */
+
+#ifndef __NET_FASTBOOT_H__
+#define __NET_FASTBOOT_H__
+
+/**
+ * Wait for incoming UDP fastboot comands.
+ */
+void fastboot_udp_start_server(void);
+
+#endif /* __NET_FASTBOOT_H__ */
diff --git a/include/net/ldpaa_eth.h b/include/net/ldpaa_eth.h
new file mode 100644
index 00000000000..7474bfaeec3
--- /dev/null
+++ b/include/net/ldpaa_eth.h
@@ -0,0 +1,15 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright 2023 NXP
+ */
+
+#define LDPAA_ETH_DRIVER_NAME "ldpaa_eth"
+
+/**
+ * ldpaa_eth_get_dpmac_id() - Get the dpmac_id of a DPAA2 ethernet device
+ *
+ * @dev: DPAA2 ethernet udevice pointer
+ * Return: requested dpmac_id
+ */
+
+uint32_t ldpaa_eth_get_dpmac_id(struct udevice *dev);
diff --git a/include/net/tcp.h b/include/net/tcp.h
index 322551694f5..c29d4ce24a7 100644
--- a/include/net/tcp.h
+++ b/include/net/tcp.h
@@ -259,6 +259,7 @@ union tcp_build_pkt {
* enum tcp_state - TCP State machine states for connection
* @TCP_CLOSED: Need to send SYN to connect
* @TCP_SYN_SENT: Trying to connect, waiting for SYN ACK
+ * @TCP_SYN_RECEIVED: Initial SYN received, waiting for ACK
* @TCP_ESTABLISHED: both server & client have a connection
* @TCP_CLOSE_WAIT: Rec FIN, passed to app for FIN, ACK rsp
* @TCP_CLOSING: Rec FIN, sent FIN, ACK waiting for ACK
@@ -268,6 +269,7 @@ union tcp_build_pkt {
enum tcp_state {
TCP_CLOSED,
TCP_SYN_SENT,
+ TCP_SYN_RECEIVED,
TCP_ESTABLISHED,
TCP_CLOSE_WAIT,
TCP_CLOSING,
@@ -283,14 +285,18 @@ int tcp_set_tcp_header(uchar *pkt, int dport, int sport, int payload_len,
/**
* rxhand_tcp() - An incoming packet handler.
* @pkt: pointer to the application packet
- * @dport: destination UDP port
+ * @dport: destination TCP port
* @sip: source IP address
- * @sport: source UDP port
+ * @sport: source TCP port
+ * @tcp_seq_num: TCP sequential number
+ * @tcp_ack_num: TCP acknowledgment number
+ * @action: TCP action (SYN, ACK, FIN, etc)
* @len: packet length
*/
-typedef void rxhand_tcp(uchar *pkt, unsigned int dport,
- struct in_addr sip, unsigned int sport,
- unsigned int len);
+typedef void rxhand_tcp(uchar *pkt, u16 dport,
+ struct in_addr sip, u16 sport,
+ u32 tcp_seq_num, u32 tcp_ack_num,
+ u8 action, unsigned int len);
void tcp_set_tcp_handler(rxhand_tcp *f);
void rxhand_tcp_f(union tcp_build_pkt *b, unsigned int len);