change sockaddr generation to use a table of func ptrs instead of a huge switch.