some key low level functions for networking:

a.   netif_rx()--> just after the interrupt level, and before the
TCP/IP interface are called, for reciving packets.
b.   dev_queue_xmit()--> the equivalent of above  but for transmission.
c.   ip_rcv(), tcp_v4_do_rcv(), tcp_v4_rcv() etc.
d.   tcp_sendmsg(), tcp_recvmsg() etc.

On Tue, Dec 16, 2008 at 10:32 AM, Li, Chanjuan <[email protected]> wrote:
>
>
> ---------- Forwarded message ----------
> From: Li, Chanjuan <[email protected]>
> Date: Tue, Dec 16, 2008 at 10:30 AM
> Subject: how to
> To: [email protected]
>
>
> hi,all:
>      I am a newbie on linux kernel. now I encountered a problem on socket in
> kernel space.I create a SOCK_DGRAM socket in kernel space . What I want to
> do can
> be described as follows:
>   while(1){
>         if( packet received)
>                    call packet handler
> }
>
> my problem is how to know packet received at kernel space. In user space
> there is select() to use, but in kernel space, there is no such function.
> I have read sk_buff  and struct sock definition to find some hint, but still
> have no idea. I think it is a good place to ask for help. thanks in advance.
>
>
> lily
>
>
>



-- 
Regards,
Peter Teoh

Ernest Hemingway - "Never mistake motion for action."

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to [email protected]
Please read the FAQ at http://kernelnewbies.org/FAQ

Reply via email to