Hi again, I am really going crazy now :-( // ----------------------------------------------------- .... /* Create media transport */ status = pjmedia_transport_udp_create(med_endpt, NULL, local_port, 0, &transport); if (status != PJ_SUCCESS){ return status; } pjmedia_transport_info myInf; status = pjmedia_transport_get_info (transport, &myInf); if (status != PJ_SUCCESS){ return status; } printf("Local Socket is:%i\n",(int)myInf.sock_info.rtp_sock); pj_sock_t sockfd = myInf.sock_info.rtp_sock; pj_ip_mreq group; group.imr_interface.s_addr = inet_addr("192.168.1.175"); group.imr_multiaddr.s_addr = inet_addr("225.1.1.1"); status = pj_sock_setsockopt(sockfd, PJ_SOL_SOCKET, pj_IP_ADD_MEMBERSHIP(), (char*)&group, sizeof(group)); if (status != PJ_SUCCESS){ app_perror(THIS_FILE, "Error binding", status); return status; } .... // ----------------------------------------------------- Shouldn't that be enough ? But netstat -g doesn't show the 225.1.1.1 as a group ? My native socket client program (without pj) does when setting the imr_* with sockopt. What's wrong ? Could someone please please help ? Regards, Frederic On Sun, Mar 27, 2011 at 9:12 AM, Frederic-Philippe Metz <frederic.metz at gmail.com> wrote: > Hi all, > > I am struggling with streamutil.c to implement multicast sender and > receiver. On pure socket level, it is for me quite clear what to do, > but I didn't find the pj level of abstraction to get it running with > streamutil. > > In the Socket Abstraction, there's a pj_sock_setsockopt(..) but in > streamutil, there's no sockfd and I see no way to get it. Do I have to > use pj_ip_mreq instead and if so, how ? pj_IP_MULTICAST_IF and > pj_IP_ADD_MEMBERSHIP should also be used somehow I guess ? > > Cheers, > ?Frederic >