On Wed, Feb 17, 2010 at 5:03 AM, Simon Kelley <si...@thekelleys.org.uk> wrote: > ignacio.br...@belden.com wrote: >> Simon Kelley <si...@thekelleys.org.uk> wrote on 16/02/2010 14:27:36: >> >>> fakeroot debian/rules binary >> I found a problem when fakerooting (sorry for my ignorance) Do I need to >> install additional tools containing this lib?: >> Package libidn was not found in the pkg-config search path. >> Perhaps you should add the directory containing `libidn.pc' >> to the PKG_CONFIG_PATH environment variable >> No package 'libidn' found > > That's a mismatch between what's needed to compile Ubuntu's current > dnsmasq package and the latest one. the fix is > > sudo apt-get install libidn11-dev > > >>> The magic you need is that you can invert tags, so make the last line >>> >>> >> dhcp-range=net:#switch1,net:#puerto3,10.10.35.40,10.10.35.42,255.255.255.0 >>> Then it can only be used when none of the port specific tags are in use. >> >> The problem I see here is switch1 tag is common to all switch1-ports. So I >> discard all switch1 ports when I write: net:#switch1 >> >> I feel I need something like: #(switch1ANDport3) instead >> #(switch1)AND#(port3) >> >> Is it possible to set something like #(net:switch1,net:port3)? or maybe an >> OR function so that different conditions (switchANDport) apply to the same >> range? >
Can't the option-matching lines which set e.g. port1 also set e.g. nopool, then use #nopool in the dhcp-range line? I guess there might need to be nosw1pool, nosw2pool, nosw3pool, and then dhcp-range such as net:switch1,net:#nosw1pool Or maybe even just net:switch1,net:#port3,net:#port4 (pool which is valid for all switch1 ports except 3 and 4) > Good point. Your requirements exceed what it's currently possible to > express using the tag system. > > Maybe there needs to be something to calculate and arbitrary boolean > expression on tags > > declare-tag set:newtag, !(switch1 & port1) > > Joy, the options code finally becomes a full recusive-descent parser. Actually, I think you can avoid that without loss of generality. By DeMorgan's theorem, the AND and NOT operations currently available are sufficient to define any expression. You just need a way to do grouping, which a syntax for setting one tag conditionally based on another tag would do. Remember that the example given doesn't need a complement applied, you can negate it in the match later. Since "if" is a very well understood concept, I'd propose tag-if switch1,port1 newtag Where newtag gets set if all listed tags are matched. Using multiple tag-if lines lets you effectively OR things together (this yields sum-of-products capability). Allow a user to unset a tag with tag-if #switch1,port15 #newtag for even more flexibility, but now all tag-if commands need to be processed in order. > > > Let me think about this a bit more. > > > Simon. > >> >> Thanks >> Ignacio >> >> DISCLAIMER: >> >> Privileged and/or Confidential information may be contained in this >> message. If you are not the addressee of this message, you may not >> copy, use or deliver this message to anyone. In such event, you >> should destroy the message and kindly notify the sender by reply >> e-mail. It is understood that opinions or conclusions that do not >> relate to the official business of the company are neither given >> nor endorsed by the company. >> >> Thank You. >> >> > > > _______________________________________________ > Dnsmasq-discuss mailing list > Dnsmasq-discuss@lists.thekelleys.org.uk > http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss >