parent
3460444d84
commit
4caffd79db
|
@ -17,6 +17,12 @@
|
||||||
/* OS includes */
|
/* OS includes */
|
||||||
#include <net/netaddress.h>
|
#include <net/netaddress.h>
|
||||||
|
|
||||||
namespace Net { using Mac_address = Net::Network_address<6, ':', true>; }
|
namespace Net { struct Mac_address; }
|
||||||
|
|
||||||
|
struct Net::Mac_address : Net::Network_address<6, ':', true>
|
||||||
|
{
|
||||||
|
using Net::Network_address<6, ':', true>::Network_address;
|
||||||
|
bool multicast() const { return addr[0] & 1; }
|
||||||
|
};
|
||||||
|
|
||||||
#endif /* _NET__MAC_ADDRESS_H_ */
|
#endif /* _NET__MAC_ADDRESS_H_ */
|
||||||
|
|
|
@ -61,8 +61,12 @@ void Packet_handler::_link_state()
|
||||||
|
|
||||||
void Packet_handler::broadcast_to_clients(Ethernet_frame *eth, Genode::size_t size)
|
void Packet_handler::broadcast_to_clients(Ethernet_frame *eth, Genode::size_t size)
|
||||||
{
|
{
|
||||||
/* check whether it's really a broadcast packet */
|
/*
|
||||||
if (eth->dst() == Ethernet_frame::broadcast()) {
|
* For simplicity reasons, we broadcast all multicast packets not only the
|
||||||
|
* special multicast case "broadcast". (The broadcast address also has the
|
||||||
|
* multicast bit set on Ethernet).
|
||||||
|
*/
|
||||||
|
if (eth->dst().multicast()) {
|
||||||
/* iterate through the list of clients */
|
/* iterate through the list of clients */
|
||||||
Mac_address_node *node =
|
Mac_address_node *node =
|
||||||
_vlan.mac_list.first();
|
_vlan.mac_list.first();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user