From MAILER-DAEMON Mon Nov 01 03:03:50 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1COXAM-0006kz-6l for mharc-lwip-users@gnu.org; Mon, 01 Nov 2004 03:03:50 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1COXAJ-0006jk-Pj for lwip-users@nongnu.org; Mon, 01 Nov 2004 03:03:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1COXAI-0006jQ-UT for lwip-users@nongnu.org; Mon, 01 Nov 2004 03:03:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1COXAI-0006j4-OI for lwip-users@nongnu.org; Mon, 01 Nov 2004 03:03:46 -0500 Received: from [193.173.79.22] (helo=smtp.h4b.biz) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1COX12-0008PJ-Gc for lwip-users@nongnu.org; Mon, 01 Nov 2004 02:54:13 -0500 Received: from PCBGRND (bti.h4b.biz [193.173.79.18]) by smtp.h4b.biz (8.12.8/8.12.8) with SMTP id iA17XSiF031092 for ; Mon, 1 Nov 2004 08:33:28 +0100 Message-ID: <001001c4bfe8$c0384e90$46000d0a@qlite.net> From: "Bonny Gijzen" To: Date: Mon, 1 Nov 2004 08:59:44 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000D_01C4BFF1.21889800" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: [lwip-users] strange problems (small etherreal log attached) X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bonny Gijzen , Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2004 08:03:48 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_000D_01C4BFF1.21889800 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, As you may know I am running a client using lwIP, but sometimes I have = some problems. I have made an etherreal log of the connection (on the servers side) and = I can see some oddities near the end, like missing segment, retransmissions and duplicate ack's. (The 82. is my clients IP, the 192. is the servers IP) www.ic-prog.com/mylog_eth.rar I am not very familiar with TCP internals, but still I tried to analyze = the log. This is what I have noticed: 1) As you can see I send the same message every 10 seconds (This I have done on purpose to make debugging easier) 2) At some point (near the end of the log) I can see a 20 second gap = between messages. This means that 1 msg from my client (lwip) has not reached the server. The server notices this (because the seq doesn't match) and reacts to = that. In this log the missing frame was detected 10 seconds later (at the time = my client had sent a new msg). This is wrong because lwip would need to see an ACK and if not a = retransmission should kick in much earlier. (I am not sure about the timeframe used here, but should be millisecs I = guess) I have checked my lwIP timers, they are OK. (I use a 250msec interval for tcp_tmr() which invokes both the fast and = slow timer) I have tried to simulate this at home, with unplugging the ethernet = connector. This does trigger the rexmit() call (and backoff value was incremented = each timeout period). When plugging the connector back in everything seemed to continue as = normal. ********** I hope someone can take a look at this log, specially at the oddities = near the end and perhaps write a small explanation of what (he thinks) is happening. Thanks for your support and a nice stack :-) Rgs Bonny ------=_NextPart_000_000D_01C4BFF1.21889800 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
As you may know I am running a client = using lwIP,=20 but sometimes I have some problems.
 
I have made an=20 etherreal log of the connection (on the servers side) and I can see some = oddities
near the end, like missing segment, retransmissions and = duplicate=20 ack's.
(The 82. is my=20 clients IP, the 192. is the servers IP)
www.ic-prog.com/mylog_eth.r= ar
 
I am not very=20 familiar with TCP internals, but still I tried to analyze the=20 log.
This is what I=20 have noticed:
 
1) As you can=20 see I send the same message every 10 seconds
(This I have=20 done on purpose to make debugging easier)
 
2) At some=20 point (near the end of the log) I can see a 20 second gap between=20 messages.
This means=20 that 1 msg from my client (lwip) has not reached the=20 server.
The server=20 notices this (because the seq doesn't match) and reacts to=20 that.
 
In this log the missing frame was = detected 10=20 seconds later (at the time my client had sent a new = msg).
This is wrong because lwip would = need to see=20 an ACK and if not a retransmission should kick in much=20 earlier.
(I am not sure about the = timeframe used here,=20 but should be millisecs I guess)
 
I have checked my lwIP timers, = they are=20 OK.
(I use a 250msec interval for = tcp_tmr() which=20 invokes both the fast and slow timer)
 
I have tried to simulate this at = home, with=20 unplugging the ethernet connector.
This does trigger the rexmit() = call (and=20 backoff value was incremented each timeout = period).

When plugging the connector back in everything seemed to = continue as=20 normal.
 
**********
 
I hope someone can take a look at this log, specially at the = oddities near=20 the end
and perhaps write a small explanation of what (he thinks) is=20 happening.

Thanks for your support and a nice stack :-)
 
Rgs Bonny
------=_NextPart_000_000D_01C4BFF1.21889800-- From MAILER-DAEMON Mon Nov 01 04:32:08 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1COYXn-0007kj-CY for mharc-lwip-users@gnu.org; Mon, 01 Nov 2004 04:32:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1COYXj-0007im-9w for lwip-users@nongnu.org; Mon, 01 Nov 2004 04:32:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1COYXi-0007hv-25 for lwip-users@nongnu.org; Mon, 01 Nov 2004 04:32:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1COYXh-0007hI-MX for lwip-users@nongnu.org; Mon, 01 Nov 2004 04:32:01 -0500 Received: from [131.111.8.134] (helo=ppsw-4.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1COYPg-0000tn-Je for lwip-users@nongnu.org; Mon, 01 Nov 2004 04:23:44 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:43565) by ppsw-4.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.154]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.43) id 1COYPe-0006Hq-4Z (return-path ) for lwip-users@nongnu.org; Mon, 01 Nov 2004 09:23:42 +0000 Subject: Re: [lwip-users] strange problems (small etherreal log attached) From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: <001001c4bfe8$c0384e90$46000d0a@qlite.net> References: <001001c4bfe8$c0384e90$46000d0a@qlite.net> Content-Type: text/plain Organization: Message-Id: <1099301021.21226.6.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 01 Nov 2004 09:23:41 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2004 09:32:05 -0000 On Mon, 2004-11-01 at 07:59, Bonny Gijzen wrote: > In this log the missing frame was detected 10 seconds later (at the > time my client had sent a new msg). > This is wrong because lwip would need to see an ACK and if not a > retransmission should kick in much earlier. > (I am not sure about the timeframe used here, but should be millisecs > I guess) > > I have checked my lwIP timers, they are OK. > (I use a 250msec interval for tcp_tmr() which invokes both the fast > and slow timer) You're right that the retransmission should happen without receiving another packet. After a few calls to it (so probably at least 1 second), the slow timer routine should notice that a packet remains unacked, and retransmit. Although you say the lwIP timers are OK, it looks like this is where things must be going wrong. I would insert some debug statements liberally in the slow timer function and hope that sheds some light on your problem. It should go through the list of segments on the "unacked" queue of each pcb and increment a counter. When that counter reaches a threshold it knows it's been hanging around for too long and it should then be retransmitted. Check that this is all happening correctly. Thanks, and sorry that I don't have more time to investigate. Kieran From MAILER-DAEMON Tue Nov 02 01:42:44 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1COsNQ-0001wK-ED for mharc-lwip-users@gnu.org; Tue, 02 Nov 2004 01:42:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1COsNO-0001uo-TQ for lwip-users@nongnu.org; Tue, 02 Nov 2004 01:42:43 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1COsNO-0001tv-CH for lwip-users@nongnu.org; Tue, 02 Nov 2004 01:42:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1COsNO-0001tp-9r for lwip-users@nongnu.org; Tue, 02 Nov 2004 01:42:42 -0500 Received: from [216.136.129.91] (helo=smtp201.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1COsF0-0000dZ-NO for lwip-users@nongnu.org; Tue, 02 Nov 2004 01:34:02 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp201.mail.sc5.yahoo.com with SMTP; 2 Nov 2004 06:34:01 -0000 Date: Tue, 2 Nov 2004 14:35:02 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] a question about low_level_input X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2004 06:42:43 -0000 i am reading the source codes of lwip , and happen some question . how to obtain the length of the pocket ,if the data pocket is a 802.3 frame how to do ? and if the data pocket is ethnet frame ? how to do? From MAILER-DAEMON Tue Nov 02 02:04:47 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1COsik-0008JT-NQ for mharc-lwip-users@gnu.org; Tue, 02 Nov 2004 02:04:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1COsih-0008Gi-VH for lwip-users@nongnu.org; Tue, 02 Nov 2004 02:04:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1COsif-0008E9-JF for lwip-users@nongnu.org; Tue, 02 Nov 2004 02:04:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1COsif-0008CT-0w for lwip-users@nongnu.org; Tue, 02 Nov 2004 02:04:41 -0500 Received: from [193.173.79.22] (helo=smtp.h4b.biz) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1COsZz-00048A-Nt for lwip-users@nongnu.org; Tue, 02 Nov 2004 01:55:44 -0500 Received: from PCBGRND (bti.h4b.biz [193.173.79.18]) by smtp.h4b.biz (8.12.8/8.12.8) with SMTP id iA26ZKiF005108 for ; Tue, 2 Nov 2004 07:35:20 +0100 Message-ID: <002101c4c0a9$c654d1b0$46000d0a@qlite.net> From: "Bonny Gijzen" To: "Mailing list for lwIP users" References: <001001c4ba5b$a3e460e0$46000d0a@qlite.net> <1098693308.23044.207180258@webmail.messagingengine.com> Subject: Re: [lwip-users] lwIP port to 32bit target (and its problems ...) Date: Tue, 2 Nov 2004 08:01:27 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bonny Gijzen , Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2004 07:04:45 -0000 From: "Leon Woestenberg" To: "Bonny Gijzen" ; "Mailing list for lwIP users" ; Sent: Monday, October 25, 2004 09:35 Subject: Re: [lwip-users] lwIP port to 32bit target (and its problems ...) > Also, did you enable ETHARP_QUEUEING in lwipopts.h ? > I have one unsolved bug report (on the list) which makes the current > queueing code suspicious. Hi Leon, In the previous response I mentioned that I couldnt' find the ETHARP_QUEUEING option. But last night after some more examination I found: ARP_QUEUEING ! Did you mean this options? Anyway, I disabled it (defined to 0) and I am running a test now. Why do you think this code could be responsible for the issues I am experiencing? Rgs Bonny, From MAILER-DAEMON Tue Nov 02 17:03:02 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CP6k1-00067u-W3 for mharc-lwip-users@gnu.org; Tue, 02 Nov 2004 17:03:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CP6jz-000670-MG for lwip-users@nongnu.org; Tue, 02 Nov 2004 17:02:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CP6jy-00066a-SI for lwip-users@nongnu.org; Tue, 02 Nov 2004 17:02:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CP6jy-00066V-N3 for lwip-users@nongnu.org; Tue, 02 Nov 2004 17:02:58 -0500 Received: from [203.22.251.251] (helo=mg2.works.net.au) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CP6bU-0004j0-6y for lwip-users@nongnu.org; Tue, 02 Nov 2004 16:54:12 -0500 Received: from cassowary.teragen.com.au (cassowary.teragen.com.au [203.22.251.82]) by mg2.works.net.au (8.12.11/linuxconf) with ESMTP id iA2Lxjai011843 for ; Wed, 3 Nov 2004 08:59:45 +1100 Received: from gizmo (gizmo.teragen.com.au [203.34.238.21]) by cassowary.teragen.com.au (8.12.8/linuxconf) with ESMTP id iA2Lrtb5015694 for ; Wed, 3 Nov 2004 08:53:56 +1100 Message-Id: <200411022153.iA2Lrtb5015694@cassowary.teragen.com.au> From: "Rajesh Singh" To: "'Mailing list for lwIP users'" Subject: RE: [lwip-users] a question about low_level_input Date: Wed, 3 Nov 2004 08:53:50 +1100 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.5510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: Thread-Index: AcTApghTYYRYwxR/R/as9f/9OqPbegAgFjaQ X-MG2-Works-MailScanner-Information: Please contact the ISP for more information X-MG2-Works-MailScanner: Found to be clean X-MG2-Works-MailScanner-SpamCheck: not spam, SpamAssassin (score=-4.9, required 5, autolearn=not spam, BAYES_00 -4.90) X-MailScanner-From: rajesh@teragen.com.au X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Nov 2004 22:02:59 -0000 You'd have to write your own code to interface with 802.3... There should be some example wireless source floating around if you do a search on google. Rajesh Singh 03 9912 0112 rajesh@teragen.com.au programmer - www.teragen.com.au -----Original Message----- From: lwip-users-bounces+rajesh=teragen.com.au@nongnu.org [mailto:lwip-users-bounces+rajesh=teragen.com.au@nongnu.org] On Behalf Of jack W Sent: Tuesday, 2 November 2004 5:35 PM To: lwip-users Subject: [lwip-users] a question about low_level_input i am reading the source codes of lwip , and happen some question . how to obtain the length of the pocket ,if the data pocket is a 802.3 frame how to do ? and if the data pocket is ethnet frame ? how to do? _______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users From MAILER-DAEMON Wed Nov 03 02:57:23 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPG1C-0002ZZ-FN for mharc-lwip-users@gnu.org; Wed, 03 Nov 2004 02:57:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPG1A-0002Yq-3b for lwip-users@nongnu.org; Wed, 03 Nov 2004 02:57:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPG18-0002YH-QX for lwip-users@nongnu.org; Wed, 03 Nov 2004 02:57:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPG18-0002XJ-Ml for lwip-users@nongnu.org; Wed, 03 Nov 2004 02:57:18 -0500 Received: from [216.136.129.97] (helo=smtp207.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CPFm3-0000ub-Ve for lwip-users@nongnu.org; Wed, 03 Nov 2004 02:41:44 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp207.mail.sc5.yahoo.com with SMTP; 3 Nov 2004 07:41:39 -0000 Date: Wed, 3 Nov 2004 15:42:41 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] a question about alignment X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 07:57:20 -0000 hi everyone i am reading the lwip source codes , i happend a question about structure alignments . in the codes it says : there are four macros #PACK_STRUCT_BEGIN #PACK_STRUCT_FIELD #PACK_STRUCT_STRUCT and #PACK_STRUCT_END if i define a structure named xyz following : #PACK_STRUCT_BEGIN struct xyz{ int xxx } #PACK_STRUCT_END IF i should write the "#PACK_STRUCT_FIELD" in the front of variable "int xxx" or not ? From MAILER-DAEMON Wed Nov 03 04:27:14 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPHQ9-0007bH-Mz for mharc-lwip-users@gnu.org; Wed, 03 Nov 2004 04:27:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPHQ7-0007Zc-ES for lwip-users@nongnu.org; Wed, 03 Nov 2004 04:27:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPHQ2-0007Yy-KG for lwip-users@nongnu.org; Wed, 03 Nov 2004 04:27:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPHQ2-0007Yk-6F for lwip-users@nongnu.org; Wed, 03 Nov 2004 04:27:06 -0500 Received: from [211.21.181.155] (helo=SMTP01.zydas.com.tw) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CPHHL-0002Tb-0Y for lwip-users@nongnu.org; Wed, 03 Nov 2004 04:18:12 -0500 Received: from mail.zydas.com.tw ([172.19.1.5]) by SMTP01 with trend_isnt_name_B; Wed, 03 Nov 2004 17:23:26 +0800 Received: from stephennb01 ([172.19.1.79]) by mail.zydas.com.tw (8.12.8/8.12.8) with SMTP id iA39Evse014697 for ; Wed, 3 Nov 2004 17:14:57 +0800 Message-ID: <00b701c4c185$e45c4580$f65ffea9@zydas.com.tw> From: "stephen" To: "Mailing list for lwIP users" References: Subject: Re: [lwip-users] a question about alignment Date: Wed, 3 Nov 2004 17:16:56 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 09:27:12 -0000 Jack: These macros are used to pack ethernet/ip/tcp header structure. You can see "struct ip_hdr" in "ip.h" But if you want to declare your own structure, just forget these macros. ----- Original Message ----- From: "jack W" To: "lwip-users" Sent: Wednesday, November 03, 2004 3:42 PM Subject: [lwip-users] a question about alignment > hi everyone > > > i am reading the lwip source codes , i happend a question about structure alignments . > > in the codes it says : there are four macros #PACK_STRUCT_BEGIN #PACK_STRUCT_FIELD > #PACK_STRUCT_STRUCT and #PACK_STRUCT_END > > if i define a structure named xyz following : > > #PACK_STRUCT_BEGIN > struct xyz{ > int xxx > > } > #PACK_STRUCT_END > > IF i should write the "#PACK_STRUCT_FIELD" in the front of variable "int xxx" or not ? > > > > > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users From MAILER-DAEMON Wed Nov 03 04:30:27 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPHTG-0000Uf-PC for mharc-lwip-users@gnu.org; Wed, 03 Nov 2004 04:30:26 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPHTC-0000TI-M0 for lwip-users@nongnu.org; Wed, 03 Nov 2004 04:30:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPHTB-0000SA-2d for lwip-users@nongnu.org; Wed, 03 Nov 2004 04:30:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPHT9-0000Ri-Fl for lwip-users@nongnu.org; Wed, 03 Nov 2004 04:30:20 -0500 Received: from [131.111.8.133] (helo=ppsw-3.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CPHKR-0002wH-Lk for lwip-users@nongnu.org; Wed, 03 Nov 2004 04:21:20 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:46755) by ppsw-3.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.153]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) (Exim 4.43) id 1CPHJx-0003sE-Lg (return-path ) for lwip-users@nongnu.org; Wed, 03 Nov 2004 09:20:49 +0000 Subject: Re: [lwip-users] a question about alignment From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1099473649.29374.10.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 03 Nov 2004 09:20:49 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 09:30:24 -0000 On Wed, 2004-11-03 at 07:42, jack W wrote: > hi everyone > > > i am reading the lwip source codes , i happend a question about structure alignments . > > in the codes it says : there are four macros #PACK_STRUCT_BEGIN #PACK_STRUCT_FIELD > #PACK_STRUCT_STRUCT and #PACK_STRUCT_END > > if i define a structure named xyz following : > > #PACK_STRUCT_BEGIN > struct xyz{ > int xxx > > } > #PACK_STRUCT_END > > IF i should write the "#PACK_STRUCT_FIELD" in the front of variable "int xxx" or not ? > Yes. However, note that you only need to pack structures if they will be mapped onto data that is sent or received via the network (e.g. packet headers). If it's just for internal state, there is no need to pack (and in fact packing is in most cases/architectures a precautionary measure). Also, if it does need to be packed, you should probably be using a type such as "u32_t" rather than "int" in the above example, as you don't know what size the int will be on different architectures. Hope that helps, Kieran From MAILER-DAEMON Wed Nov 03 06:58:02 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPJlS-0003jf-4O for mharc-lwip-users@gnu.org; Wed, 03 Nov 2004 06:57:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPJiq-0003Rw-4D for lwip-users@nongnu.org; Wed, 03 Nov 2004 06:54:40 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPJiN-0003NW-6h for lwip-users@nongnu.org; Wed, 03 Nov 2004 06:54:12 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPJeu-0003EO-BN for lwip-users@nongnu.org; Wed, 03 Nov 2004 06:50:36 -0500 Received: from [216.136.130.127] (helo=smtp204.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CPJW9-00007h-VW for lwip-users@nongnu.org; Wed, 03 Nov 2004 06:41:43 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp204.mail.sc5.yahoo.com with SMTP; 3 Nov 2004 11:41:32 -0000 Date: Wed, 3 Nov 2004 19:42:32 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] question about netif.c X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 11:57:12 -0000 hi everyone i am reading the souce codes and in the file named netif.c ,there is a function named netif_add(). In the function a line of program is "init(netif);" and i don't understand where is init()? thank you ! From MAILER-DAEMON Wed Nov 03 07:25:14 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPKCN-0008Ba-QF for mharc-lwip-users@gnu.org; Wed, 03 Nov 2004 07:25:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPKCI-00089l-S7 for lwip-users@nongnu.org; Wed, 03 Nov 2004 07:25:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPKCE-00087T-40 for lwip-users@nongnu.org; Wed, 03 Nov 2004 07:25:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPKCA-000879-C4 for lwip-users@nongnu.org; Wed, 03 Nov 2004 07:25:00 -0500 Received: from [217.119.192.11] (helo=ns01.toc.de) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CPK31-0005PT-IC for lwip-users@nongnu.org; Wed, 03 Nov 2004 07:15:32 -0500 Received: from intranet.fal.de (gate.falcom.de [217.119.194.33]) by ns01.toc.de (8.11.7p1+Sun/8.11.7) with ESMTP id iA3CFRS04026 for ; Wed, 3 Nov 2004 13:15:27 +0100 (MET) Received: from falcom.de (dev_akictiraz.fal.de [192.168.1.95]) by intranet.fal.de (8.12.7/8.12.7/SuSE Linux 0.6) with ESMTP id iA3CFRBn019168 for ; Wed, 3 Nov 2004 13:15:27 +0100 Message-ID: <4188CBE2.5060107@falcom.de> Date: Wed, 03 Nov 2004 13:15:30 +0100 From: Anoulak Kictiraz User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: de, en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] question about netif.c References: In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 12:25:08 -0000 jack W wrote: > hi everyone > > > i am reading the souce codes and in the file named netif.c ,there is a function named >netif_add(). In the function a line of program is "init(netif);" and i don't understand where is init()? > > init(netif) is a callback function in the lower protocol layer such as ppp or ethernet. If you use ppp than you can find the implementation of this callback function "static err_t pppifNetifInit(struct netif *netif)" into the file ppp.c. Bye, Anoulak -- _____ FALCOM GmbH ______________________________________________________ Dipl.-Inf. Anoulak Kictiraz Software Engineer R&D Department Phone: +49 3677 8042 0 Fax: +49 3677 8042 215 E-mail: anoulak.kictiraz@falcom.de Address: Gewerbering 6, 98704 Langewiesen, Germany ______________________________ www.falcom.de ___________________________ This e-mail and any files transmitted are the property of FALCOM and/or its affiliates, are confidential, and are intended solely for the use of the individual or entity to whom this e-mail is addressed. If you are not one of the named recipients or otherwise have reason to believe that you have received this e-mail in error, please notify the sender and delete this message immediately from your computer. Any other use, retention, dissemination, forwarding, printing or copying of this e-mail is strictly prohibited. From MAILER-DAEMON Thu Nov 04 05:07:35 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPeWh-0003O8-1c for mharc-lwip-users@gnu.org; Thu, 04 Nov 2004 05:07:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPeWU-0003NZ-HU for lwip-users@nongnu.org; Thu, 04 Nov 2004 05:07:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPeWQ-0003N3-93 for lwip-users@nongnu.org; Thu, 04 Nov 2004 05:07:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPeWO-0003Ll-Hm for lwip-users@nongnu.org; Thu, 04 Nov 2004 05:07:13 -0500 Received: from [194.51.201.21] (helo=alstom-av-smtp3.gmessaging.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CPeNy-0002tt-VJ for lwip-users@nongnu.org; Thu, 04 Nov 2004 04:58:31 -0500 Received: from obiwan.transport.alstom.com (relay3 [172.24.21.37]) by alstom-av-smtp3.gmessaging.net (iPlanet Messaging Server 5.2 HotFix 1.21 (built Sep 8 2003)) with ESMTP id <0I6N008RQFM8IE@alstom-av-smtp3.gmessaging.net> for lwip-users@nongnu.org; Thu, 04 Nov 2004 10:56:33 +0100 (MET) Received: from mz01world.transport.alstom.com (mz01world [10.3.4.18]) by obiwan.transport.alstom.com (8.12.2+Sun/8.12.2) with ESMTP id iA49uVGR018528 for ; Thu, 04 Nov 2004 10:56:32 +0100 (CET) Date: Thu, 04 Nov 2004 10:54:38 +0100 From: francois.charreire@transport.alstom.com To: lwip-users@nongnu.org Message-id: MIME-version: 1.0 X-Mailer: Lotus Notes Release 5.0.11 July 24, 2002 Content-type: multipart/alternative; boundary="Boundary_(ID_QO2ma3ujoLHlFL0nn2jjKQ)" X-MIMETrack: Serialize by Router on MZ01WORLD/GECALSTHOM(Release 5.0.11 |July 24, 2002) at 04/11/2004 10:56:34, Serialize complete at 04/11/2004 10:56:34 Subject: [lwip-users] lwIP port for Coldfire 5282 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2004 10:07:23 -0000 Message en plusieurs parties au format MIME --Boundary_(ID_QO2ma3ujoLHlFL0nn2jjKQ) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable I'm trying to port the lwIP Coldfire 5272 to Coldfirre 5282 but the FEC=20 looks differents and I'm a newbie on Coldfire. Has somebody already done=20 the port to give me the fec files ? Regards, - Fran=E7ois - :.=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F CONFIDENTIALITE : Ce message et les =E9ventuelles pi=E8ces attach=E9es sont= =20 confidentiels. Si vous n'=EAtes pas dans la liste des destinataires,=20 veuillez informer l'exp=E9diteur imm=E9diatement et ne pas divulguer le=20 contenu =E0 une tierce personne, ne pas l'utiliser pour quelque raison que = ce soit, ne pas stocker ou copier l'information qu'il contient sur un=20 quelconque support. CONFIDENTIALITY : This e-mail and any attachments are confidential and=20 may be privileged. If you are not a named recipient, please notify the=20 sender immediately and do not disclose the contents to another person, use = it for any purpose or store or copy the information in any medium.= --Boundary_(ID_QO2ma3ujoLHlFL0nn2jjKQ) Content-type: text/html; charset=iso-8859-1 Content-transfer-encoding: quoted-printable
I'm trying to port the lwIP Coldfire 5272= to Coldfirre 5282 but the FEC looks differents and I'm a newbie on Coldfir= e. Has somebody already done the port to give me the fec files ?

Regards,

- Fran=E7ois -


:.=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F=5F
CONFIDENTIALITE : Ce message et les =E9ventuelles pi=E8ces attach=E9es sont= confidentiels. Si vous n'=EAtes pas dans la liste des destinataires, veuil= lez informer l'exp=E9diteur imm=E9diatement et ne pas divulguer le contenu = =E0 une tierce personne, ne pas l'utiliser pour quelque raison que ce soit,= ne pas stocker ou copier l'information qu'il contient sur un quelconque su= pport.

CONFIDENTIALITY : This  e-mail  and  any attachments are con= fidential and may be privileged. If  you are not a named recipient, pl= ease notify the sender immediately and do not disclose the contents to anot= her person, use it for any purpose or store or copy the information in any = medium.
= --Boundary_(ID_QO2ma3ujoLHlFL0nn2jjKQ)-- From MAILER-DAEMON Thu Nov 04 07:45:50 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPgzu-0008Gr-OO for mharc-lwip-users@gnu.org; Thu, 04 Nov 2004 07:45:50 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPgzr-0008Gk-8Q for lwip-users@nongnu.org; Thu, 04 Nov 2004 07:45:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPgzp-0008G0-4o for lwip-users@nongnu.org; Thu, 04 Nov 2004 07:45:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPgzp-0008Fx-2d for lwip-users@nongnu.org; Thu, 04 Nov 2004 07:45:45 -0500 Received: from [216.155.196.95] (helo=web61006.mail.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CPgqi-00057X-RM for lwip-users@nongnu.org; Thu, 04 Nov 2004 07:36:21 -0500 Message-ID: <20041104123614.56730.qmail@web61006.mail.yahoo.com> Received: from [24.123.54.130] by web61006.mail.yahoo.com via HTTP; Thu, 04 Nov 2004 04:36:14 PST Date: Thu, 4 Nov 2004 04:36:14 -0800 (PST) From: Errin Bechtel Subject: Re: [lwip-users] lwIP port for Coldfire 5282 To: Mailing list for lwIP users In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0-1798606689-1099571774=:56381" X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2004 12:45:47 -0000 --0-1798606689-1099571774=:56381 Content-Type: text/plain; charset=us-ascii Content-Id: Content-Disposition: inline François Here is what I have. I took the 5272fec.c that was in cvs and modified it for the 5282. Errin --- francois.charreire@transport.alstom.com wrote: > I'm trying to port the lwIP Coldfire 5272 to > Coldfirre 5282 but the FEC > looks differents and I'm a newbie on Coldfire. Has > somebody already done > the port to give me the fec files ? > > Regards, > > - François - > > > :.________________ > CONFIDENTIALITE : Ce message et les éventuelles > pièces attachées sont > confidentiels. Si vous n'êtes pas dans la liste des > destinataires, > veuillez informer l'expéditeur immédiatement et ne > pas divulguer le > contenu à une tierce personne, ne pas l'utiliser > pour quelque raison que > ce soit, ne pas stocker ou copier l'information > qu'il contient sur un > quelconque support. > > CONFIDENTIALITY : This e-mail and any attachments > are confidential and > may be privileged. If you are not a named > recipient, please notify the > sender immediately and do not disclose the contents > to another person, use > it for any purpose or store or copy the information > in any medium.> _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com --0-1798606689-1099571774=:56381 Content-Type: text/plain; name="mcf5282_if.c" Content-Description: mcf5282_if.c Content-Disposition: inline; filename="mcf5282_if.c" /* * Copyright (c) 2001-2004 Swedish Institute of Computer Science. * All rights reserved. * * Redistribution and use in source and binary forms, with or without modification, * are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the above copyright notice, * this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * 3. The name of the author may not be used to endorse or promote products * derived from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY * OF SUCH DAMAGE. * * This file is part of the lwIP TCP/IP stack. * * Author: Adam Dunkels * */ /* * This file is a skeleton for developing Ethernet network interface * drivers for lwIP. Add code to the low_level functions and do a * search-and-replace for the word "mcf5282_if" to replace it with * something that better describes your network interface. */ #include "lwip/opt.h" #include "lwip/def.h" #include "lwip/mem.h" #include "lwip/pbuf.h" #include "lwip/sys.h" #include "lwip/stats.h" #include "netif/etharp.h" #include "lwip/tcpip.h" #include "lwip/dhcp.h" //#include "httpd.h" /* Sizing the descriptor rings will depend upon how many pbufs you have available * and how big they are. Also on how many frames you might want to input before dropping * frames. Generally it is a good idea to buffer one tcp window. This means that * you won't get a tcp retransmit and your tcp transmissions will be reasonably fast. */ #define NUM_RXBDS 64 // Number of receive descriptor rings #define NUM_TXBDS 32 // Number of transmit descriptor rings /* Define those to better describe your network interface. */ #define IFNAME0 'e' #define IFNAME1 'n' #define FEC_MTU 1518 struct rxbd { u16_t flags; u16_t data_len; u8_t *p_buf; }; typedef struct rxbd rxbd_t; struct txbd { u16_t flags; u16_t data_len; u8_t *p_buf; }; typedef struct txbd txbd_t; struct mcf5282_if { rxbd_t rxbd_a[NUM_RXBDS] __attribute__ ((aligned (16))); // Rx descriptor ring. Must be aligned to double-word txbd_t txbd_a[NUM_TXBDS] __attribute__ ((aligned (16))); // Tx descriptor ring. Must be aligned to double-word struct pbuf *rx_pbuf_a[NUM_RXBDS]; // Array of pbufs corresponding to payloads in rx desc ring. struct pbuf *tx_pbuf_a[NUM_TXBDS]; // Array of pbufs corresponding to payloads in tx desc ring. unsigned int rx_remove; // Index that driver will remove next rx frame from. unsigned int rx_insert; // Index that driver will insert next empty rx buffer. unsigned int tx_insert; // Index that driver will insert next tx frame to. unsigned int tx_remove; // Index that driver will clean up next tx buffer. unsigned int tx_free; // Number of free transmit descriptors. unsigned int rx_buf_len; // number of bytes in a rx buffer (that we can use). struct eth_addr *ethaddr; } mcf5282_if __attribute__ ((aligned (8))); struct netif mcf282_fec_netif; sys_sem_t tx_sem; sys_sem_t rx_sem; #define INC_RX_BD_INDEX(idx) do { if (++idx >= NUM_RXBDS) idx = 0; } while (0) #define INC_TX_BD_INDEX(idx) do { if (++idx >= NUM_TXBDS) idx = 0; } while (0) #define DEC_TX_BD_INDEX(idx) do { if (idx-- == 0) idx = NUM_TXBDS-1; } while (0) static const struct eth_addr ethbroadcast = {{0xff,0xff,0xff,0xff,0xff,0xff}}; /* Forward declarations. */ void mcf5282_if_input(struct netif *netif); err_t mcf5282_if_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr); void low_level_input(struct netif *netif); void eth_input(struct pbuf *p, struct netif *netif); void fill_rx_ring(struct mcf5282_if *mcf5282) { struct pbuf *p; struct rxbd *p_rxbd; int i = mcf5282->rx_insert; void *new_payload; u32_t u_p_pay; /* Try and fill as many receive buffers as we can */ while (mcf5282->rx_pbuf_a[i] == 0) { p = pbuf_alloc(PBUF_RAW, (u16_t) mcf5282->rx_buf_len, PBUF_POOL); if (p == 0) /* No pbufs, so can't refill ring */ return; /* Align payload start to be divisible by 16 as required by HW */ u_p_pay = (u32_t) p->payload; new_payload = p->payload = (void *) (((u_p_pay + 15) / 16) * 16); mcf5282->rx_pbuf_a[i] = p; p_rxbd = &mcf5282->rxbd_a[i]; p_rxbd->p_buf = (u8_t *) new_payload; p_rxbd->flags = (p_rxbd->flags & MCF5282_FEC_RxBD_W) | MCF5282_FEC_RxBD_E; INC_RX_BD_INDEX(mcf5282->rx_insert); i = mcf5282->rx_insert; } } void fec_disable(struct mcf5282_if *mcf5282) { int i; /* Reset the FEC - equivalent to a hard reset */ MCF5282_FEC_ECR = MCF5282_FEC_ECR_RESET; /* Wait for the reset sequence to complete */ while (MCF5282_FEC_ECR & MCF5282_FEC_ECR_RESET); /* Set the Graceful Transmit Stop bit */ //MCF5282_FEC_TCR = (MCF5282_FEC_TCR | MCF5282_FEC_TCR_GTS); /* Wait for the current transmission to complete */ //while ( !(MCF5282_FEC_EIR & MCF5282_FEC_EIR_GRA)); /* Clear the GRA event */ //MCF5282_FEC_EIR = MCF5282_FEC_EIR_GRA; /* Disable the FEC */ MCF5282_FEC_ECR = 0; /* Disable all FEC interrupts by clearing the IMR register */ MCF5282_FEC_EIMR = 0; /* Clear the GTS bit so frames can be tranmitted when restarted */ MCF5282_FEC_TCR = (MCF5282_FEC_TCR & ~MCF5282_FEC_TCR_GTS); /* Release all buffers attached to the descriptors. Since the driver * ALWAYS zeros the pbuf array locations and descriptors when buffers are * removed, we know we just have to free any non-zero descriptors */ for (i = 0; i < NUM_RXBDS; i++) if (mcf5282->rx_pbuf_a[i]) { pbuf_free(mcf5282->rx_pbuf_a[i]); mcf5282->rx_pbuf_a[i] = 0; mcf5282->rxbd_a->p_buf = 0; } for (i = 0; i < NUM_TXBDS; i++) if (mcf5282->tx_pbuf_a[i]) { pbuf_free(mcf5282->tx_pbuf_a[i]); mcf5282->tx_pbuf_a[i] = 0; mcf5282->txbd_a->p_buf = 0; } } void fec_enable(struct mcf5282_if *mcf5282) { int i; /* Initialize empty tx descriptor ring */ for(i = 0; i < NUM_TXBDS-1; i++) mcf5282->txbd_a[i].flags = 0; /* Set wrap bit for last descriptor */ mcf5282->txbd_a[i].flags = MCF5282_FEC_TxBD_W; /* initialize tx indexes */ mcf5282->tx_remove = mcf5282->tx_insert = 0; mcf5282->tx_free = NUM_TXBDS; /* Initialize empty rx descriptor ring */ for (i = 0; i < NUM_RXBDS-1; i++) mcf5282->rxbd_a[i].flags = 0; /* Set wrap bit for last descriptor */ mcf5282->rxbd_a[i].flags = MCF5282_FEC_RxBD_W; /* Initialize rx indexes */ mcf5282->rx_remove = mcf5282->rx_insert = 0; /* Fill receive descriptor ring */ fill_rx_ring(mcf5282); sim->gpio.pehlpar = 0xC0; sim->gpio.paspar = 0x0F00; /* Enable FEC */ MCF5282_FEC_ECR = MCF5282_FEC_ECR_ETHER_EN; /* Allow interrupts by setting IMR register */ MCF5282_FEC_EIMR = MCF5282_FEC_EIMR_RXF | MCF5282_FEC_EIMR_TXF; /* Indicate that there have been empty receive buffers produced */ MCF5282_FEC_RDAR = 1; } void mcf5282fec_tx_cleanup(void) { struct pbuf *p; unsigned int tx_remove_sof; unsigned int tx_remove_eof; unsigned int i; u16_t flags; struct mcf5282_if *mcf5282 = mcf282_fec_netif.state; #if SYS_LIGHTWEIGHT_PROT == 1 u32_t old_level; #endif tx_remove_sof = tx_remove_eof = mcf5282->tx_remove; #if defined(MCF5282_DEBUG) printf("mcf5282fec_tx_cleanup: tx_remove_eof: %d\n", tx_remove_eof); #endif /* We must protect reading the flags and then reading the buffer pointer. They must both be read together. */ #if SYS_LIGHTWEIGHT_PROT == 1 old_level = sys_arch_protect(); #endif /* Loop, looking for completed buffers at eof */ while ((((flags = mcf5282->txbd_a[tx_remove_eof].flags) & MCF5282_FEC_TxBD_R) == 0) && (mcf5282->tx_pbuf_a[tx_remove_eof] != 0)) { /* See if this is last buffer in frame */ if ((flags & MCF5282_FEC_TxBD_L) != 0) { i = tx_remove_eof; /* This frame is complete. Take the frame off backwards */ do { p = mcf5282->tx_pbuf_a[i]; mcf5282->tx_pbuf_a[i] = 0; mcf5282->txbd_a[i].p_buf = 0; mcf5282->tx_free++; if (i != tx_remove_sof) DEC_TX_BD_INDEX(i); else break; } while (1); #if SYS_LIGHTWEIGHT_PROT == 1 sys_arch_unprotect(old_level); #endif #if defined(MCF5282_DEBUG) printf("mcf5282fec_tx_cleanup: pbuf_free -> 0x%08X\n", p); #endif pbuf_free(p); // Will be head of chain #if SYS_LIGHTWEIGHT_PROT == 1 old_level = sys_arch_protect(); #endif /* Look at next descriptor */ INC_TX_BD_INDEX(tx_remove_eof); tx_remove_sof = tx_remove_eof; } else INC_TX_BD_INDEX(tx_remove_eof); } mcf5282->tx_remove = tx_remove_sof; //MCF5282_FEC_EIMR |= MCF5282_FEC_EIMR_TXF; // renable interrupt #if SYS_LIGHTWEIGHT_PROT == 1 sys_arch_unprotect(old_level); #endif } void __attribute__ ((interrupt_handler)) mcf5282_fec_int_rxf(void) { MCF5282_FEC_EIMR &= ~MCF5282_FEC_EIMR_RXF; // disable rx int MCF5282_FEC_EIR = MCF5282_FEC_EIR_RXF; // clear int flag sys_sem_signal(rx_sem); } void __attribute__ ((interrupt_handler)) mcf5282_fec_int_txf(void) { //MCF5282_FEC_EIMR &= ~MCF5282_FEC_EIMR_TXF; // disable tx int /* clear interrupt status for tx interrupt */ MCF5282_FEC_EIR = MCF5282_FEC_EIR_TXF; sys_sem_signal(tx_sem); } void low_level_init(struct netif *netif) { struct mcf5282_if *mcf5282; struct pbuf *p; int i; #ifdef MCF5282_DEBUG printf("low_level_init\n"); #endif mcf5282 = netif->state; fec_disable(mcf5282); /* set MAC hardware address length */ netif->hwaddr_len = 6; /* set MAC hardware address */ netif->hwaddr[0] = 0x00; netif->hwaddr[1] = 0xCF; netif->hwaddr[2] = 0x52; netif->hwaddr[3] = 0x82; netif->hwaddr[4] = 0x00; netif->hwaddr[5] = 0x01; /* maximum transfer unit */ netif->mtu = FEC_MTU; /* broadcast capability */ netif->flags = NETIF_FLAG_BROADCAST; // install int handlers SetInterruptVector(MCF52XX_FEC_X_INTF_VECTOR + MCF52XX_INTC0_VECTOR_BASE, &mcf5282_fec_int_txf); SetInterruptVector(MCF52XX_FEC_R_INTF_VECTOR + MCF52XX_INTC0_VECTOR_BASE, &mcf5282_fec_int_rxf); sim->intc[0].icrn[MCF52XX_FEC_X_INTF_VECTOR] = MCF52XX_FEC_X_INTF_IACKLPR; // set int level and priority sim->intc[0].icrn[MCF52XX_FEC_R_INTF_VECTOR] = MCF52XX_FEC_R_INTF_IACKLPR; // set int level and priority EnableInterrupt(MCF52XX_FEC_X_INTF_VECTOR); // enable ints EnableInterrupt(MCF52XX_FEC_R_INTF_VECTOR); // enable ints /* Set the source address for the controller */ MCF5282_FEC_PALR = 0 | (netif->hwaddr[0] <<24) | (netif->hwaddr[1] <<16) | (netif->hwaddr[2] <<8) | (netif->hwaddr[3] <<0); MCF5282_FEC_PAUR = 0 | (netif->hwaddr[4] <<24) | (netif->hwaddr[5] <<16); /* Initialize the hash table registers */ MCF5282_FEC_IAUR = 0; MCF5282_FEC_IALR = 0; /* Set Receive Buffer Size. We subtract 16 because the start of the receive * buffer MUST be divisible by 16, so depending on where the payload really * starts in the pbuf, we might be increasing the start point by up to 15 bytes. * See the alignment code in fill_rx_ring() */ /* There might be an offset to the payload address and we should subtract * that offset */ p = pbuf_alloc(PBUF_RAW, PBUF_POOL_BUFSIZE, PBUF_POOL); i = 0; if (p) { struct pbuf *q = p; while ((q = q->next) != 0) i += q->len; mcf5282->rx_buf_len = PBUF_POOL_BUFSIZE-16-i; pbuf_free(p); } MCF5282_FEC_EMRBR = (u16_t) mcf5282->rx_buf_len; /* Point to the start of the circular Rx buffer descriptor queue */ MCF5282_FEC_ERDSR = ((u32_t) &mcf5282->rxbd_a[0]); /* Point to the start of the circular Tx buffer descriptor queue */ MCF5282_FEC_ETDSR = ((u32_t) &mcf5282->txbd_a[0]); /* Set the tranceiver interface to MII mode */ MCF5282_FEC_RCR = (FEC_MTU << 16) | MCF5282_FEC_RCR_MII_MODE | MCF5282_FEC_RCR_DRT; // half duplex //| MCF5282_FEC_RCR_PROM; // accept all frames /* Only operate in half-duplex, no heart beat control */ MCF5282_FEC_TCR = 0; /* Set MII bus speed */ MCF5282_FEC_MSCR = 0x0D; /* Clear MII interrupt status */ //MCF5282_FEC_EIR = MCF5282_FEC_EIMR_MII; // enable fec fec_enable(mcf5282); } /* * low_level_output(): * * Should do the actual transmission of the packet. The packet is * contained in the pbuf that is passed to the function. This pbuf * might be chained. * */ err_t low_level_output(struct netif *netif, struct pbuf *p) { struct mcf5282_if *mcf5282 = netif->state; struct pbuf *q, *r; char *ptr; char *pStart; unsigned int len; #if SYS_LIGHTWEIGHT_PROT == 1 u32_t old_level; #endif #if SYS_LIGHTWEIGHT_PROT == 1 /* Interrupts are disabled through this whole thing to support multi-threading * transmit calls. Also this function might be called from an ISR. */ old_level = sys_arch_protect(); #endif // make sure a descriptor free if (mcf5282->tx_free) { r = pbuf_alloc(PBUF_RAW, p->tot_len + 16, PBUF_RAM); // alloc mem for buffer if (r != NULL) { ptr = pStart = (void *) ((((DWORD)r->payload + 15) / 16) * 16); // get start address aligned on 16 byte boundary for(q = p, len = 0; q != NULL; q = q->next) { memcpy(ptr + len, q->payload, q->len); len += q->len; } #if defined(MCF5282_DEBUG) printf("low_level_output: mcf5282->tx_insert: %d\n", mcf5282->tx_insert); #endif // put buffer on descriptor ring mcf5282->tx_free--; // dec free descriptors mcf5282->tx_pbuf_a[mcf5282->tx_insert] = r; // save pointer to pbuf mcf5282->txbd_a[mcf5282->tx_insert].p_buf = pStart; // set start address of data mcf5282->txbd_a[mcf5282->tx_insert].data_len = len; // set len of data #if defined(MCF5282_DEBUG) printf("low_level_output: pbuf: 0x%08X, buf: 0x%08X, data_len: %d\n", mcf5282->tx_pbuf_a[mcf5282->tx_insert], mcf5282->txbd_a[mcf5282->tx_insert].p_buf, mcf5282->txbd_a[mcf5282->tx_insert].data_len); printf("p_buf:\n"); printf("\tdest mac: "); for(len = 0; len < 6; len++) printf("%02X%c", ((BYTE*)mcf5282->txbd_a[mcf5282->tx_insert].p_buf)[len], len == 5 ? '\n' : ':'); printf("\tsrc mac: "); for(; len < 12; len++) printf("%02X%c", ((BYTE*)mcf5282->txbd_a[mcf5282->tx_insert].p_buf)[len], len == 11 ? '\n' : ':'); for(; len < mcf5282->txbd_a[mcf5282->tx_insert].data_len; len++) printf("%02X ", ((BYTE*)mcf5282->txbd_a[mcf5282->tx_insert].p_buf)[len]); printf("\n"); #endif // set flags mcf5282->txbd_a[mcf5282->tx_insert].flags = (u16_t) (MCF5282_FEC_TxBD_R | (mcf5282->txbd_a[mcf5282->tx_insert].flags & MCF5282_FEC_TxBD_W) | (MCF5282_FEC_TxBD_L | MCF5282_FEC_TxBD_TC)); INC_TX_BD_INDEX(mcf5282->tx_insert); #ifdef LINK_STATS lwip_stats.link.xmit++; #endif /* Indicate that there has been a transmit buffer produced */ MCF5282_FEC_TDAR = 1; #if SYS_LIGHTWEIGHT_PROT == 1 sys_arch_unprotect(old_level); #endif return ERR_OK; } } /* Drop the frame, we have no place to put it */ #ifdef LINK_STATS lwip_stats.link.memerr++; #endif #if SYS_LIGHTWEIGHT_PROT == 1 sys_arch_unprotect(old_level); #endif return ERR_MEM; } //err_t low_level_output(struct netif *netif, struct pbuf *p) //{ // struct pbuf *q; // struct mcf5282_if *mcf5282 = netif->state; // int num_desc; // int num_free; // unsigned int tx_insert_sof, tx_insert_eof; // unsigned int i; //#if SYS_LIGHTWEIGHT_PROT == 1 // u32_t old_level; //#endif // // /* Make sure that there are no PBUF_REF buffers in the chain. These buffers // have to be freed immediately and this ethernet driver puts the buffers on // the dma chain, so they get freed later */ // p = pbuf_take(p); // //#if SYS_LIGHTWEIGHT_PROT == 1 // /* Interrupts are disabled through this whole thing to support multi-threading // * transmit calls. Also this function might be called from an ISR. */ // old_level = sys_arch_protect(); //#endif // // /* Determine number of descriptors needed */ // num_desc = pbuf_clen(p); // // if (num_desc > mcf5282->tx_free) // { // /* Drop the frame, we have no place to put it */ //#ifdef LINK_STATS // lwip_stats.link.memerr++; //#endif //#if SYS_LIGHTWEIGHT_PROT == 1 // sys_arch_unprotect(old_level); //#endif // return ERR_MEM; // } // else // { // DWORD i; // // /* Increment use count on pbuf */ // pbuf_ref(p); // // /* Put buffers on descriptor ring, but don't mark them as ready yet */ // tx_insert_eof = tx_insert_sof = mcf5282->tx_insert; // q = p; // // do // { // /*printf("packet: payload 0x%08X -> ", q->payload); // for(i = 0; i < q->len; i++) // printf("%02X ", ((BYTE*)q->payload)[i]); // printf("\n");*/ // // if((DWORD)q->payload & 3) // { // pbuf_header(q, 4 - (DWORD)q->payload & 3); // } // // mcf5282->tx_free--; // mcf5282->tx_pbuf_a[tx_insert_eof] = q; // mcf5282->txbd_a[tx_insert_eof].p_buf = q->payload; // mcf5282->txbd_a[tx_insert_eof].data_len = q->len; // // //printf("q->payload: 0x%08X, q->len: %d, p_buf: 0x%08X\n", q->payload, q->len, mcf5282->txbd_a[tx_insert_eof].p_buf); // // /*if(((DWORD)mcf5282->txbd_a[tx_insert_eof].p_buf & 0x03)) // { // printf("low_level_output: mcf5282->txbd_a[tx_insert_eof].p_buf 0x%08X, not mult. of 4\n", mcf5282->txbd_a[tx_insert_eof].p_buf); // abort(); // }*/ // // q = q->next; // // if (q) // INC_TX_BD_INDEX(tx_insert_eof); // // } while (q); // // /* Go backwards through descriptor ring setting flags */ // i = tx_insert_eof; // // do // { // mcf5282->txbd_a[i].flags = (u16_t) (MCF5282_FEC_TxBD_R | // (mcf5282->txbd_a[i].flags & MCF5282_FEC_TxBD_W) | // ((i == tx_insert_eof) ? (MCF5282_FEC_TxBD_L | MCF5282_FEC_TxBD_TC) : 0)); // // if (i != tx_insert_sof) // DEC_TX_BD_INDEX(i); // else // break; // } while (1); // // INC_TX_BD_INDEX(tx_insert_eof); // mcf5282->tx_insert = tx_insert_eof; // //#ifdef LINK_STATS // lwip_stats.link.xmit++; //#endif // /* Indicate that there has been a transmit buffer produced */ // MCF5282_FEC_TDAR = 1; // //#if SYS_LIGHTWEIGHT_PROT == 1 // sys_arch_unprotect(old_level); //#endif // } // // return ERR_OK; //} /* * low_level_input(): * * Should allocate a pbuf and transfer the bytes of the incoming * packet from the interface into the pbuf. * */ void low_level_input(struct netif *netif) { u16_t flags; unsigned int rx_remove_sof; unsigned int rx_remove_eof; struct pbuf *p; struct mcf5282_if *mcf5282 = netif->state; rx_remove_sof = rx_remove_eof = mcf5282->rx_remove; /* Loop, looking for filled buffers at eof */ while ((((flags = mcf5282->rxbd_a[rx_remove_eof].flags) & MCF5282_FEC_RxBD_E) == 0) && (mcf5282->rx_pbuf_a[rx_remove_eof] != 0)) { /* See if this is last buffer in frame */ if ((flags & MCF5282_FEC_RxBD_L) != 0) { /* This frame is ready to go. Start at first descriptor in frame. */ p = 0; do { /* Adjust pbuf length if this is last buffer in frame */ if (rx_remove_sof == rx_remove_eof) { mcf5282->rx_pbuf_a[rx_remove_sof]->tot_len = mcf5282->rx_pbuf_a[rx_remove_sof]->len = (u16_t) (mcf5282->rxbd_a[rx_remove_sof].data_len - (p ? p->tot_len : 0)); } else mcf5282->rx_pbuf_a[rx_remove_sof]->len = mcf5282->rx_pbuf_a[rx_remove_sof]->tot_len = mcf5282->rxbd_a[rx_remove_sof].data_len; /* Chain pbuf */ if (p == 0) { p = mcf5282->rx_pbuf_a[rx_remove_sof]; // First in chain p->tot_len = p->len; // Important since len might have changed } else { pbuf_chain(p, mcf5282->rx_pbuf_a[rx_remove_sof]); pbuf_free(mcf5282->rx_pbuf_a[rx_remove_sof]); } /* Clear pointer to mark descriptor as free */ mcf5282->rx_pbuf_a[rx_remove_sof] = 0; mcf5282->rxbd_a[rx_remove_sof].p_buf = 0; if (rx_remove_sof != rx_remove_eof) INC_RX_BD_INDEX(rx_remove_sof); else break; } while (1); INC_RX_BD_INDEX(rx_remove_sof); /* Check error status of frame */ if (flags & (MCF5282_FEC_RxBD_LG | MCF5282_FEC_RxBD_NO | MCF5282_FEC_RxBD_CR | MCF5282_FEC_RxBD_OV)) { #ifdef LINK_STATS lwip_stats.link.drop++; if (flags & MCF5282_FEC_RxBD_LG) lwip_stats.link.lenerr++; //Jumbo gram else if (flags & (MCF5282_FEC_RxBD_NO | MCF5282_FEC_RxBD_OV)) lwip_stats.link.err++; else if (flags & MCF5282_FEC_RxBD_CR) lwip_stats.link.chkerr++; // CRC errors #endif /* Drop errored frame */ pbuf_free(p); } else { /* Good frame. increment stat */ #ifdef LINK_STATS lwip_stats.link.recv++; #endif eth_input(p, netif); } } INC_RX_BD_INDEX(rx_remove_eof); } mcf5282->rx_remove = rx_remove_sof; /* Fill up empty descriptor rings */ fill_rx_ring(mcf5282); /* Set rx interrupt bit again */ MCF5282_FEC_EIMR |= MCF5282_FEC_EIMR_RXF; /* Tell fec that we have filled up her ring */ MCF5282_FEC_RDAR = 1; } /* * mcf5282_if_output(): * * This function is called by the TCP/IP stack when an IP packet * should be sent. It calls the function called low_level_output() to * do the actual transmission of the packet. * */ err_t mcf5282_if_output(struct netif *netif, struct pbuf *p, struct ip_addr *ipaddr) { /* resolve hardware address, then send (or queue) packet */ return etharp_output(netif, ipaddr, p); } void eth_input(struct pbuf *p, struct netif *netif) { /* Ethernet protocol layer */ struct eth_hdr *ethhdr; struct mcf5282_if *mcf5282 = netif->state; ethhdr = p->payload; switch (htons(ethhdr->type)) { case ETHTYPE_IP: etharp_ip_input(netif, p); pbuf_header(p, -(WORD)sizeof(struct eth_hdr)); netif->input(p, netif); break; case ETHTYPE_ARP: etharp_arp_input(netif, mcf5282->ethaddr, p); break; default: pbuf_free(p); p = NULL; break; } } /* * mcf5282_if_init(): * * Should be called at the beginning of the program to set up the * network interface. It calls the function low_level_init() to do the * actual setup of the hardware. * */ err_t mcf5282_if_init(struct netif *netif) { struct mcf5282_if *mcf5282if = &mcf5282_if; printf("mcf5282_if_init: %08X\n", (DWORD)&mcf5282_if); if (mcf5282if == NULL) { LWIP_DEBUGF(NETIF_DEBUG, ("mcf5282_if_init: out of memory\n")); return ERR_MEM; } netif->state = mcf5282if; netif->name[0] = IFNAME0; netif->name[1] = IFNAME1; netif->output = mcf5282_if_output; netif->linkoutput = low_level_output; netif->mtu = FEC_MTU - 18; // mtu without ethernet header and crc //netif->input = tcpip_input; netif->hwaddr_len = 6; /* Ethernet interface */ mcf5282if->ethaddr = (struct eth_addr *)&(netif->hwaddr[0]); low_level_init(netif); etharp_init(); return ERR_OK; } void arp_timer(void *arg) { etharp_tmr(); sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); } void dhcp_fine_timer(void *arg) { dhcp_fine_tmr(); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_fine_timer, NULL); } void dhcp_coarse_timer(void *arg) { dhcp_coarse_tmr(); sys_timeout(DHCP_COARSE_TIMER_SECS * 1000, dhcp_coarse_timer, NULL); } void tcpip_init_done(void *arg) { sys_sem_t *sem; #ifdef DEBUG_PRINTF printf("tcpip thread: %d\n", TS_GetCurrentTask()); #endif sem = arg; sys_sem_signal(*sem); } void mcf5282_ethernet_timers_thread(void *arg) { sys_sem_t tmr_sem; tmr_sem = sys_sem_new(0); // create sem // start timers sys_timeout(ARP_TMR_INTERVAL, arp_timer, NULL); sys_timeout(DHCP_FINE_TIMER_MSECS, dhcp_fine_timer, NULL); sys_timeout(DHCP_COARSE_TIMER_SECS * 1000, dhcp_coarse_timer, NULL); while(1) { sys_sem_wait(tmr_sem); // wait forever } } /** \brief rx thread * \author Errin Bechtel * \date 09-21-2004 * * Modified:
* * \param *arg */ void mcf5282_ethernet_rx_thread(void *arg) { while (1) { sys_sem_wait(rx_sem); low_level_input(&mcf282_fec_netif); } } /** \brief transmit thread * \author Errin Bechtel * \date 09-21-2004 * * Modified:
* * \param *arg */ void mcf5282_ethernet_thread(void *arg) { while (1) { sys_sem_wait(tx_sem); mcf5282fec_tx_cleanup(); } } void mcf5282_ethernet_init() { sys_sem_t sem; struct ip_addr ipaddr, netmask, gw; TS_EnterSystemCritical(); #ifdef STATS stats_init(); #endif sys_init(); mem_init(); memp_init(); pbuf_init(); netif_init(); rx_sem = sys_sem_new(0); // create receive semaphore tx_sem = sys_sem_new(0); // create transmit semaphore // start new threads for tx, rx and timers sys_thread_new(mcf5282_ethernet_rx_thread, NULL, DEFAULT_THREAD_PRIO); sys_thread_new(mcf5282_ethernet_thread, NULL, DEFAULT_THREAD_PRIO); sys_thread_new(mcf5282_ethernet_timers_thread, NULL, DEFAULT_THREAD_PRIO); sem = sys_sem_new(0); tcpip_init(tcpip_init_done, &sem); sys_sem_wait(sem); sys_sem_free(sem); printf("TCP/IP initialized.\n"); IP4_ADDR(&gw, 0,0,0,0); IP4_ADDR(&ipaddr, 0,0,0,0); IP4_ADDR(&netmask, 0,0,0,0); netif_add(&mcf282_fec_netif, &ipaddr, &netmask, &gw, NULL, mcf5282_if_init, tcpip_input); netif_set_default(&mcf282_fec_netif); //netif_set_up(&mcf282_fec_netif); TS_LeaveSystemCritical(); dhcp_start(&mcf282_fec_netif); // start dhcp //httpd_init(); // start web server } void ethernet_stats_display(void) { struct mcf5282_if *mcf5282 = mcf282_fec_netif.state; stats_display(); // print IP address printf("IP addr: %08X\n", mcf282_fec_netif.ip_addr.addr); printf("netif_is_up: %d\n", netif_is_up(&mcf282_fec_netif)); printf("tx_free: %d\n", mcf5282->tx_free); } --0-1798606689-1099571774=:56381 Content-Type: text/plain; name="fec.h" Content-Description: fec.h Content-Disposition: inline; filename="fec.h" #ifndef _FEC_H #define _FEC_H #define MCF5282_FEC_EIR sim->fec.eir #define MCF5282_FEC_EIR_HBERR (0x80000000) #define MCF5282_FEC_EIR_BABR (0x40000000) #define MCF5282_FEC_EIR_BABT (0x20000000) #define MCF5282_FEC_EIR_GRA (0x10000000) #define MCF5282_FEC_EIR_TXF (0x08000000) #define MCF5282_FEC_EIR_TXB (0x04000000) #define MCF5282_FEC_EIR_RXF (0x02000000) #define MCF5282_FEC_EIR_RXB (0x01000000) #define MCF5282_FEC_EIR_MII (0x00800000) #define MCF5282_FEC_EIR_EBERR (0x00400000) #define MCF5282_FEC_EIR_LC (0x00200000) #define MCF5282_FEC_EIR_RL (0x00100000) #define MCF5282_FEC_EIR_UN (0x00080000) #define MCF5282_FEC_EIMR sim->fec.eimr #define MCF5282_FEC_EIMR_HBERR (0x80000000) #define MCF5282_FEC_EIMR_BABR (0x40000000) #define MCF5282_FEC_EIMR_BABT (0x20000000) #define MCF5282_FEC_EIMR_GRA (0x10000000) #define MCF5282_FEC_EIMR_TXF (0x08000000) #define MCF5282_FEC_EIMR_TXB (0x04000000) #define MCF5282_FEC_EIMR_RXF (0x02000000) #define MCF5282_FEC_EIMR_RXB (0x01000000) #define MCF5282_FEC_EIMR_MII (0x00800000) #define MCF5282_FEC_EIMR_EBERR (0x00400000) #define MCF5282_FEC_EIMR_LC (0x00200000) #define MCF5282_FEC_EIMR_RL (0x00100000) #define MCF5282_FEC_EIMR_UN (0x00080000) #define MCF5282_FEC_RDAR sim->fec.rdar #define MCF5282_FEC_RDAR_R_DES_ACTIVE (0x01000000) #define MCF5282_FEC_TDAR sim->fec.tdar #define MCF5282_FEC_TDAR_X_DES_ACTIVE (0x01000000) #define MCF5282_FEC_ECR sim->fec.ecr #define MCF5282_FEC_ECR_ETHER_EN (0x00000002) #define MCF5282_FEC_ECR_RESET (0x00000001) #define MCF5282_FEC_MMFR sim->fec.mmfr #define MCF5282_FEC_MMFR_ST (0x40000000) #define MCF5282_FEC_MMFR_OP_RD (0x20000000) #define MCF5282_FEC_MMFR_OP_WR (0x10000000) #define MCF5282_FEC_MMFR_PA(x) (((x)&0x1F)<<23) #define MCF5282_FEC_MMFR_RA(x) (((x)&0x1F)<<18) #define MCF5282_FEC_MMFR_TA (0x00020000) #define MCF5282_FEC_MMFR_DATA(x) (((x)&0xFFFF)) #define MCF5282_FEC_MSCR sim->fec.mscr #define MCF5282_FEC_MSCR_DIS_PREAMBLE (0x00000008) #define MCF5282_FEC_MSCR_MII_SPEED(x) (((x)&0x1F)<<1) #define MCF5282_FEC_MIBC sim->fec.mibc #define MCF5282_FEC_MIBC_MIB_DISABLE (0x80000000) #define MCF5282_FEC_MIBC_MIB_IDLE (0x40000000) #define MCF5282_FEC_RCR sim->fec.rcr #define MCF5282_FEC_RCR_MAX_FL(x) (((x)&0x07FF)<<16) #define MCF5282_FEC_RCR_FCE (0x00000020) #define MCF5282_FEC_RCR_BC_REJ (0x00000010) #define MCF5282_FEC_RCR_PROM (0x00000008) #define MCF5282_FEC_RCR_MII_MODE (0x00000004) #define MCF5282_FEC_RCR_DRT (0x00000002) #define MCF5282_FEC_RCR_LOOP (0x00000001) #define MCF5282_FEC_TCR sim->fec.tcr #define MCF5282_FEC_TCR_RFC_PAUSE (0x00000010) #define MCF5282_FEC_TCR_TFC_PAUSE (0x00000008) #define MCF5282_FEC_TCR_FDEN (0x00000004) #define MCF5282_FEC_TCR_HBC (0x00000002) #define MCF5282_FEC_TCR_GTS (0x00000001) #define MCF5282_FEC_PALR sim->fec.palr #define MCF5282_FEC_PALR_BYTE0(x) (((x)&0xFF)<<24) #define MCF5282_FEC_PALR_BYTE1(x) (((x)&0xFF)<<16) #define MCF5282_FEC_PALR_BYTE2(x) (((x)&0xFF)<<8) #define MCF5282_FEC_PALR_BYTE3(x) (((x)&0xFF)) #define MCF5282_FEC_PAUR sim->fec.paur #define MCF5282_FEC_PAUR_BYTE4(x) (((x)&0xFF)<<24) #define MCF5282_FEC_PAUR_BYTE5(x) (((x)&0xFF)<<16) #define MCF5282_FEC_OPD sim->fec.opd #define MCF5282_FEC_OPD_PAUSE_DUR(x) (((x)&0xFFFF)) #define MCF5282_FEC_TFWR sim->fec.tfwr #define MCF5282_FEC_TFWR_X_WMRK_64 (0x00000001) #define MCF5282_FEC_TFWR_X_WMRK_128 (0x00000002) #define MCF5282_FEC_TFWR_X_WMRK_192 (0x00000003) #define MCF5282_FEC_EMRBR sim->fec.emrbr #define MCF5282_FEC_EMRBR_R_BUF_SIZE(x) (((x)&7F)<<4) #define MCF5282_FEC_TxBD_R 0x8000 #define MCF5282_FEC_TxBD_TO1 0x4000 #define MCF5282_FEC_TxBD_W 0x2000 #define MCF5282_FEC_TxBD_TO2 0x1000 #define MCF5282_FEC_TxBD_L 0x0800 #define MCF5282_FEC_TxBD_TC 0x0400 #define MCF5282_FEC_TxBD_ABC 0x0200 #define MCF5282_FEC_RxBD_E 0x8000 #define MCF5282_FEC_RxBD_R01 0x4000 #define MCF5282_FEC_RxBD_W 0x2000 #define MCF5282_FEC_RxBD_R02 0x1000 #define MCF5282_FEC_RxBD_L 0x0800 #define MCF5282_FEC_RxBD_M 0x0100 #define MCF5282_FEC_RxBD_BC 0x0080 #define MCF5282_FEC_RxBD_MC 0x0040 #define MCF5282_FEC_RxBD_LG 0x0020 #define MCF5282_FEC_RxBD_NO 0x0010 #define MCF5282_FEC_RxBD_CR 0x0004 #define MCF5282_FEC_RxBD_OV 0x0002 #define MCF5282_FEC_RxBD_TR 0x0001 #define MCF5282_FEC_IAUR sim->fec.iaur #define MCF5282_FEC_IALR sim->fec.ialr #define MCF5282_FEC_ERDSR sim->fec.erdsr #define MCF5282_FEC_ETDSR sim->fec.etdsr #define MCF52XX_FEC_X_INTF_VECTOR 23 #define MCF52XX_FEC_X_INTB_VECTOR 24 #define MCF52XX_FEC_UN_VECTOR 25 #define MCF52XX_FEC_RL_VECTOR 26 #define MCF52XX_FEC_R_INTF_VECTOR 27 #define MCF52XX_FEC_R_INTB_VECTOR 28 #define MCF52XX_FEC_MII_VECTOR 29 #define MCF52XX_FEC_LC_VECTOR 30 #define MCF52XX_FEC_HBERR_VECTOR 31 #define MCF52XX_FEC_GRA_VECTOR 32 #define MCF52XX_FEC_EBERR_VECTOR 33 #define MCF52XX_FEC_BABT_VECTOR 34 #define MCF52XX_FEC_BABR_VECTOR 35 typedef struct { /* fast ethernet controller */ volatile DWORD eir; /* 1004->1007 interrupt event register */ volatile DWORD eimr; /* 1008->100b interrupt mask register */ volatile BYTE pack00[4]; /* 100c->100f */ volatile DWORD rdar; /* 1010->1013 recieve descriptor active register */ volatile DWORD tdar; /* 1014->1017 transmit descriptor active register */ volatile BYTE pack01[12]; /* 1018->1023 */ volatile DWORD ecr; /* 1024->1027 ethernet control register */ volatile BYTE pack02[24]; /* 1028->103f */ volatile DWORD mdata; /* 1040->1043 mii data register */ volatile DWORD mscr; /* 1044->1047 mii speed control register */ volatile BYTE pack03[28]; /* 1048->1063 */ volatile DWORD mibc; /* 1064->1067 mib control/status register */ volatile BYTE pack04[28]; /* 1068->1083 */ volatile DWORD rcr; /* 1084->1087 recieve control register */ volatile BYTE pack05[60]; /* 1088->10c3 */ volatile DWORD tcr; /* 10c4->10c7 transmit control register */ volatile BYTE pack06[28]; /* 10c8->10e3 */ volatile DWORD palr; /* 10e4->10e7 physical address low register */ volatile DWORD paur; /* 10e8->10eb physical address high+ type field */ volatile DWORD opd; /* 10ec->10ef opcode + pause duration */ volatile BYTE pack07[40]; /* 10f0->1117 */ volatile DWORD iaur; /* 1118->111b upper 32bits of individual hash table */ volatile DWORD ialr; /* 111c->111f lower 32bits of individual hash table */ volatile DWORD gaur; /* 1120->1123 upper 32bits of group hash table */ volatile DWORD galr; /* 1124->1127 lower 32bits of group hash table */ volatile BYTE pack08[28]; /* 1128->1143 */ volatile DWORD tfwr; /* 1144->1147 transmit fifo watermark */ volatile BYTE pack09[4]; /* 1148->114b */ volatile DWORD frbr; /* 114c->114f fifo receive bound register */ volatile DWORD frsr; /* 1150->1153 fifo receive fifo start registers */ volatile BYTE pack10[44]; /* 1154->117f */ volatile DWORD erdsr; /* 1180->1183 pointer to receive descriptor ring */ volatile DWORD etdsr; /* 1184->1187 pointer to transmit descriptor ring */ volatile DWORD emrbr; /* 1188->118b maximum receive buffer size */ } fecstruct /*__attribute__ ((packed))*/; #endif /* _FEC_H */ --0-1798606689-1099571774=:56381-- From MAILER-DAEMON Thu Nov 04 12:39:50 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPlaQ-00008F-IF for mharc-lwip-users@gnu.org; Thu, 04 Nov 2004 12:39:50 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPlaO-00007p-Kj for lwip-users@nongnu.org; Thu, 04 Nov 2004 12:39:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPlaN-00007G-J1 for lwip-users@nongnu.org; Thu, 04 Nov 2004 12:39:48 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPlaN-000076-Er for lwip-users@nongnu.org; Thu, 04 Nov 2004 12:39:47 -0500 Received: from [66.80.7.162] (helo=gibbons.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CPlRq-00077f-TH for lwip-users@nongnu.org; Thu, 04 Nov 2004 12:30:59 -0500 Received: from [66.80.7.178] ([66.80.7.178]) (authenticated user jim@gibbons.com) by gibbons.com (Kerio MailServer 6.0.1) for lwip-users@nongnu.org; Thu, 4 Nov 2004 09:30:58 -0800 Message-ID: <418A6756.7010500@gibbons.com> Date: Thu, 04 Nov 2004 09:31:02 -0800 From: Jim Gibbons Organization: Gibbons and Associates, Inc. User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Content-Type: multipart/alternative; boundary="------------000302030201080506030700" Subject: [lwip-users] arp question X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jim@gibbons.com, Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Nov 2004 17:39:48 -0000 This is a multi-part message in MIME format. --------------000302030201080506030700 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit I have caught yet another problem in my code related to ARP. It has made me wonder if perhaps it might be wise to make some modest changes in etharp.c to protect the likes of me. The issue is the integrity of the ARP table in a multi-tasking environment. Three major entry points to etharp are involved. These are etharp_timer, etharp_input and etharp_output. All must be called by the user by some means, and all result in ARP table accesses and modifications. If all are called from the same task, then everything will be all right, but if they are called from different tasks, problems may ensue. Typically, etharp_output is called from the context of the TCP/IP task, in the netif upper level output function. etharp_timer is usually called via a sys_timeout function. It is possible to put these calls into the context of the TCP/IP task by calling the sys_timeout for the first time from the tcpip_init_done function. But it is pretty difficult to get the etharp_input call into the context of the TCP/IP task. (If I'm mistaken about this, please correct me.) If calling all three of these functions from the context of the TCP/IP task isn't going to work, then another option would be to call them all from the context of some user task. This is pretty straightforward for etharp_timer and etharp_input. In order to get the etharp_output calls out of the TCP/IP task context, though, the outbound pbuf will have to be passed to the user task in some kind of OS message (from within netif's upper level output function). This isn't too satisfying, either. It seems like the best approach would be to simply protect the ARP table with a mutex (sys_sem?). This could be done within the ARP code without too much difficulty. Does this sound reasonable? -- Jim Gibbons jim@gibbons.com Gibbons and Associates, Inc. TEL: (408) 984-1441 900 Lafayette, Suite 704, Santa Clara, CA FAX: (408) 247-6395 --------------000302030201080506030700 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit I have caught yet another problem in my code related to ARP.  It has made me wonder if perhaps it might be wise to make some modest changes in etharp.c to protect the likes of me.

The issue is the integrity of the ARP table in a multi-tasking environment.  Three major entry points to etharp are involved.  These are etharp_timer, etharp_input and etharp_output.  All must be called by the user by some means, and all result in ARP table accesses and modifications.  If all are called from the same task, then everything will be all right, but if they are called from different tasks, problems may ensue.

Typically, etharp_output is called from the context of the TCP/IP task, in the netif upper level output function.  etharp_timer is usually called via a sys_timeout function.  It is possible to put these calls into the context of the TCP/IP task by calling the sys_timeout for the first time from the tcpip_init_done function.  But it is pretty difficult to get the etharp_input call into the context of the TCP/IP task.  (If I'm mistaken about this, please correct me.)

If calling all three of these functions from the context of the TCP/IP task isn't going to work, then another option would be to call them all from the context of some user task.  This is pretty straightforward for etharp_timer and etharp_input.  In order to get the etharp_output calls out of the TCP/IP task context, though, the outbound pbuf will have to be passed to the user task in some kind of OS message (from within netif's upper level output function).  This isn't too satisfying, either.

It seems like the best approach would be to simply protect the ARP table with a mutex (sys_sem?).  This could be done within the ARP code without too much difficulty.

Does this sound reasonable?

--
E-mail signature
Jim Gibbons
jim@gibbons.com
Gibbons and Associates, Inc.
TEL: (408) 984-1441
900 Lafayette, Suite 704, Santa Clara, CA
FAX: (408) 247-6395


--------------000302030201080506030700-- From MAILER-DAEMON Fri Nov 05 01:03:27 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPxC3-0003Ko-Dt for mharc-lwip-users@gnu.org; Fri, 05 Nov 2004 01:03:27 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPxC1-0003Kg-Sh for lwip-users@nongnu.org; Fri, 05 Nov 2004 01:03:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPxC1-0003KJ-39 for lwip-users@nongnu.org; Fri, 05 Nov 2004 01:03:25 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPxC1-0003KG-0t for lwip-users@nongnu.org; Fri, 05 Nov 2004 01:03:25 -0500 Received: from [216.136.130.117] (helo=smtp209.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CPx3g-0007UI-VS for lwip-users@nongnu.org; Fri, 05 Nov 2004 00:54:49 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp209.mail.sc5.yahoo.com with SMTP; 5 Nov 2004 05:54:43 -0000 Date: Fri, 5 Nov 2004 13:55:41 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] a question about alignment X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 06:03:26 -0000 hi everyone i have defined a non-alignment struct named ip_addr {.....} and i use the macro IP4_ADDR() in the file ip_addr.h to write the ip address "192.168.0.3" into a pointer variable my_addr. in the netif_add function , there is a macoro ip_add_set() . when the my_addr is put into the macro . the result is (192.168.0.1)0x0100A8C0 not (192.168.0.3)0x0300A8C0 . I do not know why ? my struct is following : PACK_STRUCT_BEGIN struct ip_addr{ PACK_STRUCT_FIELD(u32_t ip_addr);} and i defined the macro PACK_STRUC_BEGIN __packed and the macro PACK_STRUCT_FIEL __packed x; i use the ADS (a METROWERKS CODEWARRIOR ARM DEVELOPMETN SUITE) in the winxp; the __packed is the keyword of ads compiler that can define the non-alignment struct. there is a url of __packed information http://www.arm.com/support/faqdev/1228.html From MAILER-DAEMON Fri Nov 05 03:06:58 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CPz7a-0004Qj-M0 for mharc-lwip-users@gnu.org; Fri, 05 Nov 2004 03:06:58 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CPz7Z-0004Qe-BG for lwip-users@nongnu.org; Fri, 05 Nov 2004 03:06:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CPz7Y-0004QS-VU for lwip-users@nongnu.org; Fri, 05 Nov 2004 03:06:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CPz7Y-0004QP-T8 for lwip-users@nongnu.org; Fri, 05 Nov 2004 03:06:56 -0500 Received: from [216.136.129.97] (helo=smtp207.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CPyzI-00022q-5w for lwip-users@nongnu.org; Fri, 05 Nov 2004 02:58:24 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp207.mail.sc5.yahoo.com with SMTP; 5 Nov 2004 07:58:23 -0000 Date: Fri, 5 Nov 2004 15:59:24 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] about memory managemnet X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 08:06:57 -0000 hi lwip-users i am reading the source codes, i want to know the difference between mem.c and memp.c i think they all are used to manage the memory ? thank you very much From MAILER-DAEMON Fri Nov 05 05:49:28 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CQ1eq-0000Mp-8g for mharc-lwip-users@gnu.org; Fri, 05 Nov 2004 05:49:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CQ1eo-0000KQ-0x for lwip-users@nongnu.org; Fri, 05 Nov 2004 05:49:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CQ1en-0000KD-ET for lwip-users@nongnu.org; Fri, 05 Nov 2004 05:49:25 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQ1en-0000KA-3X for lwip-users@nongnu.org; Fri, 05 Nov 2004 05:49:25 -0500 Received: from [131.111.8.132] (helo=ppsw-2.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CQ1WS-0004DQ-VC for lwip-users@nongnu.org; Fri, 05 Nov 2004 05:40:49 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:50259) by ppsw-2.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.152]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) id 1CQ1WM-0007Hb-7G (Exim 4.43) for lwip-users@nongnu.org (return-path ); Fri, 05 Nov 2004 10:40:42 +0000 Subject: Re: [lwip-users] a question about alignment From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1099651241.9874.4.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 05 Nov 2004 10:40:42 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 10:49:26 -0000 On Fri, 2004-11-05 at 05:55, jack W wrote: > hi everyone > i have defined a non-alignment struct named ip_addr {.....} > and i use the macro IP4_ADDR() in the file ip_addr.h to write the ip address "192.168.0.3" into a pointer variable my_addr. in the netif_add function , there is a macoro ip_add_set() . when the my_addr is put into the macro . the result is (192.168.0.1)0x0100A8C0 not (192.168.0.3)0x0300A8C0 . I do not know why ? > > my struct is following : PACK_STRUCT_BEGIN > struct ip_addr{ > PACK_STRUCT_FIELD(u32_t ip_addr);} > > > and i defined the macro PACK_STRUC_BEGIN __packed > and the macro PACK_STRUCT_FIEL __packed x; Do you get the same error if you don't pack the structure? It's possible that the packing directives have nothing to do with the problem, so if you could try it and see that would help rule them out. Thanks Kieran From MAILER-DAEMON Fri Nov 05 05:52:48 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CQ1i3-0000gz-GC for mharc-lwip-users@gnu.org; Fri, 05 Nov 2004 05:52:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CQ1hq-0000gp-Rx for lwip-users@nongnu.org; Fri, 05 Nov 2004 05:52:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CQ1hm-0000gc-CW for lwip-users@nongnu.org; Fri, 05 Nov 2004 05:52:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQ1hl-0000gZ-NI for lwip-users@nongnu.org; Fri, 05 Nov 2004 05:52:30 -0500 Received: from [131.111.8.133] (helo=ppsw-3.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CQ1ZN-0004ic-Fy for lwip-users@nongnu.org; Fri, 05 Nov 2004 05:43:49 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:50261) by ppsw-3.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.153]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) id 1CQ1ZE-0004nt-BG (Exim 4.43) for lwip-users@nongnu.org (return-path ); Fri, 05 Nov 2004 10:43:40 +0000 Subject: Re: [lwip-users] about memory managemnet From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1099651420.9874.8.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 05 Nov 2004 10:43:40 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Nov 2004 10:52:40 -0000 On Fri, 2004-11-05 at 07:59, jack W wrote: > hi lwip-users > > i am reading the source codes, i want to know the difference between mem.c and memp.c > i think they all are used to manage the memory ? mem.c maintains a memory heap for targets that do not have support for this in the operating system. On other systems, these functions (e.g. mem_malloc()) will just be defined to be the normal OS ones (e.g. malloc()). memp.c maintains a pool of fixed size memory chunks used for common structures such as PCBs and so on. This avoids the need to constantly allocate and free new blocks of memory: the same ones can be used over and over again. Hope that helps, Kieran From MAILER-DAEMON Sun Nov 07 06:50:56 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CQlZQ-0007O9-Iu for mharc-lwip-users@gnu.org; Sun, 07 Nov 2004 06:50:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CQlZO-0007Nw-E8 for lwip-users@nongnu.org; Sun, 07 Nov 2004 06:50:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CQlZN-0007Nk-WA for lwip-users@nongnu.org; Sun, 07 Nov 2004 06:50:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CQlZN-0007Nh-T5 for lwip-users@nongnu.org; Sun, 07 Nov 2004 06:50:53 -0500 Received: from [216.136.129.91] (helo=smtp201.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CQlQu-0006GE-3R for lwip-users@nongnu.org; Sun, 07 Nov 2004 06:42:12 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp201.mail.sc5.yahoo.com with SMTP; 7 Nov 2004 11:42:05 -0000 Date: Sun, 7 Nov 2004 19:43:04 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] a question about mem_init() X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 07 Nov 2004 11:50:54 -0000 hi everyone i am reading the source file of mem.c , and i have a question on following in the function mem_init(), why the function set ram_end , i don't know the means of the ram_end, and it's function ? . i have anthoer question. In order to port the lwip ,we need wirte some function such as bzero() in the file of lib.h and these are my codes : void bzero(void *data, int n){ memset(data,0,n); } who can tell me if this is right? i user ansi C. i have an english grammer question: how to use the word 'following' and the expression is right on the second line? thank you very much ! From MAILER-DAEMON Mon Nov 08 07:26:44 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CR8bb-0004Sh-OZ for mharc-lwip-users@gnu.org; Mon, 08 Nov 2004 07:26:43 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CR8bZ-0004Oi-0o for lwip-users@nongnu.org; Mon, 08 Nov 2004 07:26:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CR8bX-0004MF-6C for lwip-users@nongnu.org; Mon, 08 Nov 2004 07:26:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CR8bX-0004M4-3I for lwip-users@nongnu.org; Mon, 08 Nov 2004 07:26:39 -0500 Received: from [216.136.129.92] (helo=smtp202.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CR8Si-0000a2-Cf for lwip-users@nongnu.org; Mon, 08 Nov 2004 07:17:32 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp202.mail.sc5.yahoo.com with SMTP; 8 Nov 2004 12:17:29 -0000 Date: Mon, 8 Nov 2004 20:18:31 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] a question X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 12:26:42 -0000 hi everyone i have a question about the file ethernetif.c. In the file there is a function low_level_input() and in the function , i must use the pbuf to fill the packet /* We iterate over the pbuf chain until we have read the entire * packet into the pbuf. */ for(q = p; q != NULL; q = q->next) { /* Read enough bytes to fill this pbuf in the chain. The * available data in the pbuf is given by the q->len * variable. */ read data into(q->payload, q->len); } acknowledge that packet has been read(); i don't understand why use p and q . From MAILER-DAEMON Mon Nov 08 07:42:46 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CR8r8-0000hU-KY for mharc-lwip-users@gnu.org; Mon, 08 Nov 2004 07:42:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CR8r7-0000gu-37 for lwip-users@nongnu.org; Mon, 08 Nov 2004 07:42:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CR8r5-0000fr-Kk for lwip-users@nongnu.org; Mon, 08 Nov 2004 07:42:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CR8r5-0000fQ-EC for lwip-users@nongnu.org; Mon, 08 Nov 2004 07:42:43 -0500 Received: from [217.154.131.7] (helo=lon-gs1mx.mistral.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CR8iR-0004sz-3I for lwip-users@nongnu.org; Mon, 08 Nov 2004 07:33:47 -0500 Received: from angela1.data-uncertain.co.uk (adsl-195-184-237-106.mistral-uk.net [195.184.237.106]) by lon-gs1mx.mistral.net (Postfix) with ESMTP id C73F837669 for ; Mon, 8 Nov 2004 12:33:45 +0000 (GMT) From: Craig Graham To: Mailing list for lwIP users Subject: Re: [lwip-users] a question Date: Mon, 8 Nov 2004 12:58:31 +0000 User-Agent: KMail/1.6 References: In-Reply-To: MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: <200411081258.31515.c_graham@mistral.co.uk> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 12:42:45 -0000 That's in case the packet from the ethernet is to big to fit into a single pbuf, in which case you actually have a linked list of pbuf's (a chain). 'q' iterates along the linked list, filling each pbuf with as much data as it can, then moving on to the next pbuf in the chain until it has read the entire packet from the ethernet chip. On Monday 08 November 2004 12:18, jack W wrote: > hi everyone > > i have a question about the file ethernetif.c. In the file there is a > function low_level_input() and in the function , i must use the pbuf to > fill the packet > > > /* We iterate over the pbuf chain until we have read the entire > * packet into the pbuf. */ > for(q = p; q != NULL; q = q->next) { > /* Read enough bytes to fill this pbuf in the chain. The > * available data in the pbuf is given by the q->len > * variable. */ > read data into(q->payload, q->len); > } > acknowledge that packet has been read(); > > > i don't understand why use p and q . > > > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users From MAILER-DAEMON Mon Nov 08 11:19:08 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CRCEW-0003Fb-6u for mharc-lwip-users@gnu.org; Mon, 08 Nov 2004 11:19:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRCET-0003Eg-Ss for lwip-users@nongnu.org; Mon, 08 Nov 2004 11:19:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRCER-0003Da-1x for lwip-users@nongnu.org; Mon, 08 Nov 2004 11:19:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRCEQ-0003Ct-5B for lwip-users@nongnu.org; Mon, 08 Nov 2004 11:19:02 -0500 Received: from [194.105.28.94] (helo=iv.ro) by monty-python.gnu.org with smtp (Exim 4.34) id 1CRC5s-0004St-Ex for lwip-users@nongnu.org; Mon, 08 Nov 2004 11:10:12 -0500 Received: (qmail 23189 invoked from network); 8 Nov 2004 19:05:30 -0000 Received: from unknown (HELO ?192.168.1.4?) (192.168.1.4) by 192.168.1.1 with SMTP; 8 Nov 2004 19:05:30 -0000 Message-ID: <418F9A57.20009@iv.ro> Date: Mon, 08 Nov 2004 18:09:59 +0200 From: Jani Monoses User-Agent: Mozilla Thunderbird 0.8 (X11/20041012) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [lwip-users] netif_is_up ? X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 16:19:07 -0000 Hello There's a recent (I think) change in ip.c CVS which makes the stack accept packets only if the corresponding netif_is_up. However the netif state seems to only be touched by dhcp code. So is netif_set_up() which sets the NETIF_FLAG_UP on the netif's flags an additional step needed in low level eth drivers, or in app code in order to init things? thanks Jani From MAILER-DAEMON Mon Nov 08 11:28:10 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CRCNG-0007d5-JL for mharc-lwip-users@gnu.org; Mon, 08 Nov 2004 11:28:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRCNE-0007cC-Iu for lwip-users@nongnu.org; Mon, 08 Nov 2004 11:28:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRCND-0007bl-QA for lwip-users@nongnu.org; Mon, 08 Nov 2004 11:28:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRCND-0007bb-MV for lwip-users@nongnu.org; Mon, 08 Nov 2004 11:28:07 -0500 Received: from [12.35.250.43] (helo=nbs-ctc1.nbs-ctc-1.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CRCEp-0007G4-Ml for lwip-users@nongnu.org; Mon, 08 Nov 2004 11:19:27 -0500 Received: from [192.168.10.84] ([192.168.10.84]) by nbs-ctc1.nbs-ctc-1.com with Microsoft SMTPSVC(5.0.2195.6713); Mon, 8 Nov 2004 11:23:07 -0500 Message-ID: <418F9C8D.5030602@alum.rpi.edu> Date: Mon, 08 Nov 2004 11:19:25 -0500 From: David Haas User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] netif_is_up ? References: <418F9A57.20009@iv.ro> In-Reply-To: <418F9A57.20009@iv.ro> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 08 Nov 2004 16:23:07.0328 (UTC) FILETIME=[3B03F400:01C4C5AF] X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 16:28:09 -0000 Hi Jani, I'm not sure when this change was made, but you now have to explicitly make a call to bring your interface up. My initialization looks like this: netif_add(&netif, &ipaddr, &netmask, &gw, NULL, mcf5272fecif_init, tcpip_input); netif_set_default(&netif); netif_set_up(&netif); Since I am not using DHCP right now. I have'nt looked at any of the code, but I would suppose PPP also uses netif_set_up() and netif_set_down() when the interface goes up and down. David. Jani Monoses wrote: > Hello > > There's a recent (I think) change in ip.c CVS which makes the stack > accept packets only if the corresponding netif_is_up. However the > netif state seems to only be touched by dhcp code. > So is netif_set_up() which sets the NETIF_FLAG_UP on the netif's flags > an additional step needed in low level eth drivers, or in app code in > order to init things? > > thanks > Jani > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users > From MAILER-DAEMON Mon Nov 08 14:04:49 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CREoq-0004Ri-Uj for mharc-lwip-users@gnu.org; Mon, 08 Nov 2004 14:04:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CREon-0004QL-9F for lwip-users@nongnu.org; Mon, 08 Nov 2004 14:04:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CREoj-0004Ny-5o for lwip-users@nongnu.org; Mon, 08 Nov 2004 14:04:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CREoi-0004Mj-F3 for lwip-users@nongnu.org; Mon, 08 Nov 2004 14:04:40 -0500 Received: from [213.148.231.189] (helo=yukon.acuity.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CREft-00050D-72 for lwip-users@nongnu.org; Mon, 08 Nov 2004 13:55:33 -0500 Received: from smtp1.axon.nl ([195.35.170.200]) by yukon.acuity.nl (Lotus Domino Release 6.5.1IF1) with ESMTP id 2004110819550553-80 ; Mon, 8 Nov 2004 19:55:05 +0100 In-Reply-To: <418F9A57.20009@iv.ro> Subject: Re: [lwip-users] netif_is_up ? To: Mailing list for lwIP users X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 Message-ID: From: christiaan.simons@axon.tv Date: Mon, 8 Nov 2004 17:13:36 +0100 MIME-Version: 1.0 X-MIMETrack: Serialize by Router on Axon_Server2/Axon(Release 6.5|September 26, 2003) at 08-11-2004 19:54:50, Itemize by SMTP Server on yukon/Acuity(Release 6.5.1IF1|March 16, 2004) at 08-11-2004 19:55:05, Serialize by Notes Server on yukon/Acuity(Release 6.5.1IF1|March 16, 2004) at 08-11-2004 19:55:07, Serialize complete at 08-11-2004 19:55:07, Serialize by Router on yukon/Acuity(Release 6.5.1IF1|March 16, 2004) at 08-11-2004 19:55:48, Serialize complete at 08-11-2004 19:55:48 Content-type: text/plain; charset=US-ASCII X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Nov 2004 19:04:46 -0000 lwip-users-bounces+christiaan.simons=axon.tv@nongnu.org wrote on 08-11-2004 17:09:59: > So is netif_set_up() which sets the NETIF_FLAG_UP on the netif's > flags an additional step > needed in low level eth drivers, or in app code in order to init things? The app code (in fact DHCP is more or less app layer). Bye, Christiaan Simons Software Engineer Axon Digital Design +31 (0)13 511 66 66 +31 (0)13 511 41 51 christiaan.simons@axon.tv http://www.axon.tv The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed. Axon Digital Design Group is neither liable for the proper nor for the complete transmission of the information contained in this communication nor for any delay in its receipt. Axon Digital Design Group does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. In that case please return the communication to the sender and delete and destroy all copies. In carrying out its engagements, Axon Digital Design Group applies general terms and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge. From MAILER-DAEMON Wed Nov 10 07:10:47 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CRrJH-0002I4-Af for mharc-lwip-users@gnu.org; Wed, 10 Nov 2004 07:10:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRrJE-0002Hs-U2 for lwip-users@nongnu.org; Wed, 10 Nov 2004 07:10:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRrJE-0002HX-9A for lwip-users@nongnu.org; Wed, 10 Nov 2004 07:10:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRrJE-0002HM-5t for lwip-users@nongnu.org; Wed, 10 Nov 2004 07:10:44 -0500 Received: from [216.136.129.91] (helo=smtp201.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CRrAS-0002CC-Lh for lwip-users@nongnu.org; Wed, 10 Nov 2004 07:01:41 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp201.mail.sc5.yahoo.com with SMTP; 10 Nov 2004 12:01:31 -0000 Date: Wed, 10 Nov 2004 20:02:35 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] a question about porting X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 12:10:45 -0000 lwip-usershello everyone i am porting the lwip into ucos . but i happen a question . i use ping command to ping the board and i watch the incoming data packet , it is running .and data is follwing : from here | 0x80043180 00 00 00 00 00 00 00 00 02 01 00 00 90 31 04 80 .............1.. 0x80043190 40 00 40 00 FF FF FF FF FF FF 00 E0 4C 03 18 72 @.@.........L..r 0x800431a0 08 00 06 04 08 00 06 04 00 01 00 E0 4C 03 18 72 ............L..r 0x800431b0 C0 A8 00 01 00 00 00 00 00 00 C0 A8 00 03 20 20 .............. | end but in the function arp_arp_input() ; it watch the pointer hdr ...hdr ethhdr ....dst ff ff ff ff ff ff ....src 00 e0 4c 03 18 72 hwtype 0x01000 proto 0x0008 _hwlen_protolen 0x0406 shwaddr ..... 00 e0 40 03 18 72 sipaddr ..... 0x0100a8c0 dhwaddr ..... 00 00 00 00 00 00 dipaddr ...... 0x20200300 <---- why happen this error ,my board ip should be 0x0300a8c0 "192.168.0.3 From MAILER-DAEMON Wed Nov 10 14:18:39 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CRxzL-0003AV-NQ for mharc-lwip-users@gnu.org; Wed, 10 Nov 2004 14:18:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CRvLJ-0005xI-Bf for lwip-users@nongnu.org; Wed, 10 Nov 2004 11:29:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CRvLI-0005wy-Lr for lwip-users@nongnu.org; Wed, 10 Nov 2004 11:29:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CRvLI-0005wo-JM for lwip-users@nongnu.org; Wed, 10 Nov 2004 11:29:08 -0500 Received: from [195.29.150.2] (helo=ls401.htnet.hr) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CRvCj-0005X2-9y for lwip-users@nongnu.org; Wed, 10 Nov 2004 11:20:17 -0500 Received: from ls401.htnet.hr (localhost.localdomain [127.0.0.1]) by ls401.htnet.hr (0.0.0/8.12.10) with ESMTP id iAAGKFec009267 for ; Wed, 10 Nov 2004 17:20:15 +0100 Received: from frankoii (83-131-4-179.adsl.net.htnet.hr [83.131.4.179]) by ls401.htnet.hr (0.0.0/8.12.10) with SMTP id iAAGKEw5009258 for ; Wed, 10 Nov 2004 17:20:14 +0100 Message-ID: <000a01c4c741$6f46d050$f900a8c0@frankoii> From: "Franko Skof" To: Date: Wed, 10 Nov 2004 17:22:03 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C4C749.CBC14EC0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Trace: ls401.htnet.hr 1100103615 687 83.131.4.179 (Wed, 10 Nov 2004 17:20:15 +0100) X-Mailman-Approved-At: Wed, 10 Nov 2004 14:18:38 -0500 Subject: [lwip-users] lwIP sio_ functionality X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Nov 2004 16:29:09 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C4C749.CBC14EC0 Content-Type: text/plain; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable Hi everybody! Is there any sio_ (sio_send, sio_recv, sio_read, sio_write, = sio_read_abort) functionality specification (especially if they need to = be blocking or nonblocking)? I am trying to port lwIP to a = microcontroler and to use serial ppp connection. I have no OS, so my = intention is to use raw api.=20 Thanks ------=_NextPart_000_0007_01C4C749.CBC14EC0 Content-Type: text/html; charset="iso-8859-2" Content-Transfer-Encoding: quoted-printable
Hi everybody!
Is there any sio_ (sio_send, sio_recv,=20 sio_read, sio_write, sio_read_abort) functionality specification = (especially if=20 they need to be blocking or nonblocking)? I am trying to port lwIP to a=20 microcontroler and to use serial ppp connection. I have no OS, so my = intention=20 is to use raw api.
Thanks
------=_NextPart_000_0007_01C4C749.CBC14EC0-- From MAILER-DAEMON Thu Nov 11 06:29:10 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CSD8Y-00078Q-Nr for mharc-lwip-users@gnu.org; Thu, 11 Nov 2004 06:29:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSD8W-00075k-O3 for lwip-users@nongnu.org; Thu, 11 Nov 2004 06:29:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSD8W-000750-3Y for lwip-users@nongnu.org; Thu, 11 Nov 2004 06:29:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSD8W-00074s-13 for lwip-users@nongnu.org; Thu, 11 Nov 2004 06:29:08 -0500 Received: from [193.166.120.33] (helo=pat.uwasa.fi) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CSCzd-0007jv-Dp for lwip-users@nongnu.org; Thu, 11 Nov 2004 06:19:57 -0500 Received: from localhost (unknown [127.0.0.1]) by pat.uwasa.fi (MailerDaemon) with ESMTP id B0CC827802 for ; Thu, 11 Nov 2004 13:19:54 +0200 (EET) Received: from majakka.uwasa.fi (majakka.uwasa.fi [193.166.122.16]) by pat.uwasa.fi (MailerDaemon) with ESMTP id 188BD277A2 for ; Thu, 11 Nov 2004 13:19:54 +0200 (EET) Date: Thu, 11 Nov 2004 13:19:54 +0200 (EET) From: Johan Karel Maria Dams To: Mailing list for lwIP users Subject: Re: [lwip-users] a question about porting In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2004 11:29:09 -0000 Hi, I don't know if this is of any help, but in my situation running uC/OS-II on m32c microcontroller and a cs8900 in 8-bit polling mode I had to change some macro's in etharp.c to get it working. I had some similar problems, and this solved the problem. Not sure if it will work for you though, but you can try. #define ARPH_HWLEN(hdr) (((hdr)->_hwlen_protolen) >> 8) #define ARPH_PROTOLEN(hdr) (((hdr)->_hwlen_protolen) & 0xff) #define ARPH_HWLEN_SET(hdr, len) (hdr)->_hwlen_protolen = htons(ARPH_PROTOLEN(hdr) | ((len))) #define ARPH_PROTOLEN_SET(hdr, len) (hdr)->_hwlen_protolen = htons((len) | (ARPH_HWLEN(hdr) << 8)) (This last one stays the same) Best regards, Johan On Wed, 10 Nov 2004, jack W wrote: > lwip-usershello everyone > > > i am porting the lwip into ucos . but i happen a question . i use ping command to ping the board and i watch the incoming data packet , it is running .and data is follwing : > from here > | > 0x80043180 00 00 00 00 00 00 00 00 02 01 00 00 90 31 04 80 .............1.. > 0x80043190 40 00 40 00 FF FF FF FF FF FF 00 E0 4C 03 18 72 @.@.........L..r > 0x800431a0 08 00 06 04 08 00 06 04 00 01 00 E0 4C 03 18 72 ............L..r > 0x800431b0 C0 A8 00 01 00 00 00 00 00 00 C0 A8 00 03 20 20 .............. > | end > > but in the function arp_arp_input() ; it watch the pointer hdr > > ...hdr > ethhdr > ....dst ff ff ff ff ff ff > ....src 00 e0 4c 03 18 72 > hwtype 0x01000 > proto 0x0008 > _hwlen_protolen 0x0406 > shwaddr > ..... 00 e0 40 03 18 72 > sipaddr > ..... 0x0100a8c0 > dhwaddr > ..... 00 00 00 00 00 00 > dipaddr > ...... 0x20200300 <---- why happen this error ,my board ip should be 0x0300a8c0 "192.168.0.3 > > > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users > From MAILER-DAEMON Thu Nov 11 11:08:09 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CSHUX-0003iW-Es for mharc-lwip-users@gnu.org; Thu, 11 Nov 2004 11:08:09 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSHUU-0003i8-WA for lwip-users@nongnu.org; Thu, 11 Nov 2004 11:08:07 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSHUU-0003ho-5L for lwip-users@nongnu.org; Thu, 11 Nov 2004 11:08:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSHUU-0003hf-1V for lwip-users@nongnu.org; Thu, 11 Nov 2004 11:08:06 -0500 Received: from [61.1.128.45] (helo=bgl1mr1-a-fixed.sancharnet.in) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CSHLu-0007Yg-1G for lwip-users@nongnu.org; Thu, 11 Nov 2004 10:59:14 -0500 Received: from conversion-daemon.bgl1mr1-a-fixed.sancharnet.in by bgl1mr1-a-fixed.sancharnet.in (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) id <0I7000201U4TKY@bgl1mr1-a-fixed.sancharnet.in> (original mail from kathir4@sancharnet.in) for lwip-users@nongnu.org; Thu, 11 Nov 2004 21:29:06 +0530 (IST) Received: from india ([61.1.208.33]) by bgl1mr1-a-fixed.sancharnet.in (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPPA id <0I70006A2V2G0D@bgl1mr1-a-fixed.sancharnet.in> for lwip-users@nongnu.org; Thu, 11 Nov 2004 21:29:06 +0530 (IST) Date: Thu, 11 Nov 2004 21:29:25 +0530 From: kathir Subject: Re: [lwip-users] a question about porting Sender: kathir4@sancharnet.in To: Mailing list for lwIP users Message-id: <000601c4c807$6c8c5940$21d0013d@india> Organization: BSNL MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Mailer: Microsoft Outlook Express 6.00.2800.1106 Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: 7BIT X-Priority: 3 X-MSMail-priority: Normal References: X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 11 Nov 2004 16:08:07 -0000 it may be silly question . can i port Lwip to pic microcontrollers using uC/OS-II. pl help me ----- Original Message ----- From: "Johan Karel Maria Dams" To: "Mailing list for lwIP users" Sent: Thursday, November 11, 2004 4:49 PM Subject: Re: [lwip-users] a question about porting > Hi, > > I don't know if this is of any help, but in my situation running uC/OS-II > on m32c microcontroller and a cs8900 in 8-bit polling mode I had to change > some macro's in etharp.c to get it working. > I had some similar problems, and this solved the problem. Not sure if it > will work for you though, but you can try. > > #define ARPH_HWLEN(hdr) (((hdr)->_hwlen_protolen) >> 8) > #define ARPH_PROTOLEN(hdr) (((hdr)->_hwlen_protolen) & 0xff) > #define ARPH_HWLEN_SET(hdr, len) (hdr)->_hwlen_protolen = > htons(ARPH_PROTOLEN(hdr) | ((len))) > #define ARPH_PROTOLEN_SET(hdr, len) (hdr)->_hwlen_protolen = htons((len) | > (ARPH_HWLEN(hdr) << 8)) > > (This last one stays the same) > > > Best regards, > Johan > > > On Wed, 10 Nov 2004, jack W wrote: > > > lwip-usershello everyone > > > > > > i am porting the lwip into ucos . but i happen a question . i use ping command to ping the board and i watch the incoming data packet , it is running .and data is follwing : > > from here > > | > > 0x80043180 00 00 00 00 00 00 00 00 02 01 00 00 90 31 04 80 .............1.. > > 0x80043190 40 00 40 00 FF FF FF FF FF FF 00 E0 4C 03 18 72 @.@.........L..r > > 0x800431a0 08 00 06 04 08 00 06 04 00 01 00 E0 4C 03 18 72 ............L..r > > 0x800431b0 C0 A8 00 01 00 00 00 00 00 00 C0 A8 00 03 20 20 .............. > > | end > > > > but in the function arp_arp_input() ; it watch the pointer hdr > > > > ...hdr > > ethhdr > > ....dst ff ff ff ff ff ff > > ....src 00 e0 4c 03 18 72 > > hwtype 0x01000 > > proto 0x0008 > > _hwlen_protolen 0x0406 > > shwaddr > > ..... 00 e0 40 03 18 72 > > sipaddr > > ..... 0x0100a8c0 > > dhwaddr > > ..... 00 00 00 00 00 00 > > dipaddr > > ...... 0x20200300 <---- why happen this error ,my board ip should be 0x0300a8c0 "192.168.0.3 > > > > > > > > > > _______________________________________________ > > lwip-users mailing list > > lwip-users@nongnu.org > > http://lists.nongnu.org/mailman/listinfo/lwip-users > > > > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users From MAILER-DAEMON Fri Nov 12 01:46:41 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CSVCj-0004TG-Qg for mharc-lwip-users@gnu.org; Fri, 12 Nov 2004 01:46:41 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSVCh-0004Sg-Du for lwip-users@nongnu.org; Fri, 12 Nov 2004 01:46:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSVCf-0004Rn-MQ for lwip-users@nongnu.org; Fri, 12 Nov 2004 01:46:38 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSVCf-0004RL-3D for lwip-users@nongnu.org; Fri, 12 Nov 2004 01:46:37 -0500 Received: from [193.166.120.33] (helo=pat.uwasa.fi) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CSV1n-0006as-S9 for lwip-users@nongnu.org; Fri, 12 Nov 2004 01:35:24 -0500 Received: from localhost (unknown [127.0.0.1]) by pat.uwasa.fi (MailerDaemon) with ESMTP id F3F8327805 for ; Fri, 12 Nov 2004 08:35:22 +0200 (EET) Received: from majakka.uwasa.fi (majakka.uwasa.fi [193.166.122.16]) by pat.uwasa.fi (MailerDaemon) with ESMTP id 83F8F27779 for ; Fri, 12 Nov 2004 08:35:22 +0200 (EET) Date: Fri, 12 Nov 2004 08:35:22 +0200 (EET) From: Johan Karel Maria Dams To: Mailing list for lwIP users Subject: Re: [lwip-users] a question about porting In-Reply-To: <000601c4c807$6c8c5940$21d0013d@india> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 06:46:39 -0000 Hi, I never did it before, but I think it should be possible, in theory. There is a port of uC/OS-II available for the PIC18XX series. (See uC/OS-II website http://www.ucos-ii.com/) I remember however that those PIC series don't have that much of RAM (4K max?), so you'll be very limited there. I think it'll be a tight fit. Maybe you can get LwIP running without RTOS on the PIC? There is also a port for the dsPIC30, and these have a little more RAM on them (8K max?) so maybe you can use this one? Hope it helps a little. Best regards, Johan Dams On Thu, 11 Nov 2004, kathir wrote: > it may be silly question . can i port Lwip to pic microcontrollers > using uC/OS-II. pl help me > ----- Original Message ----- > From: "Johan Karel Maria Dams" > To: "Mailing list for lwIP users" > Sent: Thursday, November 11, 2004 4:49 PM > Subject: Re: [lwip-users] a question about porting > > > > Hi, > > > > I don't know if this is of any help, but in my situation running uC/OS-II > > on m32c microcontroller and a cs8900 in 8-bit polling mode I had to change > > some macro's in etharp.c to get it working. > > I had some similar problems, and this solved the problem. Not sure if it > > will work for you though, but you can try. > > > > #define ARPH_HWLEN(hdr) (((hdr)->_hwlen_protolen) >> 8) > > #define ARPH_PROTOLEN(hdr) (((hdr)->_hwlen_protolen) & 0xff) > > #define ARPH_HWLEN_SET(hdr, len) (hdr)->_hwlen_protolen = > > htons(ARPH_PROTOLEN(hdr) | ((len))) > > #define ARPH_PROTOLEN_SET(hdr, len) (hdr)->_hwlen_protolen = htons((len) | > > (ARPH_HWLEN(hdr) << 8)) > > > > (This last one stays the same) > > > > > > Best regards, > > Johan > > > > > > On Wed, 10 Nov 2004, jack W wrote: > > > > > lwip-usershello everyone > > > > > > > > > i am porting the lwip into ucos . but i happen a question . i use ping > command to ping the board and i watch the incoming data packet , it is > running .and data is follwing : > > > from here > > > | > > > 0x80043180 00 00 00 00 00 00 00 00 02 01 00 00 90 31 04 80 > .............1.. > > > 0x80043190 40 00 40 00 FF FF FF FF FF FF 00 E0 4C 03 18 72 > @.@.........L..r > > > 0x800431a0 08 00 06 04 08 00 06 04 00 01 00 E0 4C 03 18 72 > ............L..r > > > 0x800431b0 C0 A8 00 01 00 00 00 00 00 00 C0 A8 00 03 20 20 > .............. > > > | end > > > > > > but in the function arp_arp_input() ; it watch the pointer hdr > > > > > > ...hdr > > > ethhdr > > > ....dst ff ff ff ff ff ff > > > ....src 00 e0 4c 03 18 72 > > > hwtype 0x01000 > > > proto 0x0008 > > > _hwlen_protolen 0x0406 > > > shwaddr > > > ..... 00 e0 40 03 18 72 > > > sipaddr > > > ..... 0x0100a8c0 > > > dhwaddr > > > ..... 00 00 00 00 00 00 > > > dipaddr > > > ...... 0x20200300 <---- why happen this error ,my board ip > should be 0x0300a8c0 "192.168.0.3 > > > > > > > > > > > > > > > _______________________________________________ > > > lwip-users mailing list > > > lwip-users@nongnu.org > > > http://lists.nongnu.org/mailman/listinfo/lwip-users > > > > > > > > > > > _______________________________________________ > > lwip-users mailing list > > lwip-users@nongnu.org > > http://lists.nongnu.org/mailman/listinfo/lwip-users > > > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users > From MAILER-DAEMON Fri Nov 12 02:57:04 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CSWIp-00055N-Pe for mharc-lwip-users@gnu.org; Fri, 12 Nov 2004 02:57:03 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSWIo-00055D-Id for lwip-users@nongnu.org; Fri, 12 Nov 2004 02:57:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSWIo-000551-3w for lwip-users@nongnu.org; Fri, 12 Nov 2004 02:57:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSWIn-00054y-Vg for lwip-users@nongnu.org; Fri, 12 Nov 2004 02:57:02 -0500 Received: from [193.173.79.22] (helo=smtp.h4b.biz) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CSW9u-00018s-Fa for lwip-users@nongnu.org; Fri, 12 Nov 2004 02:47:50 -0500 Received: from PCBGRND (bti.h4b.biz [193.173.79.18]) by smtp.h4b.biz (8.12.8/8.12.8) with SMTP id iAC7T3bd028296 for ; Fri, 12 Nov 2004 08:29:03 +0100 Message-ID: <001c01c4c88c$bb48bee0$46000d0a@qlite.net> From: "Bonny Gijzen" To: Date: Fri, 12 Nov 2004 08:53:42 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0019_01C4C895.1C8FE090" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: [lwip-users] RTO calculated to 0 msec ??? X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bonny Gijzen , Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 07:57:02 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0019_01C4C895.1C8FE090 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi to all, I have been logging my client (using lwIP) for some time and I noticed a = problem in my log. It seems the RTO value (receive timeout) has been calculated to 0 msec = at some point, which causes the segment to be retransmitted instantly: ack timeout @ 0 msec pcb->sa=3D12 pcb->sv=3D-1 pcb->nrtx=3D0 new timeout=3D0 msec rexmit() The next timeout again occurs at 0 msec, so I get a continous serie of = retransmissions. Can anybody explain what the values ->sa and ->sv mean? And how are they calculated? I have the feeling the ->sv=3D-1 is the one causing the problem (i.e. = causing RTO to be 0) Thanks in advance for your insights Bonny, ------=_NextPart_000_0019_01C4C895.1C8FE090 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi to all,
 
 
I have been logging my client (using = lwIP) for some=20 time and I noticed a problem in my=20 log.
It seems the RTO value (receive = timeout) has been=20 calculated to 0 msec at some point,
which causes the segment to be = retransmitted=20 instantly:
 
ack timeout @ 0=20 msec
pcb->sa=3D12
pcb->sv=3D-1
pcb->nrtx=3D0
new = timeout=3D0=20 msec
rexmit()
 
The next timeout again occurs at 0 = msec, so I get a=20 continous serie of retransmissions.

Can anybody explain what the values ->sa and ->sv = mean?
And how are they calculated?
 
I have the feeling the ->sv=3D-1 is the one causing the problem = (i.e.=20 causing RTO to be 0)
 
 
Thanks in advance for your insights

Bonny,
------=_NextPart_000_0019_01C4C895.1C8FE090-- From MAILER-DAEMON Fri Nov 12 04:42:12 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CSXwZ-0005rd-RK for mharc-lwip-users@gnu.org; Fri, 12 Nov 2004 04:42:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CSXwS-0005qu-CB for lwip-users@nongnu.org; Fri, 12 Nov 2004 04:42:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CSXwQ-0005qa-Te for lwip-users@nongnu.org; Fri, 12 Nov 2004 04:42:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CSXwP-0005qQ-Ja for lwip-users@nongnu.org; Fri, 12 Nov 2004 04:42:02 -0500 Received: from [193.173.79.22] (helo=smtp.h4b.biz) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CSXnn-0000yJ-OD for lwip-users@nongnu.org; Fri, 12 Nov 2004 04:33:10 -0500 Received: from PCBGRND (bti.h4b.biz [193.173.79.18]) by smtp.h4b.biz (8.12.8/8.12.8) with SMTP id iAC9ELbd028310 for ; Fri, 12 Nov 2004 10:14:21 +0100 Message-ID: <001201c4c89b$70bc6f20$46000d0a@qlite.net> From: "Bonny Gijzen" To: Date: Fri, 12 Nov 2004 10:39:00 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_000F_01C4C8A3.D21480C0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: [lwip-users] RTO calculated to 0 msec ??? (follow-up) X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bonny Gijzen , Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Nov 2004 09:42:05 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_000F_01C4C8A3.D21480C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi again, After examining the log some more I also noticed that the RTT = measurement behaves incorrectly. Mostly I get a string like this in my log: tcp_receive: experienced rtt 0 ticks (0 msec). or tcp_receive: experienced rtt 1 ticks (500 msec). or tcp_receive: experienced rtt 2 ticks (1000 msec). But after 1 day of running (or so) I see this: tcp_receive: experienced rtt 65537 ticks (32768500 msec). And it never gets back again to a LOW value. It seems there is an offset of 65536 added to the measured RTT value. I have examined the tcp_in.c code and noticed this: m =3D tcp_ticks - pcb->rttest; So when the segment is sent away the ->rttest value is set to tcp_ticks, and on receiption of the ACK the difference of ->rttest and the current = tcp_ticks value is calculated and stored in m. (=3Dresponse time, = expressed in timerticks (=3D500msec)) There are 2 things which strike me: 1) How is WRAP AROUND handled? 2) All 3 variables are differently defined: int m; u32_t tcp_ticks; u16_t rttest; I think the offset of 65536 is directly related to the above formula and = the definition of the variables themselves. I will add some more debug = code and log again to see exactly what happens. Can somebody have a look at this and perhaps explain a little of it? Thanks Bonny ------=_NextPart_000_000F_01C4C8A3.D21480C0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi again,
 
 
After examining the log some more I = also noticed=20 that the RTT measurement behaves incorrectly.
Mostly I get a string like this in my=20 log:
 
tcp_receive: experienced rtt 0 ticks (0 = msec).
or
tcp_receive: experienced rtt 1 ticks = (500=20 msec).
or
tcp_receive: experienced rtt 2 ticks = (1000=20 msec).
 
 
But after 1 day of running (or so) I = see=20 this:
 
tcp_receive: experienced rtt 65537 = ticks (32768500=20 msec).
 
And it never gets back again to a LOW=20 value.
It seems there is an offset of 65536 = added to the=20 measured RTT value.

I have examined the tcp_in.c code and noticed this:
m =3D tcp_ticks - pcb->rttest;
 
So when the segment is sent away the = ->rttest=20 value is set to tcp_ticks,
and on receiption of the ACK the = difference of=20 ->rttest and the current tcp_ticks value is calculated and stored in = m.=20 (=3Dresponse time, expressed in timerticks (=3D500msec))
 
There are 2 things which strike = me:
 
1) How is WRAP AROUND = handled?
2) All 3 variables are differently=20 defined:
int       = m;
u32_t   = tcp_ticks;
u16_t   rttest;
 
I think the offset of 65536 is directly = related to=20 the above formula and the definition of the variables themselves. I will = add=20 some more debug code and log again to see exactly what=20 happens.

Can somebody have a look at this and perhaps explain a little = of=20 it?
 

Thanks
Bonny
 
------=_NextPart_000_000F_01C4C8A3.D21480C0-- From MAILER-DAEMON Mon Nov 15 11:31:09 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CTjky-0006p7-OO for mharc-lwip-users@gnu.org; Mon, 15 Nov 2004 11:31:08 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTjkw-0006mJ-3b for lwip-users@nongnu.org; Mon, 15 Nov 2004 11:31:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTjku-0006ko-BT for lwip-users@nongnu.org; Mon, 15 Nov 2004 11:31:04 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTjkt-0006jM-N2 for lwip-users@nongnu.org; Mon, 15 Nov 2004 11:31:03 -0500 Received: from [209.248.148.3] (helo=mail.dmp.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CTjbn-0001jv-LM for lwip-users@nongnu.org; Mon, 15 Nov 2004 11:21:39 -0500 Received: from ENGRMGR [192.168.0.50] by mail.dmp.com with ESMTP (SMTPD32-6.06) id A31829018C; Mon, 15 Nov 2004 10:02:32 -0600 From: "Rodney Brown" To: Date: Mon, 15 Nov 2004 10:02:25 -0600 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0035_01C4CAFA.3A849A20" X-Mailer: Microsoft Office Outlook, Build 11.0.6353 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcTLLHd6JZSN5458SU+RvdvIoXp2EA== Message-Id: <200411151002208.SM00186@ENGRMGR> X-RBL-Warning: CMDSPACE: Space found in RCPT TO: command. X-RBL-Warning: SPAMHEADERS: This E-mail has headers consistent with spam [4000021e]. X-Declude-Sender: rebrown@dmp.com [192.168.0.50] X-Note: This E-mail was scanned by Declude JunkMail (www.declude.com) for spam. X-Spam-Tests-Failed: CMDSPACE, SPAMHEADERS [4] X-Note: This E-mail was sent from (Private IP) ([192.168.0.50]). Cc: Rodney Brown Subject: [lwip-users] UDP packets with incorrect MAC addresses. X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 16:31:06 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0035_01C4CAFA.3A849A20 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit We have received reports that, in some cases, our device (using lwip) sends UDP packets to a gateway with incorrect MAC address (all FF). Also, no ARPs are sent by our device. We cannot reproduce the problem here. The network in question has Cisco routers in a dual router configuration. Any ideas? We are currently using an old version of lwip (I believe 0.6.1). Will updating fix this problem? Thanks, Rodney ------=_NextPart_000_0035_01C4CAFA.3A849A20 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

We have received reports that, in some cases, our = device (using lwip) sends UDP packets to a gateway with incorrect MAC address = (all FF). Also, no ARPs are sent by our device. We cannot reproduce the = problem here. The network in question has Cisco routers in a dual router = configuration.

 

Any ideas? We are currently using an old version of = lwip (I believe 0.6.1). Will updating fix this = problem?

 

Thanks,

Rodney

------=_NextPart_000_0035_01C4CAFA.3A849A20-- From MAILER-DAEMON Mon Nov 15 16:30:35 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CToQk-0003ci-U3 for mharc-lwip-users@gnu.org; Mon, 15 Nov 2004 16:30:35 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CToQj-0003cH-4t for lwip-users@nongnu.org; Mon, 15 Nov 2004 16:30:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CToQi-0003bs-1n for lwip-users@nongnu.org; Mon, 15 Nov 2004 16:30:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CToQh-0003bp-V2 for lwip-users@nongnu.org; Mon, 15 Nov 2004 16:30:31 -0500 Received: from [206.46.170.131] (helo=out009.verizon.net) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CToHa-00019h-2q for lwip-users@nongnu.org; Mon, 15 Nov 2004 16:21:06 -0500 Received: from dell8100 ([70.16.37.87]) by out009.verizon.net (InterMail vM.5.01.06.06 201-253-122-130-106-20030910) with ESMTP id <20041115212105.MWMY3542.out009.verizon.net@dell8100> for ; Mon, 15 Nov 2004 15:21:05 -0600 Message-ID: <002101c4cb59$01c7dda0$7101a8c0@dell8100> From: "Bob Ammerman" To: "Mailing list for lwIP users" Date: Mon, 15 Nov 2004 16:18:32 -0500 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-Authentication-Info: Submitted using SMTP AUTH at out009.verizon.net from [70.16.37.87] at Mon, 15 Nov 2004 15:21:04 -0600 Subject: [lwip-users] Compile problem: #define NO_SYS 1, tcp_timer_needed macro issue. X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Nov 2004 21:30:33 -0000 Hi, I am building LWIP from 1.0.0 sources using Visual C 6.0. I have placed #define NO_SYS 1 in my 'cc.h' file. I get the warning: C:\cust\SCI\lwip\lwip\src\api\tcpip.c(72) : warning C4002: too many actual parameters for macro 'tcp_timer_needed' followed by the error: C:\cust\SCI\lwip\lwip\src\api\tcpip.c(73) : error C2059: syntax error : '{' when compiling 'tcpip.c'. Upon investigation I find the following code in tcp.h #if NO_SYS #define tcp_timer_needed() #else void tcp_timer_needed(void); #endif Which defines 'tcp_timer_needed' as a zero argument macro. However, the code in 'tcpip.c' where I encounter the error looks like: void tcp_timer_needed(void) { ....body of function.... } Which, after macro substitution looks like: void { ....body of function.... } Which is obviously broken. For now, I am going to just use '#if !NO_SYS' to conditionalize the definition of 'tcp_timer_needed' in tcpip.c. However, I do not want to have to leave my own tweak in a standard LWIP module. Anybody have a better idea?? Bob Ammerman RAm Systems From MAILER-DAEMON Mon Nov 15 20:29:06 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CTs9a-0004io-CL for mharc-lwip-users@gnu.org; Mon, 15 Nov 2004 20:29:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTs9Y-0004iR-FB for lwip-users@nongnu.org; Mon, 15 Nov 2004 20:29:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTs9X-0004i1-NL for lwip-users@nongnu.org; Mon, 15 Nov 2004 20:29:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTs9X-0004hx-K6 for lwip-users@nongnu.org; Mon, 15 Nov 2004 20:29:03 -0500 Received: from [61.1.128.45] (helo=bgl1mr1-a-fixed.sancharnet.in) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CTs09-0003qM-Gz for lwip-users@nongnu.org; Mon, 15 Nov 2004 20:19:21 -0500 Received: from conversion-daemon.bgl1mr1-a-fixed.sancharnet.in by bgl1mr1-a-fixed.sancharnet.in (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) id <0I7800J01Z0SFN@bgl1mr1-a-fixed.sancharnet.in> (original mail from kathir4@sancharnet.in) for lwip-users@nongnu.org; Tue, 16 Nov 2004 06:49:14 +0530 (IST) Received: from india ([61.1.208.9]) by bgl1mr1-a-fixed.sancharnet.in (iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004)) with ESMTPPA id <0I7800IS6ZO0TF@bgl1mr1-a-fixed.sancharnet.in> for lwip-users@nongnu.org; Tue, 16 Nov 2004 06:49:14 +0530 (IST) Date: Tue, 16 Nov 2004 06:49:24 +0530 From: kathir Subject: RE: [lwip-users] a question about porting In-reply-to: Sender: kathir4@sancharnet.in To: Mailing list for lwIP users Message-id: MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2004 01:29:04 -0000 how to get permission to -----Original Message----- From: lwip-users-bounces+kathir4=sancharnet.in@nongnu.org [mailto:lwip-users-bounces+kathir4=sancharnet.in@nongnu.org]On Behalf Of Johan Karel Maria Dams Sent: Thursday, November 11, 2004 4:50 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] a question about porting Hi, I don't know if this is of any help, but in my situation running uC/OS-II on m32c microcontroller and a cs8900 in 8-bit polling mode I had to change some macro's in etharp.c to get it working. I had some similar problems, and this solved the problem. Not sure if it will work for you though, but you can try. #define ARPH_HWLEN(hdr) (((hdr)->_hwlen_protolen) >> 8) #define ARPH_PROTOLEN(hdr) (((hdr)->_hwlen_protolen) & 0xff) #define ARPH_HWLEN_SET(hdr, len) (hdr)->_hwlen_protolen = htons(ARPH_PROTOLEN(hdr) | ((len))) #define ARPH_PROTOLEN_SET(hdr, len) (hdr)->_hwlen_protolen = htons((len) | (ARPH_HWLEN(hdr) << 8)) (This last one stays the same) Best regards, Johan On Wed, 10 Nov 2004, jack W wrote: > lwip-usershello everyone > > > i am porting the lwip into ucos . but i happen a question . i use ping command to ping the board and i watch the incoming data packet , it is running .and data is follwing : > from here > | > 0x80043180 00 00 00 00 00 00 00 00 02 01 00 00 90 31 04 80 .............1.. > 0x80043190 40 00 40 00 FF FF FF FF FF FF 00 E0 4C 03 18 72 @.@.........L..r > 0x800431a0 08 00 06 04 08 00 06 04 00 01 00 E0 4C 03 18 72 ............L..r > 0x800431b0 C0 A8 00 01 00 00 00 00 00 00 C0 A8 00 03 20 20 .............. > | end > > but in the function arp_arp_input() ; it watch the pointer hdr > > ...hdr > ethhdr > ....dst ff ff ff ff ff ff > ....src 00 e0 4c 03 18 72 > hwtype 0x01000 > proto 0x0008 > _hwlen_protolen 0x0406 > shwaddr > ..... 00 e0 40 03 18 72 > sipaddr > ..... 0x0100a8c0 > dhwaddr > ..... 00 00 00 00 00 00 > dipaddr > ...... 0x20200300 <---- why happen this error ,my board ip should be 0x0300a8c0 "192.168.0.3 > > > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users > _______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users From MAILER-DAEMON Mon Nov 15 22:16:02 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CTtp4-0004Tj-Nu for mharc-lwip-users@gnu.org; Mon, 15 Nov 2004 22:16:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTtp2-0004Ta-Ty for lwip-users@nongnu.org; Mon, 15 Nov 2004 22:16:01 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTtp2-0004TO-Gt for lwip-users@nongnu.org; Mon, 15 Nov 2004 22:16:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTtp2-0004TL-E3 for lwip-users@nongnu.org; Mon, 15 Nov 2004 22:16:00 -0500 Received: from [216.136.130.125] (helo=smtp200.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CTtg0-0003x2-97 for lwip-users@nongnu.org; Mon, 15 Nov 2004 22:06:40 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.232 with login) by smtp200.mail.sc5.yahoo.com with SMTP; 16 Nov 2004 03:06:37 -0000 Date: Tue, 16 Nov 2004 11:07:33 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] a question X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2004 03:16:01 -0000 hi everyone i am reading the lwip codes , and i have a question about the pbuf_header() function in the file of pbuf.c i want to know the fuction's usage. and what did the function do? From MAILER-DAEMON Tue Nov 16 03:39:46 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CTysL-0006aI-PW for mharc-lwip-users@gnu.org; Tue, 16 Nov 2004 03:39:45 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CTysD-0006Yd-AS for lwip-users@nongnu.org; Tue, 16 Nov 2004 03:39:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CTys5-0006Wy-L0 for lwip-users@nongnu.org; Tue, 16 Nov 2004 03:39:30 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CTys5-0006Wf-Ed for lwip-users@nongnu.org; Tue, 16 Nov 2004 03:39:29 -0500 Received: from [195.35.170.200] (helo=smtp1.axon.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CTyin-0006Mn-JZ for lwip-users@nongnu.org; Tue, 16 Nov 2004 03:29:53 -0500 In-Reply-To: <200411151002208.SM00186@ENGRMGR> Subject: Re: [lwip-users] UDP packets with incorrect MAC addresses. To: Mailing list for lwIP users X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 Message-ID: From: christiaan.simons@axon.tv Date: Tue, 16 Nov 2004 09:29:49 +0100 X-MIMETrack: Serialize by Router on Axon_Server2/Axon(Release 6.5.1|January 21, 2004) at 16-11-2004 09:29:53 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Nov 2004 08:39:42 -0000 lwip-users-bounces+christiaan.simons=axon.tv@nongnu.org wrote on 15-11-2004 17:02:25: > We have received reports that, in some cases, our device (using > lwip) sends UDP packets to a gateway with incorrect MAC address (all > FF). All FFs souds like the ehternet broadcast address. Are they really sure the target is a unicast address? (maybe they mistake a subnet broadcast for a unicast?) > Also, no ARPs are sent by our device. We cannot reproduce the > problem here. The network in question has Cisco routers in a dual > router configuration. The ARP won't pass an IP router. Nothing to worry about. Recently I did encounter another ARP problem in an old lwip version we've used. It produced an ARP network flood. > Any ideas? We are currently using an old version of lwip (I believe > 0.6.1). Will updating fix this problem? I can highly recommend an update. Many serious issues were solved since 0.6.1. See also the changelog file. Bye, Christiaan Simons Software Engineer Axon Digital Design +31 (0)13 511 66 66 +31 (0)13 511 41 51 christiaan.simons@axon.tv http://www.axon.tv The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed. Axon Digital Design Group is neither liable for the proper nor for the complete transmission of the information contained in this communication nor for any delay in its receipt. Axon Digital Design Group does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. In that case please return the communication to the sender and delete and destroy all copies. In carrying out its engagements, Axon Digital Design Group applies general terms and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge. From MAILER-DAEMON Thu Nov 18 08:39:02 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CUmV4-0004b4-6p for mharc-lwip-users@gnu.org; Thu, 18 Nov 2004 08:39:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CUmV1-0004ax-2w for lwip-users@nongnu.org; Thu, 18 Nov 2004 08:38:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CUmV0-0004al-AZ for lwip-users@nongnu.org; Thu, 18 Nov 2004 08:38:58 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUmV0-0004ai-30 for lwip-users@nongnu.org; Thu, 18 Nov 2004 08:38:58 -0500 Received: from [216.136.130.127] (helo=smtp204.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CUmLj-0007aL-FB for lwip-users@nongnu.org; Thu, 18 Nov 2004 08:29:23 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.238 with login) by smtp204.mail.sc5.yahoo.com with SMTP; 18 Nov 2004 13:29:20 -0000 Date: Thu, 18 Nov 2004 21:30:23 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] question about (* input)() X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2004 13:38:59 -0000 hi everyone i have some question about the function struct netif *netif_add(struct ip_addr *ipaddr, struct ip_addr *netmask, struct ip_addr *gw, void (* init)(struct netif *netif), err_t (* input)(struct pbuf *p, struct netif *netif)) the last parameter err_t..... is the input function of the netif . i call the function in the following : netif_set_default(netif_add(&ipaddr, &netmask, &gw, ne2k_init, ip_input)); i use the function err_t ip_input(...) in the file ip.c . pinging the board is OK. but i can't use the api function such as netconn_new etc to establish the tcp/ip program . i want to write some codes about tftp in my test files. So i use the fuction err_t tcpip_input(struct pbuf *p, struct netif *inp) as its input interface to replace the function ip_input(), netif_set_default(netif_add(&ipaddr, &netmask, &gw, ne2k_init, tcpip_input)); then i can use the api in the file of apilib.c to establish tcp/ip program.but when i ping the board ,it failed. From MAILER-DAEMON Fri Nov 19 02:09:56 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CV2u4-0002U5-04 for mharc-lwip-users@gnu.org; Fri, 19 Nov 2004 02:09:56 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CV2u2-0002Sc-0B for lwip-users@nongnu.org; Fri, 19 Nov 2004 02:09:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CV2u1-0002Rj-2c for lwip-users@nongnu.org; Fri, 19 Nov 2004 02:09:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CV2u0-0002Qy-Uc for lwip-users@nongnu.org; Fri, 19 Nov 2004 02:09:52 -0500 Received: from [216.136.129.92] (helo=smtp202.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CV2kt-0003Pa-Nd for lwip-users@nongnu.org; Fri, 19 Nov 2004 02:00:27 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.238 with login) by smtp202.mail.sc5.yahoo.com with SMTP; 19 Nov 2004 07:00:26 -0000 Date: Fri, 19 Nov 2004 15:01:30 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] question about netif_add() X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2004 07:09:54 -0000 hi everyone i am reading the souce codes and have some questions . first, the last parameter of function netif_add() . i don't know which function to use for this parameter. i think this parameter is function pointer ,and is the input function of the netif. thank you very much! From MAILER-DAEMON Fri Nov 19 03:05:26 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CV3lm-00049G-GV for mharc-lwip-users@gnu.org; Fri, 19 Nov 2004 03:05:26 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CV3lk-00048r-Ox for lwip-users@nongnu.org; Fri, 19 Nov 2004 03:05:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CV3lj-00048O-Eg for lwip-users@nongnu.org; Fri, 19 Nov 2004 03:05:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CV3lj-00048D-C7 for lwip-users@nongnu.org; Fri, 19 Nov 2004 03:05:23 -0500 Received: from [202.165.102.35] (helo=web15506.mail.cnb.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CV3ch-0004PH-ML for lwip-users@nongnu.org; Fri, 19 Nov 2004 02:56:04 -0500 Message-ID: <20041119075448.1576.qmail@web15506.mail.cnb.yahoo.com> Received: from [211.92.108.205] by web15506.mail.cnb.yahoo.com via HTTP; Fri, 19 Nov 2004 15:54:47 CST Date: Fri, 19 Nov 2004 15:54:47 +0800 (CST) From: zhanglj To: lwip-users@nongnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-63635085-1100850887=:77054" Content-Transfer-Encoding: 8bit Subject: [lwip-users] the netio of lwip X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2004 08:05:25 -0000 --0-63635085-1100850887=:77054 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit i want to test the throughput of the lwip over win32 coule someone tell me some details on how to use the netio? thank you --------------------------------- Do You Yahoo!? 150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌà ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ 1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ --0-63635085-1100850887=:77054 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit
i want to test the throughput of the lwip over win32
 
coule someone tell me some details on how to use the netio?
 
thank you



Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ --0-63635085-1100850887=:77054-- From MAILER-DAEMON Fri Nov 19 04:53:28 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CV5SJ-0006IH-QZ for mharc-lwip-users@gnu.org; Fri, 19 Nov 2004 04:53:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CV5SG-0006Hx-IM for lwip-users@nongnu.org; Fri, 19 Nov 2004 04:53:24 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CV5SF-0006HO-IH for lwip-users@nongnu.org; Fri, 19 Nov 2004 04:53:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CV5SE-0006HH-RU for lwip-users@nongnu.org; Fri, 19 Nov 2004 04:53:23 -0500 Received: from [194.47.250.47] (helo=df.lth.se) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CV5JB-0007Pl-3z for lwip-users@nongnu.org; Fri, 19 Nov 2004 04:44:01 -0500 Received: from www.df.lth.se (frodo.df.lth.se [194.47.250.40]) by df.lth.se (8.13.1/8.13.1) with ESMTP id iAJ9hvTM006212 for ; Fri, 19 Nov 2004 10:43:57 +0100 (CET) Received: from 194.237.142.24 (SquirrelMail authenticated user triad); by www.df.lth.se with HTTP; Fri, 19 Nov 2004 10:43:57 +0100 (CET) Message-ID: <37570.194.237.142.24.1100857437.squirrel@194.237.142.24> Date: Fri, 19 Nov 2004 10:43:57 +0100 (CET) From: "Linus Walleij" To: lwip-users@nongnu.org User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: [lwip-users] Thesis in lwIP in USB CDC and Microsoft RNDIS context X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2004 09:53:25 -0000 I want to inform all interested developers that I have published a thesis on the use of lwIP in conjunction with the USB Communications Device Class (CDC) alternatively with Microsoft RNDIS (Remote Network Driver Interface Specification). The thesis shows how a network-based bootstrap program on a single-threaded lwIP stack can be used for providing firmware upgrades to an embedded system. The use of CDC or RNDIS makes it possible to connect and use the system without the need of any host USB drivers, relying solely on standard operating system features. The thesis report is available here: http://www.df.lth.se/~triad/papers/firmware.pdf Feedback is welcomed. Yours, Linus Walleij From MAILER-DAEMON Fri Nov 19 18:03:51 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CVHnD-000561-Ec for mharc-lwip-users@gnu.org; Fri, 19 Nov 2004 18:03:51 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CVHnB-00054W-DQ for lwip-users@nongnu.org; Fri, 19 Nov 2004 18:03:49 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CVHnA-00054K-Uq for lwip-users@nongnu.org; Fri, 19 Nov 2004 18:03:49 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVHnA-00054H-N7 for lwip-users@nongnu.org; Fri, 19 Nov 2004 18:03:48 -0500 Received: from [209.248.148.3] (helo=mail.dmp.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CVHe6-0004cj-EU for lwip-users@nongnu.org; Fri, 19 Nov 2004 17:54:26 -0500 Received: from ENGRMGR [192.168.0.50] by mail.dmp.com with ESMTP (SMTPD32-6.06) id A99B88E0168; Fri, 19 Nov 2004 16:54:19 -0600 From: "Rodney Brown" To: "'Mailing list for lwIP users'" Date: Fri, 19 Nov 2004 16:54:34 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-Reply-To: <37570.194.237.142.24.1100857437.squirrel@194.237.142.24> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcTOHTRMM29QnmtWQiycel8ZQfi/qgAaWq5A Message-Id: <200411191654910.SM00186@ENGRMGR> X-RBL-Warning: CMDSPACE: Space found in RCPT TO: command. X-RBL-Warning: SPAMHEADERS: This E-mail has headers consistent with spam [4000021e]. X-Declude-Sender: rebrown@dmp.com [192.168.0.50] X-Note: This E-mail was scanned by Declude JunkMail (www.declude.com) for spam. X-Spam-Tests-Failed: CMDSPACE, SPAMHEADERS [4] X-Note: This E-mail was sent from (Private IP) ([192.168.0.50]). Cc: Rodney Brown Subject: [lwip-users] Bug in ip_addr.c concerning Broadcast. X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Nov 2004 23:03:49 -0000 I believe I've found a bug in ipp_addr.c and wanted some confirmation before fixing it. Snippet from ip_addr_isbroadcast(struct ip_addr *addr, struct netif *netif) . . /* host identifier bits are all ones? => network broadcast address */ else if ((addr->addr & ~netif->netmask.addr) == (ip_addr_broadcast.addr & ~netif->netmask.addr)) return 1; addr is the destination. netif is the device's information. If the destination IP is 123.123.123.63, and the local subnet is 255.255.255.192, the routine will return true, no matter what subnet the address is on. Should the code read: ?? else if (((addr->addr & ~netif->netmask.addr) == (ip_addr_broadcast.addr & ~netif->netmask.addr)) && ((addr->addr & netif->netmask.addr) == (netif->ip_addr.addr & netif->netmask.addr))) return 1; This checks to be sure the device and destination are on the same subnet, and that the last address on that subnet is the destination. Thanks, Rodney From MAILER-DAEMON Fri Nov 19 20:15:01 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CVJq9-0003qz-2u for mharc-lwip-users@gnu.org; Fri, 19 Nov 2004 20:15:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CVJq4-0003pR-AC for lwip-users@nongnu.org; Fri, 19 Nov 2004 20:14:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CVJq1-0003o4-6V for lwip-users@nongnu.org; Fri, 19 Nov 2004 20:14:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVJq0-0003nE-Dw for lwip-users@nongnu.org; Fri, 19 Nov 2004 20:14:52 -0500 Received: from [216.136.129.91] (helo=smtp201.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CVJfI-00011n-OW for lwip-users@nongnu.org; Fri, 19 Nov 2004 20:03:52 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp201.mail.sc5.yahoo.com with SMTP; 20 Nov 2004 01:03:22 -0000 Date: Sat, 20 Nov 2004 09:04:25 +0800 From: "jack W" To: "Mailing list for lwIP users" Subject: Re: [lwip-users] Bug in ip_addr.c concerning Broadcast. X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2004 01:14:57 -0000 hi Rodney Brown i think that the ip addr 123.123.123.63 is not invalid ip addr to the netmask 255.255.255.192. >I believe I've found a bug in ipp_addr.c and wanted some confirmation before >fixing it. > >Snippet from ip_addr_isbroadcast(struct ip_addr *addr, struct netif *netif) >. >. > /* host identifier bits are all ones? => network broadcast address */ > else if ((addr->addr & ~netif->netmask.addr) == > (ip_addr_broadcast.addr & ~netif->netmask.addr)) > return 1; > > >addr is the destination. netif is the device's information. If the >destination IP is 123.123.123.63, and the local subnet is 255.255.255.192, >the routine will return true, no matter what subnet the address is on. > >Should the code read: ?? > > else if (((addr->addr & ~netif->netmask.addr) == > (ip_addr_broadcast.addr & ~netif->netmask.addr)) && > ((addr->addr & netif->netmask.addr) == > (netif->ip_addr.addr & netif->netmask.addr))) > > return 1; > >This checks to be sure the device and destination are on the same subnet, >and that the last address on that subnet is the destination. > >Thanks, >Rodney > > > >_______________________________________________ >lwip-users mailing list >lwip-users@nongnu.org >http://lists.nongnu.org/mailman/listinfo/lwip-users = = = = = = = = = = = = = = = = = = = = From MAILER-DAEMON Sat Nov 20 09:05:50 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CVVs6-0000cf-K5 for mharc-lwip-users@gnu.org; Sat, 20 Nov 2004 09:05:50 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CVVs4-0000a3-JC for lwip-users@nongnu.org; Sat, 20 Nov 2004 09:05:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CVVs3-0000ZF-Nd for lwip-users@nongnu.org; Sat, 20 Nov 2004 09:05:47 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVVs3-0000Yy-KB for lwip-users@nongnu.org; Sat, 20 Nov 2004 09:05:47 -0500 Received: from [216.136.129.95] (helo=smtp205.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CVVif-0004UL-Gg for lwip-users@nongnu.org; Sat, 20 Nov 2004 08:56:05 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp205.mail.sc5.yahoo.com with SMTP; 20 Nov 2004 13:56:02 -0000 Date: Sat, 20 Nov 2004 21:57:06 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 Message-Id: Subject: [lwip-users] question about api X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2004 14:05:48 -0000 aGkgZXZlcnlvbmUgDQoNCg0KIGkgdXNlZCB0aGUgbHdpcCdzIGFwaSB0byB3cml0IGEgdGNwZWNo byB0YXNrIGluIHRoZSB1Y29zLUlJLiB0aGUgY29kZXMgaXMgaGVyZToNCg0KICBzeXNfdGhyZWFk X25ldyh0Y3BlY2hvX3RocmVhZCwgTlVMTCk7ICANCg0Kc3RhdGljIHZvaWQgDQp0Y3BlY2hvX3Ro cmVhZCh2b2lkICphcmcpDQp7DQogIGNvbm4gPSBuZXRjb25uX25ldyhORVRDT05OX1RDUCk7DQog ICBzc1BSSU5UKCJDT05ORUNUVElPTiBJUyBFU1RBQkxJU0hFRFxuIik7DQogIC8qIEJpbmQgY29u bmVjdGlvbiB0byB3ZWxsIGtub3duIHBvcnQgbnVtYmVyIDcuICovDQogIG5ldGNvbm5fYmluZChj b25uLCBOVUxMLCA3KTsNCiAgc3NQUklOVCgiQ09OTkVDVFRJT04gSVMgQklOREVEXG4iKTsNCiAg LyogVGVsbCBjb25uZWN0aW9uIHRvIGdvIGludG8gbGlzdGVuaW5nIG1vZGUuICovDQogIG5ldGNv bm5fbGlzdGVuKGNvbm4pOw0KICBzc1BSSU5UKCJMaXN0ZW5pbmcuLi4uLi4uXG4iKTsNCiAgd2hp bGUoMSkgew0KCS8qIEdyYWIgbmV3IGNvbm5lY3Rpb24uICovDQoJbmV3Y29ubiA9IG5ldGNvbm5f YWNjZXB0KGNvbm4pOw0KCXNzUFJJTlQoImFjY2VwdGVkIG5ldyBjb25uZWN0aW9uICVwXG4iKTsN CgkvKiBQcm9jZXNzIHRoZSBuZXcgY29ubmVjdGlvbi4gKi8NCglpZihuZXdjb25uICE9IE5VTEwp IHsNCi4uLi4uLg0KDQppIHNldCB0Y3BpcF9kZWJ1ZyB0byAxOyBhbmQgaSBjYW4gd2F0Y2ggdGhl IGRlYnVnIGluZm8gYnkgdGhlIHVhcnQwO3NzUFJJTlQgaXMgYSBmdW5jdGlvbiB0aGF0IHNlbmQg Y2hhciB0byB0aGUgdWFydDA7DQoNCklOIHRoZSB3aW5kb3dzICBpIHVzZSB0aGUgY29tbWFuZCCh sHRlbG5ldCAxOTIuMTY4LjAuMyA3obEgaW4gdGhlIHJ1biBkaWFsb2cuDQoNCmJ1dCBpbiBkZWJ1 ZyBkYXRhIHRoYXQgdWFydDAgc2VudCAgIGkgZm91bmQgIHRoYXQgDQoiDQorLSstKy0rLSstKy0r LSstKy0rLSstKy0rLSstIHRjcF9pbnB1dDogZmxhZ3MgU1lOIC0rLSstKy0rLSstKy0rLSstKy0r LSstKy0rLSsNCnRjcF9pbnB1dDogbm8gUENCIG1hdGNoIGZvdW5kLCByZXNldHRpbmcuDQouLi4u LiINCg0KaSBkb24ndCBrbm93ICB3aHkgdGhlIHBjYiBpcyBuJ3QgZm91bmRlZD8gaSBkb3VidCB3 aGVyZSB0aGUgcGNiIGlzIGVzdGFibGlzaGVkID8NCg0K From MAILER-DAEMON Sat Nov 20 15:07:38 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CVbWE-0005Bs-F6 for mharc-lwip-users@gnu.org; Sat, 20 Nov 2004 15:07:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CVbWD-0005BY-0H for lwip-users@nongnu.org; Sat, 20 Nov 2004 15:07:37 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CVbWB-0005B7-OX for lwip-users@nongnu.org; Sat, 20 Nov 2004 15:07:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CVbWB-0005Ax-K7 for lwip-users@nongnu.org; Sat, 20 Nov 2004 15:07:35 -0500 Received: from [131.111.8.136] (helo=ppsw-6.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CVbMq-0005sv-V1 for lwip-users@nongnu.org; Sat, 20 Nov 2004 14:57:57 -0500 Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:54820) by ppsw-6.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.136]:25) with esmtp id 1CVbMn-0002Rr-Jf (Exim 4.43) for lwip-users@nongnu.org (return-path ); Sat, 20 Nov 2004 19:57:53 +0000 Received: from prayer by hermes-1.csi.cam.ac.uk with local (Exim 4.34) id 1CVbMn-000654-25 for lwip-users@nongnu.org; Sat, 20 Nov 2004 19:57:53 +0000 From: Kieran Mansley To: Mailing list for lwIP users Subject: Re: [lwip-users] question about (* input)() Date: 20 Nov 2004 19:57:53 +0000 X-Mailer: Prayer v1.0.11 X-Originating-IP: [80.195.22.170] In-Reply-To: Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Nov 2004 20:07:37 -0000 On Nov 18 2004, jack W wrote: So i use the=20 > fuction err_t tcpip_input(struct pbuf *p, struct netif *inp) as its input= =20 > interface to replace the function ip_input(), > netif_set_default(netif_add(&ipaddr, &netmask, &gw, ne2k_init, > =09=09=09 tcpip_input)); > then i can use the api in the file of apilib.c to establish tcp/ip=20 > program.but when i ping the board ,it failed. That is very odd as tcpip_input() should in turn call ip_input(), after=20 making sure the stack is protected to prevent multiple threads accessing at= =20 once. Are you able to enable any tracing to throw some light on why the=20 ping fails? Does icmp_input() get called for example? Thanks Kieran From MAILER-DAEMON Mon Nov 22 02:07:15 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CW8I6-000744-Rz for mharc-lwip-users@gnu.org; Mon, 22 Nov 2004 02:07:14 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CW8I4-00073r-GO for lwip-users@nongnu.org; Mon, 22 Nov 2004 02:07:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CW8I3-00073S-N0 for lwip-users@nongnu.org; Mon, 22 Nov 2004 02:07:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CW8I3-00073O-ET for lwip-users@nongnu.org; Mon, 22 Nov 2004 02:07:11 -0500 Received: from [202.165.102.30] (helo=web15501.mail.cnb.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CW88W-0003HS-KW for lwip-users@nongnu.org; Mon, 22 Nov 2004 01:57:21 -0500 Message-ID: <20041122065712.21634.qmail@web15501.mail.cnb.yahoo.com> Received: from [211.92.108.205] by web15501.mail.cnb.yahoo.com via HTTP; Mon, 22 Nov 2004 14:57:12 CST Date: Mon, 22 Nov 2004 14:57:12 +0800 (CST) From: zhanglj To: lwip-users@nongnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2146761909-1101106632=:18528" Content-Transfer-Encoding: 8bit Subject: [lwip-users] a question about:how to use the netio of lwip over win32 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 07:07:12 -0000 --0-2146761909-1101106632=:18528 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit i want to test the throughput of the lwip over win32 coule someone tell me some details on how to use the netio? thank you --------------------------------- Do You Yahoo!? 150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌà ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ 1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ --0-2146761909-1101106632=:18528 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit
i  want to test the throughput of the lwip over win32
 
coule someone tell me some details on how to use the netio?
 
thank you




Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ --0-2146761909-1101106632=:18528-- From MAILER-DAEMON Mon Nov 22 02:56:43 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CW93z-0004in-N7 for mharc-lwip-users@gnu.org; Mon, 22 Nov 2004 02:56:43 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CW93y-0004hs-M1 for lwip-users@nongnu.org; Mon, 22 Nov 2004 02:56:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CW93y-0004hg-4v for lwip-users@nongnu.org; Mon, 22 Nov 2004 02:56:42 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CW93y-0004hd-16 for lwip-users@nongnu.org; Mon, 22 Nov 2004 02:56:42 -0500 Received: from [193.173.79.22] (helo=smtp.h4b.biz) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CW8uR-00041o-LJ for lwip-users@nongnu.org; Mon, 22 Nov 2004 02:46:52 -0500 Received: from PCBGRND (bti.h4b.biz [193.173.79.18]) by smtp.h4b.biz (8.12.8/8.12.8) with SMTP id iAM7Tibd012134 for ; Mon, 22 Nov 2004 08:29:45 +0100 Message-ID: <009201c4d068$47f6f680$46000d0a@qlite.net> From: "Bonny Gijzen" To: Date: Mon, 22 Nov 2004 08:52:56 +0100 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_008F_01C4D070.A940FE60" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 Subject: [lwip-users] I think I found a bug/problem in lwIP stack 1.0.0 (regarding retransmissions) X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Bonny Gijzen , Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 07:56:42 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_008F_01C4D070.A940FE60 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi guys, After extensive debugging of my problems I think I found a problem with = lwIP stack. Let me try to explain it: When a segment is sent, it is added to the unacked list. When the segment needs to be retransmitted, it is removed from the = unacked list and put on the unsent list (so that it can be outputted again). After it has been re-sent it is put back on the unacked list. In my case, after some time, there are multiple segments on the unacked = list. If the 1st segment on the unacked list needs to retransmitted, then = (after retransmission) it ends up at the END of unacked list. (you could say that the unacked list gets shuffled...) Now, I am not sure if this is normal, or that this shouldn't cause a = problem, but in my case it *is* causing a problem. It seems that when an ACK response arrives it is compared against the = unacked list to see if a matching segment is found. The "while" code should process all segments, but it starts with the 1st = one, and if the 1st segment on the unacked list doesn't match then the = while is exitted. So in my case (because the unacked list was shuffled) the 1st segment = didn't match and the code continued without handling the received ACK. My knowlegde of the lwIP stack is not good enough to know if this = behaviour is a bug or intended. I hope one of the more experienced = people can have a look at it and comment on it please. I have thought of 2 solutions. They use a different approach and I am = not sure which one is correct or preferred: 1) When a segment is up for retransmission, then put it onto the unsent = list, but *LEAVE* it on the unacked list aswell. Then when the segment = is re-sent, the code must check if this segment is already on the = unacked list. If not then add it, if it is then dont add it (because it = is already there). The big advantage of this approach is that it preserves the original = order in which the segments were put on the unacked list. (I have implemented this approach using tcp_seg_copy() and = tcp_seg_free() and it is running a test at the moment) 2) The 2nd approach involves not touching the unacked list (so the list = gets shuffled). But when an ACK arrives the *whole* list is checked for a match, and not = exitting when the 1st segment doesn't match. My overall knowlegde of this stack isn't good enough to know which = approach is better. I truly hope some of you can spare the time to have a look and think = about this. Also, I am curious as to why other people using this stack (version = 1.0.0) aren't facing these problems. I think if the higher level API is used this problem might be avoided = depending on how it is used, but I am using the raw api. Many regards, Bonny PS. The first tests I did with lwIP required a lot of tweaking because = of 32bit alignment issues. It was just recently I found out about the padding trick in the ethernet = header to avoid the 32bit alignment issues using #define ETH_PAD_SIZE Now I am using this trick and I am running the stack without = modifications. (I have only changed the checksum to use bytes instead of 16bits) ------=_NextPart_000_008F_01C4D070.A940FE60 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi guys,
 
 
After extensive debugging of my = problems I think I=20 found a problem with lwIP stack.
Let me try to explain it:
 
 
When a segment is sent, it is added to = the unacked=20 list.
When the segment needs to be = retransmitted, it is=20 removed from the unacked list
and put on the unsent list (so that it = can be=20 outputted again).
After it has been re-sent it is put = back on the=20 unacked list.
 
In my case, after some time, there are = multiple=20 segments on the unacked list.
If the 1st segment on the unacked list = needs to=20 retransmitted, then (after retransmission) it
ends up at the END of unacked = list.
(you could say that the unacked list = gets=20 shuffled...)
 
Now, I am not sure if this is normal, = or that this=20 shouldn't cause a problem,
but in my case it *is* causing a=20 problem.

It seems that when an ACK response = arrives it=20 is compared against the unacked list
to see if a matching segment is = found.
The "while" code should process all = segments, but=20 it starts with the 1st one, and if the 1st segment on the unacked list = doesn't=20 match then the while is exitted.

So in my case (because the unacked = list was=20 shuffled) the 1st segment didn't match and the code continued without = handling=20 the received ACK.
 
My knowlegde of the lwIP stack is not = good enough=20 to know if this behaviour is a bug or intended. I hope one of the more=20 experienced people can have a look at it and comment on it = please.
 
I have thought of 2 solutions. They use = a different=20 approach and I am not sure which one is correct or = preferred:
 
1) When a segment is up for = retransmission, then=20 put it onto the unsent list, but *LEAVE* it on the unacked list aswell. = Then=20 when the segment is re-sent, the code must check if this segment is = already on=20 the unacked list. If not then add it, if it is then dont add it (because = it is=20 already there).
The big advantage of this approach is that it = preserves the=20 original order in which the segments were put on the unacked = list.
(I have implemented this approach using = tcp_seg_copy() and tcp_seg_free() and = it is running a test at the = moment)
 
2) The 2nd approach involves not = touching the=20 unacked list (so the list gets shuffled).
But when an ACK arrives the *whole* = list is checked=20 for a match, and not exitting when the 1st segment doesn't = match.
 
My overall knowlegde of this stack = isn't good=20 enough to know which approach is better.
I truly hope some of you can = spare=20 the time to have a look and think about this.
 
Also, I am curious as to why other = people using=20 this stack (version 1.0.0) aren't facing these problems.
I think if the higher level API is used = this=20 problem might be avoided depending on how it is used, but I am using the = raw=20 api.
 
 
Many regards,
Bonny
 
PS. The first tests I did with lwIP = required a lot=20 of tweaking because of 32bit alignment issues.
It was just recently I found out about = the padding=20 trick in the ethernet header to avoid the 32bit alignment issues using = #define=20 ETH_PAD_SIZE
Now I am using this trick and I am = running the=20 stack without modifications.
(I have only changed the checksum to = use bytes=20 instead of 16bits)
------=_NextPart_000_008F_01C4D070.A940FE60-- From MAILER-DAEMON Mon Nov 22 08:12:39 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWDzi-0007iP-Rq for mharc-lwip-users@gnu.org; Mon, 22 Nov 2004 08:12:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWDzg-0007he-Dv for lwip-users@nongnu.org; Mon, 22 Nov 2004 08:12:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWDze-0007h5-97 for lwip-users@nongnu.org; Mon, 22 Nov 2004 08:12:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWDvs-0006eU-62 for lwip-users@nongnu.org; Mon, 22 Nov 2004 08:08:40 -0500 Received: from [216.136.130.116] (helo=smtp208.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CWDm4-0007jv-3z for lwip-users@nongnu.org; Mon, 22 Nov 2004 07:58:32 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp208.mail.sc5.yahoo.com with SMTP; 22 Nov 2004 12:58:27 -0000 Date: Mon, 22 Nov 2004 20:59:29 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] question about memp X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 13:12:37 -0000 hi everyone i am testing my porting lwip onto ucos , i write a routine about upd server using lwip api. when the routine runs , i open the debug info ,at the beginning several times it is ok ,it can receive and send packed ,but afterward there are some message about memp "memp_malloc: out of memory in pool" i debuged it and found that the memp_tab[MEMP_UDP_PCB] is NULL, but in the memp_init() i can find that the memp_tab[MEMP_UDP_PCB] is not NULL thank you very much From MAILER-DAEMON Mon Nov 22 08:33:01 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWEJR-0007dM-0d for mharc-lwip-users@gnu.org; Mon, 22 Nov 2004 08:33:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CUPaL-0000kN-Fs for lwip-users@nongnu.org; Wed, 17 Nov 2004 08:10:57 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CUPaK-0000kA-Dl for lwip-users@nongnu.org; Wed, 17 Nov 2004 08:10:57 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CUPaK-0000k5-9G for lwip-users@nongnu.org; Wed, 17 Nov 2004 08:10:56 -0500 Received: from [202.165.102.36] (helo=web15507.mail.cnb.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CUPRN-00040J-Dy for lwip-users@nongnu.org; Wed, 17 Nov 2004 08:01:42 -0500 Message-ID: <20041117130133.17821.qmail@web15507.mail.cnb.yahoo.com> Received: from [211.97.235.34] by web15507.mail.cnb.yahoo.com via HTTP; Wed, 17 Nov 2004 21:01:33 CST Date: Wed, 17 Nov 2004 21:01:33 +0800 (CST) From: ljsd zhang To: lwip-users@nongnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-808948648-1100696493=:7633" Content-Transfer-Encoding: 8bit X-Mailman-Approved-At: Mon, 22 Nov 2004 08:32:58 -0500 Subject: [lwip-users] how to use http of lwip over win32 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 Nov 2004 13:10:57 -0000 --0-808948648-1100696493=:7633 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit i can ping lwip successfully over win32 but i donot know how to use http and ftp on it? could anybody help me? i can not access http://www.psky.com/lwip/lwip_32_a.htm, can you give me a new message or send it to me thank you very much. --------------------------------- Do You Yahoo!? 150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌà ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ 1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ --0-808948648-1100696493=:7633 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit
i can ping lwip successfully over win32
 
but i donot know how to use http and ftp on it?
 
could anybody help me?
 
 
can you give me a new message or send it to me
 
thank you very much.



Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ --0-808948648-1100696493=:7633-- From MAILER-DAEMON Mon Nov 22 09:27:56 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWFAZ-0008Jx-OF for mharc-lwip-users@gnu.org; Mon, 22 Nov 2004 09:27:55 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWFAX-0008Jf-Nm for lwip-users@nongnu.org; Mon, 22 Nov 2004 09:27:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWFAX-0008JK-20 for lwip-users@nongnu.org; Mon, 22 Nov 2004 09:27:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWFAW-0008JA-VE for lwip-users@nongnu.org; Mon, 22 Nov 2004 09:27:52 -0500 Received: from [209.248.148.3] (helo=mail.dmp.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWF1L-0002b1-2z for lwip-users@nongnu.org; Mon, 22 Nov 2004 09:18:23 -0500 Received: from ENGRMGR [192.168.0.50] by mail.dmp.com with ESMTP (SMTPD32-6.06) id A5289680190; Mon, 22 Nov 2004 08:18:16 -0600 From: "Rodney Brown" To: "'Mailing list for lwIP users'" Subject: RE: [lwip-users] Bug in ip_addr.c concerning Broadcast. Date: Mon, 22 Nov 2004 08:18:09 -0600 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Office Outlook, Build 11.0.6353 In-reply-to: X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 Thread-Index: AcTOnY303Qnyn8BUSHahxP2oDEZnuACAET4A Message-Id: <200411220818403.SM00186@ENGRMGR> X-RBL-Warning: CMDSPACE: Space found in RCPT TO: command. X-RBL-Warning: SPAMHEADERS: This E-mail has headers consistent with spam [4000021e]. X-Declude-Sender: rebrown@dmp.com [192.168.0.50] X-Note: This E-mail was scanned by Declude JunkMail (www.declude.com) for spam. X-Spam-Tests-Failed: CMDSPACE, SPAMHEADERS [4] X-Note: This E-mail was sent from (Private IP) ([192.168.0.50]). Cc: Rodney Brown X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 14:27:54 -0000 Sorry - I wasn't clear. The 123.123.123.63 address is not on the subnet and must be handled by a router. The device address is something like 111.111.111.27 or whatever. The first 3 bytes don't match. Help from anyone else? -----Original Message----- From: lwip-users-bounces+rebrown=dmp.com@nongnu.org [mailto:lwip-users-bounces+rebrown=dmp.com@nongnu.org] On Behalf Of jack W Sent: Friday, November 19, 2004 7:04 PM To: Mailing list for lwIP users Subject: Re: [lwip-users] Bug in ip_addr.c concerning Broadcast. hi Rodney Brown i think that the ip addr 123.123.123.63 is not invalid ip addr to the netmask 255.255.255.192. >I believe I've found a bug in ipp_addr.c and wanted some confirmation before >fixing it. > >Snippet from ip_addr_isbroadcast(struct ip_addr *addr, struct netif *netif) >. >. > /* host identifier bits are all ones? => network broadcast address */ > else if ((addr->addr & ~netif->netmask.addr) == > (ip_addr_broadcast.addr & ~netif->netmask.addr)) > return 1; > > >addr is the destination. netif is the device's information. If the >destination IP is 123.123.123.63, and the local subnet is 255.255.255.192, >the routine will return true, no matter what subnet the address is on. > >Should the code read: ?? > > else if (((addr->addr & ~netif->netmask.addr) == > (ip_addr_broadcast.addr & ~netif->netmask.addr)) && > ((addr->addr & netif->netmask.addr) == > (netif->ip_addr.addr & netif->netmask.addr))) > > return 1; > >This checks to be sure the device and destination are on the same subnet, >and that the last address on that subnet is the destination. > >Thanks, >Rodney > > > >_______________________________________________ >lwip-users mailing list >lwip-users@nongnu.org >http://lists.nongnu.org/mailman/listinfo/lwip-users = = = = = = = = = = = = = = = = = = = = _______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users From MAILER-DAEMON Mon Nov 22 11:05:50 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWGhJ-0006e7-Lf for mharc-lwip-users@gnu.org; Mon, 22 Nov 2004 11:05:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWGhG-0006dN-RF for lwip-users@nongnu.org; Mon, 22 Nov 2004 11:05:47 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWGhF-0006cj-M3 for lwip-users@nongnu.org; Mon, 22 Nov 2004 11:05:45 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWGhF-0006cb-Gl for lwip-users@nongnu.org; Mon, 22 Nov 2004 11:05:45 -0500 Received: from [131.111.8.135] (helo=ppsw-5.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWGYA-0001Ni-1j for lwip-users@nongnu.org; Mon, 22 Nov 2004 10:56:22 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:37280) by ppsw-5.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.155]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) id 1CWGY4-00078c-Hy (Exim 4.43) for lwip-users@nongnu.org (return-path ); Mon, 22 Nov 2004 15:56:16 +0000 Subject: Re: [lwip-users] I think I found a bug/problem in lwIP stack 1.0.0 (regarding retransmissions) From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: <009201c4d068$47f6f680$46000d0a@qlite.net> References: <009201c4d068$47f6f680$46000d0a@qlite.net> Content-Type: text/plain Organization: Message-Id: <1101138976.3031.36.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 22 Nov 2004 15:56:16 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Nov 2004 16:05:47 -0000 On Mon, 2004-11-22 at 07:52, Bonny Gijzen wrote: > I have thought of 2 solutions. They use a different approach and I am > not sure which one is correct or preferred: > > 1) When a segment is up for retransmission, then put it onto the > unsent list, but *LEAVE* it on the unacked list aswell. Then when the > segment is re-sent, the code must check if this segment is already on > the unacked list. If not then add it, if it is then dont add it > (because it is already there). > The big advantage of this approach is that it preserves the original > order in which the segments were put on the unacked list. > (I have implemented this approach using tcp_seg_copy() and > tcp_seg_free() and it is running a test at the moment) > > 2) The 2nd approach involves not touching the unacked list (so the > list gets shuffled). > But when an ACK arrives the *whole* list is checked for a match, and > not exitting when the 1st segment doesn't match. > > My overall knowlegde of this stack isn't good enough to know which > approach is better. Well spotted. I've had a look at the latest code and I think this is the result of an oversight from when the retransmission code was changed to sometimes only retransmit a single packet rather than all packets on the unacked queue. I would have a preference for a method which for most packets does not involving searching the lists. Of these, (1) sounds better than (2) in this respect. As you have a working fix, could you prepare a patch (that will preferably apply cleanly to the current CVS code)? If so, I'll take a look and try and submit it. Thanks Kieran From MAILER-DAEMON Mon Nov 22 20:09:25 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWPBN-0004fw-F7 for mharc-lwip-users@gnu.org; Mon, 22 Nov 2004 20:09:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWPBJ-0004fo-9C for lwip-users@nongnu.org; Mon, 22 Nov 2004 20:09:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWPBI-0004fc-Gw for lwip-users@nongnu.org; Mon, 22 Nov 2004 20:09:20 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWPBI-0004fZ-07 for lwip-users@nongnu.org; Mon, 22 Nov 2004 20:09:20 -0500 Received: from [216.136.130.125] (helo=smtp200.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CWP1p-0008DE-98 for lwip-users@nongnu.org; Mon, 22 Nov 2004 19:59:33 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.228 with login) by smtp200.mail.sc5.yahoo.com with SMTP; 23 Nov 2004 00:59:30 -0000 Date: Tue, 23 Nov 2004 09:00:32 +0800 From: "jack W" To: "Mailing list for lwIP users" Subject: Re: [lwip-users] how to use http of lwip over win32 X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====003_Dragon758020482242_=====" Message-Id: X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 01:09:21 -0000 This is a multi-part message in MIME format. --=====003_Dragon758020482242_===== Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 aGkgbGpzZCB6aGFuZyANCg0KoaGhoXlvdSBtdXN0IHdyaXRlIHNvbWUgY29kZXMgYWJvdXQgaHR0 cCBvciBmdHAgLnVzaW5nIHJhdyBhcGkgb3IgbHdpcCBhcGkod2hlbiB5b3UgcnVuIGx3aXAgb24g YSBPUyBzdWNoIGFzIHVjL29zIGV0YykuDQoNCj09PT09PT09IDIwMDQtMTEtMTcgMjE6MDE6MzMg xPrU2sC00MXW0NC0tcCjuiA9PT09PT09PQ0KDQppIGNhbiBwaW5nIGx3aXAgc3VjY2Vzc2Z1bGx5 IG92ZXIgd2luMzINCg0KYnV0IGkgZG9ub3Qga25vdyBob3cgdG8gdXNlIGh0dHAgYW5kIGZ0cCBv biBpdD8NCg0KY291bGQgYW55Ym9keSBoZWxwIG1lPw0KDQppIGNhbiBub3QgYWNjZXNzIGh0dHA6 Ly93d3cucHNreS5jb20vbHdpcC9sd2lwXzMyX2EuaHRtLA0KDQpjYW4geW91IGdpdmUgbWUgYSBu ZXcgbWVzc2FnZSBvciBzZW5kIGl0IHRvIG1lIA0KDQp0aGFuayB5b3UgdmVyeSBtdWNoLg0KDQoN Cg0KDQoNCkRvIFlvdSBZYWhvbyE/DQoxNTDN8sf6TVAzt+i/8cvRo6y0+MT6tLPI69L0wNa17szD DQrDwMWuw/fQx9Om09C+odPQo6zL0bHpw8DNvKGi0d7NvLrNv+HNvA0KMUe+zcrHMTAwMNXXo6zR xbuitefTytfU1vrAqcjdo6EgDQoNCj0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9 ID0gPSA9ID0gDQqhoaGhoaGhoaGhoaGhoaGh1sINCsDxo6ENCg0KoaGhoaGhoaGhoaGhoaGhoaGh oaGhoaGhoaGhoWphY2sgVw0KoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoXNkdXN0aGQyMDAw QHlhaG9vLmNvbS5jbg0KoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhMjAwNC0xMS0yMw0K --=====003_Dragon758020482242_===== Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu dD0idGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMiI+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNi4w MC4yODAwLjE0MDAiIG5hbWU9R0VORVJBVE9SPjwvSEVBRD4NCjxCT0RZIGJnQ29sb3I9I2VhZWFl YT48Rk9OVCBzaXplPTI+PEZPTlQgZmFjZT3LzszlPmhpIGxqc2Qgemhhbmc8L0ZPTlQ+IDwvRk9O VD4NCjxESVY+Jm5ic3A7PC9ESVY+DQo8RElWPjxGT05UIGZhY2U9y87M5SBzaXplPTI+oaGhoXlv dSBtdXN0IHdyaXRlIHNvbWUgY29kZXMgYWJvdXQgaHR0cCBvciBmdHAgLnVzaW5nIA0KcmF3IGFw aSBvciBsd2lwIGFwaSh3aGVuIHlvdSBydW4gbHdpcCBvbiBhIE9TIHN1Y2ggYXMgdWMvb3MgZXRj KS48L0ZPTlQ+PC9ESVY+DQo8RElWPiZuYnNwOzwvRElWPg0KPERJVj48Rk9OVCBmYWNlPcvOzOUg c2l6ZT0yPj09PT09PT09IDIwMDQtMTEtMTcmbmJzcDsyMTowMTozMyZuYnNwO8T61NrAtNDF1tDQ tLXAo7ogDQo9PT09PT09PTwvRk9OVD48L0RJVj4NCjxESVY+Jm5ic3A7PC9ESVY+DQo8RElWPjxG T05UIHNpemU9Mj4NCjxUQUJMRSB3aWR0aD0iMTAwJSI+DQogIDxUQk9EWT4NCiAgPFRSPg0KICAg IDxURCB3aWR0aD0iMTAwJSI+DQogICAgICA8QkxPQ0tRVU9URSANCiAgICAgIHN0eWxlPSJQQURE SU5HLVJJR0hUOiAwcHg7IFBBRERJTkctTEVGVDogNXB4OyBNQVJHSU4tTEVGVDogNXB4OyBCT1JE RVItTEVGVDogIzAwMDAwMCAycHggc29saWQ7IE1BUkdJTi1SSUdIVDogMHB4Ij4NCiAgICAgICAg PERJVj5pIGNhbiBwaW5nIGx3aXAgc3VjY2Vzc2Z1bGx5IG92ZXIgd2luMzI8L0RJVj4NCiAgICAg ICAgPERJVj4mbmJzcDs8L0RJVj4NCiAgICAgICAgPERJVj5idXQgaSBkb25vdCBrbm93IGhvdyB0 byB1c2UgaHR0cCBhbmQgZnRwIG9uIGl0PzwvRElWPg0KICAgICAgICA8RElWPiZuYnNwOzwvRElW Pg0KICAgICAgICA8RElWPmNvdWxkIGFueWJvZHkgaGVscCBtZT88L0RJVj4NCiAgICAgICAgPERJ Vj4mbmJzcDs8L0RJVj4NCiAgICAgICAgPERJVj5pIGNhbiBub3QgYWNjZXNzIDxBIA0KICAgICAg ICBocmVmPSJodHRwOi8vd3d3LnBza3kuY29tL2x3aXAvbHdpcF8zMl9hLmh0bSI+aHR0cDovL3d3 dy5wc2t5LmNvbS9sd2lwL2x3aXBfMzJfYS5odG08L0E+LDwvRElWPg0KICAgICAgICA8RElWPiZu YnNwOzwvRElWPg0KICAgICAgICA8RElWPmNhbiB5b3UgZ2l2ZSBtZSBhIG5ldyBtZXNzYWdlIG9y IHNlbmQgaXQgdG8gbWUgPC9ESVY+DQogICAgICAgIDxESVY+Jm5ic3A7PC9ESVY+DQogICAgICAg IDxESVY+dGhhbmsgeW91IHZlcnkgbXVjaC48QlI+PC9ESVY+DQogICAgICAgIDxQPjxCUj4NCiAg ICAgICAgPEhSIFNJWkU9MT4NCiAgICAgICAgPEI+RG8gWW91IFlhaG9vIT88L0I+PEJSPjxBIA0K ICAgICAgICBocmVmPSJodHRwOi8vY24ucmQueWFob28uY29tL21haWxfY24vdGFnL3lpc291L211 c2ljLypodHRwOi8vbXVzaWMueWlzb3UuY29tIiANCiAgICAgICAgdGFyZ2V0PWJsYW5rPjE1MM3y x/pNUDO36L/xy9GjrLT4xPq0s8jr0vTA1rXuzMM8L0E+PEJSPjxBIA0KICAgICAgICBocmVmPSJo dHRwOi8vY24ucmQueWFob28uY29tL21haWxfY24vdGFnL3lpc291L2ltYWdlLypodHRwOi8vaW1h Z2UueWlzb3UuY29tIiANCiAgICAgICAgdGFyZ2V0PWJsYW5rPsPAxa7D99DH06bT0L6h09CjrMvR senDwM28oaLR3s28us2/4c28PC9BPjxCUj48QSANCiAgICAgICAgaHJlZj0iaHR0cDovL2NuLnJk LnlhaG9vLmNvbS9tYWlsX2NuL3RhZy8xZy8qaHR0cDovL2NuLm1haWwueWFob28uY29tL2V2ZW50 L21haWxfMWcvIiANCiAgICAgICAgdGFyZ2V0PWJsYW5rPjFHvs3KxzEwMDDV16Os0cW7orXn08rX 1Nb6wKnI3aOhPC9BPiANCjwvQkxPQ0tRVU9URT48L1REPjwvVFI+PC9UQk9EWT48L1RBQkxFPjwv Rk9OVD48L0RJVj4NCjxESVY+DQo8UD48Rk9OVCBmYWNlPcvOzOUgc2l6ZT0yPj0gPSA9ID0gPSA9 ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPC9GT05UPjwvUD4NCjxQPjxGT05UIGZh Y2U9y87M5SBzaXplPTI+oaGhoaGhoaGhoaGhoaGhodbCPEJSPsDxo6E8L0ZPTlQ+PC9QPg0KPERJ Vj4mbmJzcDs8L0RJVj4NCjxESVY+PEZPTlQgZmFjZT3LzszlIHNpemU9Mj6hoaGhoaGhoaGhoaGh oaGhoaGhoaGhoaGhoaGhamFjayBXPC9GT05UPjwvRElWPg0KPERJVj48Rk9OVCBmYWNlPcvOzOUg c2l6ZT0yPjxGT05UIGZhY2U9y87M5SBzaXplPTI+oaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGh oTwvRk9OVD48QSANCmhyZWY9Im1haWx0bzpzZHVzdGhkMjAwMEB5YWhvby5jb20uY24iPnNkdXN0 aGQyMDAwQHlhaG9vLmNvbS5jbjwvQT48L0ZPTlQ+PC9ESVY+DQo8RElWPjxGT05UIGZhY2U9y87M 5SBzaXplPTI+oaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhMjAwNC0xMS0yMzwvRk9OVD48 L0RJVj4NCjxESVY+Jm5ic3A7PC9ESVY+PC9ESVY+PC9CT0RZPjwvSFRNTD4NCg== --=====003_Dragon758020482242_=====-- From MAILER-DAEMON Tue Nov 23 02:33:12 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWVAm-0006W4-7j for mharc-lwip-users@gnu.org; Tue, 23 Nov 2004 02:33:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWVAk-0006VK-FC for lwip-users@nongnu.org; Tue, 23 Nov 2004 02:33:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWVAh-0006UF-Vo for lwip-users@nongnu.org; Tue, 23 Nov 2004 02:33:09 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWVAh-0006Ts-Rx for lwip-users@nongnu.org; Tue, 23 Nov 2004 02:33:07 -0500 Received: from [202.105.45.50] (helo=21cn.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CWV1H-0003Hy-Ck for lwip-users@nongnu.org; Tue, 23 Nov 2004 02:23:24 -0500 Received: from emperor([127.0.0.1]) by 21cn.com(AIMC 2.9.5.6 P2) with SMTP id jm1c41a33fec; Tue, 23 Nov 2004 15:25:01 +0800 Received: from emperor([218.66.59.169]) by 21cn.com(AIMC 2.9.5.4) with SMTP id AISP action; Tue, 23 Nov 2004 15:25:01 +0800 Date: Tue, 23 Nov 2004 15:26:29 +0800 From: "xcb" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-AIMC-AUTH: xcbman X-AIMC-MAILFROM: xcbman@21cn.com Message-ID: <0i958876847498.23071@send2.inner-21cn.com> Subject: [lwip-users] bug about pbuf_queue() fuction X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 07:33:11 -0000 lwip-users pbuf_queue() function in pbuf.c if ((p == NULL) || (n == NULL) ) return; should be write to: if ((p == NULL) || (n == NULL) || (p==n)) return; p->next can not point to self, for(q = p; q != NULL; q = q->next) { acc += lwip_chksum(q->payload, q->len); while (acc >> 16) { acc = (acc & 0xffffUL) + (acc >> 16); } if (q->len % 2 != 0) { swapped = 1 - swapped; acc = (acc & 0x00ffUL << 8) | (acc & 0xff00UL >> 8); } } if p->next point to self ,will not out of for()(up code), if you dont insert netLine to netword card,and excute connect() function ,it dont return forever,because of up code. From MAILER-DAEMON Tue Nov 23 08:55:47 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWb91-0008I6-7k for mharc-lwip-users@gnu.org; Tue, 23 Nov 2004 08:55:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWb8y-0008HL-9s for lwip-users@nongnu.org; Tue, 23 Nov 2004 08:55:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWb8w-0008Gk-Vu for lwip-users@nongnu.org; Tue, 23 Nov 2004 08:55:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWb8w-0008GV-Tx for lwip-users@nongnu.org; Tue, 23 Nov 2004 08:55:42 -0500 Received: from [131.111.8.132] (helo=ppsw-2.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWazg-0001a2-VZ for lwip-users@nongnu.org; Tue, 23 Nov 2004 08:46:09 -0500 Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:45397) by ppsw-2.csi.cam.ac.uk (ppsw.cam.ac.uk [131.111.8.132]:25) with esmtp id 1CWazc-0002bU-9O (Exim 4.43) for lwip-users@nongnu.org (return-path ); Tue, 23 Nov 2004 13:46:04 +0000 Received: from kjm25 (helo=localhost) by hermes-1.csi.cam.ac.uk with local-esmtp (Exim 4.34) id 1CWazc-0005S7-ST for lwip-users@nongnu.org; Tue, 23 Nov 2004 13:46:04 +0000 Date: Tue, 23 Nov 2004 13:46:04 +0000 (GMT) From: Kieran Mansley X-X-Sender: kjm25@hermes-1.csi.cam.ac.uk To: Mailing list for lwIP users Subject: Re: [lwip-users] bug about pbuf_queue() fuction In-Reply-To: <0i958876847498.23071@send2.inner-21cn.com> Message-ID: References: <0i958876847498.23071@send2.inner-21cn.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: Kieran Mansley X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 13:55:44 -0000 On Tue, 23 Nov 2004, xcb wrote: > lwip-users > pbuf_queue() function in pbuf.c > > if ((p == NULL) || (n == NULL) ) return; > should be write to: > if ((p == NULL) || (n == NULL) || (p==n)) return; As these all indicate programming errors (I think the function should never be called with those combinations of arguments, unless anyone knows otherwise) I'm tempted to make them all asserts rather than silent failures. Would anyone object to this? Thanks Kieran From MAILER-DAEMON Tue Nov 23 18:19:22 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWjwP-0002yh-Tv for mharc-lwip-users@gnu.org; Tue, 23 Nov 2004 18:19:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWjwO-0002yD-QQ for lwip-users@nongnu.org; Tue, 23 Nov 2004 18:19:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWjwO-0002y1-BX for lwip-users@nongnu.org; Tue, 23 Nov 2004 18:19:20 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWjwO-0002xy-8C for lwip-users@nongnu.org; Tue, 23 Nov 2004 18:19:20 -0500 Received: from [209.61.157.56] (helo=skyla.altweb.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CWjn1-0006xM-0T for lwip-users@nongnu.org; Tue, 23 Nov 2004 18:09:39 -0500 Received: (qmail 85308 invoked by uid 89); 24 Nov 2004 10:09:36 +1100 Received: from dsl-61-95-56-108.request.com.au (HELO sqlserver) (61.95.56.108) by skyla-3.rev.altweb.net with SMTP; 24 Nov 2004 10:09:36 +1100 From: "Paul Clarke" To: "Mailing list for lwIP users" Subject: RE: [lwip-users] bug about pbuf_queue() fuction Date: Wed, 24 Nov 2004 09:39:32 +1030 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Nov 2004 23:19:21 -0000 Hi, I had a similar issue months ago, basically while processing a received packet I checked for new received packets and reentered lwip. My initial reaction was to put NULL checks around everything but really this just makes things worst. I vote for an ASSERT, with a message indicating that LWIP is being used incorrectly ie the fault is not in LWIP, but the way the programmer has used it. Paul > -----Original Message----- > From: lwip-users-bounces+paul.clarke=quest.com.au@nongnu.org > [mailto:lwip-users-bounces+paul.clarke=quest.com.au@nongnu.org]On Behalf > Of Kieran Mansley > Sent: Wednesday, 24 November 2004 12:16 AM > To: Mailing list for lwIP users > Subject: Re: [lwip-users] bug about pbuf_queue() fuction > > > On Tue, 23 Nov 2004, xcb wrote: > > > lwip-users > > pbuf_queue() function in pbuf.c > > > > if ((p == NULL) || (n == NULL) ) return; > > should be write to: > > if ((p == NULL) || (n == NULL) || (p==n)) return; > > As these all indicate programming errors (I think the function should > never be called with those combinations of arguments, unless anyone knows > otherwise) I'm tempted to make them all asserts rather than silent > failures. Would anyone object to this? > > Thanks > > Kieran > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users > From MAILER-DAEMON Tue Nov 23 22:52:47 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWoD0-0005Qy-Vn for mharc-lwip-users@gnu.org; Tue, 23 Nov 2004 22:52:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWoCy-0005OT-Qq for lwip-users@nongnu.org; Tue, 23 Nov 2004 22:52:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWoCx-0005NR-Gt for lwip-users@nongnu.org; Tue, 23 Nov 2004 22:52:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWoCx-0005NO-Dv for lwip-users@nongnu.org; Tue, 23 Nov 2004 22:52:43 -0500 Received: from [209.61.157.56] (helo=skyla.altweb.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CWo3Y-00031Q-Tx for lwip-users@nongnu.org; Tue, 23 Nov 2004 22:43:01 -0500 Received: (qmail 55149 invoked by uid 89); 24 Nov 2004 14:42:59 +1100 Received: from dsl-61-95-56-108.request.com.au (HELO sqlserver) (61.95.56.108) by skyla-3.rev.altweb.net with SMTP; 24 Nov 2004 14:42:59 +1100 From: "Paul Clarke" To: Date: Wed, 24 Nov 2004 14:12:55 +1030 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001B_01C4D22F.B1245260" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Subject: [lwip-users] Etharp Mystery X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 03:52:45 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_001B_01C4D22F.B1245260 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi In etharp.c find_entry() find entry will always (try to) add an ARP entry even when it is not required (flags == 0). Here is my patch. It should probably return something other than ERR_MEM perhaps ERR_RTE or ERR_ARG? The dhcp.c code may need to be updated as the etharp_query(..) call in it uses a NULL pbuf which means that the etharp_query will not set the ETHARP_CREATE flag. Should etharp_query() always set ETHARP_CREATE? Finally in etharp_ip_input should the update_arp_entry have the create flag set to zero? Or set to CREATE only if the destination is our ip address? Paul netif/etharp.c cvs head 263a264,269 > if (!flags & ETHARP_CREATE) > { > // dont create arp entry if not required > return ERR_MEM; > } > ------=_NextPart_000_001B_01C4D22F.B1245260 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi
 
In = etharp.c=20 find_entry() find entry will always (try to) add an ARP entry=20 even
when = it is not=20 required (flags =3D=3D 0). Here is my patch. It should probably=20 return
something other than=20 ERR_MEM perhaps ERR_RTE or ERR_ARG?
 
The = dhcp.c=20 code may need to be updated as the = etharp_query(..)
call = in it uses a=20 NULL pbuf which means that the etharp_query will = not
set = the=20 ETHARP_CREATE flag. Should etharp_query() always set =
ETHARP_CREATE? 
 
Finally in=20 etharp_ip_input should the update_arp_entry have the
create = flag set to=20 zero? Or set to CREATE only if the destination is
our ip = address?
 
Paul
 
netif/etharp.c cvs=20 head
263a264,269
>   if = (!flags &=20 ETHARP_CREATE)
>   {
>     // = dont=20 create arp entry if not required
>     return=20 ERR_MEM;
>   }
>
------=_NextPart_000_001B_01C4D22F.B1245260-- From MAILER-DAEMON Wed Nov 24 07:39:22 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWwQc-00026c-Rz for mharc-lwip-users@gnu.org; Wed, 24 Nov 2004 07:39:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWwQa-00026J-8c for lwip-users@nongnu.org; Wed, 24 Nov 2004 07:39:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWwQZ-00025x-GZ for lwip-users@nongnu.org; Wed, 24 Nov 2004 07:39:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWwQZ-00025q-D1 for lwip-users@nongnu.org; Wed, 24 Nov 2004 07:39:19 -0500 Received: from [62.20.90.195] (helo=gorgon.vtab.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWwHM-0004Vg-BP for lwip-users@nongnu.org; Wed, 24 Nov 2004 07:29:48 -0500 Received: from [10.0.0.103] (kaufman.hq.vtech [10.0.0.103]) by gorgon.vtab.com (Postfix) with ESMTP id 4F656B9234; Wed, 24 Nov 2004 13:29:45 +0100 (CET) Message-ID: <41A47EB9.8040102@virtutech.se> Date: Wed, 24 Nov 2004 13:29:45 +0100 From: Magnus Christensson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 X-Accept-Language: en-us, en MIME-Version: 1.0 To: lwip-users@nongnu.org Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [lwip-users] Snd_buf not updated when receiving SYN in state SYN_SENT X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 12:39:20 -0000 Hi, the code that handles an incoming SYN and ACK in tcp_process doesn't update snd_buf. The code is: /* Do different things depending on the TCP state. */ switch (pcb->state) { case SYN_SENT: LWIP_DEBUGF(TCP_INPUT_DEBUG, ("SYN-SENT: ackno %lu pcb->snd_nxt %lu unacked %lu\n", ackno, pcb->snd_nxt, ntohl(pcb->unacked->tcphdr->seqno))); if ((flags & TCP_ACK) && (flags & TCP_SYN) && ackno == ntohl(pcb->unacked->tcphdr->seqno) + 1) { pcb->rcv_nxt = seqno + 1; pcb->lastack = ackno; pcb->snd_wnd = tcphdr->wnd; pcb->snd_wl1 = seqno - 1; /* initialise to seqno - 1 to force window update */ pcb->state = ESTABLISHED; pcb->cwnd = pcb->mss; --pcb->snd_queuelen; LWIP_DEBUGF(TCP_QLEN_DEBUG, ("tcp_process: SYN-SENT --queuelen %u\n", (unsigned int)pcb->snd_queuelen)); rseg = pcb->unacked; pcb->unacked = rseg->next; tcp_seg_free(rseg); /* Parse any options in the SYNACK. */ tcp_parseopt(pcb); /* Call the user specified function to call when sucessfully * connected. */ TCP_EVENT_CONNECTED(pcb, ERR_OK, err); tcp_ack(pcb); } Am I missing something, or shouldn't there be a 'pcb->snd_buf++' to update the send buffer size from the incoming ACK? M. From MAILER-DAEMON Wed Nov 24 07:58:47 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWwjP-0007Bl-FA for mharc-lwip-users@gnu.org; Wed, 24 Nov 2004 07:58:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWwjO-0007Ba-3v for lwip-users@nongnu.org; Wed, 24 Nov 2004 07:58:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWwjN-0007BK-L0 for lwip-users@nongnu.org; Wed, 24 Nov 2004 07:58:45 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWwjN-0007BH-Ff for lwip-users@nongnu.org; Wed, 24 Nov 2004 07:58:45 -0500 Received: from [131.111.8.133] (helo=ppsw-3.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWwaD-0001I4-6n for lwip-users@nongnu.org; Wed, 24 Nov 2004 07:49:17 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:39951) by ppsw-3.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.153]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) id 1CWwa7-0004eH-A4 (Exim 4.43) for lwip-users@nongnu.org (return-path ); Wed, 24 Nov 2004 12:49:11 +0000 Subject: Re: [lwip-users] Snd_buf not updated when receiving SYN in state SYN_SENT From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: <41A47EB9.8040102@virtutech.se> References: <41A47EB9.8040102@virtutech.se> Content-Type: text/plain Organization: Message-Id: <1101300550.21149.31.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 24 Nov 2004 12:49:11 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 12:58:46 -0000 On Wed, 2004-11-24 at 12:29, Magnus Christensson wrote: > > Am I missing something, or shouldn't there be a 'pcb->snd_buf++' to update the > send buffer size from the incoming ACK? Hmmm, yes, I suppose as the SYN consumes 1 sequence number, we should be doing that there. Will add it to the list of little things to fix! All other states call tcp_receive() which adjusts snd_buf appropriately, but in SYN_SENT you're not going to get any data, so this was obviously deemed unnecessary. Out of interest, did you spot this because of a problem, or just notice it when reading through the code? Thanks Kieran From MAILER-DAEMON Wed Nov 24 08:26:13 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CWx9w-0001Qr-Mr for mharc-lwip-users@gnu.org; Wed, 24 Nov 2004 08:26:13 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CWx9s-0001Pi-AS for lwip-users@nongnu.org; Wed, 24 Nov 2004 08:26:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CWx9r-0001PO-CT for lwip-users@nongnu.org; Wed, 24 Nov 2004 08:26:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CWx9r-0001PK-73 for lwip-users@nongnu.org; Wed, 24 Nov 2004 08:26:07 -0500 Received: from [62.20.90.195] (helo=gorgon.vtab.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CWx0U-0001G3-Vt for lwip-users@nongnu.org; Wed, 24 Nov 2004 08:16:27 -0500 Received: from [10.0.0.103] (kaufman.hq.vtech [10.0.0.103]) by gorgon.vtab.com (Postfix) with ESMTP id 7194CB9206; Wed, 24 Nov 2004 14:16:25 +0100 (CET) Message-ID: <41A489A8.1060202@virtutech.se> Date: Wed, 24 Nov 2004 14:16:24 +0100 From: Magnus Christensson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040618 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] Snd_buf not updated when receiving SYN in state SYN_SENT References: <41A47EB9.8040102@virtutech.se> <1101300550.21149.31.camel@kirin.eng.cam.ac.uk> In-Reply-To: <1101300550.21149.31.camel@kirin.eng.cam.ac.uk> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 13:26:09 -0000 K.J. Mansley wrote: > On Wed, 2004-11-24 at 12:29, Magnus Christensson wrote: > > >>Am I missing something, or shouldn't there be a 'pcb->snd_buf++' to update the >>send buffer size from the incoming ACK? > > > Hmmm, yes, I suppose as the SYN consumes 1 sequence number, we should be > doing that there. Will add it to the list of little things to fix! All > other states call tcp_receive() which adjusts snd_buf appropriately, but > in SYN_SENT you're not going to get any data, so this was obviously > deemed unnecessary. Ok. > Out of interest, did you spot this because of a problem, or just notice > it when reading through the code? This was triggered by an actual problem. I had a client (using lwip) sending a TCP_SND_BUF sized segment just after the SYN exchange. That segment got dropped due to its size being >snd_buf (which was TCP_SND_BUF-1 due to the missing snd_buf update). Thanks, M. From MAILER-DAEMON Wed Nov 24 18:18:01 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CX6Of-0002Gw-9u for mharc-lwip-users@gnu.org; Wed, 24 Nov 2004 18:18:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CX6Oc-0002ER-Pq for lwip-users@nongnu.org; Wed, 24 Nov 2004 18:17:58 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CX6Ob-0002DX-Mx for lwip-users@nongnu.org; Wed, 24 Nov 2004 18:17:58 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CX6Ob-0002DJ-A0 for lwip-users@nongnu.org; Wed, 24 Nov 2004 18:17:57 -0500 Received: from [209.61.157.56] (helo=skyla.altweb.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CX6FP-0004Na-FE for lwip-users@nongnu.org; Wed, 24 Nov 2004 18:08:27 -0500 Received: (qmail 94974 invoked by uid 89); 25 Nov 2004 10:08:26 +1100 Received: from dsl-61-95-56-108.request.com.au (HELO sqlserver) (61.95.56.108) by skyla-3.rev.altweb.net with SMTP; 25 Nov 2004 10:08:26 +1100 From: "Paul Clarke" To: Date: Thu, 25 Nov 2004 09:38:24 +1030 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0005_01C4D2D2.821ADC20" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Subject: [lwip-users] ARP table fix X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2004 23:17:59 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0005_01C4D2D2.821ADC20 Content-Type: multipart/alternative; boundary="----=_NextPart_001_0006_01C4D2D2.821ADC20" ------=_NextPart_001_0006_01C4D2D2.821ADC20 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi, The cvs etharp code fills the arp table with all network broadcast tcp/ip packets. On a network with windows machines this happens so often that a small arp table like on a microprocessor is constantly being recycled. This patch fixes the code so that only the ip address that the lwip is interested in are in the arp table making lwip a lot faster. Paul ------=_NextPart_001_0006_01C4D2D2.821ADC20 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi,
 
The = cvs=20 etharp code fills the arp = table with=20 all network broadcast tcp/ip packets. On a
network with windows=20 machines this happens so often that a small=20 arp table 
like on a=20 microprocessor is constantly being recycled. This patch fixes=20 the
code = so that only=20 the ip address that the lwip is interested in are in = the
arp = table=20 making lwip a lot faster.
 
Paul 
 
= ------=_NextPart_001_0006_01C4D2D2.821ADC20-- ------=_NextPart_000_0005_01C4D2D2.821ADC20 Content-Type: application/octet-stream; name="lwip_src_netif_etharp.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="lwip_src_netif_etharp.patch" --- etharp.c 2004-11-25 09:22:02.096366400 +1030 +++ etharp.new 2004-11-25 09:19:58.078036800 +1030 @@ -261,6 +261,12 @@ static s8_t find_entry(struct ip_addr *i } } =20 + if (!flags & ETHARP_CREATE) + { + // dont create arp entry if not required + return ERR_MEM; + } + /* b) choose the least destructive entry to recycle: * 1) empty entry * 2) oldest stable entry @@ -439,7 +445,7 @@ etharp_ip_input(struct netif *netif, str =20 LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("etharp_ip_input: updating = ETHARP table.\n")); /* update ARP table, ask to insert entry */ - update_arp_entry(netif, &(hdr->ip.src), &(hdr->eth.src), = ETHARP_CREATE); + update_arp_entry(netif, &(hdr->ip.src), &(hdr->eth.src), 0); } =20 =20 @@ -707,7 +713,7 @@ err_t etharp_query(struct netif *netif,=20 } =20 /* find entry in ARP cache, ask to create entry if queueing packet */ - i =3D find_entry(ipaddr, (q !=3D NULL) ? ETHARP_CREATE : 0); + i =3D find_entry(ipaddr, ETHARP_CREATE); =20 /* could not find or create entry? */ if (i < 0) return (err_t)i; ------=_NextPart_000_0005_01C4D2D2.821ADC20-- From MAILER-DAEMON Thu Nov 25 01:18:01 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXCx7-0007M4-3a for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 01:18:01 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXCx5-0007KL-56 for lwip-users@nongnu.org; Thu, 25 Nov 2004 01:17:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXCx3-0007J2-6m for lwip-users@nongnu.org; Thu, 25 Nov 2004 01:17:58 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXCx3-0007Iz-3I for lwip-users@nongnu.org; Thu, 25 Nov 2004 01:17:57 -0500 Received: from [209.61.157.56] (helo=skyla.altweb.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CXCn9-00024J-IS for lwip-users@nongnu.org; Thu, 25 Nov 2004 01:07:45 -0500 Received: (qmail 92277 invoked by uid 89); 25 Nov 2004 17:07:41 +1100 Received: from dsl-61-95-56-108.request.com.au (HELO sqlserver) (61.95.56.108) by skyla-3.rev.altweb.net with SMTP; 25 Nov 2004 17:07:41 +1100 From: "Paul Clarke" To: Date: Thu, 25 Nov 2004 16:37:36 +1030 Message-ID: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0000_01C4D30D.12130B10" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 Importance: Normal Subject: [lwip-users] dhcp bug fix X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 06:17:59 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0000_01C4D30D.12130B10 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit In dhcp_decline the netif is not configured so udp_send fails with ERR_RTE. This patch a copy of how the dhcp request is sent worked for me. Paul 682,683c682,683 < udp_connect(dhcp->pcb, &dhcp->server_ip_addr, DHCP_SERVER_PORT); < udp_send(dhcp->pcb, dhcp->p_out); --- > udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); > udp_sendto(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT); ---------------------------------------------------------------------------- ---- Paul Clarke Hardware Design Engineer QUEST Retail Technology Pty Ltd 37-39 Walsh Street Thebarton, Adelaide S.A. 5031 AUSTRALIA Tel: (+618) 8234-2311 Fax: (+618) 8234-1711 www.quest.com.au Email: paul.clarke@quest.com.au -------------------------------------------------------------------------- This email is confidential and may also be privileged. If you are not the intended recipient, please notify me immediately by emailing paul.clarke@quest.com.au. You should not copy it or use it for any other purpose, nor disclose its contents to any other person. In messages of non-business nature, the views and opinions expressed are the author's own and do not necessarily reflect the views and opinions of the Organisation. ------=_NextPart_000_0000_01C4D30D.12130B10 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
In = dhcp_decline the=20 netif is not configured so udp_send fails with = ERR_RTE.
This = patch a copy of=20 how the dhcp request is sent worked for me.
 
Paul
 
682,683c682,683
<    =20 udp_connect(dhcp->pcb, &dhcp->server_ip_addr,=20 DHCP_SERVER_PORT);
<     = udp_send(dhcp->pcb,=20 dhcp->p_out);
---
>    =20 udp_connect(dhcp->pcb, IP_ADDR_ANY,=20 DHCP_SERVER_PORT);
>     = udp_sendto(dhcp->pcb,=20 dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT);

Paul = Clarke
Hardware=20 Design Engineer
=20

QUEST Retail Technology Pty Ltd
37-39 Walsh=20 Street
Thebarton, Adelaide 
S.A. 5031  =20 AUSTRALIA

Tel: (+618) 8234-2311
Fax: (+618) 8234-1711
www.quest.com.au Email: paul.clarke@quest.com.au=

This email is confidential and may also be=20 privileged.  If you are not the intended recipient, please = notify me=20 immediately by emailing paul.clarke@quest.com.au= . =20 You should not copy it or use it for any other purpose, nor = disclose its=20 contents to any other person. In messages of non-business nature, = the=20 views and opinions expressed are the author's own and do not = necessarily=20 reflect the views and opinions of the=20 Organisation.

 
------=_NextPart_000_0000_01C4D30D.12130B10-- From MAILER-DAEMON Thu Nov 25 02:51:44 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXEPo-0003Lo-1A for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 02:51:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXEPm-0003Lf-G9 for lwip-users@nongnu.org; Thu, 25 Nov 2004 02:51:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXEPl-0003LE-Dm for lwip-users@nongnu.org; Thu, 25 Nov 2004 02:51:41 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXEPl-0003LB-9e for lwip-users@nongnu.org; Thu, 25 Nov 2004 02:51:41 -0500 Received: from [202.165.102.35] (helo=web15506.mail.cnb.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CXEGM-0004M4-7j for lwip-users@nongnu.org; Thu, 25 Nov 2004 02:41:59 -0500 Message-ID: <20041125074151.53736.qmail@web15506.mail.cnb.yahoo.com> Received: from [211.92.108.205] by web15506.mail.cnb.yahoo.com via HTTP; Thu, 25 Nov 2004 15:41:51 CST Date: Thu, 25 Nov 2004 15:41:51 +0800 (CST) From: zhanglj To: lwip-users@nongnu.org MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2045865084-1101368511=:48537" Content-Transfer-Encoding: 8bit Subject: [lwip-users] problems about use netio and ftp X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 07:51:42 -0000 --0-2045865084-1101368511=:48537 Content-Type: text/plain; charset=gb2312 Content-Transfer-Encoding: 8bit hi i use lwip over win32 successfully and now i want to test the throughput and use the ftp could you can tell me some details on how to use the netio and ftp? thank you --------------------------------- Do You Yahoo!? 150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌà ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ 1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ --0-2045865084-1101368511=:48537 Content-Type: text/html; charset=gb2312 Content-Transfer-Encoding: 8bit
 hi
 
 i use lwip over win32 successfully
 
and now i want to test the throughput and use the ftp
 
could you can tell me some details on how to use the netio and ftp?
 
thank you



Do You Yahoo!?
150ÍòÇúMP3·è¿ñËÑ£¬´øÄú´³ÈëÒôÀÖµîÌÃ
ÃÀÅ®Ã÷ÐÇÓ¦Óо¡ÓУ¬ËѱéÃÀͼ¡¢ÑÞͼºÍ¿áͼ
1G¾ÍÊÇ1000Õ×£¬ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡ --0-2045865084-1101368511=:48537-- From MAILER-DAEMON Thu Nov 25 05:53:49 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXHG1-0005G6-2T for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 05:53:49 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXHFx-00058b-2Y for lwip-users@nongnu.org; Thu, 25 Nov 2004 05:53:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXHFv-00054q-1p for lwip-users@nongnu.org; Thu, 25 Nov 2004 05:53:43 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXHFu-00053p-Ok for lwip-users@nongnu.org; Thu, 25 Nov 2004 05:53:42 -0500 Received: from [131.111.8.133] (helo=ppsw-3.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXH6a-0005WM-Am for lwip-users@nongnu.org; Thu, 25 Nov 2004 05:44:04 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:41506) by ppsw-3.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.153]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) id 1CXH6X-0000mM-By (Exim 4.44) for lwip-users@nongnu.org (return-path ); Thu, 25 Nov 2004 10:44:01 +0000 Subject: Re: [lwip-users] ARP table fix From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1101379441.26465.4.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 25 Nov 2004 10:44:01 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 10:53:46 -0000 On Wed, 2004-11-24 at 23:08, Paul Clarke wrote: > Hi, > > The cvs etharp code fills the arp table with all network broadcast > tcp/ip packets. On a > network with windows machines this happens so often that a small > arp table > like on a microprocessor is constantly being recycled. This patch > fixes the > code so that only the ip address that the lwip is interested in are in > the > arp table making lwip a lot faster. Thanks for this patch, and the DHCP one. Hopefully someone familiar with those bits of the code will check them over and apply them, but to make sure they don't get forgotten it's a good idea to submit a bug report (and attach the patches to that) as well as emailing them to the mailing list. Kieran From MAILER-DAEMON Thu Nov 25 06:15:58 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXHbQ-0003BI-Vp for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 06:15:57 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXHbO-0003A7-Lg for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:15:55 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXHbN-00039I-DT for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:15:53 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXHbM-000392-V2 for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:15:53 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXHS7-0002NH-1j for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:06:19 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id D3570C3BB7E for ; Thu, 25 Nov 2004 06:06:17 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id E2241FBD; Thu, 25 Nov 2004 06:06:14 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: Subject: Re: [lwip-users] dhcp bug fix In-Reply-To: To: "Mailing list for lwIP users" Date: Thu, 25 Nov 2004 12:06:14 +0100 From: "Leon Woestenberg" X-Sasl-Enc: Ekd+TpX4F1URz2we2UcVYA 1101380774 Message-Id: <1101380774.7264.209440436@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 11:15:55 -0000 Hello Paul, please make sure you are sending plain text to the mailing list and use unified diff patches (diff -Nur will do this). > In dhcp_decline the netif is not configured so udp_send fails with ERR_RTE. > Could you deduce where this ERR_RTE was created? udp_send() calls upon ip_route() which should return the default interface where the default gateway is on. > This patch a copy of how the dhcp request is sent worked for me. > > 682,683c682,683 > < udp_connect(dhcp->pcb, &dhcp->server_ip_addr, DHCP_SERVER_PORT); > < udp_send(dhcp->pcb, dhcp->p_out); > --- > > udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); > > udp_sendto(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT); The last line is indeed a good fix, as per RFC 2131 (DHCP) section 4.4.4, we should broadcast DECLINE messages. The first line connecting to the ANY address (0.0.0.0) seems strange, but it might be a legal or illegal workaround to the fact that udp_send() returns ERR_RTE as you say. I do not see the need for the connect now that we use sendto(). If you remove it completely, does it still work? Thanks! Regards, Leon Woestenberg. From MAILER-DAEMON Thu Nov 25 06:20:28 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXHfo-0004t9-42 for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 06:20:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXHfl-0004qx-EK for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:20:25 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXHfj-0004po-Ag for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:20:23 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXHfi-0004pA-Sy for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:20:23 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXHWJ-0003Wp-Sk for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:10:40 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id 6C5BFC3B7EE for ; Thu, 25 Nov 2004 06:10:39 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id 7218EFBF; Thu, 25 Nov 2004 06:10:36 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: <1101379441.26465.4.camel@kirin.eng.cam.ac.uk> Subject: Re: [lwip-users] ARP table fix In-Reply-To: <1101379441.26465.4.camel@kirin.eng.cam.ac.uk> To: "Mailing list for lwIP users" Date: Thu, 25 Nov 2004 12:10:36 +0100 From: "Leon Woestenberg" X-Sasl-Enc: zt+GlC1zAvk10CQ8/O9pDQ 1101381036 Message-Id: <1101381036.7546.209442879@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 11:20:26 -0000 Hello, On 25 Nov 2004 10:44:01 +0000, "K.J. Mansley" said: > On Wed, 2004-11-24 at 23:08, Paul Clarke wrote: > Thanks for this patch, and the DHCP one. Hopefully someone familiar > with those bits of the code will check them over and apply them, but to Just to inform you all, I am just reviewing the patches. The DHCP fix seems valid (but see my remarks) and just committed, ARP is up next. Regards, Leon. From MAILER-DAEMON Thu Nov 25 06:29:21 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXHoO-0007E0-4J for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 06:29:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXHoL-0007Dt-Fb for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:29:17 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXHoK-0007Dh-Pe for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:29:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXHoK-0007De-7A for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:29:16 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXHex-0005f7-Af for lwip-users@nongnu.org; Thu, 25 Nov 2004 06:19:35 -0500 Received: from web3.messagingengine.com (web3.internal [10.202.2.212]) by frontend1.messagingengine.com (Postfix) with ESMTP id B1B33C3BBD7 for ; Thu, 25 Nov 2004 06:19:33 -0500 (EST) Received: by web3.messagingengine.com (Postfix, from userid 99) id 0B9272787; Thu, 25 Nov 2004 06:19:34 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: <1101380774.7264.209440436@webmail.messagingengine.com> Subject: Re: [lwip-users] dhcp bug fix In-Reply-To: <1101380774.7264.209440436@webmail.messagingengine.com> To: "Mailing list for lwIP users" , "Mailing list for lwIP users" Date: Thu, 25 Nov 2004 21:49:34 +1030 From: "Paul C" X-Sasl-Enc: cuqXJhOw4Jl8lkZpkKRH5Q 1101381574 Message-Id: <1101381574.18272.209443056@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 11:29:18 -0000 Hi Leon On Thu, 25 Nov 2004 12:06:14 +0100, "Leon Woestenberg" said: > Hello Paul, > > please make sure you are sending plain text to the mailing list and use > unified > diff patches (diff -Nur will do this). > Sorry about that. > > In dhcp_decline the netif is not configured so udp_send fails with ERR_RTE. > > > Could you deduce where this ERR_RTE was created? > > udp_send() calls upon ip_route() which should return the default > interface > where the default gateway is on. > When the netif is not configured when it comes to find the netif to use for output the test for local network fails so it tries to use the gateway (which is not configured) so it gives up ERR_RTE. I'm not quite sure why the sendto avoids this trap. > > This patch a copy of how the dhcp request is sent worked for me. > > > > 682,683c682,683 > > < udp_connect(dhcp->pcb, &dhcp->server_ip_addr, DHCP_SERVER_PORT); > > < udp_send(dhcp->pcb, dhcp->p_out); > > --- > > > udp_connect(dhcp->pcb, IP_ADDR_ANY, DHCP_SERVER_PORT); > > > udp_sendto(dhcp->pcb, dhcp->p_out, IP_ADDR_BROADCAST, DHCP_SERVER_PORT); > > The last line is indeed a good fix, as per RFC 2131 (DHCP) section > 4.4.4, we > should broadcast DECLINE messages. > > The first line connecting to the ANY address (0.0.0.0) seems strange, > but it > might be a legal or illegal workaround to the fact that udp_send() > returns > ERR_RTE as you say. > > I do not see the need for the connect now that we use sendto(). If you > remove > it completely, does it still work? > I'll try that tomorrow. Paul From MAILER-DAEMON Thu Nov 25 08:18:34 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXJW6-0000kz-Ce for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 08:18:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXJW3-0000kP-JY for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:18:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXJW1-0000jB-25 for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:18:30 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXJW0-0000io-OD for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:18:28 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXJMK-0007SX-II for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:08:28 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id A0512C3BAEE for ; Thu, 25 Nov 2004 08:08:27 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id B39FEFCA; Thu, 25 Nov 2004 08:08:23 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: Subject: Re: [lwip-users] Etharp Mystery In-Reply-To: To: "Mailing list for lwIP users" Date: Thu, 25 Nov 2004 14:08:23 +0100 From: "Leon Woestenberg" X-Sasl-Enc: +mxec02JKUwqZW0FEyxFdw 1101388103 Message-Id: <1101388103.17293.209443810@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 13:18:32 -0000 Hello Paul, formerly ARP more or less worked this way. > In etharp.c find_entry() find entry will always (try to) add an ARP entry even > when it is not required (flags == 0). > Correct. > Here is my patch. It should probably return > something other than ERR_MEM perhaps ERR_RTE or ERR_ARG? > The implementation is correct, ARP is ALWAYS required to update the ARP cache, and always add entries when possible. Setting "ETHARP_CREATE" just means that lwIP tries harder to actually create an ARP entry in case the cache is full and in use. It is there to more or less force ARP to recycle an active entry in the cache, as we think the new entry is more important than an older entry. There could be several reasons for thinking that. In other words, NOT setting ETHARP_CREATE might still create an ARP entry, and that is intended behaviour. Maybe I should call it "ETHARP_RECYCLE" or "ETHARP_TRY_HARDER" or "ETHARP_REPLACE". I will We recycle older entries (see line 264 in etharp.c) as follows: /* b) choose the least destructive entry to recycle: * 1) empty entry * 2) oldest stable entry * 3) oldest pending entry without queued packets * 4) oldest pending entry without queued packets */ > The dhcp.c code may need to be updated as the etharp_query(..) > call in it uses a NULL pbuf which means that the etharp_query will not > set the ETHARP_CREATE flag. Should etharp_query() always set > ETHARP_CREATE? > Yes, this is a good point and will make DHCP behave more robust in the corner cases where the DHCP server gives away an address already in use. > Finally in etharp_ip_input should the update_arp_entry have the > create flag set to zero? Or set to CREATE only if the destination is > our ip address? > There is no real way of telling beforehand if we should try harder to replace an active entry, but again a good point; I will remove it there. Please review the code after these changes are committed (in an hour or so). Regards, Leon Woestenberg. From MAILER-DAEMON Thu Nov 25 08:21:15 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXJYg-00023m-LR for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 08:21:14 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXJYb-00022G-K4 for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:21:11 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXJYZ-00021G-5f for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:21:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXJYZ-000217-29 for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:21:07 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXJPC-0008Ar-JD for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:11:26 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id D6FF6C3B5FB for ; Thu, 25 Nov 2004 08:11:25 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id E54D0ADE; Thu, 25 Nov 2004 08:11:21 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: <200411191654910.SM00186@ENGRMGR> Subject: Re: [lwip-users] Bug in ip_addr.c concerning Broadcast. In-Reply-To: <200411191654910.SM00186@ENGRMGR> To: "Mailing list for lwIP users" Date: Thu, 25 Nov 2004 14:11:21 +0100 From: "Leon Woestenberg" X-Sasl-Enc: SUfIk5SXxrmtVmGPOId+PQ 1101388281 Message-Id: <1101388281.17642.209448465@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 13:21:12 -0000 Rodney, your observation is correct, ip_addr_isbroadcast() did not check whether the given address argument actually was on the same network as the given interface was on. I have fixes this in CVS. It could be argued that this should be checked elsewhere (BSD does that check elsewhere). So, what I wonder, did you find cases in lwIP where the function could be called with an IP address outside the netif network address? Regards, Leon. On Fri, 19 Nov 2004 16:54:34 -0600, "Rodney Brown" said: > I believe I've found a bug in ipp_addr.c and wanted some confirmation > before > fixing it. > > Snippet from ip_addr_isbroadcast(struct ip_addr *addr, struct netif > *netif) > . > . > /* host identifier bits are all ones? => network broadcast address */ > else if ((addr->addr & ~netif->netmask.addr) == > (ip_addr_broadcast.addr & ~netif->netmask.addr)) > return 1; > > > addr is the destination. netif is the device's information. If the > destination IP is 123.123.123.63, and the local subnet is > 255.255.255.192, > the routine will return true, no matter what subnet the address is on. > > Should the code read: ?? > > else if (((addr->addr & ~netif->netmask.addr) == > (ip_addr_broadcast.addr & ~netif->netmask.addr)) && > ((addr->addr & netif->netmask.addr) == > (netif->ip_addr.addr & netif->netmask.addr))) > > return 1; > > This checks to be sure the device and destination are on the same subnet, > and that the last address on that subnet is the destination. > > Thanks, > Rodney > > > > _______________________________________________ > lwip-users mailing list > lwip-users@nongnu.org > http://lists.nongnu.org/mailman/listinfo/lwip-users From MAILER-DAEMON Thu Nov 25 08:26:22 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXJdd-0003CV-PL for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 08:26:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXJdb-00039j-QI for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:26:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXJda-00038C-DX for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:26:18 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXJda-00037v-9Q for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:26:18 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXJU2-00013h-1u for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:16:26 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id 7EABFC3BCEC for ; Thu, 25 Nov 2004 08:16:25 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id 837D9ADE; Thu, 25 Nov 2004 08:16:21 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: <37570.194.237.142.24.1100857437.squirrel@194.237.142.24> Subject: Re: [lwip-users] Thesis in lwIP in USB CDC and Microsoft RNDIS context In-Reply-To: <37570.194.237.142.24.1100857437.squirrel@194.237.142.24> To: lwip-users@nongnu.org Date: Thu, 25 Nov 2004 14:16:21 +0100 From: "Leon Woestenberg" X-Sasl-Enc: LqVOa6YeE+R7q4FW0QLz0Q 1101388581 Message-Id: <1101388581.18032.209448722@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 13:26:20 -0000 Hello Linus, On Fri, 19 Nov 2004 10:43:57 +0100 (CET), "Linus Walleij" said: > I want to inform all interested developers that I have published a thesis > on the use of lwIP in conjunction with the USB Communications Device > > The thesis shows how a network-based bootstrap program on a > single-threaded > lwIP stack can be used for providing firmware upgrades to an embedded > system. > We have been using lwIP for that for years :-) Given the fact that users are desperately seeking examples and info, thank you very much for submitting this URL to your thesis paper. Being dumped to the printer right now, makes some interesting reading for this evening. Thank you, and good luck in any follow-up studies or work, Regards, Leon Woestenberg. From MAILER-DAEMON Thu Nov 25 08:48:30 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXJz1-0001jN-Rt for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 08:48:28 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXJz0-0001j6-M1 for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:48:26 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXJyz-0001iS-Id for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:48:25 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXJyz-0001iP-FK for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:48:25 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXJp2-0006xv-Up for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:38:09 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id 1AF58C3BB87 for ; Thu, 25 Nov 2004 08:38:08 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id E8EB6FC7; Thu, 25 Nov 2004 08:38:03 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: Subject: Re: [lwip-users] ARP table fix In-Reply-To: To: "Mailing list for lwIP users" Date: Thu, 25 Nov 2004 14:38:03 +0100 From: "Leon Woestenberg" X-Sasl-Enc: zAPsBl4InLlsTXFHl3VJIA 1101389883 Message-Id: <1101389883.19571.209449857@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 13:48:26 -0000 Hello Paul, On Thu, 25 Nov 2004 09:38:24 +1030, "Paul Clarke" said: > Hi, > > The cvs etharp code fills the arp table with all network broadcast tcp/ip > packets. This would be a bug in etharp.c or ip_addr_*(). Please see why your IP addresses would fall through this if statement: --- update_arp_entry() /* non-unicast address? */ if (ip_addr_isany(ipaddr) || ip_addr_isbroadcast(ipaddr, netif) || ip_addr_ismulticast(ipaddr)) { LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("update_arp_entry: will not add non-unicast IP address to ARP cache\n")); return ERR_ARG; } --- Regards, Leon Woestenberg. From MAILER-DAEMON Thu Nov 25 08:51:23 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXK1q-0002nZ-VK for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 08:51:23 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXK1p-0002nO-Fj for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:51:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXK1o-0002n5-SK for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:51:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXK1o-0002n2-Ov for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:51:20 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXJs7-0007mm-Bf for lwip-users@nongnu.org; Thu, 25 Nov 2004 08:41:19 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id BFFF5C3BBEC for ; Thu, 25 Nov 2004 08:41:18 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id 93012FCC; Thu, 25 Nov 2004 08:41:14 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: Subject: Re: [lwip-users] ARP table fix In-Reply-To: To: "Mailing list for lwIP users" Date: Thu, 25 Nov 2004 14:41:14 +0100 From: "Leon Woestenberg" X-Sasl-Enc: 4xi4y8soIkUm98S5F2j+xA 1101390074 Message-Id: <1101390074.19823.209449965@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 13:51:21 -0000 Hello Paul, On Thu, 25 Nov 2004 09:38:24 +1030, "Paul Clarke" said: > Hi, > > The cvs etharp code fills the arp table with all network broadcast tcp/ip > packets. I just noticed this report does not match the patch. Here you say non-unicast address end up in the cache, whereas the patch addresses the use of the ETHARP_CREATE flag. These are orthonogal. FYI, I have responded to both this report and the patch in seperate emails. I have adapted some of the ETHARP_CREATE usage, but broadcast IP address should not end up in the cache. Several functions in etharp_*() just drop those requests (early in the function body). Regards, Leon Woestenberg. From MAILER-DAEMON Thu Nov 25 09:17:22 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXKQz-00010A-RK for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 09:17:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXKQy-000100-Ax for lwip-users@nongnu.org; Thu, 25 Nov 2004 09:17:20 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXKQx-0000zf-O2 for lwip-users@nongnu.org; Thu, 25 Nov 2004 09:17:19 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXKQx-0000zV-JA for lwip-users@nongnu.org; Thu, 25 Nov 2004 09:17:19 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXKHU-0005ar-AN for lwip-users@nongnu.org; Thu, 25 Nov 2004 09:07:32 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id 7460AC3BB95; Thu, 25 Nov 2004 09:07:31 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id 12310FE3; Thu, 25 Nov 2004 09:07:27 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: <418A6756.7010500@gibbons.com> Subject: Re: [lwip-users] arp question In-Reply-To: <418A6756.7010500@gibbons.com> To: jim@gibbons.com, "Mailing list for lwIP users" Date: Thu, 25 Nov 2004 15:07:27 +0100 From: "Leon Woestenberg" X-Sasl-Enc: ktbFIHMr41R6yXKgoUdTjw 1101391647 Message-Id: <1101391647.22291.209451469@webmail.messagingengine.com> Cc: X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 14:17:20 -0000 Jim, ARP is not protected against concurrent access. Calling the etharp_timer should be possible from within the TCP/IP thread though. I have suggested earlier to rename the tcpip thread name to something more generic lwip_timer_thread or so, and do all the timeout involved actions there. Regards, Leon. From MAILER-DAEMON Thu Nov 25 12:14:55 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXNCp-0000gX-8e for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 12:14:55 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXNCn-0000fN-0C for lwip-users@nongnu.org; Thu, 25 Nov 2004 12:14:53 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXNCl-0000ep-Qa for lwip-users@nongnu.org; Thu, 25 Nov 2004 12:14:52 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXNCl-0000ef-MM for lwip-users@nongnu.org; Thu, 25 Nov 2004 12:14:51 -0500 Received: from [66.80.7.162] (helo=gibbons.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXN2o-000071-1h for lwip-users@nongnu.org; Thu, 25 Nov 2004 12:04:34 -0500 Received: from [67.119.12.189] ([67.119.12.189]) (authenticated user jim@gibbons.com) by gibbons.com (Kerio MailServer 6.0.4) for lwip-users@nongnu.org; Thu, 25 Nov 2004 09:04:32 -0800 Message-ID: <41A610A3.903@gibbons.com> Date: Thu, 25 Nov 2004 09:04:35 -0800 From: Jim Gibbons User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.1) Gecko/20040707 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] arp question References: <418A6756.7010500@gibbons.com> <1101391647.22291.209451469@webmail.messagingengine.com> In-Reply-To: <1101391647.22291.209451469@webmail.messagingengine.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 17:14:53 -0000 Leon, I've just noticed your recent flurry of activity. I know that this must take a lot of your time. I would like to express the gratitude of the community for your efforts and those of the other developers. In the matter of ARP, I think some concurrent access protection might be in order in common use scenarios. Perhaps it should be noted in comments so that callers could do it, since the callers are usually netif implementors. I agree that it is a simple matter to get etharp_output and the timer to run out of the tcpip task. I think it is substantially harder to get etharp_ip_input and etharp_arp_input to run in that context. Most of us who implement netif's in multitasking environments end up with an ethernet receive thread from which the etharp input functions must be called. Other brave souls do this from an interrupt context. In the former case, a mutex would provide the protection required, while in the latter case SYS_LIGHTWEIGHT_PROT methods might be used to protect the timer and output. Finally, a very broad question. Is 1.0.0 ready for prime time? I have two embedded systems currently running 0.7.2, and it has been hard for me to tell from all of the e-mail going by whether 1.0.0 would prove to be more stable or less so for these products. Thanks again for all your efforts. Leon Woestenberg wrote: >Jim, > >ARP is not protected against concurrent access. > >Calling the etharp_timer should be possible from within the >TCP/IP thread though. > >I have suggested earlier to rename the tcpip thread name to >something more generic lwip_timer_thread or so, and do all >the timeout involved actions there. > >Regards, > >Leon. > > >_______________________________________________ >lwip-users mailing list >lwip-users@nongnu.org >http://lists.nongnu.org/mailman/listinfo/lwip-users > > From MAILER-DAEMON Thu Nov 25 18:43:53 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXTHF-0005Zr-E1 for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 18:43:53 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXTH9-0005ZR-Tx for lwip-users@nongnu.org; Thu, 25 Nov 2004 18:43:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXTH8-0005Yc-1s for lwip-users@nongnu.org; Thu, 25 Nov 2004 18:43:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXTH7-0005YF-US for lwip-users@nongnu.org; Thu, 25 Nov 2004 18:43:45 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXT7O-0005Tg-Vu for lwip-users@nongnu.org; Thu, 25 Nov 2004 18:33:43 -0500 Received: from web2.messagingengine.com (web2.internal [10.202.2.211]) by frontend1.messagingengine.com (Postfix) with ESMTP id A32CEC3C2A4 for ; Thu, 25 Nov 2004 18:33:41 -0500 (EST) Received: by web2.messagingengine.com (Postfix, from userid 99) id B549FA01; Thu, 25 Nov 2004 18:33:32 -0500 (EST) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_11014256128910"; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) To: "Mailing list for lwIP users" Date: Fri, 26 Nov 2004 10:03:32 +1030 From: "Paul C" X-Sasl-Enc: NZNH6486hqKqFdsYC6EDdQ 1101425612 Message-Id: <1101425612.891.209476941@webmail.messagingengine.com> Subject: [lwip-users] ARP ETHARP_TRY_HARD X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Nov 2004 23:43:48 -0000 This is a multi-part message in MIME format. --_----------=_11014256128910 Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) Date: Thu, 25 Nov 2004 23:33:32 UT Leon, I like the patches you have put in etharp.c but I still think that the exit if !ETHARP_TRY_HARD is missing. How about this patch? If etharp can find an empty slot it is used otherwise we bail out. Paul --_----------=_11014256128910 Content-Disposition: attachment; filename="ETHARP_TRY_HARD.patch" Content-Transfer-Encoding: base64 Content-Type: application/octet-stream; name="ETHARP_TRY_HARD.patch" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) Date: Thu, 25 Nov 2004 23:33:32 UT SW5kZXg6IHNyYy9uZXRpZi9ldGhhcnAuYw0KPT09PT09PT09PT09PT09PT09 PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09 PT09PQ0KUkNTIGZpbGU6IC9jdnNyb290L2x3aXAvbHdpcC9zcmMvbmV0aWYv ZXRoYXJwLmMsdg0KcmV0cmlldmluZyByZXZpc2lvbiAxLjg0DQpkaWZmIC1y MS44NCBldGhhcnAuYw0KMjY0YTI2NSwyNjkNCj4gDQo+ICAgaWYgKChlbXB0 eSA9PSBBUlBfVEFCTEVfU0laRSkgJiYgKCFmbGFncyAmIEVUSEFSUF9UUllf SEFSRCkpDQo+ICAgew0KPiAgICAgcmV0dXJuIEVSUl9BUkc7DQo+ICAgfQ0K --_----------=_11014256128910-- From MAILER-DAEMON Thu Nov 25 22:40:22 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXWy6-0006UQ-Ox for mharc-lwip-users@gnu.org; Thu, 25 Nov 2004 22:40:22 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXWy5-0006U8-NX for lwip-users@nongnu.org; Thu, 25 Nov 2004 22:40:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXWy5-0006Tw-AE for lwip-users@nongnu.org; Thu, 25 Nov 2004 22:40:21 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXWy2-0006Tr-WE for lwip-users@nongnu.org; Thu, 25 Nov 2004 22:40:21 -0500 Received: from [216.136.129.93] (helo=smtp203.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CXWoJ-00032v-NQ for lwip-users@nongnu.org; Thu, 25 Nov 2004 22:30:15 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.238 with login) by smtp203.mail.sc5.yahoo.com with SMTP; 26 Nov 2004 03:30:10 -0000 Date: Fri, 26 Nov 2004 11:31:00 +0800 From: "jack W" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Message-Id: Subject: [lwip-users] i don't konw why X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 03:40:22 -0000 hi every one i have a problem about icmp.c when i ping my board , useing ping 192.168.0.3 l -999 -t , it failed its debug info is "checksum failed for received ICMP echo." but when i ping the board using ping 192.168.0.3 l -1000 -t . it successed i found that when the size of packet is odd bytes if fails and when it si parity bytes it successes. why ? thank you From MAILER-DAEMON Fri Nov 26 00:59:46 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXZ90-0008Vg-KN for mharc-lwip-users@gnu.org; Fri, 26 Nov 2004 00:59:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXZ8z-0008VT-1o for lwip-users@nongnu.org; Fri, 26 Nov 2004 00:59:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXZ8y-0008V3-5S for lwip-users@nongnu.org; Fri, 26 Nov 2004 00:59:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXZ8y-0008V0-1J for lwip-users@nongnu.org; Fri, 26 Nov 2004 00:59:44 -0500 Received: from [202.105.45.51] (helo=21cn.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CXYzY-0004Nv-Gb for lwip-users@nongnu.org; Fri, 26 Nov 2004 00:50:01 -0500 Received: from emperor([127.0.0.1]) by 21cn.com(AIMC 2.9.5.6 P2) with SMTP id jm041a71b8f; Fri, 26 Nov 2004 13:51:42 +0800 Received: from emperor([218.66.59.169]) by 21cn.com(AIMC 2.9.5.4) with SMTP id AISP action; Fri, 26 Nov 2004 13:51:42 +0800 Date: Fri, 26 Nov 2004 13:53:09 +0800 From: "xcb" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 X-AIMC-AUTH: xcbman X-AIMC-MAILFROM: xcbman@21cn.com Message-ID: Subject: [lwip-users] why not realese a new version X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 05:59:45 -0000 bHdpcC11c2Vyc6OsDQoJeW91IGhhdmUgZm91bmQgYSBsb3Qgb2YgYnVnIGluIGx3aXAgMS4wLjAg LGFuZCBzb2x2ZSBpdCAsd2h5IG5vdCByZWFsZXNlIGEgbmV3IHZlcnNpb24/Pz8NCg== From MAILER-DAEMON Fri Nov 26 01:42:48 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXZoe-0001HE-CW for mharc-lwip-users@gnu.org; Fri, 26 Nov 2004 01:42:48 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXZoc-0001H8-8F for lwip-users@nongnu.org; Fri, 26 Nov 2004 01:42:46 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXZob-0001Gw-Pu for lwip-users@nongnu.org; Fri, 26 Nov 2004 01:42:46 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXZob-0001Gt-M1 for lwip-users@nongnu.org; Fri, 26 Nov 2004 01:42:45 -0500 Received: from [203.67.181.35] (helo=mta7.iii.org.tw) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CXZey-0004Ux-TQ for lwip-users@nongnu.org; Fri, 26 Nov 2004 01:32:50 -0500 Received: from mta1.iii.org.tw (mta1.iii.org.tw [140.92.66.14]) by mta7.iii.org.tw (8.12.8/8.12.8) with ESMTP id iAQ6WPaP030679 for ; Fri, 26 Nov 2004 14:32:28 +0800 Received: from exim by mta1.iii.org.tw with scanned-ok (Exim 3.36 #2) id 1CXZea-00050u-00 for lwip-users@nongnu.org; Fri, 26 Nov 2004 14:32:24 +0800 Received: from [140.92.60.196] (helo=jason) by mta1.iii.org.tw with smtp (Exim 3.36 #2) id 1CXZeZ-0004rG-00 for lwip-users@nongnu.org; Fri, 26 Nov 2004 14:32:23 +0800 Message-ID: <00fc01c4d381$afdc0350$c43c5c8c@jason> From: "Wei Bo-Er \(Jason\)" To: "Mailing list for lwIP users" References: Subject: Re: [lwip-users] i don't konw why Date: Fri, 26 Nov 2004 14:31:52 +0800 MIME-Version: 1.0 X-scanner: scanned by Inflex 1.0.10 - (http://pldaniels.com/inflex/) Content-Type: multipart/alternative; boundary="----=_NextPart_000_00F9_01C4D3C4.ABDFACF0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 06:42:46 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_00F9_01C4D3C4.ABDFACF0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable You may check out your network card and it's driver to see if it is = word(2 bytes) alignment and you have made the wrong byte as the last = byte of the received packet. Bo-Er ----- Original Message -----=20 From: jack W=20 To: lwip-users=20 Sent: Friday, November 26, 2004 11:31 AM Subject: [lwip-users] i don't konw why hi every one =20 i have a problem about icmp.c=20 when i ping my board , useing ping 192.168.0.3 l -999 -t , it = failed its debug info is=20 "checksum failed for received ICMP echo." but when i ping the board using ping 192.168.0.3 l -1000 -t . it = successed i found that when the size of packet is odd bytes if fails and when = it si parity bytes it successes. why ? thank you =20 _______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users ------=_NextPart_000_00F9_01C4D3C4.ABDFACF0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
You may check out your network = card and it's driver to see=20 if it is word(2 bytes) alignment and you have made the wrong byte = as the=20 last byte of the received packet.
 
Bo-Er
----- Original = Message -----
From:=20 jack=20 W
Sent: Friday, = November 26, 2004 11:31=20 AM
Subject: = [lwip-users] i don't konw=20 why

hi every one 


    i = have a=20 problem about icmp.c
  when i ping my board , useing ping = 192.168.0.3=20 l -999 -t  , it failed  its debug info is
"checksum = failed for=20 received ICMP echo."

but when i ping the board using ping = 192.168.0.3 l=20 -1000 -t . it successed

 i found that when the size of = packet is=20 odd bytes if fails  and when it si parity bytes it=20 successes.

 why ?

thank you =20 =





_______________________________________________lwip-users=20 mailing list
lwip-users@nongnu.org
http://lists= .nongnu.org/mailman/listinfo/lwip-users ------=_NextPart_000_00F9_01C4D3C4.ABDFACF0-- From MAILER-DAEMON Fri Nov 26 03:43:19 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXbhH-0006wO-0Y for mharc-lwip-users@gnu.org; Fri, 26 Nov 2004 03:43:19 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXbhE-0006vm-Ai for lwip-users@nongnu.org; Fri, 26 Nov 2004 03:43:16 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXbhC-0006vM-Q9 for lwip-users@nongnu.org; Fri, 26 Nov 2004 03:43:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXbhB-0006vE-EN for lwip-users@nongnu.org; Fri, 26 Nov 2004 03:43:14 -0500 Received: from [195.35.170.200] (helo=smtp1.axon.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXbXu-0005gB-7n for lwip-users@nongnu.org; Fri, 26 Nov 2004 03:33:39 -0500 In-Reply-To: Subject: Re: [lwip-users] why not realese a new version To: Mailing list for lwIP users X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 Message-ID: From: christiaan.simons@axon.tv Date: Fri, 26 Nov 2004 09:33:27 +0100 X-MIMETrack: Serialize by Router on Axon_Server2/Axon(Release 6.5.1|January 21, 2004) at 26-11-2004 09:33:38 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 08:43:17 -0000 lwip-users-bounces+christiaan.simons=axon.tv@nongnu.org wrote on 26-11-2004 06:53:09: > you have found a lot of bug in lwip 1.0.0 ,and solve it ,why not > realese a new version??? Cause the maintainers have little time to do runtime tests. Currently there is a release candidate 1.1.0 which I was more or less testing. These tests consist of using manual / DHCP configuration changes, introducing already leased IP addresses on the network, flood pings, gateway passage test etc. (this takes a few days including fixes rebuilds) I guess you don't have CVS access but you want to be on the bleeding edge with the released tars? We can't solve that for you, please be patient... Christiaan Simons Software Engineer Axon Digital Design +31 (0)13 511 66 66 +31 (0)13 511 41 51 christiaan.simons@axon.tv http://www.axon.tv The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed. Axon Digital Design Group is neither liable for the proper nor for the complete transmission of the information contained in this communication nor for any delay in its receipt. Axon Digital Design Group does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. In that case please return the communication to the sender and delete and destroy all copies. In carrying out its engagements, Axon Digital Design Group applies general terms and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge. From MAILER-DAEMON Fri Nov 26 04:24:26 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXcL3-0001Ci-IZ for mharc-lwip-users@gnu.org; Fri, 26 Nov 2004 04:24:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXcKy-0001AT-N1 for lwip-users@nongnu.org; Fri, 26 Nov 2004 04:24:21 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXcKs-00019C-Ud for lwip-users@nongnu.org; Fri, 26 Nov 2004 04:24:15 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXcKs-000199-PC for lwip-users@nongnu.org; Fri, 26 Nov 2004 04:24:14 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXcBC-0006nw-2K for lwip-users@nongnu.org; Fri, 26 Nov 2004 04:14:14 -0500 Received: from web3.messagingengine.com (web3.internal [10.202.2.212]) by frontend1.messagingengine.com (Postfix) with ESMTP id D1D36C3BB24 for ; Fri, 26 Nov 2004 04:14:10 -0500 (EST) Received: by web3.messagingengine.com (Postfix, from userid 99) id 0C3BA2BA8; Fri, 26 Nov 2004 04:14:11 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) To: "Mailing list for lwIP users" Date: Fri, 26 Nov 2004 19:44:11 +1030 From: "Paul C" X-Sasl-Enc: BRE/LMIOhdeoVz8ycY2z5A 1101460451 Message-Id: <1101460451.10507.209495626@webmail.messagingengine.com> Subject: [lwip-users] ARP timer Pending timeout X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 09:24:22 -0000 Hi, One concern I have is that the Arp timer pending timeout is only 1 count (ARP_MAXPENDING). If the ARP is sent and thus a pending ARP entry is generated it is possible that the ARP timer is called imediately following and the pending entry removed before the ARP reply is received. ARP_MAXPENDING was 2 in 0.72 and appears to be changed by likewise (whoever that is) to 1. Perhaps the ETHARP_TMR_INTERVAL could be faster and thus make the time uncertainty smaller? Paul From MAILER-DAEMON Fri Nov 26 05:03:31 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXcws-000453-VP for mharc-lwip-users@gnu.org; Fri, 26 Nov 2004 05:03:31 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXcwq-00044t-Ih for lwip-users@nongnu.org; Fri, 26 Nov 2004 05:03:28 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXcwo-00044W-VM for lwip-users@nongnu.org; Fri, 26 Nov 2004 05:03:27 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXcwo-00044R-9q for lwip-users@nongnu.org; Fri, 26 Nov 2004 05:03:26 -0500 Received: from [202.105.45.50] (helo=21cn.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CXcnV-0008Oa-QG for lwip-users@nongnu.org; Fri, 26 Nov 2004 04:53:51 -0500 Received: from emperor([127.0.0.1]) by 21cn.com(AIMC 2.9.5.6 P2) with SMTP id jm941a7116e; Fri, 26 Nov 2004 17:55:32 +0800 Received: from emperor([218.66.59.169]) by 21cn.com(AIMC 2.9.5.4) with SMTP id AISP action; Fri, 26 Nov 2004 17:55:32 +0800 Date: Fri, 26 Nov 2004 17:56:59 +0800 From: "xcb" To: "lwip-users" X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit X-AIMC-AUTH: xcbman X-AIMC-MAILFROM: xcbman@21cn.com Message-ID: Subject: [lwip-users] help about cgi program X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 10:03:29 -0000 lwip-users who can give source code about cgi or egi that can run lwip???(OS is Windows) ,thanks From MAILER-DAEMON Fri Nov 26 05:42:28 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXdYZ-00065y-Kf for mharc-lwip-users@gnu.org; Fri, 26 Nov 2004 05:42:27 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXdYT-00065a-IC for lwip-users@nongnu.org; Fri, 26 Nov 2004 05:42:22 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXdYO-000652-Qj for lwip-users@nongnu.org; Fri, 26 Nov 2004 05:42:20 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXdYO-00064V-4C for lwip-users@nongnu.org; Fri, 26 Nov 2004 05:42:16 -0500 Received: from [131.111.8.132] (helo=ppsw-2.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CXdOo-0000pQ-S8 for lwip-users@nongnu.org; Fri, 26 Nov 2004 05:32:23 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:43474) by ppsw-2.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.152]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) id 1CXdOj-00048v-8Q (Exim 4.44) for lwip-users@nongnu.org (return-path ); Fri, 26 Nov 2004 10:32:17 +0000 Subject: Re: [lwip-users] help about cgi program From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: References: Content-Type: text/plain Organization: Message-Id: <1101465137.31277.6.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 26 Nov 2004 10:32:17 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 10:42:24 -0000 On Fri, 2004-11-26 at 09:56, xcb wrote: > lwip-users > > who can give source code about cgi or egi that can run lwip???(OS is Windows) ,thanks Assuming you mean cgi as in code that provides dynamic content to a web server, the fact that you're using lwIP is (or should be!) irrelevant. I don't know much about the windows port, but assuming it provides the sockets API, any code or application that uses this API should work as normal. (Apart from if it uses any bits of the API that we haven't implemented). The same goes for other applications like ftp or web servers that I think you've asked about in the past: you should be able to use any you like. Hope that answers your question. Kieran From MAILER-DAEMON Fri Nov 26 08:44:46 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CXgP0-000276-8l for mharc-lwip-users@gnu.org; Fri, 26 Nov 2004 08:44:46 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CXgOy-00026y-Ml for lwip-users@nongnu.org; Fri, 26 Nov 2004 08:44:44 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CXgOy-00026m-7v for lwip-users@nongnu.org; Fri, 26 Nov 2004 08:44:44 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CXgOy-00026j-5m for lwip-users@nongnu.org; Fri, 26 Nov 2004 08:44:44 -0500 Received: from [216.136.130.127] (helo=smtp204.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CXgFV-0004gN-TB for lwip-users@nongnu.org; Fri, 26 Nov 2004 08:34:58 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.238 with login) by smtp204.mail.sc5.yahoo.com with SMTP; 26 Nov 2004 13:34:52 -0000 Date: Fri, 26 Nov 2004 21:35:36 +0800 From: "jack W" To: "Mailing list for lwIP users" Subject: Re: Re: [lwip-users] i don't konw why X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="=====003_Dragon188542648774_=====" Message-Id: X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 26 Nov 2004 13:44:44 -0000 This is a multi-part message in MIME format. --=====003_Dragon188542648774_===== Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 V2VpIEJvLUVyIFwoSmFzb25cKaOsxPq6w6OhIA0KDQqhoaGhYnV0IHdoZW4gaSBza2lwIHRoZSBj aGVja3N1bSAgaW4gdGhlIGljbXAuYywgIHBpbmcgdGhlIGJvYXJkIHVzaW5nIHBpbmcgMTkyLjE2 OC4wLjMgLWwgMTAwMSAtdCBhbmQgIHBpbmcgMTkyLjE2OC4wLjMgLWwgMTAwMCAtdCAgLCBpdCBz dWNjZXNzZWQuIFdoeSA/IGEgYnVnPw0KDQo9PT09PT09PSAyMDA0LTExLTI2IDE0OjMxOjUyIMT6 1NrAtNDF1tDQtLXAo7ogPT09PT09PT0NCg0KWW91IG1heSBjaGVjayBvdXQgeW91ciBuZXR3b3Jr IGNhcmQgYW5kIGl0J3MgZHJpdmVyIHRvIHNlZSBpZiBpdCBpcyB3b3JkKDIgYnl0ZXMpIGFsaWdu bWVudCBhbmQgeW91IGhhdmUgbWFkZSB0aGUgd3JvbmcgYnl0ZSBhcyB0aGUgbGFzdCBieXRlIG9m IHRoZSByZWNlaXZlZCBwYWNrZXQuDQoNCkJvLUVyDQotLS0tLSBPcmlnaW5hbCBNZXNzYWdlIC0t LS0tIA0KRnJvbTogamFjayBXIA0KVG86IGx3aXAtdXNlcnMgDQpTZW50OiBGcmlkYXksIE5vdmVt YmVyIDI2LCAyMDA0IDExOjMxIEFNDQpTdWJqZWN0OiBbbHdpcC11c2Vyc10gaSBkb24ndCBrb253 IHdoeQ0KDQoNCmhpIGV2ZXJ5IG9uZSAgDQoNCg0KICAgIGkgaGF2ZSBhIHByb2JsZW0gYWJvdXQg aWNtcC5jIA0KICB3aGVuIGkgcGluZyBteSBib2FyZCAsIHVzZWluZyBwaW5nIDE5Mi4xNjguMC4z IGwgLTk5OSAtdCAgLCBpdCBmYWlsZWQgIGl0cyBkZWJ1ZyBpbmZvIGlzIA0KImNoZWNrc3VtIGZh aWxlZCBmb3IgcmVjZWl2ZWQgSUNNUCBlY2hvLiINCg0KYnV0IHdoZW4gaSBwaW5nIHRoZSBib2Fy ZCB1c2luZyBwaW5nIDE5Mi4xNjguMC4zIGwgLTEwMDAgLXQgLiBpdCBzdWNjZXNzZWQNCg0KIGkg Zm91bmQgdGhhdCB3aGVuIHRoZSBzaXplIG9mIHBhY2tldCBpcyBvZGQgYnl0ZXMgaWYgZmFpbHMg IGFuZCB3aGVuIGl0IHNpIHBhcml0eSBieXRlcyBpdCBzdWNjZXNzZXMuDQoNCiB3aHkgPw0KDQp0 aGFuayB5b3UgIA0KDQoNCg0KDQoNCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX19fDQpsd2lwLXVzZXJzIG1haWxpbmcgbGlzdA0KbHdpcC11c2Vyc0Bub25nbnUu b3JnDQpodHRwOi8vbGlzdHMubm9uZ251Lm9yZy9tYWlsbWFuL2xpc3RpbmZvL2x3aXAtdXNlcnMN Cg0KPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSANCqGhoaGhoaGh oaGhoaGhoaHWwg0KwPGjoQ0KDQqhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhamFjayBXDQqh oaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhc2R1c3RoZDIwMDBAeWFob28uY29tLmNuDQqhoaGh oaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaEyMDA0LTExLTI2DQo= --=====003_Dragon188542648774_===== Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9uYWwv L0VOIj4NCjxIVE1MPjxIRUFEPg0KPE1FVEEgaHR0cC1lcXVpdj1Db250ZW50LVR5cGUgY29udGVu dD0idGV4dC9odG1sOyBjaGFyc2V0PWdiMjMxMiI+DQo8TUVUQSBjb250ZW50PSJNU0hUTUwgNi4w MC4yODAwLjE0MDAiIG5hbWU9R0VORVJBVE9SPjwvSEVBRD4NCjxCT0RZIGJnQ29sb3I9I2VhZWFl YT48Rk9OVCBzaXplPTI+PEZPTlQgZmFjZT3LzszlPldlaSBCby1FciBcKEphc29uXCmjrMT6usOj oTwvRk9OVD4gDQo8L0ZPTlQ+DQo8RElWPiZuYnNwOzwvRElWPg0KPERJVj48Rk9OVCBmYWNlPcvO zOUgc2l6ZT0yPqGhoaFidXQgd2hlbiBpIHNraXAgdGhlIGNoZWNrc3VtJm5ic3A7IGluIHRoZSAN CmljbXAuYywmbmJzcDsgcGluZyB0aGUgYm9hcmQgdXNpbmcgcGluZyAxOTIuMTY4LjAuMyAtbCAx MDAxIC10IGFuZCZuYnNwOyBwaW5nIA0KMTkyLjE2OC4wLjMgLWwgMTAwMCAtdCZuYnNwOyAsIGl0 IHN1Y2Nlc3NlZC4gV2h5ID8gYSBidWc/PC9GT05UPjwvRElWPg0KPERJVj4mbmJzcDs8L0RJVj4N CjxESVY+PEZPTlQgZmFjZT3LzszlIHNpemU9Mj49PT09PT09PSAyMDA0LTExLTI2Jm5ic3A7MTQ6 MzE6NTImbmJzcDvE+tTawLTQxdbQ0LS1wKO6IA0KPT09PT09PT08L0ZPTlQ+PC9ESVY+DQo8RElW PiZuYnNwOzwvRElWPg0KPERJVj48Rk9OVCBzaXplPTI+DQo8VEFCTEUgd2lkdGg9IjEwMCUiPg0K ICA8VEJPRFk+DQogIDxUUj4NCiAgICA8VEQgd2lkdGg9IjEwMCUiPg0KICAgICAgPEJMT0NLUVVP VEUgDQogICAgICBzdHlsZT0iUEFERElORy1SSUdIVDogMHB4OyBQQURESU5HLUxFRlQ6IDVweDsg TUFSR0lOLUxFRlQ6IDVweDsgQk9SREVSLUxFRlQ6ICMwMDAwMDAgMnB4IHNvbGlkOyBNQVJHSU4t UklHSFQ6IDBweCI+DQogICAgICAgIDxESVY+PEZPTlQgZmFjZT3Qwryaw/fzdz5Zb3UgbWF5IGNo ZWNrIG91dCB5b3VyIG5ldHdvcmsgY2FyZCBhbmQgaXQncyBkcml2ZXIgDQogICAgICAgIHRvIHNl ZSBpZiBpdCBpcyB3b3JkKDIgYnl0ZXMpIGFsaWdubWVudCBhbmQgeW91IGhhdmUmbmJzcDttYWRl IHRoZSB3cm9uZyANCiAgICAgICAgYnl0ZSBhcyB0aGUgbGFzdCZuYnNwO2J5dGUgb2YgdGhlIHJl Y2VpdmVkIHBhY2tldC48L0ZPTlQ+PC9ESVY+DQogICAgICAgIDxESVY+PEZPTlQgZmFjZT3Qwrya w/fzdz48L0ZPTlQ+Jm5ic3A7PC9ESVY+DQogICAgICAgIDxESVY+PEZPTlQgZmFjZT3Qwryaw/fz dz5Cby1FcjwvRk9OVD48L0RJVj4NCiAgICAgICAgPEJMT0NLUVVPVEUgDQogICAgICAgIHN0eWxl PSJQQURESU5HLVJJR0hUOiAwcHg7IFBBRERJTkctTEVGVDogNXB4OyBNQVJHSU4tTEVGVDogNXB4 OyBCT1JERVItTEVGVDogIzAwMDAwMCAycHggc29saWQ7IE1BUkdJTi1SSUdIVDogMHB4Ij4NCiAg ICAgICAgICA8RElWIHN0eWxlPSJGT05UOiAxMHB0INDCvJrD9/N3Ij4tLS0tLSBPcmlnaW5hbCBN ZXNzYWdlIC0tLS0tIDwvRElWPg0KICAgICAgICAgIDxESVYgDQogICAgICAgICAgc3R5bGU9IkJB Q0tHUk9VTkQ6ICNlNGU0ZTQ7IEZPTlQ6IDEwcHQg0MK8msP383c7IGZvbnQtY29sb3I6IGJsYWNr Ij48Qj5Gcm9tOjwvQj4gDQogICAgICAgICAgPEEgdGl0bGU9c2R1c3RoZDIwMDBAeWFob28uY29t LmNuIA0KICAgICAgICAgIGhyZWY9Im1haWx0bzpzZHVzdGhkMjAwMEB5YWhvby5jb20uY24iPmph Y2sgVzwvQT4gPC9ESVY+DQogICAgICAgICAgPERJViBzdHlsZT0iRk9OVDogMTBwdCDQwryaw/fz dyI+PEI+VG86PC9CPiA8QSB0aXRsZT1sd2lwLXVzZXJzQG5vbmdudS5vcmcgDQogICAgICAgICAg aHJlZj0ibWFpbHRvOmx3aXAtdXNlcnNAbm9uZ251Lm9yZyI+bHdpcC11c2VyczwvQT4gPC9ESVY+ DQogICAgICAgICAgPERJViBzdHlsZT0iRk9OVDogMTBwdCDQwryaw/fzdyI+PEI+U2VudDo8L0I+ IEZyaWRheSwgTm92ZW1iZXIgMjYsIDIwMDQgDQogICAgICAgICAgMTE6MzEgQU08L0RJVj4NCiAg ICAgICAgICA8RElWIHN0eWxlPSJGT05UOiAxMHB0INDCvJrD9/N3Ij48Qj5TdWJqZWN0OjwvQj4g W2x3aXAtdXNlcnNdIGkgZG9uJ3Qga29udyANCiAgICAgICAgICB3aHk8L0RJVj4NCiAgICAgICAg ICA8RElWPjxCUj48L0RJVj5oaSBldmVyeSBvbmUmbmJzcDsgPEJSPjxCUj48QlI+Jm5ic3A7Jm5i c3A7Jm5ic3A7IGkgDQogICAgICAgICAgaGF2ZSBhIHByb2JsZW0gYWJvdXQgaWNtcC5jIDxCUj4m bmJzcDsgd2hlbiBpIHBpbmcgbXkgYm9hcmQgLCB1c2VpbmcgDQogICAgICAgICAgcGluZyAxOTIu MTY4LjAuMyBsIC05OTkgLXQmbmJzcDsgLCBpdCBmYWlsZWQmbmJzcDsgaXRzIGRlYnVnIGluZm8g aXMgDQogICAgICAgICAgPEJSPiJjaGVja3N1bSBmYWlsZWQgZm9yIHJlY2VpdmVkIElDTVAgZWNo by4iPEJSPjxCUj5idXQgd2hlbiBpIHBpbmcgDQogICAgICAgICAgdGhlIGJvYXJkIHVzaW5nIHBp bmcgMTkyLjE2OC4wLjMgbCAtMTAwMCAtdCAuIGl0IA0KICAgICAgICAgIHN1Y2Nlc3NlZDxCUj48 QlI+Jm5ic3A7aSBmb3VuZCB0aGF0IHdoZW4gdGhlIHNpemUgb2YgcGFja2V0IGlzIG9kZCANCiAg ICAgICAgICBieXRlcyBpZiBmYWlscyZuYnNwOyBhbmQgd2hlbiBpdCBzaSBwYXJpdHkgYnl0ZXMg aXQgDQogICAgICAgICAgc3VjY2Vzc2VzLjxCUj48QlI+Jm5ic3A7d2h5ID88QlI+PEJSPnRoYW5r IHlvdSZuYnNwOyANCiAgICAgICAgICA8QlI+PEJSPjxCUj48QlI+PEJSPjxCUj5fX19fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fXzxCUj5sd2lwLXVzZXJzIA0KICAg ICAgICAgIG1haWxpbmcgbGlzdDxCUj48QSANCiAgICAgICAgICBocmVmPSJtYWlsdG86bHdpcC11 c2Vyc0Bub25nbnUub3JnIj5sd2lwLXVzZXJzQG5vbmdudS5vcmc8L0E+PEJSPjxBIA0KICAgICAg ICAgIGhyZWY9Imh0dHA6Ly9saXN0cy5ub25nbnUub3JnL21haWxtYW4vbGlzdGluZm8vbHdpcC11 c2VycyI+aHR0cDovL2xpc3RzLm5vbmdudS5vcmcvbWFpbG1hbi9saXN0aW5mby9sd2lwLXVzZXJz PC9BPjwvQkxPQ0tRVU9URT48L0JMT0NLUVVPVEU+PC9URD48L1RSPjwvVEJPRFk+PC9UQUJMRT48 L0ZPTlQ+PC9ESVY+DQo8RElWPg0KPFA+PEZPTlQgZmFjZT3LzszlIHNpemU9Mj49ID0gPSA9ID0g PSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9IDwvRk9OVD48L1A+DQo8UD48Rk9OVCBm YWNlPcvOzOUgc2l6ZT0yPqGhoaGhoaGhoaGhoaGhoaHWwjxCUj7A8aOhPC9GT05UPjwvUD4NCjxE SVY+Jm5ic3A7PC9ESVY+DQo8RElWPjxGT05UIGZhY2U9y87M5SBzaXplPTI+oaGhoaGhoaGhoaGh oaGhoaGhoaGhoaGhoaGhoWphY2sgVzwvRk9OVD48L0RJVj4NCjxESVY+PEZPTlQgZmFjZT3Lzszl IHNpemU9Mj48Rk9OVCBmYWNlPcvOzOUgc2l6ZT0yPqGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGh oaE8L0ZPTlQ+PEEgDQpocmVmPSJtYWlsdG86c2R1c3RoZDIwMDBAeWFob28uY29tLmNuIj5zZHVz dGhkMjAwMEB5YWhvby5jb20uY248L0E+PC9GT05UPjwvRElWPg0KPERJVj48Rk9OVCBmYWNlPcvO zOUgc2l6ZT0yPqGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoaGhoTIwMDQtMTEtMjY8L0ZPTlQ+ PC9ESVY+DQo8RElWPiZuYnNwOzwvRElWPjwvRElWPjwvQk9EWT48L0hUTUw+DQo= --=====003_Dragon188542648774_=====-- From MAILER-DAEMON Sat Nov 27 05:57:41 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CY0Gq-000802-V4 for mharc-lwip-users@gnu.org; Sat, 27 Nov 2004 05:57:41 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CY0Go-0007zS-MW for lwip-users@nongnu.org; Sat, 27 Nov 2004 05:57:38 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CY0Gm-0007yo-UN for lwip-users@nongnu.org; Sat, 27 Nov 2004 05:57:37 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CY0Gm-0007yh-LA for lwip-users@nongnu.org; Sat, 27 Nov 2004 05:57:36 -0500 Received: from [4.27.241.139] (helo=fn-orion.dyndns.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CY07H-0001v9-VV for lwip-users@nongnu.org; Sat, 27 Nov 2004 05:47:48 -0500 Received: from chris by fn-orion.dyndns.org with local (Exim 3.35 #1 (Debian)) id 1CY07G-00039x-00 for ; Sat, 27 Nov 2004 02:47:46 -0800 Date: Sat, 27 Nov 2004 02:47:46 -0800 To: lwip-users@nongnu.org Message-ID: <20041127104746.GL2505@frostnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-PGP-Key: Send email with subject 'retrieve pgp key' X-PGP-Fingerprint: Send email with subject 'retrieve pgp fingerprint' From: Chris Frost Subject: [lwip-users] Building lwip and ip.h et al not being found X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 10:57:39 -0000 I was quite excited to see the existance of lwip a few weeks back, and am beginning to port it to a small os now. In building lwip in the enviroment, I see that lwip/api.h includes "lwip/ip.h". But, this file does not exist. Specically, the compiler error: i386-jos-elf-gcc -pipe -nostdinc -fno-builtin -I. -MD -Wall -Wno-format -ggdb -DJOS_USER -I./inc/net/ -I./inc/ -c -o obj/user/net/api/api_lib.o lib/net/api/api_lib.c In file included from lib/net/api/api_lib.c:37: ./inc/net/lwip/api.h:39:21: lwip/ip.h: No such file or directory In file included from ./inc/net/lwip/api.h:41, from lib/net/api/api_lib.c:37: ./inc/net/lwip/raw.h:38:23: lwip/inet.h: No such file or directory In file included from ./inc/net/lwip/api.h:41, from lib/net/api/api_lib.c:37: At first I thought that perhaps I needed to link either the ipv4 or the ipv6 files to lwip/, but this breaks the build later on with redeclarations for ipv6 .c files. (I'd be fine with having just ipv4, if this matters?) Could anyone help me clarify what I seem to be missing here? thanks! -- Chris Frost | -------------+---------------------------------- Public PGP Key: Email chris@frostnet.net with the subject "retrieve pgp key" or visit From MAILER-DAEMON Sat Nov 27 06:22:10 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CY0eX-00052L-Uy for mharc-lwip-users@gnu.org; Sat, 27 Nov 2004 06:22:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CY0eW-00051u-0P for lwip-users@nongnu.org; Sat, 27 Nov 2004 06:22:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CY0eU-00050s-Ra for lwip-users@nongnu.org; Sat, 27 Nov 2004 06:22:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CY0eU-00050b-Ju for lwip-users@nongnu.org; Sat, 27 Nov 2004 06:22:06 -0500 Received: from [131.111.8.135] (helo=ppsw-5.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CY0Up-0006UP-6Z for lwip-users@nongnu.org; Sat, 27 Nov 2004 06:12:07 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:44825) by ppsw-5.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.155]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) id 1CY0Ui-0007Or-I4 (Exim 4.44) for lwip-users@nongnu.org (return-path ); Sat, 27 Nov 2004 11:12:00 +0000 Subject: Re: [lwip-users] Building lwip and ip.h et al not being found From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: <20041127104746.GL2505@frostnet.net> References: <20041127104746.GL2505@frostnet.net> Content-Type: text/plain Organization: Message-Id: <1101553920.3426.2.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 27 Nov 2004 11:12:00 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 11:22:08 -0000 On Sat, 2004-11-27 at 10:47, Chris Frost wrote: > I was quite excited to see the existance of lwip a few weeks back, and > am beginning to port it to a small os now. In building lwip in > the enviroment, I see that lwip/api.h includes "lwip/ip.h". But, this file does > not exist. Specically, the compiler error: > > i386-jos-elf-gcc -pipe -nostdinc -fno-builtin -I. -MD -Wall -Wno-format -ggdb -DJOS_USER -I./inc/net/ -I./inc/ -c -o obj/user/net/api/api_lib.o lib/net/api/api_lib.c > In file included from lib/net/api/api_lib.c:37: > ./inc/net/lwip/api.h:39:21: lwip/ip.h: No such file or directory > In file included from ./inc/net/lwip/api.h:41, > from lib/net/api/api_lib.c:37: > ./inc/net/lwip/raw.h:38:23: lwip/inet.h: No such file or directory > In file included from ./inc/net/lwip/api.h:41, > from lib/net/api/api_lib.c:37: > > > At first I thought that perhaps I needed to link either the ipv4 or the > ipv6 files to lwip/, but this breaks the build later on with redeclarations > for ipv6 .c files. (I'd be fine with having just ipv4, if this matters?) Add either -Isrc/include/ipv4 or -Isrc/include/ipv6 to your gcc command. You may need to change those paths a little as you seem to have a bit of a non-standard build tree, but I'm sure you get the idea! Kieran From MAILER-DAEMON Sat Nov 27 15:33:14 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CY9Fq-0006QM-Fj for mharc-lwip-users@gnu.org; Sat, 27 Nov 2004 15:33:14 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CY9Fo-0006QH-83 for lwip-users@nongnu.org; Sat, 27 Nov 2004 15:33:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CY9Fn-0006Q5-Pl for lwip-users@nongnu.org; Sat, 27 Nov 2004 15:33:11 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CY9Fn-0006Q2-L7 for lwip-users@nongnu.org; Sat, 27 Nov 2004 15:33:11 -0500 Received: from [4.27.241.139] (helo=fn-orion.dyndns.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CY96E-0006s9-W0 for lwip-users@nongnu.org; Sat, 27 Nov 2004 15:23:19 -0500 Received: from chris by fn-orion.dyndns.org with local (Exim 3.35 #1 (Debian)) id 1CY96E-0006Aw-00 for ; Sat, 27 Nov 2004 12:23:18 -0800 Date: Sat, 27 Nov 2004 12:23:18 -0800 To: Mailing list for lwIP users Subject: Re: [lwip-users] Building lwip and ip.h et al not being found Message-ID: <20041127202318.GN2505@frostnet.net> References: <20041127104746.GL2505@frostnet.net> <1101553920.3426.2.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1101553920.3426.2.camel@kirin.eng.cam.ac.uk> User-Agent: Mutt/1.3.28i X-PGP-Key: Send email with subject 'retrieve pgp key' X-PGP-Fingerprint: Send email with subject 'retrieve pgp fingerprint' From: Chris Frost X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 20:33:12 -0000 On Sat, Nov 27, 2004 at 11:12:00AM +0000, K.J. Mansley wrote: > Add either -Isrc/include/ipv4 or -Isrc/include/ipv6 to your gcc > command. You may need to change those paths a little as you seem to > have a bit of a non-standard build tree, but I'm sure you get the idea! Thank you, I think I misunderstood how ipv4 and ipv6 go in. It sounds like only one may be used in a particular build? This is my first experience in using lwip (v1.0.0, fwiw), are Adam Dunkels' 2001 paper, doc/sys_arch.txt, and the contrib 0.7.1 arch files good sources to learn from to see what I need to do to support lwip? -- Chris Frost | -------------+---------------------------------- Public PGP Key: Email chris@frostnet.net with the subject "retrieve pgp key" or visit From MAILER-DAEMON Sat Nov 27 15:40:11 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CY9MZ-00008u-I1 for mharc-lwip-users@gnu.org; Sat, 27 Nov 2004 15:40:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CY9MW-00006n-SZ for lwip-users@nongnu.org; Sat, 27 Nov 2004 15:40:10 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CY9MU-00006M-Lb for lwip-users@nongnu.org; Sat, 27 Nov 2004 15:40:07 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CY9MU-00006J-Dp for lwip-users@nongnu.org; Sat, 27 Nov 2004 15:40:06 -0500 Received: from [131.111.8.130] (helo=ppsw-0.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CY9Cs-0008FS-J5 for lwip-users@nongnu.org; Sat, 27 Nov 2004 15:30:10 -0500 Received: from hermes-1.csi.cam.ac.uk ([131.111.8.51]:48164) by ppsw-0.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.150]:25) with esmtpa (EXTERNAL:kjm25) id 1CY9Cn-0001wL-1n (Exim 4.44) for lwip-users@nongnu.org (return-path ); Sat, 27 Nov 2004 20:30:05 +0000 Received: from kjm25 (helo=localhost) by hermes-1.csi.cam.ac.uk (hermes.cam.ac.uk) with local-esmtp id 1CY9Cn-0008HV-H0 (Exim 4.43) for lwip-users@nongnu.org (return-path ); Sat, 27 Nov 2004 20:30:05 +0000 Date: Sat, 27 Nov 2004 20:30:05 +0000 (GMT) From: Kieran Mansley X-X-Sender: kjm25@hermes-1.csi.cam.ac.uk To: Mailing list for lwIP users Subject: Re: [lwip-users] Building lwip and ip.h et al not being found In-Reply-To: <20041127202318.GN2505@frostnet.net> Message-ID: References: <20041127104746.GL2505@frostnet.net> <1101553920.3426.2.camel@kirin.eng.cam.ac.uk> <20041127202318.GN2505@frostnet.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Sender: kjm25@hermes.cam.ac.uk X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 20:40:10 -0000 On Sat, 27 Nov 2004, Chris Frost wrote: > On Sat, Nov 27, 2004 at 11:12:00AM +0000, K.J. Mansley wrote: >> Add either -Isrc/include/ipv4 or -Isrc/include/ipv6 to your gcc >> command. You may need to change those paths a little as you seem to >> have a bit of a non-standard build tree, but I'm sure you get the idea! > > Thank you, I think I misunderstood how ipv4 and ipv6 go in. It sounds > like only one may be used in a particular build? Yes, I think so. > This is my first experience in using lwip (v1.0.0, fwiw), are Adam > Dunkels' 2001 paper, Probably out of date by now, but may have some core concepts that are of interest. > doc/sys_arch.txt, and the contrib 0.7.1 arch > files good sources to learn from to see what I need to do to support lwip? Again, not completely up to date, but better than nothing! Like many open source projects we're woefully short of documentation: I've asked before, but if anyone feels like helping out (and often newcomers are best at this as they encounter the problems, and so know what needs clarifying) with documentation, all contributions would be gratefully received. In the mean time, this mailing list (and its archives, when they are working) should be able to help with most problems. Kieran From MAILER-DAEMON Sat Nov 27 16:26:07 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYA51-00045C-Dh for mharc-lwip-users@gnu.org; Sat, 27 Nov 2004 16:26:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYA50-000457-2l for lwip-users@nongnu.org; Sat, 27 Nov 2004 16:26:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYA4z-00044v-Kb for lwip-users@nongnu.org; Sat, 27 Nov 2004 16:26:05 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYA4z-00044s-HT for lwip-users@nongnu.org; Sat, 27 Nov 2004 16:26:05 -0500 Received: from [4.27.241.139] (helo=fn-orion.dyndns.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CY9vF-00006G-3m for lwip-users@nongnu.org; Sat, 27 Nov 2004 16:16:01 -0500 Received: from chris by fn-orion.dyndns.org with local (Exim 3.35 #1 (Debian)) id 1CY9vE-0006Sq-00 for ; Sat, 27 Nov 2004 13:16:00 -0800 Date: Sat, 27 Nov 2004 13:16:00 -0800 To: Mailing list for lwIP users Subject: Re: [lwip-users] Building lwip and ip.h et al not being found Message-ID: <20041127211600.GO2505@frostnet.net> References: <20041127104746.GL2505@frostnet.net> <1101553920.3426.2.camel@kirin.eng.cam.ac.uk> <20041127202318.GN2505@frostnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.28i X-PGP-Key: Send email with subject 'retrieve pgp key' X-PGP-Fingerprint: Send email with subject 'retrieve pgp fingerprint' From: Chris Frost X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Nov 2004 21:26:06 -0000 On Sat, Nov 27, 2004 at 08:30:05PM +0000, Kieran Mansley wrote: > >This is my first experience in using lwip (v1.0.0, fwiw), are Adam > >Dunkels' 2001 paper, > > Probably out of date by now, but may have some core concepts that are of > interest. > > >doc/sys_arch.txt, and the contrib 0.7.1 arch > >files good sources to learn from to see what I need to do to support lwip? > > Again, not completely up to date, but better than nothing! Like many open > source projects we're woefully short of documentation: I've asked before, > but if anyone feels like helping out (and often newcomers are best at this > as they encounter the problems, and so know what needs clarifying) with > documentation, all contributions would be gratefully received. > > In the mean time, this mailing list (and its archives, when they are > working) should be able to help with most problems. I'd be happy to help with some documentation as I work my way along. I'm still trying to gauge whether I can do a port in a day or two amount of work; if this works out, I'd be happy to help with this. Looking through cvs, it looks like the ports in contrib are generally much older than the 1.0.0 release of lwip. (Maybe I misread or missed a port, though?) Are there any available ports for lwip 1.0.0 (or close to it) that I could read? thanks again, -- Chris Frost | -------------+---------------------------------- Public PGP Key: Email chris@frostnet.net with the subject "retrieve pgp key" or visit From MAILER-DAEMON Sun Nov 28 11:03:05 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYRVx-0000OC-Ie for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 11:03:05 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYRVv-0000O0-U7 for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:03:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYRVv-0000Nb-54 for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:03:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYRVv-0000NY-0V for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:03:03 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYRMU-0006K4-1l for lwip-users@nongnu.org; Sun, 28 Nov 2004 10:53:18 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 5ABC1C3C6F0 for ; Sun, 28 Nov 2004 10:53:17 -0500 (EST) X-Sasl-enc: duYKZCid5Udz5tDGv1ioCw 1101657197 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id 2D3C126A03 for ; Sun, 28 Nov 2004 10:53:17 -0500 (EST) Message-ID: <41A9F496.4050307@mailcan.com> Date: Sun, 28 Nov 2004 16:53:58 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] lwIP port for Coldfire 5282 References: <20041104123614.56730.qmail@web61006.mail.yahoo.com> In-Reply-To: <20041104123614.56730.qmail@web61006.mail.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 16:03:04 -0000 Hello Errin, Errin Bechtel wrote: >Fran=E7ois > Here is what I have. I took the 5272fec.c that was >in cvs and modified it for the 5282. =20 > >Errin > =20 > Any chance of having this into the contrib CVS module? I could either just throw it in (so it is available) or if you wish, I can give you CVS access to maintain the source in contrib/ Regards, Regards, Leon. From MAILER-DAEMON Sun Nov 28 11:03:06 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYRVx-0000OG-QY for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 11:03:05 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYRVv-0000O2-UL for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:03:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYRVv-0000Ni-9w for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:03:03 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYRVv-0000NY-8N for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:03:03 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYRM9-0006Gh-BF for lwip-users@nongnu.org; Sun, 28 Nov 2004 10:52:57 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 07206C3C134 for ; Sun, 28 Nov 2004 10:52:55 -0500 (EST) X-Sasl-enc: Z7xsEDHqYP/DSFjlhZSZRQ 1101657174 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id B9A8E26A03 for ; Sun, 28 Nov 2004 10:52:54 -0500 (EST) Message-ID: <41A9F47F.1090109@mailcan.com> Date: Sun, 28 Nov 2004 16:53:35 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] ARP timer Pending timeout References: <1101460451.10507.209495626@webmail.messagingengine.com> In-Reply-To: <1101460451.10507.209495626@webmail.messagingengine.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 16:03:04 -0000 Hello Paul, >One concern I have is that the Arp timer pending timeout is only 1 count >(ARP_MAXPENDING). If the ARP is sent and thus a pending ARP entry is >generated it is possible that the ARP timer is called imediately >following and the pending entry removed before the ARP reply is >received. ARP_MAXPENDING was 2 in 0.72 and appears to be changed by >likewise (whoever that is) to 1. Perhaps the ETHARP_TMR_INTERVAL could >be faster and thus make the time uncertainty smaller? > > > Agreed either this has to be changed back to 2, and possibly halve the timer period. 'likewise' is my login. Regards, Leon. From MAILER-DAEMON Sun Nov 28 11:23:36 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYRpo-0006uj-Du for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 11:23:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYRpm-0006uV-PP for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:23:34 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYRpl-0006u4-V0 for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:23:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYRpl-0006u1-S8 for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:23:33 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYRg5-0001jg-Ag for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:13:33 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 99E47C3C56C for ; Sun, 28 Nov 2004 11:13:32 -0500 (EST) X-Sasl-enc: nK6sj8CgTjjnMcKH9nyTgg 1101658412 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id 5677926A03 for ; Sun, 28 Nov 2004 11:13:32 -0500 (EST) Message-ID: <41A9F955.4020900@mailcan.com> Date: Sun, 28 Nov 2004 17:14:13 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] why not realese a new version References: In-Reply-To: Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: quoted-printable X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 16:23:35 -0000 Hello, xcb wrote: >lwip-users=A3=AC > you have found a lot of bug in lwip 1.0.0 ,and solve it ,why not reales= e a new version??? > =20 > Good idea, we already put out a 1.1.0-RC1 (release candidate) but we stir= red some people that reported enough bugs in there to fix those first. My personal idea is that we need to make sure we have the known bugs fixe= d, and we are well underway with the current activities on lwip-users. Keep the testing and comments going! I think there is room for a second RC next week. Regards, Leon. From MAILER-DAEMON Sun Nov 28 11:46:43 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYSCB-0004ZY-AM for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 11:46:43 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYSC0-0004Yf-QD for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:46:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYSBz-0004YB-Tx for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:46:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYSBz-0004Y1-RS for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:46:31 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYS2S-0006Aj-6N for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:36:40 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 05F15C3C79F for ; Sun, 28 Nov 2004 11:36:39 -0500 (EST) X-Sasl-enc: zwpYyCxi3UlgjWaQTLRT5w 1101659798 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id D339E2553F for ; Sun, 28 Nov 2004 11:36:38 -0500 (EST) Message-ID: <41A9FEC0.9010908@mailcan.com> Date: Sun, 28 Nov 2004 17:37:20 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] Building lwip and ip.h et al not being found References: <20041127104746.GL2505@frostnet.net> <1101553920.3426.2.camel@kirin.eng.cam.ac.uk> <20041127202318.GN2505@frostnet.net> <20041127211600.GO2505@frostnet.net> In-Reply-To: <20041127211600.GO2505@frostnet.net> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 16:46:33 -0000 Chris Frost wrote: >I'd be happy to help with some documentation as I work my way along. I'm >still trying to gauge whether I can do a port in a day or two amount of work; >if this works out, I'd be happy to help with this. > > > You are fresh to lwIP, it would be great if you can write some "getting started" documentation. Please see what's already there in doc/ so that you don't write redundant docs; rather refer to existing doc. >Looking through cvs, it looks like the ports in contrib are generally >much older than the 1.0.0 release of lwip. (Maybe I misread or missed >a port, though?) Are there any available ports for lwip 1.0.0 (or close >to it) that I could read? > > This means the corresponding authors or maintainers did not test (and tag) their port against a newer lwIP version. However, the API changes between versions are really minimal, so the stuff should be easy to bring forward. I know that the "c16x" port is reasonably up to date, because Christiaan did some testing the last weeks. Use it as an example if you need to modify your side of the API. Regards, Leon Woestenberg. From MAILER-DAEMON Sun Nov 28 12:02:06 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYSR4-0001Hg-Gm for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 12:02:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYSR0-0001Fp-Ts for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:02:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYSQz-0001Ex-He for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:02:01 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYSQz-0001Er-6l for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:02:01 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYSHN-0000gG-BK for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:52:05 -0500 Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id 931EAC3C7FC for ; Sun, 28 Nov 2004 11:52:04 -0500 (EST) X-Sasl-enc: IbotXbbLoyeWvn/Uj3tuKQ 1101660723 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id 6866A56D394 for ; Sun, 28 Nov 2004 11:52:03 -0500 (EST) Message-ID: <41AA025D.7050204@mailcan.com> Date: Sun, 28 Nov 2004 17:52:45 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] arp question References: <418A6756.7010500@gibbons.com> <1101391647.22291.209451469@webmail.messagingengine.com> <41A610A3.903@gibbons.com> In-Reply-To: <41A610A3.903@gibbons.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 17:02:05 -0000 Hello Jim, Jim Gibbons wrote: > In the matter of ARP, I think some concurrent access protection might > be in order in common use scenarios. Perhaps it should be noted in > comments so that callers could do it, since the callers are usually > netif implementors. > > I agree that it is a simple matter to get etharp_output and the timer > to run out of the tcpip task. I think it is substantially harder to > get etharp_ip_input and etharp_arp_input to run in that context. Most > of us who implement netif's in multitasking environments end up with > an ethernet receive thread from which the etharp input functions must > be called. Other brave souls do this from an interrupt context. In > the former case, a mutex would provide the protection required, while > in the latter case SYS_LIGHTWEIGHT_PROT methods might be used to > protect the timer and output. > > Finally, a very broad question. Is 1.0.0 ready for prime time? I > have two embedded systems currently running 0.7.2, and it has been > hard for me to tell from all of the e-mail going by whether 1.0.0 > would prove to be more stable or less so for these products. > Nope, we hope 1.1.0 to be of 0.7.2 stability. The 0.7.x received excellent testing (I recall lots of embedded developers sharing test results then), but currently although we have lots of users there is relatively little feedback (but we welcome the feedback we got!). We hope developers take the time for testing, this is a community project after all, and we cannot guarantee we are providing a fully stable TCP/IP stack, although that is our ultimate goal (and 0.7.2 proves to be that, although we now now it has some glitches in corner cases). Regards, Leon. From MAILER-DAEMON Sun Nov 28 12:06:39 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYSVS-000457-RW for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 12:06:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYSVQ-00044s-Id for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:06:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYSVP-00044P-LJ for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:06:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYSVP-00044B-Cs for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:06:35 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYSLq-0001c7-Og for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:56:42 -0500 Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id D1140C3C8F1 for ; Sun, 28 Nov 2004 11:56:41 -0500 (EST) X-Sasl-enc: K5kLboVp5yDNJGbcRQIH8Q 1101661000 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id C7FD856F504 for ; Sun, 28 Nov 2004 11:56:40 -0500 (EST) Message-ID: <41AA0373.3080906@mailcan.com> Date: Sun, 28 Nov 2004 17:57:23 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] arp question References: <418A6756.7010500@gibbons.com> <1101391647.22291.209451469@webmail.messagingengine.com> <41A610A3.903@gibbons.com> In-Reply-To: <41A610A3.903@gibbons.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 17:06:37 -0000 Hello Jim, forgot to answer the part on concurrency protection. Jim Gibbons wrote: > I agree that it is a simple matter to get etharp_output and the timer > to run out of the tcpip task. I think it is substantially harder to > get etharp_ip_input and etharp_arp_input to run in that context. Most > of us who implement netif's in multitasking environments end up with > an ethernet receive thread from which the etharp input functions must > be called. Other brave souls do this from an interrupt context. In > the former case, a mutex would provide the protection required, while > in the latter case SYS_LIGHTWEIGHT_PROT methods might be used to > protect the timer and output. > There are too many multitasking environments around to cope for. We hope the integrating developer has knowledge about the multithreading issues involved for her environment. We came across a bunch when we merged lwIP into uCOS, such as mutex-recursion, priority inheritance, nested interrupts. Personally, I think the synchronization primitives in the outer API wrapper of lwIP are inadequately generic, but I also think there is no such thing as a generic locking abstraction that works for everyone. POSIX would be great but is probably an overkill in the context of lwIP. Regards, Leon. From MAILER-DAEMON Sun Nov 28 12:09:36 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYSYK-0004RF-Kk for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 12:09:36 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYSYJ-0004Qu-69 for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:09:35 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYSYI-0004Qi-NY for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:09:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYSYI-0004Qf-KI for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:09:34 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYSOb-0002CY-Vj for lwip-users@nongnu.org; Sun, 28 Nov 2004 11:59:34 -0500 Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id 0D35AC3C78A for ; Sun, 28 Nov 2004 11:59:33 -0500 (EST) X-Sasl-enc: +Hro5Ml8+TBFaD270BI3nA 1101661172 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id DA49056F784 for ; Sun, 28 Nov 2004 11:59:31 -0500 (EST) Message-ID: <41AA041E.2020104@mailcan.com> Date: Sun, 28 Nov 2004 18:00:14 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] a question References: <200411081258.31515.c_graham@mistral.co.uk> In-Reply-To: <200411081258.31515.c_graham@mistral.co.uk> Content-Type: text/plain; charset=GB2312 Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 17:09:35 -0000 Hello, Craig Graham wrote: >That's in case the packet from the ethernet is to big to fit into a single >pbuf, in which case you actually have a linked list of pbuf's (a chain). 'q' >iterates along the linked list, filling each pbuf with as much data as it >can, then moving on to the next pbuf in the chain until it has read the >entire packet from the ethernet chip. > > > Yes, and pointer p is kept to its origin, because we might need it later in the last part of the function: #if ETH_PAD_SIZE pbuf_header(p, ETH_PAD_SIZE); /* reclaim the padding word */ #endif So, we cannot just use q to iterate over the pbuf chain. Regards, Leon. From MAILER-DAEMON Sun Nov 28 12:57:34 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYTIk-0001qe-Of for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 12:57:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYTIj-0001qZ-PJ for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:57:33 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYTIj-0001qN-Bu for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:57:33 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYTIj-0001qK-8B for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:57:33 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYT9L-0003Gl-Ga for lwip-users@nongnu.org; Sun, 28 Nov 2004 12:47:51 -0500 Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id 8343BC3C7CC for ; Sun, 28 Nov 2004 12:47:45 -0500 (EST) X-Sasl-enc: 73ZBnCDvOf2BpBMdsU62hA 1101664064 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id 94AF956FABA for ; Sun, 28 Nov 2004 12:47:44 -0500 (EST) Message-ID: <41AA0F6A.7060107@mailcan.com> Date: Sun, 28 Nov 2004 18:48:26 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] ARP ETHARP_TRY_HARD References: <1101425612.891.209476941@webmail.messagingengine.com> In-Reply-To: <1101425612.891.209476941@webmail.messagingengine.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 17:57:33 -0000 Hello Paul, thanks for looking in the code, I enjoy having extra pairs of eyes checking my code! Paul C wrote: >Leon, > >I like the patches you have put in etharp.c but I still think that the >exit if !ETHARP_TRY_HARD is missing. > > Could you explain why please? I think the current code is correct in the find_entry(..., flags = 0) case. find_entry will: a) find candidate ARP entries for the given IP address b) select the least-cache-destructive entry c) see if it may alter that entry Steps a and b are non-modifying, and are marked a and b in the source code comments of etharp.c Step c ONLY recycles existing entries when an empty ARP entry is found: Step c ALWAYS fills empty ARP entries. (I assume you do not want that to happen, am I correct??) See etharp.c line 308 /* allowed to recycle a entry? */ if (flags & ETHARP_TRY_HARD) { /* recycle (no-op for an already empty entry) */ arp_table[i].state = ETHARP_STATE_EMPTY; } Yes, it will fill up the cache with any broadcast traffic, BUT only until the cache is full. Once the cache is full, it will return ERR_MEM, see line 327: /* no entry available */ } else { /* return failure */ i = (s8_t)ERR_MEM; } Only if ETHARP_TRY_HARD is specified, it will recycle cache entries. At least this is exactly what I think should happen. Please let me know where my thoughts go wrong, or what you expected the algorithm to do? Regards, Leon Woestenberg. From MAILER-DAEMON Sun Nov 28 13:41:04 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYTyq-00068d-9I for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 13:41:04 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYTyo-00068U-UO for lwip-users@nongnu.org; Sun, 28 Nov 2004 13:41:03 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYTyo-00068I-Hi for lwip-users@nongnu.org; Sun, 28 Nov 2004 13:41:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYTyo-00068F-E8 for lwip-users@nongnu.org; Sun, 28 Nov 2004 13:41:02 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYTp2-0003Cd-Ho for lwip-users@nongnu.org; Sun, 28 Nov 2004 13:30:56 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id E4AA4C3C987 for ; Sun, 28 Nov 2004 13:30:54 -0500 (EST) X-Sasl-enc: Tw2an23uQLmt33n7daLNeQ 1101666654 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id 9B06C247F3 for ; Sun, 28 Nov 2004 13:30:54 -0500 (EST) Message-ID: <41AA1987.9000009@mailcan.com> Date: Sun, 28 Nov 2004 19:31:35 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] Compile problem: #define NO_SYS 1, tcp_timer_needed macro issue. References: <002101c4cb59$01c7dda0$7101a8c0@dell8100> In-Reply-To: <002101c4cb59$01c7dda0$7101a8c0@dell8100> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 18:41:03 -0000 Hello Bob, > > For now, I am going to just use '#if !NO_SYS' to conditionalize the > definition of 'tcp_timer_needed' in tcpip.c. However, I do not want > to have to leave my own tweak in a standard LWIP module. > I have brought this fix into CVS, could you please test it? Thanks , Leon. From MAILER-DAEMON Sun Nov 28 18:44:32 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYYiW-0005BH-8L for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 18:44:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYYiV-0005BB-AZ for lwip-users@nongnu.org; Sun, 28 Nov 2004 18:44:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYYiU-0005Az-TI for lwip-users@nongnu.org; Sun, 28 Nov 2004 18:44:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYYiU-0005Aw-Q3 for lwip-users@nongnu.org; Sun, 28 Nov 2004 18:44:30 -0500 Received: from [209.61.157.56] (helo=skyla.altweb.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CYYZ0-00031F-ON for lwip-users@nongnu.org; Sun, 28 Nov 2004 18:34:42 -0500 Received: (qmail 45176 invoked by uid 89); 29 Nov 2004 10:34:40 +1100 Received: from dsl-61-95-56-108.request.com.au (HELO sqlserver) (61.95.56.108) by skyla-3.rev.altweb.net with SMTP; 29 Nov 2004 10:34:40 +1100 From: "Paul Clarke" To: "Mailing list for lwIP users" Subject: RE: [lwip-users] ARP ETHARP_TRY_HARD Date: Mon, 29 Nov 2004 10:04:38 +1030 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <41AA0F6A.7060107@mailcan.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Nov 2004 23:44:31 -0000 Hi Leon > > Hello Paul, > > thanks for looking in the code, I enjoy having extra pairs of eyes > checking my code! > > > >I like the patches you have put in etharp.c but I still think that the > >exit if !ETHARP_TRY_HARD is missing. > > > Could you explain why please? > Although the code is correct with its TRY_HARD from a code maintenance perspective it is a lot easier to see if there is an exit test for no empty slot and !flags & ETHARP_TRY_HARD. The following code can then remove the TRY_HARD case also making it easier to understand. example for (i = 0; i I think the current code is correct in the find_entry(..., flags > = 0) case. > > find_entry will: > a) find candidate ARP entries for the given IP address > b) select the least-cache-destructive entry > c) see if it may alter that entry > > Steps a and b are non-modifying, and are marked a and b in the source > code comments of etharp.c > Step c ONLY recycles existing entries when an empty ARP entry is found: > Step c ALWAYS fills empty ARP entries. (I assume you do not want that > to happen, am I correct??) Now that we add ARP Entries with the right TRY_HARD setting it is not an issue. When I was testing this code it was easier to see what was happening if the ARP table only got filled with entries we care about ie our connections. > > See etharp.c line 308 > > /* allowed to recycle a entry? */ > if (flags & ETHARP_TRY_HARD) { > /* recycle (no-op for an already empty entry) */ > arp_table[i].state = ETHARP_STATE_EMPTY; > } > > Yes, it will fill up the cache with any broadcast traffic, BUT only > until the cache > is full. Once the cache is full, it will return ERR_MEM, see line 327: > > /* no entry available */ > } else { > /* return failure */ > i = (s8_t)ERR_MEM; > } > > Only if ETHARP_TRY_HARD is specified, it will recycle cache entries. > > At least this is exactly what I think should happen. > > Please let me know where my thoughts go wrong, or what you expected > the algorithm to do? > > Regards, > > Leon Woestenberg. > > Paul From MAILER-DAEMON Sun Nov 28 19:10:38 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYZ7m-0003ks-5w for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 19:10:38 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYZ7k-0003kM-Hp for lwip-users@nongnu.org; Sun, 28 Nov 2004 19:10:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYZ7j-0003k1-KK for lwip-users@nongnu.org; Sun, 28 Nov 2004 19:10:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYZ7j-0003jx-DH for lwip-users@nongnu.org; Sun, 28 Nov 2004 19:10:35 -0500 Received: from [209.61.157.56] (helo=skyla.altweb.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CYYy4-0007Hl-El for lwip-users@nongnu.org; Sun, 28 Nov 2004 19:00:43 -0500 Received: (qmail 50333 invoked by uid 89); 29 Nov 2004 11:00:35 +1100 Received: from dsl-61-95-56-108.request.com.au (HELO sqlserver) (61.95.56.108) by skyla-3.rev.altweb.net with SMTP; 29 Nov 2004 11:00:35 +1100 From: "Paul Clarke" To: "Mailing list for lwIP users" Subject: RE: [lwip-users] ARP ETHARP_TRY_HARD Date: Mon, 29 Nov 2004 10:30:33 +1030 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <41AA0F6A.7060107@mailcan.com> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 00:10:36 -0000 Hi Leon, One more little change to the etharp.c If our interface is not configured we need to process the ARP. This is really useful in detecting an in use IP address that the DHCP server has assigned us. I cant recall exactly where the bug is caused but this was the fix. line 494 - 498 /* this interface is not configured? */ if (netif->ip_addr.addr == 0) { for_us = 1; } else { > From MAILER-DAEMON Sun Nov 28 21:48:32 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYbaa-0005VA-G7 for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 21:48:32 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYbaZ-0005V5-7D for lwip-users@nongnu.org; Sun, 28 Nov 2004 21:48:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYbaY-0005Ut-R8 for lwip-users@nongnu.org; Sun, 28 Nov 2004 21:48:30 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYbaY-0005Up-KV for lwip-users@nongnu.org; Sun, 28 Nov 2004 21:48:30 -0500 Received: from [4.27.241.139] (helo=fn-orion.dyndns.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYbR0-0008Ur-Iz for lwip-users@nongnu.org; Sun, 28 Nov 2004 21:38:39 -0500 Received: from chris by fn-orion.dyndns.org with local (Exim 3.35 #1 (Debian)) id 1CYbQy-0003QJ-00 for ; Sun, 28 Nov 2004 18:38:36 -0800 Date: Sun, 28 Nov 2004 18:38:36 -0800 To: Mailing list for lwIP users Subject: Re: [lwip-users] Building lwip and ip.h et al not being found Message-ID: <20041129023836.GJ2245@frostnet.net> References: <20041127104746.GL2505@frostnet.net> <1101553920.3426.2.camel@kirin.eng.cam.ac.uk> <20041127202318.GN2505@frostnet.net> <20041127211600.GO2505@frostnet.net> <41A9FEC0.9010908@mailcan.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41A9FEC0.9010908@mailcan.com> User-Agent: Mutt/1.3.28i X-PGP-Key: Send email with subject 'retrieve pgp key' X-PGP-Fingerprint: Send email with subject 'retrieve pgp fingerprint' From: Chris Frost X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 02:48:31 -0000 On Sun, Nov 28, 2004 at 05:37:20PM +0100, Leon Woestenberg wrote: > You are fresh to lwIP, it would be great if you can write some "getting > started" documentation. > > Please see what's already there in doc/ so that you don't write > redundant docs; rather refer to > existing doc. I'd be happy to if I'm able to offer improvements, and of course. (The existing documentation has been very helpful.) > However, the API changes between versions are really minimal, so the > stuff should be easy to bring > forward. Ah, that's nice to hear, thanks. > I know that the "c16x" port is reasonably up to date, because Christiaan > did some testing the last > weeks. Use it as an example if you need to modify your side of the API. Perhaps I'm missing something, but it looks like most of the c16x port hasn't been touched in a couple years, except for the cs8900 interface that was updated just a few weeks ago. Am I seeing this correctly? (I haven't been able to login to the cvs server so am going through viewcvs, or I may just be misreading something?) -- Chris Frost | -------------+---------------------------------- Public PGP Key: Email chris@frostnet.net with the subject "retrieve pgp key" or visit From MAILER-DAEMON Sun Nov 28 21:57:03 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYbio-000886-SG for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 21:57:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYbim-00087p-MZ for lwip-users@nongnu.org; Sun, 28 Nov 2004 21:57:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYbil-00087M-RT for lwip-users@nongnu.org; Sun, 28 Nov 2004 21:57:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYbil-00087J-Nc for lwip-users@nongnu.org; Sun, 28 Nov 2004 21:56:59 -0500 Received: from [4.27.241.139] (helo=fn-orion.dyndns.org) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYbYv-0001K5-HO for lwip-users@nongnu.org; Sun, 28 Nov 2004 21:46:50 -0500 Received: from chris by fn-orion.dyndns.org with local (Exim 3.35 #1 (Debian)) id 1CYbYu-0003SM-00 for ; Sun, 28 Nov 2004 18:46:48 -0800 Date: Sun, 28 Nov 2004 18:46:48 -0800 To: Mailing list for lwIP users Message-ID: <20041129024648.GK2245@frostnet.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-PGP-Key: Send email with subject 'retrieve pgp key' X-PGP-Fingerprint: Send email with subject 'retrieve pgp fingerprint' From: Chris Frost Subject: [lwip-users] Overview of mboxes X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 02:57:01 -0000 I was wondering if someone might be able to give me/point me towards just a short overview of the purpose of mboxes in lwip? For example, are they for intrathread communication only? Interthread? Interprocess? (If interprocess, is each mailbox global?) Just a little bit of a high level overview would be very helpful, I hope to be able to dive in with such very appreciated help. Related, I'm not clear on whether thread support, or when thread support, is needed. Are there non-performance reasons (features?) for making thread support available? I'd like to use lwip as a network stack running in one process with other processes being able to use it for network communication, I don't know if this affects the answer to this question? thanks in advance, -- Chris Frost | -------------+---------------------------------- Public PGP Key: Email chris@frostnet.net with the subject "retrieve pgp key" or visit From MAILER-DAEMON Sun Nov 28 23:46:34 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYdQo-0003RM-B1 for mharc-lwip-users@gnu.org; Sun, 28 Nov 2004 23:46:34 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYdQl-0003RC-B8 for lwip-users@nongnu.org; Sun, 28 Nov 2004 23:46:31 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYdQk-0003R0-Pv for lwip-users@nongnu.org; Sun, 28 Nov 2004 23:46:31 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYdQk-0003Qx-H4 for lwip-users@nongnu.org; Sun, 28 Nov 2004 23:46:30 -0500 Received: from [203.67.181.35] (helo=mta7.iii.org.tw) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CYdHE-0001B5-CV for lwip-users@nongnu.org; Sun, 28 Nov 2004 23:36:46 -0500 Received: from mta1.iii.org.tw (mta1.iii.org.tw [140.92.66.14]) by mta7.iii.org.tw (8.12.8/8.12.8) with ESMTP id iAT4aJaP026969 for ; Mon, 29 Nov 2004 12:36:21 +0800 Received: from exim by mta1.iii.org.tw with scanned-ok (Exim 3.36 #2) id 1CYdGs-0005rn-00 for lwip-users@nongnu.org; Mon, 29 Nov 2004 12:36:18 +0800 Received: from [140.92.60.196] (helo=jason) by mta1.iii.org.tw with smtp (Exim 3.36 #2) id 1CYdGs-0005aV-00 for lwip-users@nongnu.org; Mon, 29 Nov 2004 12:36:18 +0800 Message-ID: <005801c4d5cc$f9b50010$c43c5c8c@jason> From: "Wei Bo-Er \(Jason\)" To: "Mailing list for lwIP users" References: Subject: Re: Re: [lwip-users] i don't konw why Date: Mon, 29 Nov 2004 12:35:50 +0800 MIME-Version: 1.0 X-scanner: scanned by Inflex 1.0.10 - (http://pldaniels.com/inflex/) Content-Type: multipart/alternative; boundary="----=_NextPart_000_004F_01C4D60F.F5BD64A0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2180 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2900.2180 X-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 04:46:31 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_004F_01C4D60F.F5BD64A0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: quoted-printable It may works as you skip checking checksum since lwip doesn't = re-calculate checksum and only modify the checksum of the received = packet as the new one. I still think you should make sure the correctness of last byte of = received packets first. Bo-Er ----- Original Message -----=20 From: jack W=20 To: Mailing list for lwIP users=20 Sent: Friday, November 26, 2004 9:35 PM Subject: Re: Re: [lwip-users] i don't konw why Wei Bo-Er \(Jason\)=A3=AC=C4=FA=BA=C3=A3=A1=20 =A1=A1=A1=A1but when i skip the checksum in the icmp.c, ping the = board using ping 192.168.0.3 -l 1001 -t and ping 192.168.0.3 -l 1000 -t = , it successed. Why ? a bug? =3D=3D=3D=3D=3D=3D=3D=3D 2004-11-26 14:31:52 = =C4=FA=D4=DA=C0=B4=D0=C5=D6=D0=D0=B4=B5=C0=A3=BA = =3D=3D=3D=3D=3D=3D=3D=3D You may check out your network card and it's driver to see if = it is word(2 bytes) alignment and you have made the wrong byte as the = last byte of the received packet. Bo-Er ----- Original Message -----=20 From: jack W=20 To: lwip-users=20 Sent: Friday, November 26, 2004 11:31 AM Subject: [lwip-users] i don't konw why hi every one =20 i have a problem about icmp.c=20 when i ping my board , useing ping 192.168.0.3 l -999 -t = , it failed its debug info is=20 "checksum failed for received ICMP echo." but when i ping the board using ping 192.168.0.3 l -1000 -t = . it successed i found that when the size of packet is odd bytes if fails = and when it si parity bytes it successes. why ? thank you =20 _______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users=20 =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D = =3D =3D =3D =3D =3D=20 =A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=D6=C2 =C0=F1=A3=A1 = =A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1= =A1=A1=A1jack W = =A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1= =A1=A1=A1sdusthd2000@yahoo.com.cn = =A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1= =A1=A1=A1=A1=A12004-11-26 -------------------------------------------------------------------------= ----- _______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users ------=_NextPart_000_004F_01C4D60F.F5BD64A0 Content-Type: text/html; charset="gb2312" Content-Transfer-Encoding: quoted-printable
It may works as you skip = checking checksum since lwip=20 doesn't re-calculate checksum and only modify the checksum of the = received=20 packet as the new one.
I still think you should make = sure the correctness of last=20 byte of received packets first.
 
Bo-Er
----- Original = Message -----
From:=20 jack=20 W
Sent: Friday, = November 26, 2004 9:35=20 PM
Subject: Re: = Re: [lwip-users] i don't konw=20 why

Wei Bo-Er = \(Jason\)=A3=AC=C4=FA=BA=C3=A3=A1=20
 
=A1=A1=A1=A1but when i skip = the checksum  in the=20 icmp.c,  ping the board using ping 192.168.0.3 -l 1001 -t = and  ping=20 192.168.0.3 -l 1000 -t  , it successed. Why ? a bug?
 
=3D=3D=3D=3D=3D=3D=3D=3D = 2004-11-26 14:31:52 =C4=FA=D4=DA=C0=B4=D0=C5=D6=D0=D0=B4=B5=C0=A3= =BA=20 =3D=3D=3D=3D=3D=3D=3D=3D
 
You may check out = your network card and it's=20 driver to see if it is word(2 bytes) alignment and you = have made=20 the wrong byte as the last byte of the received=20 packet.
 
Bo-Er
----- = Original Message -----
From:=20 jack W
To: = lwip-users
Sent: Friday, November 26, 2004=20 11:31 AM
Subject: [lwip-users] i don't=20 konw why

hi every one  =


    i=20 have a problem about icmp.c
  when i ping my board = , useing=20 ping 192.168.0.3 l -999 -t  , it failed  its debug = info is=20
"checksum failed for received ICMP echo."

but = when i ping=20 the board using ping 192.168.0.3 l -1000 -t . it=20 successed

 i found that when the size of packet = is odd=20 bytes if fails  and when it si parity bytes it=20 successes.

 why ?

thank you =20 =





_______________________________________________lwip-users=20 mailing list
lwip-users@nongnu.org
http://lists= .nongnu.org/mailman/listinfo/lwip-users

=3D =3D =3D =3D =3D =3D =3D =3D = =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D =3D=20

=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=D6=C2
=C0=F1= =A3=A1

 
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1= =A1=A1=A1=A1=A1=A1jack W
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1= =A1=A1=A1=A1=A1=A1sdusthd2000@yahoo.com.cn
=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1=A1= =A1=A1=A1=A1=A1=A1=A1=A12004-11-26
 


_______________________________________________
lwip-users = mailing=20 = list
lwip-users@nongnu.org
http://lists.nongnu.org/mailman/listinfo= /lwip-users ------=_NextPart_000_004F_01C4D60F.F5BD64A0-- From MAILER-DAEMON Mon Nov 29 03:08:02 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYgZm-0000cK-FS for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 03:08:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYgZj-0000bm-UZ for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:08:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYgZj-0000bK-0M for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:07:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYgZi-0000b3-TZ for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:07:58 -0500 Received: from [216.136.129.91] (helo=smtp201.mail.sc5.yahoo.com) by monty-python.gnu.org with smtp (Exim 4.34) id 1CYgQ5-0001j7-Q8 for lwip-users@nongnu.org; Mon, 29 Nov 2004 02:58:02 -0500 Received: from unknown (HELO RavProxy) (sdusthd2000@222.134.214.238 with login) by smtp201.mail.sc5.yahoo.com with SMTP; 29 Nov 2004 07:57:50 -0000 Date: Mon, 29 Nov 2004 15:58:39 +0800 From: "jack W" To: "Mailing list for lwIP users" Subject: Re: [lwip-users] Overview of mboxes X-mailer: Foxmail 5.0 [cn] Mime-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: base64 Message-Id: X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 08:08:00 -0000 aGkgQ2hyaXMgRnJvc3QNCg0KaSB0aGluayB0aGF0IG1ib3ggaXMgYSBraW5kIG9mIGluZm8gcXVl dWUgLHNvIHdlIHNlbmQgLyByZWNlaXZlIGRhdGEgIGJ5IHRoZSBtYm94IC4gIGlmIHdlIHVzZSB0 aGUgbWJveCBhbW9uZyBzb21lIHRhc2tzICx3ZSBtdXN0IGRlbGNhcmUgdGhlIG1ib3ggYXMgdGhl IGdsb2JhbCB2YXJpYWJsZS4NCmlmIHlvdSBkb24ndCB1c2UgbHdpcCBvbiBvbmUga2luZCBvcGVy YXRlIHN5c3RlbSAseW91IG5lZWRuJ3QgdXNlIG1ib3ggYW5kIHNlbS4geW91IGNhbiB1c2UgcmF3 X2FwaSB0byBhY2hpZXZlIHlvdXIgdGFzay4gYnV0IGlmIHlvdSBydW4gbHdpcCBvbiBvbmUga2lu ZCBvZiBvcGVyYXRlIHN5c3RlbSBzdWNoIGFzIHVjL29zICx5b3UgbXVzdCB1c2UgbWJveCBhbmQg c2VtIC4gb25seSB1c2luZyB0aGVtICx5b3UgY2FuIGNvbXBsdGVseSBmaW5pc2hlZCB5b3VyIHRh c2suDQpTaW5jZSB5b3UgdXNlIHRoZSBsd2lwIAlhcyBhIHN0YWNrLCB5b3UgY2FuIHVzZSBtYm94 IHRvIHBvc3QgZGF0YSAgd2hlbiB5b3VyIG5ldHdvcmsgc3RhY2sgcmVjZWl2ZSBkYXRhIGFuZCBn aXZlIHRoZXNlIGRhdGEgdG8gdGhlc2UgdGFzayB0aGF0IGlzIHdhaXRpbmcgZm9yIHRoZXNlIGRh dGEuDQoNCiBob3BlIHRoZXNlIGluZm8gdG8gaGVscCB5b3UgDQoNCg0KDQo+SSB3YXMgd29uZGVy aW5nIGlmIHNvbWVvbmUgbWlnaHQgYmUgYWJsZSB0byBnaXZlIG1lL3BvaW50IG1lIHRvd2FyZHMN Cj5qdXN0IGEgc2hvcnQgb3ZlcnZpZXcgb2YgdGhlIHB1cnBvc2Ugb2YgbWJveGVzIGluIGx3aXA/ IEZvciBleGFtcGxlLA0KPmFyZSB0aGV5IGZvciBpbnRyYXRocmVhZCBjb21tdW5pY2F0aW9uIG9u bHk/IEludGVydGhyZWFkPyANCj5JbnRlcnByb2Nlc3M/IChJZiBpbnRlcnByb2Nlc3MsIGlzIGVh Y2ggbWFpbGJveCBnbG9iYWw/KSBKdXN0IGENCj5saXR0bGUgYml0IG9mIGEgaGlnaCBsZXZlbCBv dmVydmlldyB3b3VsZCBiZSB2ZXJ5IGhlbHBmdWwsIEkgaG9wZSB0bw0KPmJlIGFibGUgdG8gZGl2 ZSBpbiB3aXRoIHN1Y2ggdmVyeSBhcHByZWNpYXRlZCBoZWxwLg0KPg0KPlJlbGF0ZWQsIEknbSBu b3QgY2xlYXIgb24gd2hldGhlciB0aHJlYWQgc3VwcG9ydCwgb3Igd2hlbiB0aHJlYWQgc3VwcG9y dCwgaXMNCj5uZWVkZWQuIEFyZSB0aGVyZSBub24tcGVyZm9ybWFuY2UgcmVhc29ucyAoZmVhdHVy ZXM/KSBmb3IgbWFraW5nDQo+dGhyZWFkIHN1cHBvcnQgYXZhaWxhYmxlPyBJJ2QgbGlrZSB0byB1 c2UgbHdpcCBhcyBhIG5ldHdvcmsgc3RhY2sNCj5ydW5uaW5nIGluIG9uZSBwcm9jZXNzIHdpdGgg b3RoZXIgcHJvY2Vzc2VzIGJlaW5nIGFibGUgdG8gdXNlIGl0IGZvcg0KPm5ldHdvcmsgY29tbXVu aWNhdGlvbiwgSSBkb24ndCBrbm93IGlmIHRoaXMgYWZmZWN0cyB0aGUgYW5zd2VyIHRvIHRoaXMN Cj5xdWVzdGlvbj8NCj4NCj50aGFua3MgaW4gYWR2YW5jZSwNCj4tLSANCj5DaHJpcyBGcm9zdCAg fCAgPGh0dHA6Ly93d3cuZnJvc3RuZXQubmV0L2NocmlzLz4NCj4tLS0tLS0tLS0tLS0tKy0tLS0t LS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0NCj5QdWJsaWMgUEdQIEtleToNCj4gICBFbWFp bCBjaHJpc0Bmcm9zdG5ldC5uZXQgd2l0aCB0aGUgc3ViamVjdCAicmV0cmlldmUgcGdwIGtleSIN Cj4gICBvciB2aXNpdCA8aHR0cDovL3d3dy5mcm9zdG5ldC5uZXQvY2hyaXMvYWJvdXQvcGdwX2tl eS5waHRtbD4NCj4NCj4NCj5fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fXw0KPmx3aXAtdXNlcnMgbWFpbGluZyBsaXN0DQo+bHdpcC11c2Vyc0Bub25nbnUub3Jn DQo+aHR0cDovL2xpc3RzLm5vbmdudS5vcmcvbWFpbG1hbi9saXN0aW5mby9sd2lwLXVzZXJzDQoN Cj0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPSA9ID0gPQ0KCQkJDQoNCqGhoaGhoaGh oaGhoaGhoaHWwg0KwPGjoQ0KIA0KCQkJCSANCqGhoaGhoaGhoaGhoaGhoaFqYWNrIFcNCqGhoaGh oaGhoaGhoaGhoaFzZHVzdGhkMjAwMEB5YWhvby5jb20uY24NCqGhoaGhoaGhoaGhoaGhoaGhoaGh MjAwNC0xMS0yOQ0KDQo= From MAILER-DAEMON Mon Nov 29 03:38:35 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYh3L-00030v-7s for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 03:38:35 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYh3I-00030C-Gw for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:38:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYh3H-0002zl-ML for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:38:32 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYh3H-0002zT-HN for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:38:31 -0500 Received: from [195.35.170.200] (helo=smtp1.axon.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYgtR-0007rj-Kt for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:28:23 -0500 In-Reply-To: <20041129023836.GJ2245@frostnet.net> Subject: Re: [lwip-users] Building lwip and ip.h et al not being found To: Mailing list for lwIP users X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 Message-ID: From: christiaan.simons@axon.tv Date: Mon, 29 Nov 2004 09:28:16 +0100 X-MIMETrack: Serialize by Router on Axon_Server2/Axon(Release 6.5.1|January 21, 2004) at 29-11-2004 09:28:22 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 08:38:32 -0000 lwip-users-bounces+christiaan.simons=axon.tv@nongnu.org wrote on 29-11-2004 03:38:36: > Perhaps I'm missing something, but it looks like most of the c16x port > hasn't been touched in a couple years, except for the cs8900 interface > that was updated just a few weeks ago. Am I seeing this correctly? Yep, most of this port is stable for about one year or so. Since most of the important bits are in cs8900if.c this is the most likely file to get most of the fixing. I think this is a good indicator for the quality of the code (and our inactivity). Its nice to meet so much enthusiasm for this project, bye Christiaan Simons Software Engineer Axon Digital Design +31 (0)13 511 66 66 +31 (0)13 511 41 51 christiaan.simons@axon.tv http://www.axon.tv The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed. Axon Digital Design Group is neither liable for the proper nor for the complete transmission of the information contained in this communication nor for any delay in its receipt. Axon Digital Design Group does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. In that case please return the communication to the sender and delete and destroy all copies. In carrying out its engagements, Axon Digital Design Group applies general terms and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge. From MAILER-DAEMON Mon Nov 29 03:51:06 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYhFR-0006fA-QM for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 03:51:06 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYhFO-0006ec-1E for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:51:02 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYhFL-0006eE-WA for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:51:00 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYhFL-0006dy-JO for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:50:59 -0500 Received: from [195.35.170.200] (helo=smtp1.axon.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYh5p-0001oo-L1 for lwip-users@nongnu.org; Mon, 29 Nov 2004 03:41:11 -0500 In-Reply-To: <20041129024648.GK2245@frostnet.net> Subject: Re: [lwip-users] Overview of mboxes To: Mailing list for lwIP users X-Mailer: Lotus Notes Release 6.5.1 January 21, 2004 Message-ID: From: christiaan.simons@axon.tv Date: Mon, 29 Nov 2004 09:41:07 +0100 X-MIMETrack: Serialize by Router on Axon_Server2/Axon(Release 6.5.1|January 21, 2004) at 29-11-2004 09:41:09 MIME-Version: 1.0 Content-type: text/plain; charset=US-ASCII X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 08:51:03 -0000 lwip-users-bounces+christiaan.simons=axon.tv@nongnu.org wrote on 29-11-2004 03:46:48: > Just a little bit of a high level overview would be very helpful, I hope to > be able to dive in with such very appreciated help. I'm unfimiliar with the sockets/netconn interface. I guess this depends on your runtime environment, some have threads, some don't. You can interface to lwip using the PCB lists. We've created our own private sockets layer on top of this. You can use lwip in many different configurations since it has very little dependencies. > Related, I'm not clear on whether thread support, or when thread support, is > needed. Are there non-performance reasons (features?) for making > thread support available? I'd like to use lwip as a network stack > running in one process with other processes being able to use it for > network communication, I don't know if this affects the answer to this > question? There is no requirement for using threads. A process for lwip should work just fine. Christiaan Simons Software Engineer Axon Digital Design +31 (0)13 511 66 66 +31 (0)13 511 41 51 christiaan.simons@axon.tv http://www.axon.tv The information contained in this communication is confidential and is intended solely for the use of the individual or entity to whom it is addressed. Axon Digital Design Group is neither liable for the proper nor for the complete transmission of the information contained in this communication nor for any delay in its receipt. Axon Digital Design Group does not guarantee that the integrity of this communication has been maintained nor that the communication is free of viruses, interceptions or interference. If you are not the intended recipient of this communication, you are hereby notified that reading, disseminating, distributing or copying this message is strictly prohibited. In that case please return the communication to the sender and delete and destroy all copies. In carrying out its engagements, Axon Digital Design Group applies general terms and conditions, which contain a clause that limits its liability. A copy of these terms and conditions is available on request free of charge. From MAILER-DAEMON Mon Nov 29 04:37:03 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYhxu-0002FF-Pk for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 04:37:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYhxs-0002Cd-1K for lwip-users@nongnu.org; Mon, 29 Nov 2004 04:37:00 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYhxq-0002Ba-O7 for lwip-users@nongnu.org; Mon, 29 Nov 2004 04:36:59 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYhqc-0001Bv-U3 for lwip-users@nongnu.org; Mon, 29 Nov 2004 04:29:31 -0500 Received: from [131.111.8.135] (helo=ppsw-5.csi.cam.ac.uk) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYhh0-0001FQ-3F for lwip-users@nongnu.org; Mon, 29 Nov 2004 04:19:34 -0500 Received: from kirin.eng.cam.ac.uk ([129.169.98.86]:49158) by ppsw-5.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.155]:465) with esmtps (TLSv1:DHE-RSA-AES256-SHA:256) id 1CYhgw-0002Sb-IX (Exim 4.44) for lwip-users@nongnu.org (return-path ); Mon, 29 Nov 2004 09:19:30 +0000 Subject: Re: [lwip-users] Overview of mboxes From: "K.J. Mansley" To: Mailing list for lwIP users In-Reply-To: <20041129024648.GK2245@frostnet.net> References: <20041129024648.GK2245@frostnet.net> Content-Type: text/plain Organization: Message-Id: <1101719970.21777.10.camel@kirin.eng.cam.ac.uk> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 29 Nov 2004 09:19:30 +0000 Content-Transfer-Encoding: 7bit X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ X-Cam-AntiVirus: No virus found X-Cam-SpamDetails: Not scanned X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 09:37:00 -0000 On Mon, 2004-11-29 at 02:46, Chris Frost wrote: > I was wondering if someone might be able to give me/point me towards > just a short overview of the purpose of mboxes in lwip? For example, > are they for intrathread communication only? Interthread? > Interprocess? (If interprocess, is each mailbox global?) They are generally used for inter-thread communication. > Just a > little bit of a high level overview would be very helpful, I hope to > be able to dive in with such very appreciated help. > > Related, I'm not clear on whether thread support, or when thread support, is > needed. Are there non-performance reasons (features?) for making > thread support available? I'd like to use lwip as a network stack > running in one process with other processes being able to use it for > network communication, I don't know if this affects the answer to this > question? Put simply, thread support is needed if you want to use the Sockets API. If you're happy to interface at a lower level, in a non-standard way (using the Raw API - calling things like "tcp_write()" directly), you should be able to manage without threads completely. To communicate between processes may be a little more tricky. Obviously if your OS supports them, you could use any of the normal IPC techniques. You may be able to use mboxs as well (functionally they should do the job) but they'd need to reside in a region of shared memory and so on, which isn't currently provided by lwIP. One other thing that you may encounter is you'll need to ensure that you serialise access to the lwIP process, from both above (the application sending data) and below (the network delivering data). This is a common problem that people encounter when first using the stack as it does not protect itself against concurrent access. Hope that helps, Kieran From MAILER-DAEMON Mon Nov 29 05:36:02 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYit0-0003AU-Bg for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 05:36:02 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYisx-000391-AP for lwip-users@nongnu.org; Mon, 29 Nov 2004 05:35:59 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYisw-00038H-7D for lwip-users@nongnu.org; Mon, 29 Nov 2004 05:35:58 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYisv-00037w-SK for lwip-users@nongnu.org; Mon, 29 Nov 2004 05:35:57 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYijE-00074E-Im for lwip-users@nongnu.org; Mon, 29 Nov 2004 05:25:56 -0500 Received: from frontend2.messagingengine.com (frontend2.internal [10.202.2.151]) by frontend1.messagingengine.com (Postfix) with ESMTP id D084DC3C795 for ; Mon, 29 Nov 2004 05:25:55 -0500 (EST) X-Sasl-enc: hvg92dCw37tj65Y60k9j8A 1101723955 Received: from [10.1.0.73] (wc-200.r-195-35-170.essentkabel.com [195.35.170.200]) by www.fastmail.fm (Postfix) with ESMTP id 3127D56F784 for ; Mon, 29 Nov 2004 05:25:55 -0500 (EST) Subject: Re: [lwip-users] Building lwip and ip.h et al not being found From: Leon Woestenberg To: Mailing list for lwIP users In-Reply-To: <20041129023836.GJ2245@frostnet.net> References: <20041127104746.GL2505@frostnet.net> <1101553920.3426.2.camel@kirin.eng.cam.ac.uk> <20041127202318.GN2505@frostnet.net> <20041127211600.GO2505@frostnet.net> <41A9FEC0.9010908@mailcan.com> <20041129023836.GJ2245@frostnet.net> Content-Type: text/plain Message-Id: <1101723957.3987.61.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Mon, 29 Nov 2004 11:25:58 +0100 Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 10:35:59 -0000 Hello Chris, On Mon, 2004-11-29 at 03:38, Chris Frost wrote: > On Sun, Nov 28, 2004 at 05:37:20PM +0100, Leon Woestenberg wrote: > > I know that the "c16x" port is reasonably up to date, because Christiaan > > did some testing the last > > weeks. Use it as an example if you need to modify your side of the API. > > Perhaps I'm missing something, but it looks like most of the c16x port > hasn't been touched in a couple years, except for the cs8900 interface > that was updated just a few weeks ago. Am I seeing this correctly? Yes, like I said, the API has changed minimally, i.e. it was quite good from the start. The c16x port works, and has been kept up-to-date with the API (no recent changes there). We don't fix things that aren't broke. (We only break new things :-). Regards, Leon. From MAILER-DAEMON Mon Nov 29 06:06:45 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYjMi-0003AY-OV for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 06:06:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYjMd-00035n-7d for lwip-users@nongnu.org; Mon, 29 Nov 2004 06:06:39 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYjMW-00033F-VV for lwip-users@nongnu.org; Mon, 29 Nov 2004 06:06:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYjMW-000332-3i for lwip-users@nongnu.org; Mon, 29 Nov 2004 06:06:32 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYjD1-0005ON-UN for lwip-users@nongnu.org; Mon, 29 Nov 2004 05:56:44 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 68C46C3C767 for ; Mon, 29 Nov 2004 05:56:43 -0500 (EST) X-Sasl-enc: wa/IUkvvsN32QrrU8sSMAw 1101725803 Received: from [10.1.0.73] (wc-200.r-195-35-170.essentkabel.com [195.35.170.200]) by www.fastmail.fm (Postfix) with ESMTP id 20E63247F3 for ; Mon, 29 Nov 2004 05:56:42 -0500 (EST) Subject: RE: [lwip-users] ARP ETHARP_TRY_HARD From: Leon Woestenberg To: Mailing list for lwIP users In-Reply-To: References: Content-Type: text/plain Message-Id: <1101725804.3987.108.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.5 (1.4.5-7) Date: Mon, 29 Nov 2004 11:56:45 +0100 Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 11:06:39 -0000 Hello Paul, On Mon, 2004-11-29 at 00:34, Paul Clarke wrote: > Although the code is correct with its TRY_HARD from a code maintenance > perspective it is a lot easier to see if there is an exit test > for no empty slot and !flags & ETHARP_TRY_HARD. > OK, for that reason I have re-arranged the code a bit. It also speeds up the case where ETHARP_TRY_HARD is not set. > The following code can then remove the TRY_HARD case also making > it easier to understand. > > example > > for (i = 0; i // at exit i is either an empty slot or ARP_TABLE_SIZE > > if ( i== ARP_TABLE_SIZE && !flags & ETHARP_TRY_HARD) > { > return ERR_ARG; // could not find an empty slot > } !flags & ETHARP_TRY_HARD looks dangerously wrong to me, ! taking precedence over &, ! being boolean, & being bit-wise 'and'. (or did I miss your intentions?) You probably mean: ((flags & ETHARP_TRY_HARD) == 0) or (!(flags & ETHARP_TRY_HARD)) I have changed the code in CVS, please review. Thanks! Regards, Leon. From MAILER-DAEMON Mon Nov 29 06:50:39 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYk3D-0007Oe-F9 for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 06:50:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYk3A-0007O2-OJ for lwip-users@nongnu.org; Mon, 29 Nov 2004 06:50:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYk38-0007Nh-TS for lwip-users@nongnu.org; Mon, 29 Nov 2004 06:50:35 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYk38-0007NZ-8S for lwip-users@nongnu.org; Mon, 29 Nov 2004 06:50:34 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CYjtU-0005hh-6G for lwip-users@nongnu.org; Mon, 29 Nov 2004 06:40:36 -0500 Received: from web3.messagingengine.com (web3.internal [10.202.2.212]) by frontend1.messagingengine.com (Postfix) with ESMTP id C5214C3C714 for ; Mon, 29 Nov 2004 06:40:34 -0500 (EST) Received: by web3.messagingengine.com (Postfix, from userid 99) id 24D2D10D7; Mon, 29 Nov 2004 06:40:35 -0500 (EST) Content-Disposition: inline Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="ISO-8859-1" MIME-Version: 1.0 X-Mailer: MIME::Lite 1.5 (F2.73; T1.001; A1.64; B3.05; Q3.03) References: <1101725804.3987.108.camel@localhost.localdomain> Subject: RE: [lwip-users] ARP ETHARP_TRY_HARD In-Reply-To: <1101725804.3987.108.camel@localhost.localdomain> To: "Mailing list for lwIP users" Date: Mon, 29 Nov 2004 22:10:35 +1030 From: "Paul C" X-Sasl-Enc: +CjHSHjWzn/CJxE92iT9IA 1101728435 Message-Id: <1101728435.8288.209639090@webmail.messagingengine.com> X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Nov 2004 11:50:37 -0000 Hi Leon, > > Although the code is correct with its TRY_HARD from a code maintenance > > perspective it is a lot easier to see if there is an exit test > > for no empty slot and !flags & ETHARP_TRY_HARD. > > > OK, for that reason I have re-arranged the code a bit. It also speeds up > the case where ETHARP_TRY_HARD is not set. > > > The following code can then remove the TRY_HARD case also making > > it easier to understand. > > > > example > > > > for (i = 0; i > // at exit i is either an empty slot or ARP_TABLE_SIZE > > > > if ( i== ARP_TABLE_SIZE && !flags & ETHARP_TRY_HARD) > > { > > return ERR_ARG; // could not find an empty slot > > } > > !flags & ETHARP_TRY_HARD looks dangerously wrong to me, > ! taking precedence over &, ! being boolean, & being > bit-wise 'and'. (or did I miss your intentions?) > > You probably mean: > > ((flags & ETHARP_TRY_HARD) == 0) > This one looks good. I get a bit lazy when I am not feeding a compiler. > or > > (!(flags & ETHARP_TRY_HARD)) > > > I have changed the code in CVS, please review. Thanks! > > I'll try it out tomorrow. One thing I would like is to send out an arp query and some time later cbeck to see if the arp entry is stable. When using a wireless ethernet bridge there is no indication that the bridge has re associated to an alternative Access Point and network. Paul Paul From MAILER-DAEMON Mon Nov 29 19:10:12 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CYvat-0006hr-UM for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 19:10:12 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CYvaq-0006gw-Er for lwip-users@nongnu.org; Mon, 29 Nov 2004 19:10:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CYvao-0006gY-Eu for lwip-users@nongnu.org; Mon, 29 Nov 2004 19:10:06 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CYvan-0006gS-LA for lwip-users@nongnu.org; Mon, 29 Nov 2004 19:10:05 -0500 Received: from [209.61.157.56] (helo=skyla.altweb.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CYvQu-0006Aj-Uk for lwip-users@nongnu.org; Mon, 29 Nov 2004 18:59:53 -0500 Received: (qmail 15050 invoked by uid 89); 30 Nov 2004 10:59:50 +1100 Received: from dsl-61-95-56-108.request.com.au (HELO sqlserver) (61.95.56.108) by skyla-3.rev.altweb.net with SMTP; 30 Nov 2004 10:59:50 +1100 From: "Paul Clarke" To: "Mailing list for lwIP users" Subject: RE: [lwip-users] ARP ETHARP_TRY_HARD Date: Tue, 30 Nov 2004 10:29:44 +1030 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0004_01C4D6C7.821DBF00" X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) In-Reply-To: <1101725804.3987.108.camel@localhost.localdomain> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 00:10:09 -0000 This is a multi-part message in MIME format. ------=_NextPart_000_0004_01C4D6C7.821DBF00 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Hi Leon, I think you have made a typo /* no empty entry found and not allowed to recycle? */ if ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_TRY_HARD) == 0)) ^^^^^^ cvs has i I have made a patch with that and a couple of other changes move pbuf free to where it is needed (saves a ->p != NULL test) if the interface is not configured we must assume arp_input is for us. Paul ------=_NextPart_000_0004_01C4D6C7.821DBF00 Content-Type: application/octet-stream; name="etharp_patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="etharp_patch" --- c:/Paul/lwip/src/netif/etharp.c 2004-11-30 09:52:23.686597400 +1030 +++ etharp.c 2004-11-30 10:24:25.544227000 +1030 @@ -127,13 +127,13 @@ } } =20 /** * Clears expired entries in the ARP table. * - * This function should be called every ETHARP_TMR_INTERVAL = microseconds (10 seconds), + * This function should be called every ETHARP_TMR_INTERVAL = microseconds (5 seconds), * in order to expire entries in the ARP table. */ void etharp_tmr(void) { u8_t i; @@ -269,13 +269,13 @@ } } } /* { we have no match } =3D> try to create a new entry */ =20 /* no empty entry found and not allowed to recycle? */ - if ((i =3D=3D ARP_TABLE_SIZE) && ((flags & ETHARP_TRY_HARD) =3D=3D = 0)) + if ((empty =3D=3D ARP_TABLE_SIZE) && ((flags & ETHARP_TRY_HARD) = =3D=3D 0)) { return (s8_t)ERR_MEM; } =20 /* b) choose the least destructive entry to recycle: * 1) empty entry @@ -308,35 +308,33 @@ #if ARP_QUEUEING /* 4) found recyclable pending entry with queued packets? */ } else if (old_queue < ARP_TABLE_SIZE) { /* recycle oldest pending */ i =3D old_queue; LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("find_entry: selecting = oldest pending entry %d, freeing packet queue %p\n", i, (void = *)(arp_table[i].p))); - /* no empty or recyclable entries found */ + pbuf_free(arp_table[i].p); + arp_table[i].p =3D NULL; #endif + /* no empty or recyclable entries found */ } else { return (s8_t)ERR_MEM; } =20 /* { empty or recyclable entry found } */ LWIP_ASSERT("i >=3D 0", i >=3D 0); LWIP_ASSERT("i < ARP_TABLE_SIZE", i < ARP_TABLE_SIZE); =20 /* recycle entry (no-op for an already empty entry) */ arp_table[i].state =3D ETHARP_STATE_EMPTY; + /* IP address given? */ if (ipaddr !=3D NULL) { /* set IP address */ ip_addr_set(&arp_table[i].ipaddr, ipaddr); } arp_table[i].ctime =3D 0; -#if ARP_QUEUEING - /* remove any queued packets */ - if (arp_table[i].p !=3D NULL) pbuf_free(arp_table[i].p); - arp_table[i].p =3D NULL; -#endif return (err_t)i; } =20 /** * Update (or insert) a IP/MAC address pair in the ARP cache. * @@ -487,13 +485,13 @@ /* get aligned copies of addresses */ *(struct ip_addr2 *)&sipaddr =3D hdr->sipaddr; *(struct ip_addr2 *)&dipaddr =3D hdr->dipaddr; =20 /* this interface is not configured? */ if (netif->ip_addr.addr =3D=3D 0) { - for_us =3D 0; + for_us =3D 1; } else { /* ARP packet directed to us? */ for_us =3D ip_addr_cmp(&dipaddr, &(netif->ip_addr)); } =20 /* ARP message directed to us? */ ------=_NextPart_000_0004_01C4D6C7.821DBF00-- From MAILER-DAEMON Mon Nov 29 23:56:31 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CZ03z-00082h-A9 for mharc-lwip-users@gnu.org; Mon, 29 Nov 2004 23:56:31 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZ03x-00082C-C6 for lwip-users@nongnu.org; Mon, 29 Nov 2004 23:56:29 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZ03w-00081l-Ci for lwip-users@nongnu.org; Mon, 29 Nov 2004 23:56:28 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZ03w-00081b-6m for lwip-users@nongnu.org; Mon, 29 Nov 2004 23:56:28 -0500 Received: from [209.61.157.56] (helo=skyla.altweb.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.34) id 1CYzu3-0003gn-FA for lwip-users@nongnu.org; Mon, 29 Nov 2004 23:46:15 -0500 Received: (qmail 81920 invoked by uid 89); 30 Nov 2004 15:46:07 +1100 Received: from dsl-61-95-56-108.request.com.au (HELO sqlserver) (61.95.56.108) by skyla-3.rev.altweb.net with SMTP; 30 Nov 2004 15:46:07 +1100 From: "Paul Clarke" To: "Mailing list for lwIP users" Subject: RE: [lwip-users] ARP ETHARP_TRY_HARD Date: Tue, 30 Nov 2004 15:16:04 +1030 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.6604 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 In-Reply-To: X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 04:56:29 -0000 Hi Leon. The reason why line 494 needs to be for_us = 1; A few lines later we have case ARP_REPLY: /* ARP reply. We already updated the ARP cache earlier. */ LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("etharp_arp_input: incoming ARP reply\n")); #if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) /* DHCP wants to know about ARP replies to our wanna-have-address */ if (for_us) dhcp_arp_reply(netif, &sipaddr); #endif break; The other option is to change the code there to #if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) /* DHCP wants to know about ARP replies to our wanna-have-address */ if (for_us || (netif->ip_addr.addr == 0)) dhcp_arp_reply(netif, &sipaddr); #endif Which is better? Paul From MAILER-DAEMON Tue Nov 30 06:11:40 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CZ5v1-0002wi-3I for mharc-lwip-users@gnu.org; Tue, 30 Nov 2004 06:11:39 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZ5ux-0002w3-Ph for lwip-users@nongnu.org; Tue, 30 Nov 2004 06:11:36 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZ5uv-0002vb-Ii for lwip-users@nongnu.org; Tue, 30 Nov 2004 06:11:34 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZ5uv-0002vJ-8U for lwip-users@nongnu.org; Tue, 30 Nov 2004 06:11:33 -0500 Received: from [195.101.39.227] (helo=GWOUT.thalesgroup.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZ5ky-0007wb-FE for lwip-users@nongnu.org; Tue, 30 Nov 2004 06:01:17 -0500 Received: from thalescan.corp.thales (200.3.2.3) by GWOUT.thalesgroup.com (NPlex 6.5.026) id 41AC476C0000C2B3 for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:00:20 +0100 Received: from hiplex.tsbh.thales ([10.33.19.4]) by thalescan with InterScan Messaging Security Suite; Tue, 30 Nov 2004 12:00:40 +0100 Received: from hiplex.tsbh.thales (10.33.21.5) by hiplex.tsbh.thales (NPlex 6.5.026) id 4198ECC50009185E for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:00:40 +0100 Received: from complex.tcfr.thales ([202.3.3.26]) by hiplex with InterScan Messaging Security Suite; Tue, 30 Nov 2004 12:00:39 +0100 Received: from complex.tcfr.thales (202.3.3.26) by complex.tcfr.thales (NPlex 6.5.026) id 41AAA6360000E58D for lwip-users@nongnu.org; Tue, 30 Nov 2004 11:59:56 +0100 Received: from NODALNET.clb.tcfr.thales ([146.11.5.4]) by complex with InterScan Messaging Security Suite; Tue, 30 Nov 2004 11:59:56 +0100 Received: by nodalnet.clb.tcfr.thales with Internet Mail Service (5.5.2653.19) id ; Tue, 30 Nov 2004 12:00:41 +0100 Message-ID: <487273D52219D811B209000347AE974A014B7AB4@hermes.wins> From: jean-louis.gilbert@fr.thalesgroup.com To: lwip-users@nongnu.org Subject: RE: [lwip-users] Remote tcp connection with TAPIF interface Date: Tue, 30 Nov 2004 12:01:01 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: multipart/mixed; boundary="----_=_NextPart_000_01C4D6CB.E0D8133E" X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 11:11:36 -0000 This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_000_01C4D6CB.E0D8133E Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Andreas, Sorry for the delay, but i was working on other projects... Here are the two required files tapif.c and config_envt.sh. This is the linux (kernel 2.4.18) version. Bridge-utils tool is required.=20 In order to work correctly, you have to set some parameters in the "low_level_init(struct netif* netif)" as explained in the file. In the example:=20 - 192.168.0.2 is the ip addr of the remote machine. - 192.168.0.5: is the ip addr of the tapif interface (netif configuration) of the host. - 192.168.0.3: is the ip addr of the host's bridge. RMQ: For linux system, you have to be careful about the time taken by = the bridge for its initialisation -> e.g. you should insert a "sleep(x)" = call after the first lwip_socket(...) call, in your application. I hope, it will be useful. regards. -----Message d'origine----- De: Andreas Becker [mailto:andreas.becker@dsys.de] Date: mercredi 20 octobre 2004 17:45 =C0: Mailing list for lwIP users Objet: Re: [lwip-users] Remote tcp connection with TAPIF interface Hi Gilbert,=20 I've merged my project from lwip 0.7.1 to 1.1.0-rc1 now I've the same problems like you had. Can you post / send me your tapif.c and posible your bridge startup = file? Thank you. --=20 Dipl.-Ing.(FH) Andreas Becker Entwicklung dSys e.K. Soeflinger Str. 100 D-89077 Ulm Tel: +49.731.151579-1 Fax: +49.731.151579-9 web: www.dsys.de _______________________________________________ lwip-users mailing list lwip-users@nongnu.org http://lists.nongnu.org/mailman/listinfo/lwip-users ------_=_NextPart_000_01C4D6CB.E0D8133E Content-Type: application/octet-stream; name="config_envt.sh" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="config_envt.sh" echo "1" > /proc/sys/net/ipv4/ip_forward=0A= =0A= brctl addbr br0=0A= brctl addif br0 eth0=0A= ifconfig eth0 0.0.0.0 promisc up=0A= ifconfig br0 192.168.0.3 up=0A= =0A= #arp -s 192.168.0.2 HWaddr_of_remote_host=0A= ------_=_NextPart_000_01C4D6CB.E0D8133E Content-Type: application/octet-stream; name="tapif.c" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="tapif.c" /*=0A= * Copyright (c) 2001-2003 Swedish Institute of Computer Science.=0A= * All rights reserved. =0A= * =0A= * Redistribution and use in source and binary forms, with or without = modification, =0A= * are permitted provided that the following conditions are met:=0A= *=0A= * 1. Redistributions of source code must retain the above copyright = notice,=0A= * this list of conditions and the following disclaimer.=0A= * 2. Redistributions in binary form must reproduce the above copyright = notice,=0A= * this list of conditions and the following disclaimer in the = documentation=0A= * and/or other materials provided with the distribution.=0A= * 3. The name of the author may not be used to endorse or promote = products=0A= * derived from this software without specific prior written = permission. =0A= *=0A= * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR = IMPLIED =0A= * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF = =0A= * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. = IN NO EVENT =0A= * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, = SPECIAL, =0A= * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, = PROCUREMENT =0A= * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR = BUSINESS =0A= * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER = IN =0A= * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR = OTHERWISE) ARISING =0A= * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE = POSSIBILITY =0A= * OF SUCH DAMAGE.=0A= *=0A= * This file is part of the lwIP TCP/IP stack.=0A= * =0A= * Author: Adam Dunkels =0A= *=0A= */=0A= =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= #include =0A= =0A= =0A= #include "lwip/debug.h"=0A= =0A= #include "lwip/opt.h"=0A= #include "lwip/def.h"=0A= #include "lwip/ip.h"=0A= #include "lwip/mem.h"=0A= #include "lwip/pbuf.h"=0A= #include "lwip/sys.h"=0A= =0A= #include "netif/etharp.h"=0A= =0A= #if defined(LWIP_DEBUG) && defined(LWIP_TCPDUMP)=0A= #include "netif/tcpdump.h"=0A= #endif /* LWIP_DEBUG && LWIP_TCPDUMP */=0A= =0A= #ifdef linux=0A= #include =0A= #include =0A= #include =0A= #define DEVTAP "/dev/net/tun"=0A= #else /* linux */=0A= #define DEVTAP "/dev/tap0"=0A= #endif /* linux */=0A= =0A= #define IFNAME0 't'=0A= #define IFNAME1 'p'=0A= =0A= static const struct eth_addr ethbroadcast =3D = {{0xff,0xff,0xff,0xff,0xff,0xff}};=0A= =0A= struct tapif {=0A= struct eth_addr *ethaddr;=0A= /* Add whatever per-interface state that is needed here. */=0A= int fd;=0A= };=0A= =0A= /* Forward declarations. */=0A= static void tapif_input(struct netif *netif);=0A= static err_t tapif_output(struct netif *netif, struct pbuf *p,=0A= struct ip_addr *ipaddr);=0A= =0A= static void tapif_thread(void *data);=0A= =0A= /*----------------------------------------------------------------------= -------------*/=0A= static void=0A= low_level_init(struct netif *netif)=0A= {=0A= struct tapif *tapif;=0A= char buf[100];=0A= struct eth_addr struct_tap_ethaddr[20];=0A= char tapif_ethaddr[20];=0A= char tap_name[20];=0A= =0A= tapif =3D netif->state;=0A= =0A= =0A= /* NB: In order to avoid manual configuration of the following pieces = of code (CAUTION:..), =0A= future implementions should provide a way of getting :=0A= - MAC adress of actual network interface (e.g. ethernet board)=0A= - the name of the bridge.=0A= =0A= In fact, the system call to arp (arp -s ip_addr_host Hw_addr_tapif) = can be done after the netif configuration "netif_add(...)". But, you have to get the Hwaddress of = tap interface (using the following code) */ =0A= /* CAUTION: Obtain MAC address from YOUR network =0A= interface and fill the struct */=0A= /* (We just fake an address...) */=0A= tapif->ethaddr->addr[0] =3D 0x00;=0A= tapif->ethaddr->addr[1] =3D 0x04;=0A= tapif->ethaddr->addr[2] =3D 0x76;=0A= tapif->ethaddr->addr[3] =3D 0xE2;=0A= tapif->ethaddr->addr[4] =3D 0x23;=0A= tapif->ethaddr->addr[5] =3D 0xF0;=0A= =0A= =0A= printf("\n\nDEVTAP=3D%s, %X:%X:%X:%X:%X:%X\n",DEVTAP, =0A= tapif->ethaddr->addr[0],=0A= tapif->ethaddr->addr[1], =0A= tapif->ethaddr->addr[2], =0A= tapif->ethaddr->addr[3], =0A= tapif->ethaddr->addr[4], =0A= tapif->ethaddr->addr[5]);=0A= =0A= =0A= /* Do whatever else is needed to initialize interface. */=0A= =0A= tapif->fd =3D open(DEVTAP, O_RDWR);=0A= printf("DEVTAP=3D%s",DEVTAP);=0A= LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_fd: init %d\n", tapif->fd));=0A= if(tapif->fd =3D=3D -1) {=0A= #ifdef linux=0A= perror("tapif_init: try running \"modprobe tun\" or rebuilding your = kernel with CONFIG_TUN; cannot open "DEVTAP);=0A= #else=0A= perror("tapif_init: cannot open "DEVTAP);=0A= #endif=0A= exit(1);=0A= }=0A= =0A= #ifdef linux=0A= {=0A= struct ifreq ifr, if_hwaddr;=0A= int i =3D 0, s =3D 0;=0A= printf ("set tapif for linux\n");=0A= =0A= /* This code permits to add more than one tapif in the same = process, =0A= just use netif_add(...) more than once in your application */=0A= memset(&ifr, 0, sizeof(ifr));=0A= ifr.ifr_flags =3D IFF_TAP|IFF_NO_PI;=0A= ifr.ifr_name[0] =3D 't';=0A= ifr.ifr_name[1] =3D 'a';=0A= ifr.ifr_name[2] =3D 'p';=0A= ifr.ifr_name[3] =3D '%';=0A= ifr.ifr_name[4] =3D 'd';=0A= ifr.ifr_name[5] =3D '\0';=0A= if (ioctl(tapif->fd, TUNSETIFF, (void *) &ifr) < 0) =0A= {=0A= perror("tapif_init: "DEVTAP" ioctl TUNSETIFF");=0A= exit(1);=0A= }=0A= =0A= // Get system MAC address of tap interface=0A= strcpy(tap_name, ifr.ifr_name);=0A= s =3D socket(PF_INET, SOCK_DGRAM, 0);=0A= memset(&if_hwaddr, 0, sizeof(if_hwaddr));=0A= strcpy(if_hwaddr.ifr_name, tap_name);=0A= if(ioctl(s, SIOCGIFHWADDR, (void *) &if_hwaddr) < 0)=0A= {=0A= // Something wrong...=0A= perror("tapif_init: ioctl tap hwaddress");=0A= exit(1); =0A= }=0A= else=0A= {=0A= // Display and set tapif data MAC address values...=0A= printf("MAC address of %s: ", tap_name);=0A= for(i=3D 0; i<6; ++i)=0A= {=0A= printf("%.2X:", (unsigned = char)if_hwaddr.ifr_hwaddr.sa_data[i]);=0A= struct_tap_ethaddr->addr[i] =3D (unsigned = char)if_hwaddr.ifr_hwaddr.sa_data[i];=0A= }=0A= snprintf(tapif_ethaddr, sizeof(tapif_ethaddr), = "%.2X:%.2X:%.2X:%.2X:%.2X:%.2X",=0A= struct_tap_ethaddr->addr[0],=0A= struct_tap_ethaddr->addr[1], =0A= struct_tap_ethaddr->addr[2],=0A= struct_tap_ethaddr->addr[3], =0A= struct_tap_ethaddr->addr[4],=0A= struct_tap_ethaddr->addr[5]);=0A= printf("\n");=0A= }=0A= =0A= }=0A= #endif /* Linux */=0A= =0A= /* CAUTION: Use only the following lines to setup the interface=0A= tap for the bridge. */=0A= snprintf(buf, sizeof(buf), "/sbin/ifconfig %s 0.0.0.0 promisc", = tap_name); =0A= LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_init: system(\"%s\");\n", buf)); =0A= system(buf); =0A= =0A= printf("\n\nDEVTAP=3D%s, %X:%X:%X:%X:%X:%X\n",DEVTAP, =0A= tapif->ethaddr->addr[0],=0A= tapif->ethaddr->addr[1], =0A= tapif->ethaddr->addr[2], =0A= tapif->ethaddr->addr[3], =0A= tapif->ethaddr->addr[4], =0A= tapif->ethaddr->addr[5]);=0A= =0A= /* CAUTION: Use only this line to add tap to a bridge called br0 = */=0A= snprintf(buf, sizeof(buf), "brctl addif br0 %s", tap_name);=0A= LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_init: system(\"%s\");\n", buf));=0A= system(buf);=0A= =0A= /* CAUTION: Set system ARP table with the new application IP+Hwaddr = of tap.=0A= Fill the addr with the ip_addr of YOUR app defined with = netif_add(...). */=0A= snprintf(buf, sizeof(buf), "arp -s 192.168.0.5 %s", = tapif_ethaddr);=0A= LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_init: system(\"%s\");\n", buf));=0A= system(buf);=0A= =0A= sys_thread_new(tapif_thread, netif, DEFAULT_THREAD_PRIO);=0A= =0A= =0A= }=0A= /*----------------------------------------------------------------------= -------------*/=0A= /*=0A= * low_level_output():=0A= *=0A= * Should do the actual transmission of the packet. The packet is=0A= * contained in the pbuf that is passed to the function. This pbuf=0A= * might be chained.=0A= *=0A= */=0A= /*----------------------------------------------------------------------= -------------*/=0A= =0A= static err_t=0A= low_level_output(struct netif *netif, struct pbuf *p)=0A= {=0A= struct pbuf *q;=0A= char buf[1514];=0A= char *bufptr;=0A= struct tapif *tapif;=0A= =0A= tapif =3D netif->state;=0A= #if 0 =0A= if(((double)rand()/(double)RAND_MAX) < 0.2) {=0A= printf("drop output\n");=0A= return ERR_OK;=0A= }=0A= #endif =0A= /* initiate transfer(); */=0A= =0A= bufptr =3D &buf[0];=0A= =0A= for(q =3D p; q !=3D NULL; q =3D q->next) {=0A= /* Send the data from the pbuf to the interface, one pbuf at a=0A= time. The size of the data in each pbuf is kept in the ->len=0A= variable. */ =0A= /* send data from(q->payload, q->len); */=0A= memcpy(bufptr, q->payload, q->len);=0A= bufptr +=3D q->len;=0A= }=0A= =0A= /* signal that packet should be sent(); */=0A= if(write(tapif->fd, buf, p->tot_len) =3D=3D -1) {=0A= perror("tapif: write");=0A= }=0A= return ERR_OK;=0A= }=0A= /*----------------------------------------------------------------------= -------------*/=0A= /*=0A= * low_level_input():=0A= *=0A= * Should allocate a pbuf and transfer the bytes of the incoming=0A= * packet from the interface into the pbuf.=0A= *=0A= */=0A= /*----------------------------------------------------------------------= -------------*/=0A= static struct pbuf *=0A= low_level_input(struct tapif *tapif)=0A= {=0A= struct pbuf *p, *q;=0A= u16_t len;=0A= char buf[1514];=0A= char *bufptr;=0A= =0A= /* Obtain the size of the packet and put it into the "len"=0A= variable. */=0A= len =3D read(tapif->fd, buf, sizeof(buf));=0A= #if 0=0A= if(((double)rand()/(double)RAND_MAX) < 0.2) {=0A= printf("drop\n");=0A= return NULL;=0A= }=0A= #endif=0A= =0A= /* We allocate a pbuf chain of pbufs from the pool. */=0A= p =3D pbuf_alloc(PBUF_RAW, len, PBUF_POOL);=0A= =0A= if(p !=3D NULL) {=0A= /* We iterate over the pbuf chain until we have read the entire=0A= packet into the pbuf. */=0A= bufptr =3D &buf[0];=0A= for(q =3D p; q !=3D NULL; q =3D q->next) {=0A= /* Read enough bytes to fill this pbuf in the chain. The=0A= available data in the pbuf is given by the q->len=0A= variable. */=0A= /* read data into(q->payload, q->len); */=0A= memcpy(q->payload, bufptr, q->len);=0A= bufptr +=3D q->len;=0A= }=0A= /* acknowledge that packet has been read(); */=0A= } else {=0A= /* drop packet(); */=0A= }=0A= =0A= return p; =0A= }=0A= /*----------------------------------------------------------------------= -------------*/=0A= static void =0A= tapif_thread(void *arg)=0A= {=0A= struct netif *netif;=0A= struct tapif *tapif;=0A= fd_set fdset;=0A= int ret;=0A= =0A= netif =3D arg;=0A= tapif =3D netif->state;=0A= =0A= while(1) {=0A= FD_ZERO(&fdset);=0A= FD_SET(tapif->fd, &fdset);=0A= =0A= /* Wait for a packet to arrive. */=0A= ret =3D select(tapif->fd + 1, &fdset, NULL, NULL, NULL);=0A= =0A= if(ret =3D=3D 1) {=0A= /* Handle incoming packet. */=0A= tapif_input(netif);=0A= } else if(ret =3D=3D -1) {=0A= perror("tapif_thread: select");=0A= }=0A= }=0A= }=0A= /*----------------------------------------------------------------------= -------------*/=0A= /*=0A= * tapif_output():=0A= *=0A= * This function is called by the TCP/IP stack when an IP packet=0A= * should be sent. It calls the function called low_level_output() = to=0A= * do the actuall transmission of the packet.=0A= *=0A= */=0A= /*----------------------------------------------------------------------= -------------*/=0A= static err_t=0A= tapif_output(struct netif *netif, struct pbuf *p,=0A= struct ip_addr *ipaddr)=0A= {=0A= p =3D etharp_output(netif, ipaddr, p);=0A= if(p !=3D NULL) {=0A= low_level_output(netif, p);=0A= p =3D NULL;=0A= }=0A= return ERR_OK;=0A= }=0A= /*----------------------------------------------------------------------= -------------*/=0A= /*=0A= * tapif_input():=0A= *=0A= * This function should be called when a packet is ready to be read=0A= * from the interface. It uses the function low_level_input() that=0A= * should handle the actual reception of bytes from the network=0A= * interface.=0A= *=0A= */=0A= /*----------------------------------------------------------------------= -------------*/=0A= static void=0A= tapif_input(struct netif *netif)=0A= {=0A= struct tapif *tapif;=0A= struct eth_hdr *ethhdr;=0A= struct pbuf *p, *q;=0A= =0A= =0A= tapif =3D netif->state;=0A= =0A= p =3D low_level_input(tapif);=0A= =0A= if(p =3D=3D NULL) {=0A= LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_input: low_level_input returned = NULL\n"));=0A= return;=0A= }=0A= ethhdr =3D p->payload;=0A= =0A= q =3D NULL;=0A= switch(htons(ethhdr->type)) {=0A= case ETHTYPE_IP:=0A= LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_input: IP packet\n"));=0A= q =3D etharp_ip_input(netif, p);=0A= pbuf_header(p, -14);=0A= #if defined(LWIP_DEBUG) && defined(LWIP_TCPDUMP)=0A= tcpdump(p);=0A= #endif /* LWIP_DEBUG && LWIP_TCPDUMP */=0A= netif->input(p, netif);=0A= break;=0A= case ETHTYPE_ARP:=0A= LWIP_DEBUGF(TAPIF_DEBUG, ("tapif_input: ARP packet\n"));=0A= q =3D etharp_arp_input(netif, tapif->ethaddr, p);=0A= break;=0A= default:=0A= pbuf_free(p);=0A= break;=0A= }=0A= if(q !=3D NULL) {=0A= low_level_output(netif, q);=0A= pbuf_free(q);=0A= }=0A= =0A= }=0A= /*----------------------------------------------------------------------= -------------*/=0A= static void=0A= arp_timer(void *arg)=0A= {=0A= etharp_tmr();=0A= sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler)arp_timer, = NULL);=0A= }=0A= /*----------------------------------------------------------------------= -------------*/=0A= /*=0A= * tapif_init():=0A= *=0A= * Should be called at the beginning of the program to set up the=0A= * network interface. It calls the function low_level_init() to do = the=0A= * actual setup of the hardware.=0A= *=0A= */=0A= /*----------------------------------------------------------------------= -------------*/=0A= err_t=0A= tapif_init(struct netif *netif)=0A= {=0A= struct tapif *tapif;=0A= =0A= tapif =3D mem_malloc(sizeof(struct tapif));=0A= if (!tapif)=0A= return ERR_MEM;=0A= netif->state =3D tapif;=0A= netif->name[0] =3D IFNAME0;=0A= netif->name[1] =3D IFNAME1;=0A= netif->output =3D tapif_output;=0A= netif->linkoutput =3D low_level_output;=0A= netif->mtu =3D 1500; =0A= /* hardware address length */=0A= netif->hwaddr_len =3D 6;=0A= =0A= tapif->ethaddr =3D (struct eth_addr *)&(netif->hwaddr[0]);=0A= low_level_init(netif);=0A= etharp_init();=0A= =0A= sys_timeout(ARP_TMR_INTERVAL, (sys_timeout_handler)arp_timer, = NULL);=0A= return ERR_OK;=0A= }=0A= /*----------------------------------------------------------------------= -------------*/=0A= ------_=_NextPart_000_01C4D6CB.E0D8133E-- From MAILER-DAEMON Tue Nov 30 06:31:10 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CZ6Du-0000zg-Ej for mharc-lwip-users@gnu.org; Tue, 30 Nov 2004 06:31:10 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZ6Dq-0000yy-DQ for lwip-users@nongnu.org; Tue, 30 Nov 2004 06:31:06 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZ6Dl-0000yd-Q3 for lwip-users@nongnu.org; Tue, 30 Nov 2004 06:31:02 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZ6Dk-0000yY-SS for lwip-users@nongnu.org; Tue, 30 Nov 2004 06:31:01 -0500 Received: from [195.101.39.227] (helo=GWOUT.thalesgroup.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZ64D-0004AG-Cs for lwip-users@nongnu.org; Tue, 30 Nov 2004 06:21:09 -0500 Received: from thalescan.corp.thales (200.3.2.3) by GWOUT.thalesgroup.com (NPlex 6.5.026) id 41AC476C0000FD48 for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:20:34 +0100 Received: from hiplex.tsbh.thales ([10.33.19.4]) by thalescan with InterScan Messaging Security Suite; Tue, 30 Nov 2004 12:20:54 +0100 Received: from hiplex.tsbh.thales (10.33.21.5) by hiplex.tsbh.thales (NPlex 6.5.026) id 4198ECC500091CB8 for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:20:54 +0100 Received: from complex.tcfr.thales ([202.3.3.26]) by hiplex with InterScan Messaging Security Suite; Tue, 30 Nov 2004 12:20:53 +0100 Received: from complex.tcfr.thales (202.3.3.26) by complex.tcfr.thales (NPlex 6.5.026) id 41AAA6360000E92E for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:20:10 +0100 Received: from NODALNET.clb.tcfr.thales ([146.11.5.4]) by complex with InterScan Messaging Security Suite; Tue, 30 Nov 2004 12:20:10 +0100 Received: by nodalnet.clb.tcfr.thales with Internet Mail Service (5.5.2653.19) id ; Tue, 30 Nov 2004 12:21:28 +0100 Message-ID: <487273D52219D811B209000347AE974A014B7AC7@hermes.wins> From: jean-louis.gilbert@fr.thalesgroup.com To: lwip-users@nongnu.org Subject: RE: [lwip-users] Remote tcp connection with TAPIF interface Date: Tue, 30 Nov 2004 12:21:18 +0100 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 11:31:07 -0000 Hi all, I have some problems with TFTP communications... When the host has to make an ARP_REQUEST (and ARP_REPLY) to update its ARP table, i noticed that the first UDP packet isn't sent to the network... hence, for the TFTP application the WRQ or RRQ request never reach the remote host.... and the TFTP application isn't set in one or another mode, and so does't take into account the following DATA packets (which reach the remote host !)... I notice that at the end of udp_send(...) function, there is a "pbuf_free(p)", which remove this pbuf. Is "q", the new allocated pbuf (a copy), really taken into account in the FIFO in order to be sent another times (by the thread) ? Thanks for you help... regards Jean-louis Gilbert From MAILER-DAEMON Tue Nov 30 12:09:44 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CZBVY-0001rw-7T for mharc-lwip-users@gnu.org; Tue, 30 Nov 2004 12:09:44 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZBVU-0001rB-3e for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:09:42 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZBVS-0001qK-Nu for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:09:39 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZBVS-0001q5-1o for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:09:38 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZBLt-0007za-2O for lwip-users@nongnu.org; Tue, 30 Nov 2004 11:59:45 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 699DCC3D730 for ; Tue, 30 Nov 2004 11:59:42 -0500 (EST) X-Sasl-enc: nJpFjHJIwRYZDby2Tqx3SQ 1101833982 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id 21F1E287A7 for ; Tue, 30 Nov 2004 11:59:42 -0500 (EST) Message-ID: <41ACA728.6020302@mailcan.com> Date: Tue, 30 Nov 2004 18:00:24 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] ARP ETHARP_TRY_HARD References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 17:09:43 -0000 Hello Paul, Paul Clarke wrote: >Hi Leon, > >I think you have made a typo > > /* no empty entry found and not allowed to recycle? */ > if ((empty == ARP_TABLE_SIZE) && ((flags & ETHARP_TRY_HARD) == 0)) > ^^^^^^ cvs has i > > > Whoops, introduced a (short-lived :-) bug. >I have made a patch with that and a couple of other changes > move pbuf free to where it is needed (saves a ->p != NULL test) > if the interface is not configured we must assume arp_input is for us. > > > Looks excellent except for the last change, for which I prefer your second method (in your follow-up email). Thanks for the optimization. BTW, we could use active developers with CVS write access. If you are interested, email me your Savannah login. Regards, Leon Woestenberg. From MAILER-DAEMON Tue Nov 30 12:28:11 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CZBnP-0000R5-7I for mharc-lwip-users@gnu.org; Tue, 30 Nov 2004 12:28:11 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZBnN-0000PN-HH for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:28:09 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZBnM-0000OW-7q for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:28:08 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZBnM-0000OG-2n for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:28:08 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZBdQ-0003fD-OA for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:17:53 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 770E2C3C794 for ; Tue, 30 Nov 2004 12:17:51 -0500 (EST) X-Sasl-enc: hXt4qrLSfX63qV8jG5E2mA 1101835071 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id 48B402876C for ; Tue, 30 Nov 2004 12:17:51 -0500 (EST) Message-ID: <41ACAB69.7040206@mailcan.com> Date: Tue, 30 Nov 2004 18:18:33 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] ARP ETHARP_TRY_HARD References: In-Reply-To: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 17:28:09 -0000 Hello Paul, Paul Clarke wrote: >Hi Leon. > >The reason why line 494 needs to be for_us = 1; >A few lines later we have > > case ARP_REPLY: > /* ARP reply. We already updated the ARP cache earlier. */ > LWIP_DEBUGF(ETHARP_DEBUG | DBG_TRACE, ("etharp_arp_input: incoming ARP >reply\n")); >#if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) > /* DHCP wants to know about ARP replies to our wanna-have-address */ > if (for_us) dhcp_arp_reply(netif, &sipaddr); >#endif > break; > >The other option is to change the code there to > >#if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) > /* DHCP wants to know about ARP replies to our wanna-have-address */ > if (for_us || (netif->ip_addr.addr == 0)) dhcp_arp_reply(netif, >&sipaddr); >#endif > >Which is better? > > The first is not OK as the for_us also works for all ARP traffic, requests as well. Setting for_us = 1 for a request when the interface is not configured would be bad. The last one is better, although I now spot a subtle bug in the current code: If the interface in non-configured (0.0.0.0), for_us will be 0 and the dhcp_arp_reply() will not be called. This would be correct: #if (LWIP_DHCP && DHCP_DOES_ARP_CHECK) /* When unconfigured, DHCP wants to know about ARP replies from the * address offered to us, as that means someone else uses it already! */ if (netif->ip_addr.addr == 0) dhcp_arp_reply(netif, &sipaddr); #endif Changed in CVS. Regards, Leon. From MAILER-DAEMON Tue Nov 30 12:33:00 2004 Received: from mailman by lists.gnu.org with archive (Exim 4.33) id 1CZBs3-00024J-OV for mharc-lwip-users@gnu.org; Tue, 30 Nov 2004 12:32:59 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.33) id 1CZBrz-00023J-W5 for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:32:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.33) id 1CZBrx-00022S-VT for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:32:54 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.33) id 1CZBrx-000225-SE for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:32:53 -0500 Received: from [66.111.4.26] (helo=out2.smtp.messagingengine.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CZBiP-0004s3-Ur for lwip-users@nongnu.org; Tue, 30 Nov 2004 12:23:02 -0500 Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 0CDBCC3D6A1 for ; Tue, 30 Nov 2004 12:23:01 -0500 (EST) X-Sasl-enc: nWHWaYbJLc02EqNzURBptQ 1101835380 Received: from [192.168.0.110] (b76251.upc-b.chello.nl [212.83.76.251]) by www.fastmail.fm (Postfix) with ESMTP id A88FC2876C for ; Tue, 30 Nov 2004 12:23:00 -0500 (EST) Message-ID: <41ACAC9F.8090607@mailcan.com> Date: Tue, 30 Nov 2004 18:23:43 +0100 From: Leon Woestenberg User-Agent: Mozilla Thunderbird 0.7.1 (Windows/20040626) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Mailing list for lwIP users Subject: Re: [lwip-users] Remote tcp connection with TAPIF interface References: <487273D52219D811B209000347AE974A014B7AC7@hermes.wins> In-Reply-To: <487273D52219D811B209000347AE974A014B7AC7@hermes.wins> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: lwip-users@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Mailing list for lwIP users List-Id: Mailing list for lwIP users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 30 Nov 2004 17:32:57 -0000 Hello Jean-Louis, jean-louis.gilbert@fr.thalesgroup.com wrote: >Hi all, > >I have some problems with TFTP communications... > >When the host has to make an ARP_REQUEST (and ARP_REPLY) to update its ARP >table, i noticed that the first UDP packet isn't sent to the network... > > Please mention your version of lwIP, and whether you have ETHARP_QUEUEING enabled or not. Regards, Leon.