modified version with netmap support but doesn't compile