|
Bugzilla – Full Text Bug Listing |
| Summary: | what is NetDevice::GetMulticast used for ? | ||
|---|---|---|---|
| Product: | ns-3 | Reporter: | Mathieu Lacage <mathieu.lacage> |
| Component: | network | Assignee: | Craig Dowell <craigdo> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | ns-bugs |
| Priority: | P3 | ||
| Version: | pre-release | ||
| Hardware: | All | ||
| OS: | All | ||
| Attachments: |
Rename *NetDevice::MakeMulticastAddress to GetMulticast
Rename MakeMulticastAddress to GetMulticast and remove GetMulticast(void). |
||
|
Description
Mathieu Lacage
2008-08-25 12:45:32 UTC
GetMulticast is primarily there for symmetry with GetBroadcast. It is meant to be used in the same way as GetBroadcast, both internally to the net device and externally. GetMulticast returns the base address of the multicast MAC address space as defined by RFC. GetMulticast has a helper associated with it called MakeMulticastAddress which takes the multicast base address and maps an IP address onto that address according to RFC 1112. MakeMulticastAddress is how code munging IP addresses (now only ARP) is expected to interact with multicast addresses. You can find the single example of this in arp-ipv4-interface.cc if you want. The bottom line is that a public GetMulticast provides a similar method for multicast as broadcast, similar semantics to IsMulticast () to IsBroadcast () and allows you to change the way IP addresses are mapped to multicast addresses while creating MAC addresses that will be correctly received by net devices that support multicast. (In reply to comment #1) > GetMulticast is primarily there for symmetry with GetBroadcast. It is meant to > be used in the same way as GetBroadcast, both internally to the net device and > externally. GetMulticast returns the base address of the multicast MAC address > space as defined by RFC. I don't understand who would use it externally and, no one uses it externally. So, my question is, what is a practical use-case for this method from an external point of view ? I really don't see what you could use it for. > GetMulticast has a helper associated with it called MakeMulticastAddress which > takes the multicast base address and maps an IP address onto that address > according to RFC 1112. MakeMulticastAddress is how code munging IP addresses > (now only ARP) is expected to interact with multicast addresses. You can find > the single example of this in arp-ipv4-interface.cc if you want. I understand that MakeMulticastAddress is used externally but GetMulticast is not, as far as I can tell, and I don't see how and why it would ever be used externally. > > The bottom line is that a public GetMulticast provides a similar method for > multicast as broadcast, similar semantics to IsMulticast () to IsBroadcast () > and allows you to change the way IP addresses are mapped to multicast addresses > while creating MAC addresses that will be correctly received by net devices > that support multicast. I am sorry but I really don't understand what you mean here. I do not have a use case for it but it seems harmless. Created attachment 287 [details]
Rename *NetDevice::MakeMulticastAddress to GetMulticast
Rename GetMulticast
Created attachment 288 [details]
Rename MakeMulticastAddress to GetMulticast and remove GetMulticast(void).
(In reply to comment #5) > Created an attachment (id=288) [details] > Rename MakeMulticastAddress to GetMulticast and remove GetMulticast(void). ok with me for commit. |