[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] TCP sending without headers
From: |
Vincent Cui |
Subject: |
Re: [lwip-users] TCP sending without headers |
Date: |
Wed, 10 Jul 2013 09:56:59 +0000 |
Hi :
If you use socket api instead of RAW api, you can send the header directly
before sending content.
Vincent
Vincent Cui
Firmware Engineer Leader
Shanghai Enlogic Electric Technology Co., Ltd.
Room1106, Building A, New Caohejing Business Centre, No.391, Guiping Road,
Xuhui District, Shanghai, P.R.China
T: +86 21 34612525, M: +86 13482482211
www.enlogic.com
------------------------------------------------------------------------
Please consider the environment before printing this email.
------------------------------------------------------------------------
This email and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to which they are addressed. If
you have received this e-mail in error, please notify the sender immediately
and then delete it. If you are not the intended recipient, you must not use,
disclose or distribute this e-mail without the author's prior permission. We
have taken precautions to minimize the risk of transmitting software viruses,
but we advise you to carry out your own virus checks on any attachment to this
message. We cannot accept liability for any loss or damage caused by software
viruses. Any views and/or opinions expressed in this e-mail are of the author
only and do not necessarily represent the views of Enlogic.
------------------------------------------------------------------------
-----Original Message-----
From: address@hidden [mailto:address@hidden On Behalf Of Peter LM
Sent: 2013年7月10日 PM 5:57
To: address@hidden
Subject: [lwip-users] TCP sending without headers
Hi everybody,
I have developed an HTTP server based on example supplied in "contrib
stable" folder of latest lwIP release.
My problem is my server reply after an HTTP request is just composed of data
! No headers from any layer whereas every others exchange are perfectly
formed!
/This is a screenshot of wireshark trace:/
<http://lwip.100.n7.nabble.com/file/n21719/wire1.bmp>
/These are my settings from lwipopts.h :/
/*********************************************************/
#define BYTE_ORDER LITTLE_ENDIAN
#define XLWIP_CONFIG_INCLUDE_EMACLITE 1
#define TCPIP_THREAD_NAME "tcpip"
#define LWIP_HTTPD_MAX_TAG_NAME_LEN 20
#define LWIP_HTTPD_MAX_TAG_INSERT_LEN 1500
#define TCPIP_THREAD_PRIO configLWIP_TASK_PRIORITY
#define TCPIP_THREAD_STACKSIZE configTCPIP_TASK_STACK_SIZE
#define DEFAULT_THREAD_STACKSIZE configDEFAULT_THREAD_STACKSIZE
#define DEFAULT_TCP_RECVMBOX_SIZE 5
#define DEFAULT_UDP_RECVMBOX_SIZE 5
#define DEFAULT_ACCEPTMBOX_SIZE 5
#define TCPIP_MBOX_SIZE 10
#define NO_SYS 0
#define LWIP_SOCKET 1
#define LWIP_NETCONN 1
#define LWIP_SNMP 0
#define LWIP_IGMP 0
#define LWIP_ICMP 1
#define LWIP_DNS 0
#define LWIP_HAVE_LOOPIF 0
#define TCP_LISTEN_BACKLOG 0
#define LWIP_SO_RCVTIMEO 1
#define LWIP_SO_RCVBUF 1
#define MEM_ALIGNMENT 4
#define MEM_SIZE 5120
#define MEMP_NUM_PBUF 10
#define LWIP_RAW 0
#define MEMP_NUM_RAW_PCB 2
#define MEMP_NUM_UDP_PCB 8
#define MEMP_NUM_TCP_PCB 8
#define MEMP_NUM_TCP_PCB_LISTEN 2
#define MEMP_NUM_TCP_SEG 8
#define MEMP_NUM_SYS_TIMEOUT 10
#define MEMP_NUM_NETBUF 4
#define MEMP_NUM_NETCONN 4
#define MEMP_NUM_TCPIP_MSG_API 4
#define MEMP_NUM_TCPIP_MSG_INPKT 4
#define MEMP_NUM_ARP_QUEUE 5
#define PBUF_POOL_SIZE 22
#define PBUF_POOL_BUFSIZE 128+14+2
#define PBUF_LINK_HLEN 16
#define SYS_LIGHTWEIGHT_PROT (NO_SYS==0)
#define LWIP_TCP 1
#define TCP_TTL 255
#define TCP_QUEUE_OOSEQ 0
#define TCP_MSS 88//1460 //was 1460 but didn't work so I tried my real
MSS which is MTU(128)-40
#define TCP_SND_BUF ( TCP_MSS * 2 )
#define TCP_SND_QUEUELEN (4 * TCP_SND_BUF/TCP_MSS)
#define TCP_SNDLOWAT (TCP_SND_BUF/2)
#define TCP_WND (PBUF_POOL_SIZE * (PBUF_POOL_BUFSIZE - (PBUF_LINK_HLEN +
PBUF_IP_HLEN + PBUF_TRANSPORT_HLEN)))
#define TCP_MAXRTX 12
#define TCP_SYNMAXRTX 4
#define LWIP_ARP 1
#define ARP_TABLE_SIZE 10
#define ARP_QUEUEING 1
#define IP_FORWARD 0
#define IP_REASSEMBLY 1
#define IP_REASS_MAX_PBUFS 10
#define MEMP_NUM_REASSDATA 10
#define IP_FRAG 0
#define ICMP_TTL 255
#define LWIP_DHCP 0
#define DHCP_DOES_ARP_CHECK (LWIP_DHCP)
#define LWIP_AUTOIP 0
#define LWIP_DHCP_AUTOIP_COOP (LWIP_DHCP && LWIP_AUTOIP)
#define LWIP_UDP 1
#define LWIP_UDPLITE 1 //Enable UDP Lite support for all API layers.
#define UDP_TTL 255
/************************************************************************/
Thank you in advance for any advice,
BR,
PLM
--
View this message in context:
http://lwip.100.n7.nabble.com/TCP-sending-without-headers-tp21719.html
Sent from the lwip-users mailing list archive at Nabble.com.
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users