i don't know much about the ppp core, so i assume the above statement is correctThanks for your mail. I basically want to send the packets received by the synchronous ppp tty module (ppp_synctty.c) to a socket application. Since the ppp transmit function is called from interrupt context, i am not able to invoke the sock_sendmsg call.
So i thought of creating a new kernel thread which will have a queuewell looks like all you need is a static data structure like: buffer / linked list. They both need
so that from the sync ppp tty module i will post the packets to this
queue. From this kernel thread i can write the message to the socket.
to be protected by a spinlock (due to the interrupt context issues).
My idea is:
the kernel_thread goes to sleep (in a wait queue) waiting for a packet.
When a packet is received from the ppp core you enqueue it in the choosen data structre (buffer/linked list), and wake the kernel_thread.
If you're working against the 2.6, take a look at the workqueue ... maybe you
can simplify your code by using on of such queue.
Hope these helps.
-- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/