added netinf stuff and fixed a few things to compile