mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-08-30 14:52:51 +08:00
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.
13 lines
269 B
C
13 lines
269 B
C
#ifndef _RTL837X_IGMP_H_
|
|
#define _RTL837X_IGMP_H_
|
|
|
|
#include <stdint.h>
|
|
|
|
void igmp_setup(void) __banked;
|
|
void igmp_enable(void) __banked;
|
|
void igmp_router_port_set(uint16_t pmask) __banked;
|
|
void igmp_packet_handler(void) __banked;
|
|
void igmp_show(void) __banked;
|
|
|
|
#endif
|