% pfilter - packet filtering for GNU/Linux
%
% pfilter ruleset for multicast service

% Copyright 2003 Neil Gorsuch
%
% This file is part of pfilter.
%
% pfilter is free software; you can redistribute it and/or modify
% it under the terms of the GNU General Public License as published by
% the Free Software Foundation; either version 2 of the License, or
% (at your option) any later version.
%
% pfilter is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.
%
% You should have received a copy of the GNU General Public License
% along with this program; if not, write to the Free Software
% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

% multicast is defined because multicast packets are identified by
% a destination address of 224.0.0.0-239.255.255.255 and do not use
% specific ports and/or protocol types.

%macro service-multicast-open src_address dest_address src_int dest_int src_bcast dest_bcast 
# Let all multicast packets through from %src_address%.
# The destination is always 224.0.0.0-239.255.255.255.
# This method is used because multicast packets are
# identified by their destination address.
%open_protocol_port% %src_address% 224.0.0.0/4 %src_int% %dest_int% ANY ANY
%endmacro

%macro service-multicast-close src_address dest_address src_int dest_int src_bcast dest_bcast
# Block all multicast packets from %src_address%.
# The destination is always 224.0.0.0-239.255.255.255.
# This method is used because multicast packets are
# identified by their destination address.
%close_protocol_port% %src_address% 224.0.0.0/4 %src_int% %dest_int% ANY ANY
%endmacro

