On 11/26/12 3:46 PM, Mr Dash Four wrote: > >> I misunderstood your original request; > I thought as much. > >> What you are proposing above doesn't work in the general case, given the >> current compiler architecture. Currently, variable expansion takes place >> in the preprocessor which has no knowledge of chains, macros, etc. The >> chain isn't known until the input line handed to it by the preprocessor >> is parsed by rule processor. >> >> Within the body of a macro or an action, however, the chain name is >> known. So if we limit the availability of $chain (or whatever we call >> it), to macro and action bodies, would that meet your needs? >> > It would, and I actually think it would be much better. Given your next > response, however, that might not be possible. > > My gut feeling tells me that it would be better to keep the "old" macros > the way they are and create a new "inline action" type where more than 1 > parameter is allowed (addressed with "$1, $2 etc - the way actions are > at present), making internal system/shorewall variable/resource > available to that action in the way I suggested in my previous post. > > I don't know how doable/difficult this would be as my perl skills are > close to nil and I don't have enough knowledge of the internal shorewall > workings to make that judgement - this is a decision you have to take > though.
I'll work on the inline action idea for the next release. Regards, -Tom -- Tom Eastep \ When I die, I want to go like my Grandfather who Shoreline, \ died peacefully in his sleep. Not screaming like Washington, USA \ all of the passengers in his car http://shorewall.net \________________________________________________
signature.asc
Description: OpenPGP digital signature
------------------------------------------------------------------------------ Monitor your physical, virtual and cloud infrastructure from a single web console. Get in-depth insight into apps, servers, databases, vmware, SAP, cloud infrastructure, etc. Download 30-day Free Trial. Pricing starts from $795 for 25 servers or applications! http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________ Shorewall-devel mailing list Shorewall-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/shorewall-devel