Add support for LINEMODE and correct NUL handling in raw mode for ip/telnetd.