ramash | 1 Nov 2007 06:26
Picon

tcp/ip packets


I have been doing PPP 2.4 in LWIP. I have problem in sending tcp/ip packets.
whether i have to use socket concept or send packets through sio_write.I am
having a file to transmit through the ppp link.but i established ppp link
and got IP address but unable to send my input file.my lwip code is able
read ip packets transmitted by Host system but not processing it inside
PPPIproc function.

Please help me where to send the packets in TCP/IP format to the destination
IP address.

Thanks and regards
ramesh
--

-- 
View this message in context: http://www.nabble.com/tcp-ip-packets-tf4729499.html#a13523659
Sent from the lwip-users mailing list archive at Nabble.com.
ramash | 1 Nov 2007 09:45
Picon

Re: Re:tcp/ip packets


 LWIP_STATS is also enabled.Actually in  my program hits at sifup function in
ppp.c. from there where i have to initialize  tcp/ip packets .also i used
socket to send ip packets,but the return value is negative or incorrect for
the handler.please  suggest correct  path to send packets

bockham wrote:
> 
> as u say, you can got ip address, layer 3 and below should be ok
> i suggest u trace the data flow through lwip_stats(enable LWIP_STATS in
> lwipopts.h), see if tcp data has passed to layer 3
> if not, you must wrong use api function
> _______________________________________________
> lwip-users mailing list
> lwip-users@...
> http://lists.nongnu.org/mailman/listinfo/lwip-users
> 

--

-- 
View this message in context: http://www.nabble.com/tcp-ip-packets-tf4729499.html#a13525065
Sent from the lwip-users mailing list archive at Nabble.com.
Simon Goldschmidt | 1 Nov 2007 12:35
Picon
Picon

Re: netconn: freeing netbufs after netconn_recv


Am 31.10.2007 um 21:23 schrieb Ivan Delamer:

> ...
> Now, I have two questions/concerns:
>
> 1) do I have to manually free/delete the netbuf? I read the source  
> code for netconn_recv and I see a buf = memp_malloc(MEMP_NETBUF)   
> but no "free" in the examples.

Yes, look at sockets.c, lwip_recv() implementation for an example.

>
> 2) for how long is the data in the netbuf valid? netconn_recv sends  
> a API_MSG_RECV so does this mean that the data may be overwritten?  
> or does it stay valid until I free the netbuf (and underlying pbufs)?

Data stays valid until you free the netbuf. API_MSG_RECV updates the  
TCP window so that the remote side can send more data. If you don't  
free the netbuf, you will eventually run out of pbufs/netbufs.

>
> The way I see it, I should call netbuf_delete() after I'm done  
> processing the data, but I couldn't find any example of this.

As mentioned above, look at sockets.c, lwip_recv() implementation.

>
> Thanks in advance again,
> Ivan
(Continue reading)

Ivan Delamer | 1 Nov 2007 15:51
Picon
Favicon

Re: netconn: freeing netbufs after netconn_recv

Thanks Simon,

BTW, I have never contributed code here before, but perhaps the netbuf_delete could be added to the HTTP
example? How is that posted?

If the HTTP server I'm making is half decent I'll post it in case anybody is interested.

Regards
Ivan

----- Mensaje original ----
De: Simon Goldschmidt <goldsimon@...>
Para: Mailing list for lwIP users <lwip-users@...>
Enviado: jueves 1 de noviembre de 2007, 4:35:32
Asunto: Re: [lwip-users] netconn: freeing netbufs after netconn_recv

Am 31.10.2007 um 21:23 schrieb Ivan Delamer:

> ...
> Now, I have two questions/concerns:
>
> 1) do I have to manually free/delete the netbuf? I read the source  
> code for netconn_recv and I see a buf = memp_malloc(MEMP_NETBUF)  
> but no "free" in the examples.

Yes, look at sockets.c, lwip_recv() implementation for an example.

>
> 2) for how long is the data in the netbuf valid? netconn_recv sends  
> a API_MSG_RECV so does this mean that the data may be overwritten?  
(Continue reading)

Picon
Picon

Re: netconn: freeing netbufs after netconn_recv

Ivan Delamer schrieb:
> Thanks Simon,
>
> BTW, I have never contributed code here before, but perhaps the netbuf_delete could be added to the HTTP
example? How is that posted?
>   
If you take a look at the httpserver-netconn.c in the contrib module in 
CVS (take a look at the current version here:

http://cvs.savannah.nongnu.org/viewvc/contrib/apps/httpserver/httpserver-netconn.c?revision=1.4&root=lwip&view=markup 
), netbuf_delete() is called at the end of the serve-function.

> If the HTTP server I'm making is half decent I'll post it in case anybody is interested.
>   
The question how to contribute is not that easily answered right now. We 
haven't yet decided what to do with contributions that don't fit in the 
category 'bug' or 'patch'. Only apps/ports/drivers that have an active 
maintainer (with write access to CVS) are added to the repository.

We have discussed the idea for an open space for applications based on 
an lwIP API or ports/drivers that are unmaintained, but that hasn't led 
to a final decision, yet. As it is right now, I'm afraid the only thing 
you can do is post your code here on the mailing list. I'd be happy to 
take a look over it, though. But, taking part in maintaining the current 
'httpserver-netconn' I don't think it will be extended in any way since 
it is really only a small netconn-API example application.

Simon
Grubb, Jared | 1 Nov 2007 17:19

RE: netconn: freeing netbufs after netconn_recv

Ivan,

Any code examples are always appreciated! As Simon mentioned, post it to the list... maybe we can work it
into the Scribblewiki??

Jared

-----Original Message-----
From: lwip-users-bounces+jgrubb=qualcomm.com@...
[mailto:lwip-users-bounces+jgrubb=qualcomm.com@...] On
Behalf Of Ivan Delamer
Sent: Thursday, November 01, 2007 07:51
To: Mailing list for lwIP users
Subject: Re: [lwip-users] netconn: freeing netbufs after netconn_recv

Thanks Simon,

BTW, I have never contributed code here before, but perhaps the netbuf_delete could be added to the HTTP
example? How is that posted?

If the HTTP server I'm making is half decent I'll post it in case anybody is interested.

Regards
Ivan

----- Mensaje original ----
De: Simon Goldschmidt <goldsimon@...>
Para: Mailing list for lwIP users <lwip-users@...>
Enviado: jueves 1 de noviembre de 2007, 4:35:32
Asunto: Re: [lwip-users] netconn: freeing netbufs after netconn_recv
(Continue reading)

Ivan Delamer | 1 Nov 2007 17:34
Picon
Favicon

Re: netconn: freeing netbufs after netconn_recv

I must have gone over httpserver-netconn.c 10 times and missed it every single time !! thanks.

I will post the HTTPD server if it is any good.

Regards
Ivan

----- Mensaje original ----
De: "goldsimon <at> gmx.de" <goldsimon@...>
Para: Mailing list for lwIP users <lwip-users <at> nongnu.org>
Enviado: jueves 1 de noviembre de 2007, 8:37:31
Asunto: Re: [lwip-users] netconn: freeing netbufs after netconn_recv

Ivan Delamer schrieb:
> Thanks Simon,
>
> BTW, I have never contributed code here before, but perhaps the netbuf_delete could be added to the HTTP
example? How is that posted?
>  
If you take a look at the httpserver-netconn.c in the contrib module in 
CVS (take a look at the current version here:

http://cvs.savannah.nongnu.org/viewvc/contrib/apps/httpserver/httpserver-netconn.c?revision=1.4&root=lwip&view=markup 
), netbuf_delete() is called at the end of the serve-function.

> If the HTTP server I'm making is half decent I'll post it in case anybody is interested.
>  
The question how to contribute is not that easily answered right now. We 
haven't yet decided what to do with contributions that don't fit in the 
category 'bug' or 'patch'. Only apps/ports/drivers that have an active 
(Continue reading)

bonny gijzen | 2 Nov 2007 10:29

Question about PHY transceivers

Hi guys,

The question I have is not a true LWIP question, but it is hardware
related (PHY transceivers), so I guess you all have experience with
them.

I have used LWIP in the past for a personal project, so I follow this
mailing list since, so I decided to raise my question here (if that is
no problem to you all).

We are currently looking at the idea to add a (CAT5-6) gigabit
sender/receiver to our (FPGA) boards.
We think using a PHY transceiver gives more benefits over LDVS
transmitters, because:

*) Most PHY transceivers I've looked at use a single 25Mhz osc
*) Have all encoding (4b5b e.o.) done inside
*) Have embedded functions like polarity correction, adaptive
equaliztion, cross-talk cancellation, echo cancelation, timing recovery
and error correction.

These are some of the features which are embedded in the devices, so we
do not need to bother with them ourselves. 

Do any of you use PHY transceivers (not MAC devices) on your boards?
What are your experiences with them?
What prices must I think of in unit terms of 1000 pcs annual?

Thank you for maintaining LWIP,

(Continue reading)

bockham | 2 Nov 2007 17:59

Re: Re: Re:tcp/ip packets


> LWIP_STATS is also enabled.Actually in  my program hits at sifup function in 
>ppp.c. from there where i have to initialize  tcp/ip packets .also i used 
>socket to send ip packets,but the return value is negative or incorrect for 
>the handler.please  suggest correct  path to send packets 

which version of lwip do you use? 1.1.1 has a serious bug at function sifup of ppp.c
you should call 
netif_set_up(&pc->netif);
before
pc->if_up = 1;
see cvs_head for more help
_______________________________________________
lwip-users mailing list
lwip-users@...
http://lists.nongnu.org/mailman/listinfo/lwip-users
ramash | 3 Nov 2007 06:16
Picon

PPP


Dear All,
    Our project team is trying to send data using point to point protocol,We
are using PPP 2.4 version with LWIP.We are able to establish a PPP link  and
got IP address from ISP using our own drivers.After this we have the
following issues.

1.We are unable to pass the  IP packets ,since there are more files such as
tcp.c,ip.c,tcpip.c,udp.c..etc.Through which file we have to send data that
is IP packets.
2.We decided to use sockets to send packets,but it does not returns a socket
id like  windows socket API.
3.we are confused to decide a code flow   to send tcp/ip packets. also in a
file called ip.c the function  ip_init is empty but defined, a comment is
mentioned inside the function   "/* no initializations as of yet */".

kindly reply us to find a correct path.
--

-- 
View this message in context: http://www.nabble.com/PPP-tf4741948.html#a13560146
Sent from the lwip-users mailing list archive at Nabble.com.

Gmane