#include <kernel/net.h>
#include <kernel/user.h>
#include <kernel/kernel.h>

inherit LIB_PORT;               /* basic port object */

object driver;                   /* driver object */

void
create()
{
    ::create();
    driver = find_object(DRIVER);
    open_port("telnet", TELNET_PORT);   
}

object
connection(string ip, int port)
{
    return ::connection(allocate(driver->query_tls_size()), ip, port);
}

void
done()
{
    close_user();
}

/*
 * NAME:	open()
 * DESCRIPTION:	open the connection
 */
static int open(int port)
{
    ::open(allocate(driver->query_tls_size()), port);
    return FALSE;
}

/*
 * NAME:	close()
 * DESCRIPTION:	close the connection
 */
static void close(int force)
{
    ::close(allocate(driver->query_tls_size()), force);
}

