Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-28-2012, 02:37 PM   #1
LQ Newbie
Registered: May 2010
Posts: 8

Rep: Reputation: 0
Unhappy Unable to register mcast address in c++

i was working for a routing algo protocol in c++ on centos. centos was running on vmware .. i was able to register mcast address when my interfaces card are connected in bridge mode in vmware. but as i connected my centos with cisco router using gns3 cloud i got errors

so overall topolgoy is like

cenots++bridgemode-----bridgemode+centos //able to add into group

centos+--vmnet1-----------+vmnet1(gns3cloud---cisco router) //unable to add into group

if(h==NULL) {
cout << "unknown group address"<<endl;
if memcpy((char *) &mcastAddr.sin_addr.s_addr,h->h_addr_list[0],h->h_length);

mreq.imr_multiaddr.s_addr=mcastAddr.sin_addr.s_addr; //

int mc = setsockopt(soc,IPPROTO_IP,IP_ADD_MEMBERSHIP,(void *) &mreq, sizeof(mreq));
if(mc<0) {
cout <<"unable to join MCAST GROUP"<<endl;
printf("ERROR: %s\n", strerror(errno));

errno returns. ERROR: No such device

ps# there is only one interface eth0 using which m able to ping cisco router

Any pointer is welcomed

Old 12-30-2012, 10:16 AM   #2
LQ Newbie
Registered: May 2010
Posts: 8

Original Poster
Rep: Reputation: 0
i will be gratefull if anyone can comment on this plz
Old 01-01-2013, 03:57 PM   #3
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,578

Rep: Reputation: 191Reputation: 191
How do you open the socket in the first place? The errno you're talking about comes from the setsockopt, right?


c++, cisco, gns3, sockets

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how does macro to get base address register in configuration space works jamesbon Programming 1 11-22-2010 08:19 PM
Base address for hardware pin and register..! cvr Linux - Hardware 1 07-22-2010 06:06 PM
unable to register Suse vivek rai SUSE / openSUSE 1 01-29-2009 01:53 AM
dynamically register ip address to windows 2000 dns PantherSE Linux - Networking 0 06-23-2004 01:38 PM
ALSA unable to register device Griffon26 Linux - Software 3 11-27-2002 09:00 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:55 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration