lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] [lwip] Date: Mon, 4 Mar 2002 19:52:15 +0500


From: Muhammad Ashraf
Subject: [lwip-users] [lwip] Date: Mon, 4 Mar 2002 19:52:15 +0500
Date: Thu, 09 Jan 2003 02:11:22 -0000

This is a multi-part message in MIME format.

------=_NextPart_000_009B_01C1C3B6.158E5C40
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

In function tcp_enqueue

when copy flag is not set and option field is null , then these two =
conditions are false=20

   if(optdata !=3D NULL) {

and=20

   } else if(copy) {

In the else case=20

It firstly allocate the memory for the (pbuf)  type struct called   p of =
type  PBUF_ROM.Its p-payload  points to the application data.
Now again memory is allocated for=20

                    TCP + IP + DATALINKHEADER

is assighn to seg->p=20
                                    under the type of PBUF_RAM
After that seg->p and p are chained where seg->p->next points to p.Now p =
is a structure whose p->payload contain only=20
application data.
I cant understand the purpose of this whole and what is its advantage.
Where this can be done by using a single struct.

Can any body explain .

Regards

ashraf




------=_NextPart_000_009B_01C1C3B6.158E5C40
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3500" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>In function tcp_enqueue</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>when copy flag is not set and option =
field is null=20
, then these two conditions are false </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;if(optdata !=3D NULL) =

{<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>and </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp;} else if(copy)=20
{<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>In the else case&nbsp;</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>It firstly allocate the memory for the =
(pbuf)&nbsp;=20
type struct called&nbsp;&nbsp; p of type&nbsp; PBUF_ROM.Its =
p-payload&nbsp;=20
points to the application data.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Now again memory&nbsp;is allocated for=20
</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; TCP + IP +=20
DATALINKHEADER</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>is assighn to seg-&gt;p </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; =
&nbsp;&nbsp;&nbsp;=20
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; under the type =
of=20
PBUF_RAM</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>After that seg-&gt;p and p are chained =
where=20
seg-&gt;p-&gt;next points to p.Now p is a structure whose p-&gt;payload =
contain=20
only </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>application data.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I cant understand the purpose of this =
whole and=20
what is its advantage.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Where this can be done by using a =
single=20
struct.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Can any body explain .</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Regards</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>ashraf</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;</DIV></FONT></BODY></HTML>

------=_NextPart_000_009B_01C1C3B6.158E5C40--

[This message was sent through the lwip discussion list.]




reply via email to

[Prev in Thread] Current Thread [Next in Thread]