Added option to getsock to do routing or data ports