How does this line filter work?
This is standard line filter with very balanced Common Mode choke that operates over the spectrum of the application for switched currents . It raises the impedance of both Line and Neutral or L1 &amp; L2 such that in combination with C3,4 noise generated going out or in has the same series impedance shunted to Earth ground by those 2 caps . This filter has bidirectional noise reduction properties.  

In addition to reducing Differential Mode noise C1 &amp; L1 &amp; C2 form. “Pi” low pass filter (LPF) which is also bidirectional for reducing switcher noise going out called “egress” and line HV transients called “ingress”.

The specs will be rated for f attenuation [dB], line current [A] and the caps C3,C4 create line leakage current typ. 200uA allowed by most safety standards .  The R is included to absorb Voltage on caps when lug is removed.

C1,2 are called X rated caps and C3,4 called Y rated caps made from metallize Polyfilm dielectric rated for high voltage transients (3kV?) and chosen to not fail in the shorted condition.