1. An apparatus for processing packets, the apparatus comprising: a plurality of interfaces configured to receive and send packets; a firewall configured to perform firewall functionality on packets; and routing or switching or control functionality configured to control the processing and movement of packets between the plurality of interfaces and said firewall; wherein the firewall is associated with a plurality of accesses, each interface of said interfaces is mapped to an access of said accesses; wherein said performance of said firewall functionality performed on a particular packet is determined based on a particular entry access and a particular exit access of said accesses determined based on the routing of the particular packet between said interfaces, and programming of said firewall functionality based on said entry and exit accesses corresponding to the packet.