int valid_link( string from, string to );
The driver calls valid_link(from, to) in the master object from inside the link(from, to) efunction. If valid_link() returns 0, then the link() will fail. If valid_link() returns 1, then the link will succeed if rename() would succeed if called with the same arguments.
See also: link
Beek @ZorkMUD, Lima Bean, IdeaExchange, TMI-2, and elsewhere