#include <stdio.h>
#include "global.h"
#include "qio.h"

extern int dynamic_link_module();

int setup_qio_hooks(char *path)
{
  char where[80];
  sprintf(where, "qio %s.exe", path);
  return dynamic_link_module(where, 12,
                      "_get_socket_error",       &get_socket_error,
                      "myaddress",               &myaddress,
                      "_qio_accept_after_wait",  &qio_accept_after_wait,
                      "_qio_bind_and_listen",    &qio_bind_and_listen,
                      "_qio_connect",            &qio_connect,
                      "_qio_htons",              &qio_htons,
                      "_qio_htonl",              &qio_htonl,
                      "_qio_receive",            &qio_receive,
                      "_qio_send",               &qio_send,
                      "_qio_shutdown",           &qio_shutdown,
                      "_qio_socket",             &qio_socket,
                      "_qio_socket_and_connect", &qio_socket_and_connect);
}

