Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Reg - How the packet will going to application: (6 Items)
   
Reg - How the packet will going to application  
Hi,

In the network driver, once gets the packets from the hardware.
it calls the ( ifp->if_input() ) function to send the packet to the stack.

How the stack will process the packet and give to application.

tell with aby example.

1.ip_input or ether_input


Please exaplain the code flow because i m not able to understand the code.

Thanks and Regards
K.Senthil
Re: Reg - How the packet will going to application  
On Mon, Jul 27, 2009 at 03:35:34AM -0400, Senthil K wrote:
> Hi,
> 
> In the network driver, once gets the packets from the hardware.
> it calls the ( ifp->if_input() ) function to send the packet to the stack.
> 
> How the stack will process the packet and give to application.
> 
> tell with aby example.
> 
> 1.ip_input or ether_input

If it's an ethernet driver ifp->if_input() should
point to ether_input().  ether_input demux's based
on the ethertype and may call ip_input().

-seanb
Re: Reg - How the packet will going to application  
Hi,

It will go to ip_input(),there they called schednetisr() function,after that how the packets reaches to the application.


For ex ping application.

How the ping utility will get the packet from the ip_input function.


Thanks and Regards
K.Senthil
Re: Reg - How the packet will going to application  
On Tue, Jul 28, 2009 at 02:10:05AM -0400, Senthil K wrote:
> Hi,
> 
> It will go to ip_input(),there they called schednetisr() function,after that how the packets reaches to the 
application.
> 
> For ex ping application.
> 
> How the ping utility will get the packet from the ip_input function.

further in the input process soreceive() will be called which will
queue the packet on a socket buffer, wakeup() a blocked message pass
context which in turn will MsgReply to the application.  Compiling
a debug variant and firing up gdb may help here.

Regards,

-seanb
Re: Reg - How the packet will going to application  
HI Sean,

In wakeup() function.

is there is no MsgReply function call.


Can you please explain from wake up function how it will reaches to application.


Thanks and Regards
K.Senthil
Re: Reg - How the packet will going to application  
On Wed, Jul 29, 2009 at 06:50:14AM -0400, Senthil K wrote:
> HI Sean,
> 
> In wakeup() function.
> 
> is there is no MsgReply function call.
> 
> 
> Can you please explain from wake up function how it will reaches to application.

wakeup() wakes up a context blocked in ltsleep()
(sbwait() calls ltsleep() under the covers).  So
a context blocked waiting for data to queue in
a socket buffer will wake up in this manner.

Regards,

-seanb