I picked msgsnd from the book Beginning Linux Programming (Wrox).
It has the following prototype:
int msgsnd(int msqid, const void* msg_ptr, size_t msg_sz, int msgflag);
and is called this way in an example C program in the book:
msgsnd(msgid, (void*)&some_data, MAX_TEXT, 0);
where some_data is the structure:
struct msg{
long int msg_type;
char text[MAX_TEXT];
};
Yes, I meant to cast it.