linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Steven Vacca <svacca@valcom.com>
To: "LinuxEmbeddedMailList (E-mail)" <linuxppc-embedded@lists.linuxppc.org>
Subject: RE: Join Multicast returns error ENODEV
Date: Fri, 31 May 2002 15:16:43 -0400	[thread overview]
Message-ID: <01C208B6.2C66F450.svacca@valcom.com> (raw)


Before, when using enet.c,  I used to call setsockopt()
as follows (this worked fine):

  The 1st 4 bytes of tmp64 = the multicast addr 230.0.0.3
  The next 4 bytes of tmp64 = 0.0.0.0

  setsockopt(sd,IPPROTO_IP,IP_ADD_MEMBERSHIP,(const INT_8*) &tmp64,8);
	.
	.
	.
    if ((recLength = recvfrom(sd,(UINT_8*)
recBuff,sizeof(MSGPKT),MSG_DONTWAIT,(struct sockaddr*) 0,0)) > 0)
      {
      //Process recd pkt.
      }



Now, since using fec.c, I found that I can successfully call
setsockopt() if I put the local IP addr in the next 4 bytes as follows:

  The 1st 4 bytes of tmp64 = the multicast addr 230.0.0.3
  The next 4 bytes of tmp64 = 192.168.11.15

  setsockopt(sd,IPPROTO_IP,IP_ADD_MEMBERSHIP,(const INT_8*) &tmp64,8);
	.
	.
	.
    if ((recLength = recvfrom(sd,(UINT_8*)
recBuff,sizeof(MSGPKT),MSG_DONTWAIT,(struct sockaddr*) 0,0)) > 0)
      {
      //Process recd pkt.
      }


But, I never rec any pkts.


Any ideas, anyone?

Thanks,

ShutEye Thinkin



-----Original Message-----
From:	Steven Vacca [SMTP:svacca@valcom.com]
Sent:	Friday, May 31, 2002 12:00 PM
To:	LinuxEmbeddedMailList (E-mail)
Subject:	Join Multicast returns error ENODEV

When I call setsockopt(IP_ADD_MEMBERSHIP), it fails.

I had multicast Join/Leave working very well with enet.c, but have
recently changed to using fec.c.  All ethernet comm works very well.
But, there's a problem with multicast now.

My kernel is v2.2.13.  uP is MPC860T

Here's the flow I see:

    My App:              setsockopt(...,IP_ADD_MEMBERSHIP,...);

    Kernel:
    ip_sockglue.c:      ip_setsockopt()
                                   ip_mc_join_group()

    igmp.c:                    ip_mc_join_group()
                                       if (!imr->imr_ifindex)
                                         in_dev = ip_mc_find_dev(imr);
                                       if (!in_dev)
                                         {
                                         iml = NULL;
                                         err = -ENODEV;
                                         goto done;
                                         }

Would anyone have any ideas?

Thanks,

ShutEye Thinkin

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2002-05-31 19:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-05-31 19:16 Steven Vacca [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-05-31 15:59 Join Multicast returns error ENODEV Steven Vacca

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=01C208B6.2C66F450.svacca@valcom.com \
    --to=svacca@valcom.com \
    --cc=linuxppc-embedded@lists.linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).