I thought SPI means inspecting packets for their state i.e. NEW or ESTABLISHED. What you mean is a Layer 7 filter, the link to it was posted above ;).
I have been asked if iptables support stateful packet inspection.
i.e. verify if traffic on port 21 is FTP and not HTTP (correct me if I'm using the wrong term)
Is there any module or development about this ?
http://l7-filter.sourceforge.net/
Regards, Michael