#
# Copyright (c) 2022 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

CONFIG_MOSH_NRF91_NON_OFFLOADING_DEV=y

CONFIG_MOSH_PPP=n
CONFIG_MOSH_IPERF3=y
CONFIG_MOSH_WORKER_THREADS=n
CONFIG_MOSH_SOCK=n
CONFIG_MOSH_PING=n
CONFIG_MOSH_CURL=n
CONFIG_MOSH_LINK=y
CONFIG_MOSH_GNSS=n
CONFIG_MOSH_SMS=n
CONFIG_MOSH_LOCATION=n
CONFIG_MOSH_REST=n
CONFIG_MOSH_CLOUD_REST=n
CONFIG_MOSH_AT_CMD_MODE=n
CONFIG_MOSH_STARTUP_CMDS=n
CONFIG_MOSH_FOTA=n

CONFIG_DATE_TIME=n
CONFIG_SMS=n
CONFIG_NRF_CLOUD_AGNSS=n

CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3072

# Enable net shell commands
CONFIG_NET_SHELL=y
CONFIG_NET_STATISTICS_USER_API=y

# Enable needed stuff from native net stack
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=y
CONFIG_NET_STATISTICS=y
CONFIG_NET_STATISTICS_IPV4=n
CONFIG_NET_L2_DUMMY=y

CONFIG_NET_LOG=y
CONFIG_NET_CONFIG_AUTO_INIT=y

CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=n

CONFIG_NET_IF_MAX_IPV4_COUNT=1
CONFIG_NET_IF_MAX_IPV6_COUNT=1

CONFIG_NET_IPV4=y
CONFIG_NET_IPV6=y
CONFIG_NET_TCP=y

# Disable certain parts of Zephyr IPv6 stack
CONFIG_NET_IPV6_NBR_CACHE=n
CONFIG_NET_IPV6_MLD=n
CONFIG_NET_IPV6_FRAGMENT=n

#Following selects MBEDTLS_MAC_MD5_ENABLED that needs bunch of other features
CONFIG_NET_TCP_ISN_RFC6528=n

#Default RTO is too short and causes spurious retransmissions in uplink
CONFIG_NET_TCP_INIT_RETRANSMISSION_TIMEOUT=1500
CONFIG_NET_TCP_RETRY_COUNT=6

# Enable the DNS resolver:
# as a default the ones from LTE default context are used
CONFIG_DNS_RESOLVER=y

#CONFIG_DNS_SERVER_IP_ADDRESSES=y
#CONFIG_DNS_SERVER1="8.8.8.8"

CONFIG_NET_IP_ADDR_CHECK=n
CONFIG_NET_DRIVERS=y

# Uncomment to get maximum throughput.
#CONFIG_NRF_MODEM_LIB_SHMEM_TX_SIZE=32768
#CONFIG_NRF_MODEM_LIB_SHMEM_RX_SIZE=16384

# Network buffers
CONFIG_NET_BUF=y
CONFIG_NET_BUF_DATA_SIZE=128
CONFIG_NET_BUF_POOL_USAGE=y

CONFIG_NET_PKT_RX_COUNT=30
CONFIG_NET_BUF_RX_COUNT=60

CONFIG_NET_PKT_TX_COUNT=150
CONFIG_NET_BUF_TX_COUNT=300

CONFIG_NET_TC_RX_COUNT=0

# Debug options
CONFIG_NET_CORE_LOG_LEVEL_WRN=y
CONFIG_NET_IF_LOG_LEVEL_WRN=y
CONFIG_NET_TCP_LOG_LEVEL_WRN=y

CONFIG_NET_PKT_LOG_LEVEL_WRN=y
CONFIG_NET_DEBUG_NET_PKT_ALLOC=y

CONFIG_NET_CONTEXT_LOG_LEVEL_WRN=y
CONFIG_UART_CONSOLE_LOG_LEVEL_WRN=y

CONFIG_NET_BUF_LOG_LEVEL_OFF=y

CONFIG_NET_CONN_LOG_LEVEL_WRN=y
CONFIG_NET_BUF_WARN_ALLOC_INTERVAL=0
