packets: YAR (yet another refactoring)