Would it be possible to decide via a more general mechanism, maybe via a BPF filter, which packets get sent to the gateway? For instance, it would be nice to be able to say that all ARP requests for *.*.*.1 also got sent to the gateway direct :-) This would also make adding IPv6 support trivial, it'd just be another (or a more complex) BPF filter.
BPF for outgoing packets? Different. I've only ever seen it used for filtering incoming packets. ARP requests for *.*.*.1? I don't get that. There should only be one host in the subnet which matches *.*.*.1/24, so its going to reply anyway. What are you trying to achieve here?
Also, how would you handle the gateway sending back an ICMP redirect because it is the wrong gateway for a given destination, or not a gateway at all? In the network i use most, *.*.*.5/24 happens to be the gateway, not *.*.*.1.
Andrew