passing structure through message queue

i want to pass structure through message queue.As in SYSTEM V ipc we have argument called msg_type in msgsend and msgrcv calls.But we dont have any argument in mq_recieve and mq_send.please give me solution for this.Thanks in advance

mq_send/mq_receive don’t care what you send, whether it’s a structure, array, etc. It just send a block of memory.

thanks mario