I agree with Simo: this probably wants to be a KDC location plugin not something in the socket transport path. Hmm, except how do you actually track if the KDC is up? Well, we've wanted plugable KDC transports for a while:-)