I am implementing message queue in C linux. I am sending an `integer = 17` and receiving `integer = 0`. Please see below and let me know what's wrong with my `msgsnd` and `msgrcv` functions. 
Please give attention to this: will `rbuf` store data in `rbuf->m->msglen` or in `rbuf->mtype`.

In sending process

```
msgsnd(msqid, sbuf,sizeof(int), 0);
printf("\nmsglen = %d",rbuf->m->msglen);  // 17

```

In receiving process. Both have same msqid. I have verified it.

```
msgrcv(msqid, rbuf, sizeof(int), 1, 0);
printf("\nmsglen = %d",rbuf->m->msglen); // 0

//msqid=98305, some valid id

```

here is my struct definations defined in another file.

```
typedef struct message1
{
    int msglen;
    unsigned char *cp;
}msg1;

typedef struct msgbuf
{
    long    mtype;
    msg1    *m;
} message_buf;

```