struct msghdr        Msghdr;
   struct iovec         Iov;

   /* ...... */

    Iov.iov_base = (void *)msgcontent;
    Iov.iov_len = sizeof(msgcontent);

    Msghdr.msg_name = &their_addr;
    Msghdr.msg_namelen = sizeof(struct sockaddr_in);
    Msghdr.msg_iov = (struct iovec *) &Iov;
    Msghdr.msg_iovlen = 1;
    Msghdr.msg_control = NULL;
    Msghdr.msg_controllen = 0;
    
    numbytes = sendmsg(sockfd, &Msghdr, 0);



/////////////////////////////////////////////////////////////////////


 char    buf[MAXBUFLEN];
    struct sockaddr_in  their_addr; 
    struct msghdr       Msghdr;
    struct iovec        Iovec;

    Iovec.iov_base = (void *)buf;
    Iovec.iov_len = sizeof(buf);

    Msghdr.msg_name = &their_addr;
    Msghdr.msg_namelen = sizeof(struct sockaddr_in);
    Msghdr.msg_iov = &Iovec;
    Msghdr.msg_iovlen = 1;

    numbytes = recvmsg(sockfd, &Msghdr, 0);