On 11/26/2012 11:20 AM, Tom Eastep wrote: > > 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? >
Or how about a more focused solution whereby the character '@' in a switch name would be replaced by the chain name? Example: NFLOG(1,0,1) net fw ; switch=@_foo would would be the equivalent of: NFLOG(1,0,1) net fw ; switch=net2fw_foo -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 \________________________________________________ ------------------------------------------------------------------------------ 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