Include <arpa/inet.h> to declare htons(). Get rid of unused variables. Fix an intended ioctl() call.
Signed-off-by: Guy Harris <guy@alum.mit.edu>