mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
Add an implementation for IGMP
This adds an implementation for trapping IGMP packets to the CPU which will identify IGMPv1/2/3 packets, but handle only v3. The implementation then inserts/updates/deletes L3 MC entries in the L3 lookup table. The entries consist of an Ipv4 Destination IP (the IPv4 MC address), a Source IP (0.0.0.0) and a Portmask. Note that this implementation is not VLAN aware, as there is no hardware support in the device. An alternative strategy is to control switching of the L2-MC packets in which the IPv4-MC packets are transported (dst-MaC is 01:00:5e:xx:yy:zz, with xx:yy:zz corresponding to bits in the Ipv4-MC address). This will allow to use VLAN-aware packet switching. While code support is there for table insert/update/deletes, some further L2 configuration is missing. There is no support for IPv6 MC, yet.
This commit is contained in:
+2
-2
@@ -151,8 +151,8 @@ void stp_cnf_send(uint8_t port)
|
||||
|
||||
STP_O->rtl_tag.tag = HTONS(0x8899);
|
||||
STP_O->rtl_tag.version = 0x04;
|
||||
STP_O->rtl_tag.dummy = 0x0000;
|
||||
STP_O->rtl_tag.flag = 0x20; // WHY ???
|
||||
STP_O->rtl_tag.reason = 0x00;
|
||||
STP_O->rtl_tag.flags = 0x0020; // Disable L2 learning
|
||||
STP_O->rtl_tag.pmask = HTONS(((uint16_t)1) << port);
|
||||
|
||||
STP_O->msg_len = HTONS(0x27);
|
||||
|
||||
Reference in New Issue
Block a user