Re: Help on Kernel-Application Programme Communication

zam_ustc@263.net
Tue, 4 Jan 2000 10:34:35 +0800 (CST)


>> The difficulty comes when I want the kernel wants to communicate
>>with the daemon. I don't know how to implement this. Maybe it is a
>>bd idea.But how can I? I'd really appreciate any assistance--I have
>> been thinking on it for such a long time.

>1) Build a characterdevice, the daemon does a blocking read and >writes the result.
>2) 1) but instead of a device, use a file in /proc
>3) Implement a new syscall
>4) Open a TCP/IP connection to/from your daemon (localhost)
>5) Open a named pipe to/from your daemon
>6) Send signals to eachother
My programme does not run in the interrupt context.The kernel
searches the priority table before the output of a packet.If found,
the packet is sent out by the output routine;if not,the kernel then
copies it to the daemon in the application layer before it is sent
out.
I wanted to use the 4th or 5th method you mention before I sent
my mail. But I really wonder whether I can use the system calls,
such as "socket","pipe",and so on,in the kernel context.If I can,
that is quite simple,if cannot,I have to call the kernel routines
to do so,it will be more difficult.
I am sorry to ask you such silly questions. Because I used to
do the application programmes.When it comes to kernel, I am really
a layman. But I am learning. I would be very appriciate if you can
give me some points in more detail.
Thanks a lot.

Sincerely,
Mikel

_____________________________________________
首都在线--先进中国人的网上家园 http://www.263.net
免费邮箱 邮件杂志 签名邮件 邮件加密 邮件追身呼
搜索引擎 个人站点 在线游戏 网上聊天 网上挂号
金融王国 在线杀毒 跳蚤市场 软件下载 休闲娱乐
诺方安全,助您e路平安

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/