Big refactoring + added function bind6 to bind IPv6 link local addresses.