* freed by the caller.
*/
static char *raw_init(void *frontend_handle, void **backend_handle,
+ Config *cfg,
char *host, int port, char **realhost, int nodelay)
{
static const struct plug_function_table fn_table = {
logevent(raw->frontend, buf);
sfree(buf);
}
- addr = sk_namelookup(host, realhost);
- if ((err = sk_addr_error(addr)))
+ addr = name_lookup(host, port, realhost, cfg);
+ if ((err = sk_addr_error(addr)) != NULL)
return err;
if (port < 0)
logevent(raw->frontend, buf);
sfree(buf);
}
- raw->s = new_connection(addr, *realhost, port, 0, 1, nodelay, (Plug) raw);
- if ((err = sk_socket_error(raw->s)))
+ raw->s = new_connection(addr, *realhost, port, 0, 1, nodelay,
+ (Plug) raw, cfg);
+ if ((err = sk_socket_error(raw->s)) != NULL)
return err;
sk_addr_free(addr);
}
/*
+ * Stub routine (we don't have any need to reconfigure this backend).
+ */
+static void raw_reconfig(void *handle, Config *cfg)
+{
+}
+
+/*
* Called to send data down the raw connection.
*/
static int raw_send(void *handle, char *buf, int len)
Backend raw_backend = {
raw_init,
+ raw_reconfig,
raw_send,
raw_sendbuffer,
raw_size,