Hi,
 
Thanks a lot for the info. But how can I use poll and select to make the kernel call the user-upcall? Poll and select will run in user-mode and will take processor cycles in busy waiting. I want an event-driven mechanism in which kernel will automatically call the upcall(like an interrupt) when it receives a data packet at the TCP layer, to avoid polling in user code to check if data has arrived at the socket.
I will read about kqueues, and fcntl which I dont know much about:)
 
Thanks,
Anjali
----- Original Message -----
Sent: Tuesday, June 12, 2001 5:50 PM
Subject: Re: User-Level upcalls

On Tuesday, June 12, 2001, at 05:34 AM, Anjali Kulkarni wrote:

hi,
 
Does any one know how to perform user-level upcalls from kernel TCP/IP stack? If I wanted to get an upcall every time a data packet arrived on a socket, how can it be done? Can I use signal handlers for this?
 
Thanks,
Anjali


kqueue is the nicest interface, but new and not as portable as others.
poll and select are more traditional, and popular.
you can also try fcntl's O_ASYNC flag, but I have never used it.

Reply via email to