#include <9pm/u.h>
#include <9pm/libc.h>
#include <9pm/authsrv.h>
#include <9pm/bio.h>
// #include <9pm/ndb.h>

int
authdial(char *netroot, char *dom)
{
	return -1;
#ifdef NOTDEF
	char server[Ndbvlen];
	Ndbtuple *nt;

	if(dom != nil){
		/* look up an auth server in an authentication domain */
		nt = csgetval(netroot, "authdom", dom, "auth", server);

		/* if that didn't work, just try the IP domain */
		if(nt == nil)
			nt = csgetval(netroot, "dom", dom, "auth", server);
		if(nt == nil){
			werrstr("no authentication server found");
			return -1;
		}
		ndbfree(nt);
		return dial(netmkaddr(server, netroot, "ticket"), 0, 0, 0);
	} else {
		/* look for one relative to my machine */
		return dial(netmkaddr("$auth", netroot, "ticket"), 0, 0, 0);
	}
#endif
}


syntax highlighted by Code2HTML, v. 0.9.1