Hmm. It looks like you're sending a KA packet "on behalf of" the RES layer, and spoofing the creator/owner of the packet. This is really messy.
I would rather change the RES layer to have something like a "sendKa" function, and call that same function from both this module and the RES layer. Is there a way to reuse the existing ```sendKA()`` function?