Shared memory with curses

My vendor application has created serveral message queues in the AIX platform. I would like view the real-time message in the queues and output the contents on the screen by using curses library in UNIX.

I know how to do it with curses, but I have no idea to view the contents of the queue. Is it something related to the shmget or msgget?

Thx,
KK

Message queues don't appear to be designed for this kind of peeking... There are recieve methods but not peeks. There may be AIX-specific extensions, see 'man msgrcv' and 'man msgctl', but these would not be portable.

I might suggest abstracting away the msgrcv calls, i.e. the curses code reads from the message queue and outputs to an internal buffer and updates the screen, and the program "reads" from the curses code, which removes it from the list and updates the display...