summaryrefslogtreecommitdiff
path: root/proxy.c
diff options
context:
space:
mode:
authorDavid Härdeman <david@hardeman.nu>2020-06-19 00:07:33 +0200
committerDavid Härdeman <david@hardeman.nu>2020-06-19 00:07:33 +0200
commitb32800e33ec16f7c592fa09b1a8b1f30a2e9df77 (patch)
tree591605397c24a7876d46a41fb264085eda3bc8d8 /proxy.c
parent723458dfa7e6246b5de7c7943175c78cf901366a (diff)
Add an addrstr to struct sockaddr_in46, rename to struct saddr
Diffstat (limited to 'proxy.c')
-rw-r--r--proxy.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/proxy.c b/proxy.c
index fbb9ddf..bcc2b6d 100644
--- a/proxy.c
+++ b/proxy.c
@@ -69,8 +69,8 @@ proxy_free(struct uring_task *task)
debug(DBG_PROXY, "server: %s, src: %s, dst: %s\n",
proxy->scfg->name,
- proxy->client_conn.remotestr,
- proxy->server_conn.remotestr);
+ proxy->client_conn.remote.addrstr,
+ proxy->server_conn.remote.addrstr);
if (proxy->begin > 0) {
format_time(duration, sizeof(duration), time(NULL) - proxy->begin);
@@ -80,8 +80,8 @@ proxy_free(struct uring_task *task)
info("%s: proxy connection %s -> %s closed "
"(CtS: %s, StC: %s), duration %s\n",
proxy->scfg->name,
- proxy->client_conn.remotestr,
- proxy->server_conn.remotestr,
+ proxy->client_conn.remote.addrstr,
+ proxy->server_conn.remote.addrstr,
cts, stc, duration);
}
@@ -200,8 +200,8 @@ proxy_connected_cb(struct cfg *cfg, struct connection *conn, bool connected)
proxy->sfd = proxy->servertask.fd;
verbose("%s: proxy connection %s -> %s opened\n",
proxy->scfg->name,
- proxy->client_conn.remotestr,
- proxy->server_conn.remotestr);
+ proxy->client_conn.remote.addrstr,
+ proxy->server_conn.remote.addrstr);
proxy->begin = time(NULL);
uring_tbuf_read(cfg, &proxy->clienttask, proxy_client_data_in);
@@ -209,7 +209,7 @@ proxy_connected_cb(struct cfg *cfg, struct connection *conn, bool connected)
}
struct server_proxy *
-proxy_new(struct cfg *cfg, struct server *scfg, struct sockaddr_in46 *client, int fd)
+proxy_new(struct cfg *cfg, struct server *scfg, struct saddr *client, int fd)
{
struct server_proxy *proxy;