Commit deb5a4c7 authored by Oleg Zhurakivskyy's avatar Oleg Zhurakivskyy Committed by Jukka Rissanen
Browse files

net: shell: Disable TCP commands for TCP2



Currently the TCP commands work only for legacy TCP.

Signed-off-by: default avatarJukka Rissanen <jukka.rissanen@linux.intel.com>
Signed-off-by: default avatarOleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
parent 807662bf
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -1122,7 +1122,7 @@ static void conn_handler_cb(struct net_conn *conn, void *user_data)
}
#endif /* CONFIG_NET_CONN_LOG_LEVEL >= LOG_LEVEL_DBG */

#if defined(CONFIG_NET_TCP) && \
#if defined(CONFIG_NET_TCP1) && \
	(defined(CONFIG_NET_OFFLOAD) || defined(CONFIG_NET_NATIVE))
static void tcp_cb(struct net_tcp *tcp, void *user_data)
{
@@ -1433,7 +1433,7 @@ static int cmd_net_conn(const struct shell *shell, size_t argc, char *argv[])
	}
#endif

#if defined(CONFIG_NET_TCP)
#if defined(CONFIG_NET_TCP1)
	PR("\nTCP        Context   Src port Dst port   "
	   "Send-Seq   Send-Ack  MSS    State\n");

@@ -3484,7 +3484,7 @@ static int cmd_net_stats(const struct shell *shell, size_t argc, char *argv[])
	return 0;
}

#if defined(CONFIG_NET_NATIVE_TCP)
#if defined(CONFIG_NET_TCP1) && defined(CONFIG_NET_NATIVE_TCP)
static struct net_context *tcp_ctx;
static const struct shell *tcp_shell;

@@ -3687,7 +3687,7 @@ static void tcp_sent_cb(struct net_context *context,
static int cmd_net_tcp_connect(const struct shell *shell, size_t argc,
			       char *argv[])
{
#if defined(CONFIG_NET_NATIVE_TCP)
#if defined(CONFIG_NET_TCP1) && defined(CONFIG_NET_NATIVE_TCP)
	int arg = 0;

	/* tcp connect <ip> port */
@@ -3731,7 +3731,7 @@ static int cmd_net_tcp_connect(const struct shell *shell, size_t argc,
static int cmd_net_tcp_send(const struct shell *shell, size_t argc,
			    char *argv[])
{
#if defined(CONFIG_NET_NATIVE_TCP)
#if defined(CONFIG_NET_TCP1) && defined(CONFIG_NET_NATIVE_TCP)
	int arg = 0;
	int ret;
	struct net_shell_user_data user_data;
@@ -3768,7 +3768,7 @@ static int cmd_net_tcp_send(const struct shell *shell, size_t argc,
static int cmd_net_tcp_close(const struct shell *shell, size_t argc,
			     char *argv[])
{
#if defined(CONFIG_NET_NATIVE_TCP)
#if defined(CONFIG_NET_TCP1) && defined(CONFIG_NET_NATIVE_TCP)
	int ret;

	/* tcp close */