lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Re: [lwip] Interface for Raw IP


From: Adam Dunkels
Subject: [lwip-users] Re: [lwip] Interface for Raw IP
Date: Wed, 08 Jan 2003 22:44:28 -0000

Hi Rajaram!

On Monday 28 January 2002 11.08, you wrote:
> The document that comes with LwIP (raw_api.txt) describes the TCP and UDP
> interface. How can I directly send and receive at the IP level. Is there
> any documentation for the API at that level? Additionally the various
> support functions and macros are also not documented and the only way I
> could learn about them was either by looking at the headers or by seeing
> the sample simhost code. So is there any more documentation.
>
> Even if there isnt any documentation I would like to know which header
> files to look at for raw IP level access.

The IP layer API is not specified since it is used only within the stack, but 
you should look in the files src/include/ipv4/lwip/ip.h and 
src/core/ipv4/ip.c. Sending packets is done using either the ip_output() 
function or the ip_output_if() function. The latter lets you specify the 
network interface on which the packet should be sent. The function ip_route() 
can be used to find a suiteable network interface for outgoing packets (this 
is how UDP and TCP does).

Incoming packets are handled by ip_input(). You should add another case label 
in the switch statement that demultiplexes the packet between the different 
transport protocols (ICMP, UDP, and TCP).

/adam
-- 
Adam Dunkels <address@hidden>
http://www.sics.se/~adam
[This message was sent through the lwip discussion list.]




reply via email to

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