[comp.unix.programmer] SunOS and SysV IPC

krupczak@secola.Columbia.NCR.COM (Bobby Krupczak) (04/11/91)

Hi!

I am implementing a management agent on a SunOS 4.1 box.  I would like to
be able to report ipcs-like information without having to fork/exec
the ipcs command itself.  I want to be able to get the same information
programmatically.

I know that the various ipc info structures exist in the kernel and I can
lseek through /dev/kmem to get that information.  I am using the kvm facility
to dig the appropriate structures out of kernel memory.  One problem exists:
How does SunOS generate IPC IDs for the various structures?

Does anyone know the secret undocumented way that the SunOS kernel
comes up with new IPC IDs?

Answers and comments are welcome.

Thanks in advance

Bobby