Check out routerlinux:
http://www.routerlinux.com
This is a small, router-centric linux distribution that can be flashed onto the 16MB Disk-On-Chip device on a Websurfer Pro / GCT-Allwell STB box. Once you put a multiport NIC in the PCI slot, you have a very capable Linux router with IPTables/Netfilter, DHCP, DNSMasq, RP-PPPoE, FreeS/WAN, OpenSSL, OpenSSH, Zebra, etc. All the scripts are fully configurable.
I don't think there are any common NICs that can run their own code on the NIC itself. It doesn't really serve any useful purpose.