title: receive multicast from specific network interface on Linux
body: <p>I'm trying to receive a multicast data from specific network interface on CentOS 5.5</p>
  
  <pre><code>sd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP);
  memset(&amp;addr, 0, sizeof(addr));
  addr.sin_family = AF_INET;
  addr.sin_port = htons(1234);
  addr.sin_addr.s_addr = htonl(INADDR_ANY);
  bind(sd, (sockaddr*)&amp;addr, sizeof(sockaddr_in));
  setsockopt(sd, SOL_SOCKET, SO_BINDTODEVICE, "eth0", 5);
  </code></pre>
  
  <p>But I'm receiving packets from all interfaces.</p>
  
  <p>What wrong?</p>