Code for applying the rule on a packet. **NOT TESTED**
 Also, need to remove the warnings in the compilers.