readin_config param should be const
print_addr now take a length

print_addr writes to a char * passed to it, but there's no arg for
the length of the buffer making buffer overflow more likely.  This
commit adds a length arg.