Getting packets ready for transmission