bug 857 - Link-Local Multicast handle in Ipv4 Output processing

This commit is contained in:
Hajime Tazaki
2010-04-08 22:51:09 +09:00
parent 3ccf6c8ee7
commit 2c5084e25f
6 changed files with 39 additions and 3 deletions

View File

@@ -240,6 +240,13 @@ Ipv4Address::IsMulticast (void) const
return (m_address >= 0xe0000000 && m_address <= 0xefffffff);
}
bool
Ipv4Address::IsLocalMulticast (void) const
{
// Link-Local multicast address is 224.0.0.0/24
return (m_address & 0xffffff00) == 0xe0000000;
}
void
Ipv4Address::Serialize (uint8_t buf[4]) const
{

View File

@@ -111,6 +111,10 @@ public:
* \return true only if address is in the range 224.0.0.0 - 239.255.255.255
*/
bool IsMulticast (void) const;
/**
* \return true only if address is in local multicast address scope, 224.0.0.0/24
*/
bool IsLocalMulticast (void) const;
/**
* \brief Combine this address with a network mask
*