blob: d15176c4cb78b797d132a75bdb21ea150d656ec7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
#
# $Id$
#
This directory contains a very simple multicast demo program. There
are multiple multicast demo programs on the Internet and this program
is a combination of those.
Native Programs
===============
Two native programs are built as a side-effect of the RTEMS make.
They are listener and mcast.
+ listener is a pure listener
+ mcast sends and receives data and is the same program run on the
RTEMS target
Driver Requirements
===================
+ NIC must set IFF_MULTICAST bit in if_flags during attach
ifp->if_flags = IFF_BROADCAST | IFF_MULTICAST;
+ NIC must support SIOCADDMULTI and SIOCDELMULTI ioctls.
case SIOCADDMULTI:
case SIOCDELMULTI: {
struct ifreq* ifr = (struct ifreq*) data;
error = (command == SIOCADDMULTI)
? ether_addmulti(ifr, &sc->arpcom)
: ether_delmulti(ifr, &sc->arpcom);
if (error == ENETRESET) {
if (ifp->if_flags & IFF_RUNNING)
error = // driver specific routine to adjust filtering
}
break;
}
In some drivers, there is no need to adjust any driver specific
filtering. In this case, set error = 0 in the above code.
GNU/Linux
=========
You will have to have a route in place. Something like this command should
work if you adjust the 192.168.1.244 to match your IP addresa and adjust the
239.9.8.0 to match the multicast address used in mcast_params.h:
/sbin/route add -net 239.9.8.0 netmask 255.255.255.0 gw 192.168.1.244 dev eth0
|