how to know packet received from network link in kernel space?

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

 





---------- Forwarded message ----------
From: Li, Chanjuan <lichanjuan04@xxxxxxxxx>
Date: Tue, Dec 16, 2008 at 10:30 AM
Subject: how to
To: kernelnewbies@xxxxxxxxxxxx


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 
       


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux