Hi guys,
if there is a LwIP TCP server that has 2 connected clients (therefore 2
PCBs: lets say PCB A and PCB B) and tcp_write() + tcp_output() functions
are performed on PCB A, but at the same time server is processing
received packets on PCB B, is any conflict going to happen? Is this a
valid sequence of events?
What I have tried so far is this:
[iperf server:5001@PC Windows 7] <------------------ [iperf
client:XXXX@Zynq+LwIP 2.0.2]
[iperf client:XXXX@PC Windows 7]-------------------->[iperf
server:5002@Zynq+LwIP 2.0.2]
in other words, there is an iperf client on Zynq board and it gets
connected to iperf server running at PC - data is being sent from Zynq
to PC and everything is working fine. As soon as PC iperf client gets
connected to iperf server (while other connection is still alive) both
connections crash and error -11 is returned from tcp_write ("not
connected").
All in all, I guess that this kind of communication is possible, but
there is some stuff that should be extra handled? Are there any examples
or references on how full-duplex communication could be achieved with
LwIP RAW?
Best regards,
Nenad
#ifndef __LWIPOPTS_H_
#define __LWIPOPTS_H_
#ifndef PROCESSOR_LITTLE_ENDIAN
#define PROCESSOR_LITTLE_ENDIAN
#endif
#define SYS_LIGHTWEIGHT_PROT 1
#define NO_SYS 1
#define LWIP_SOCKET 0
#define LWIP_COMPAT_SOCKETS 0
#define LWIP_NETCONN 0
#define NO_SYS_NO_TIMERS 1
#define LWIP_TCP_KEEPALIVE 0
#define MEM_ALIGNMENT 64
#define MEM_SIZE 393216
#define MEMP_NUM_PBUF 32
#define MEMP_NUM_UDP_PCB 4
#define MEMP_NUM_TCP_PCB 32
#define MEMP_NUM_TCP_PCB_LISTEN 8
#define MEMP_NUM_TCP_SEG 2048
#define MEMP_NUM_SYS_TIMEOUT 8
#define MEMP_NUM_NETBUF 8
#define MEMP_NUM_NETCONN 16
#define MEMP_NUM_TCPIP_MSG_API 16
#define MEMP_NUM_TCPIP_MSG_INPKT 64
#define MEMP_NUM_SYS_TIMEOUT 8
#define PBUF_POOL_SIZE 256
#define PBUF_POOL_BUFSIZE 1700
#define PBUF_LINK_HLEN 16
#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1
#define ICMP_TTL 255
#define IP_OPTIONS 0
#define IP_FORWARD 0
#define IP_REASSEMBLY 1
#define IP_FRAG 1
#define IP_REASS_MAX_PBUFS 128
#define IP_FRAG_MAX_MTU 1500
#define IP_DEFAULT_TTL 255
#define LWIP_CHKSUM_ALGORITHM 3
#define LWIP_UDP 1
#define UDP_TTL 255
#define LWIP_TCP 1
#define TCP_MSS 1460
#define TCP_SND_BUF 64240
#define TCP_WND 64240
#define TCP_TTL 255
#define TCP_MAXRTX 12
#define TCP_SYNMAXRTX 4
#define TCP_QUEUE_OOSEQ 1
#define TCP_SND_QUEUELEN 16 * TCP_SND_BUF/TCP_MSS
#define CHECKSUM_GEN_TCP 0
#define CHECKSUM_GEN_UDP 0
#define CHECKSUM_GEN_IP 0
#define CHECKSUM_CHECK_TCP 0
#define CHECKSUM_CHECK_UDP 0
#define CHECKSUM_CHECK_IP 0
#define LWIP_FULL_CSUM_OFFLOAD_RX 1
#define LWIP_FULL_CSUM_OFFLOAD_TX 1
#define MEMP_SEPARATE_POOLS 1
#define MEMP_NUM_FRAG_PBUF 256
#define IP_OPTIONS_ALLOWED 0
#define TCP_OVERSIZE TCP_MSS
#define LWIP_DHCP 1
#define DHCP_DOES_ARP_CHECK 1
#define CONFIG_LINKSPEED_AUTODETECT 1
#define LWIP_STATS 1
#define LWIP_STATS_DISPLAY 1
#define DHCP_DEBUG (LWIP_DBG_LEVEL_SEVERE | LWIP_DBG_ON)
#endif
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users