RE: Kernel Message Queues

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

 



Thanks for the replies so far. I found a way to emulate message queues in kernel using socket programming. I’m sharing it in case someone else finds it useful. These steps should be easy for anyone familiar with sockets (unlike me :))

 

-open a local socket: protocol=SOCK_DGRAM, family=AF_LOCAL

-bind it to the loopback address

-connect to the socket

-now you can send and receive messages [kernel_sendmsg()/kernel_recvmsg()] to/from the socket

 

Let me know in case you are aware of any flaws in the above method.

 

Thanks,

Sarthak Ray

 


From: Sarthak Ray
Sent: Thursday, September 01, 2005 4:27 PM
To: kernelnewbies@xxxxxxxxxxxx
Subject: Kernel Message Queues

 

Hello all,

I want to use message-queues in a Linux kernel module (v2.6.12.5). However, I am unable to find any exported APIs for using message-queues in kernel-space.

In ipc/msg.c file, I see some message-queue functions implemented such as sys_msgrcv(), sys_msgsnd(), etc.

However, these functions are not exported for use in kernel modules. Also, they seem to be implemented for servicing user-space message-queue requests.

I would appreciate any pointers towards equivalent message-queue APIs for kernel-space.

 

Thanks,

Sarthak Ray


[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