summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorReyk Floeter <reyk@cvs.openbsd.org>2009-08-07 11:21:54 +0000
committerReyk Floeter <reyk@cvs.openbsd.org>2009-08-07 11:21:54 +0000
commit220a305bdc0361c135e3a9df73ed8b7535bc2e67 (patch)
treeaa3e09da84e587cb77b43856a29df7f5bd2ecef6 /usr.sbin
parentfadb209778763cd7089f0c3273b775a93941ad59 (diff)
rename 'struct session' to 'struct rsession' because it conflicts with
another 'struct session' in sys/sysctl.h.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/relayctl/relayctl.c4
-rw-r--r--usr.sbin/relayd/pfe.c4
-rw-r--r--usr.sbin/relayd/relay.c92
-rw-r--r--usr.sbin/relayd/relay_udp.c36
-rw-r--r--usr.sbin/relayd/relayd.c8
-rw-r--r--usr.sbin/relayd/relayd.h26
6 files changed, 85 insertions, 85 deletions
diff --git a/usr.sbin/relayctl/relayctl.c b/usr.sbin/relayctl/relayctl.c
index 94aca767f97..0ce43e44114 100644
--- a/usr.sbin/relayctl/relayctl.c
+++ b/usr.sbin/relayctl/relayctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayctl.c,v 1.37 2009/06/05 23:39:51 pyr Exp $ */
+/* $OpenBSD: relayctl.c,v 1.38 2009/08/07 11:21:53 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -382,7 +382,7 @@ show_summary_msg(struct imsg *imsg, int type)
int
show_session_msg(struct imsg *imsg)
{
- struct session *con;
+ struct rsession *con;
char a[128], b[128];
struct timeval tv_now;
diff --git a/usr.sbin/relayd/pfe.c b/usr.sbin/relayd/pfe.c
index c9bdef4bbfb..d6e7ac1c2cf 100644
--- a/usr.sbin/relayd/pfe.c
+++ b/usr.sbin/relayd/pfe.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pfe.c,v 1.60 2009/06/05 23:39:51 pyr Exp $ */
+/* $OpenBSD: pfe.c,v 1.61 2009/08/07 11:21:53 reyk Exp $ */
/*
* Copyright (c) 2006 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -617,7 +617,7 @@ show_sessions(struct ctl_conn *c)
case IMSG_CTL_SESSION:
imsg_compose_event(&c->iev,
IMSG_CTL_SESSION, proc, 0, -1,
- imsg.data, sizeof(struct session));
+ imsg.data, sizeof(struct rsession));
break;
case IMSG_CTL_END:
done = 1;
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c
index 39b6fc2c1e6..6f66788b441 100644
--- a/usr.sbin/relayd/relay.c
+++ b/usr.sbin/relayd/relay.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay.c,v 1.116 2009/06/07 05:56:25 eric Exp $ */
+/* $OpenBSD: relay.c,v 1.117 2009/08/07 11:21:53 reyk Exp $ */
/*
* Copyright (c) 2006, 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -67,11 +67,11 @@ int relay_socket_connect(struct sockaddr_storage *, in_port_t,
struct protocol *, int);
void relay_accept(int, short, void *);
-void relay_input(struct session *);
+void relay_input(struct rsession *);
-int relay_connect(struct session *);
+int relay_connect(struct rsession *);
void relay_connected(int, short, void *);
-void relay_bindanyreq(struct session *, in_port_t, int);
+void relay_bindanyreq(struct rsession *, in_port_t, int);
void relay_bindany(int, short, void *);
u_int32_t relay_hash_addr(struct sockaddr_storage *, u_int32_t);
@@ -86,7 +86,7 @@ int relay_resolve(struct ctl_relay_event *,
int relay_handle_http(struct ctl_relay_event *,
struct protonode *, struct protonode *,
struct protonode *, int);
-int relay_lognode(struct session *,
+int relay_lognode(struct rsession *,
struct protonode *, struct protonode *, char *, size_t);
void relay_read_http(struct bufferevent *, void *);
static int _relay_lookup_url(struct ctl_relay_event *, char *, char *,
@@ -99,11 +99,11 @@ void relay_read_httpcontent(struct bufferevent *, void *);
void relay_read_httpchunks(struct bufferevent *, void *);
char *relay_expand_http(struct ctl_relay_event *, char *,
char *, size_t);
-void relay_close_http(struct session *, u_int, const char *,
+void relay_close_http(struct rsession *, u_int, const char *,
u_int16_t);
SSL_CTX *relay_ssl_ctx_create(struct relay *);
-void relay_ssl_transaction(struct session *,
+void relay_ssl_transaction(struct rsession *,
struct ctl_relay_event *);
void relay_ssl_accept(int, short, void *);
void relay_ssl_connect(int, short, void *);
@@ -263,7 +263,7 @@ relay(struct relayd *x_env, int pipe_parent2pfe[2], int pipe_parent2hce[2],
void
relay_shutdown(void)
{
- struct session *con;
+ struct rsession *con;
struct relay *rlay;
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry) {
@@ -518,7 +518,7 @@ relay_statistics(int fd, short events, void *arg)
struct ctl_stats crs, *cur;
struct timeval tv, tv_now;
int resethour = 0, resetday = 0;
- struct session *con, *next_con;
+ struct rsession *con, *next_con;
/*
* This is a hack to calculate some average statistics.
@@ -746,7 +746,7 @@ relay_socket_listen(struct sockaddr_storage *ss, in_port_t port,
void
relay_connected(int fd, short sig, void *arg)
{
- struct session *con = (struct session *)arg;
+ struct rsession *con = (struct rsession *)arg;
struct relay *rlay = (struct relay *)con->se_relay;
struct protocol *proto = rlay->rl_proto;
evbuffercb outrd = relay_read;
@@ -812,7 +812,7 @@ relay_connected(int fd, short sig, void *arg)
}
void
-relay_input(struct session *con)
+relay_input(struct rsession *con)
{
struct relay *rlay = (struct relay *)con->se_relay;
struct protocol *proto = rlay->rl_proto;
@@ -862,7 +862,7 @@ void
relay_write(struct bufferevent *bev, void *arg)
{
struct ctl_relay_event *cre = (struct ctl_relay_event *)arg;
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
if (gettimeofday(&con->se_tv_last, NULL) == -1)
con->se_done = 1;
if (con->se_done)
@@ -891,7 +891,7 @@ void
relay_read(struct bufferevent *bev, void *arg)
{
struct ctl_relay_event *cre = (struct ctl_relay_event *)arg;
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct evbuffer *src = EVBUFFER_INPUT(bev);
if (gettimeofday(&con->se_tv_last, NULL) == -1)
@@ -915,7 +915,7 @@ int
relay_resolve(struct ctl_relay_event *cre,
struct protonode *proot, struct protonode *pn)
{
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
char buf[READ_BUF_SIZE], *ptr;
int id;
@@ -982,7 +982,7 @@ relay_resolve(struct ctl_relay_event *cre,
char *
relay_expand_http(struct ctl_relay_event *cre, char *val, char *buf, size_t len)
{
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct relay *rlay = (struct relay *)con->se_relay;
char ibuf[128];
@@ -1036,7 +1036,7 @@ relay_expand_http(struct ctl_relay_event *cre, char *val, char *buf, size_t len)
}
int
-relay_lognode(struct session *con, struct protonode *pn, struct protonode *pk,
+relay_lognode(struct rsession *con, struct protonode *pn, struct protonode *pk,
char *buf, size_t len)
{
const char *label = NULL;
@@ -1059,7 +1059,7 @@ int
relay_handle_http(struct ctl_relay_event *cre, struct protonode *proot,
struct protonode *pn, struct protonode *pk, int header)
{
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
char buf[READ_BUF_SIZE], *ptr;
int ret = PN_DROP, mark = 0;
struct protonode *next;
@@ -1175,7 +1175,7 @@ void
relay_read_httpcontent(struct bufferevent *bev, void *arg)
{
struct ctl_relay_event *cre = (struct ctl_relay_event *)arg;
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct evbuffer *src = EVBUFFER_INPUT(bev);
size_t size;
@@ -1210,7 +1210,7 @@ void
relay_read_httpchunks(struct bufferevent *bev, void *arg)
{
struct ctl_relay_event *cre = (struct ctl_relay_event *)arg;
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct evbuffer *src = EVBUFFER_INPUT(bev);
char *line;
long lval;
@@ -1305,7 +1305,7 @@ void
relay_read_http(struct bufferevent *bev, void *arg)
{
struct ctl_relay_event *cre = (struct ctl_relay_event *)arg;
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct relay *rlay = (struct relay *)con->se_relay;
struct protocol *proto = rlay->rl_proto;
struct evbuffer *src = EVBUFFER_INPUT(bev);
@@ -1606,7 +1606,7 @@ static int
_relay_lookup_url(struct ctl_relay_event *cre, char *host, char *path,
char *query, enum digest_type type)
{
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct protonode *proot, *pnv, pkv;
char *val, *md = NULL;
int ret = PN_FAIL;
@@ -1660,7 +1660,7 @@ int
relay_lookup_url(struct ctl_relay_event *cre, const char *str,
enum digest_type type)
{
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
int i, j, dots;
char *hi[RELAY_MAXLOOKUPLEVELS], *p, *pp, *c, ch;
char ph[MAXHOSTNAMELEN];
@@ -1737,7 +1737,7 @@ relay_lookup_url(struct ctl_relay_event *cre, const char *str,
int
relay_lookup_query(struct ctl_relay_event *cre)
{
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct protonode *proot, *pnv, pkv;
char *val, *ptr;
int ret;
@@ -1780,7 +1780,7 @@ relay_lookup_query(struct ctl_relay_event *cre)
int
relay_lookup_cookie(struct ctl_relay_event *cre, const char *str)
{
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct protonode *proot, *pnv, pkv;
char *val, *ptr;
int ret;
@@ -1829,7 +1829,7 @@ relay_lookup_cookie(struct ctl_relay_event *cre, const char *str)
}
void
-relay_close_http(struct session *con, u_int code, const char *msg,
+relay_close_http(struct rsession *con, u_int code, const char *msg,
u_int16_t labelid)
{
struct relay *rlay = (struct relay *)con->se_relay;
@@ -1917,7 +1917,7 @@ void
relay_error(struct bufferevent *bev, short error, void *arg)
{
struct ctl_relay_event *cre = (struct ctl_relay_event *)arg;
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct evbuffer *dst;
if (error & EVBUFFER_TIMEOUT) {
@@ -1945,7 +1945,7 @@ relay_accept(int fd, short sig, void *arg)
{
struct relay *rlay = (struct relay *)arg;
struct protocol *proto = rlay->rl_proto;
- struct session *con = NULL;
+ struct rsession *con = NULL;
struct ctl_natlook *cnl = NULL;
socklen_t slen;
struct timeval tv;
@@ -1963,8 +1963,8 @@ relay_accept(int fd, short sig, void *arg)
if (fcntl(s, F_SETFL, O_NONBLOCK) == -1)
goto err;
- if ((con = (struct session *)
- calloc(1, sizeof(struct session))) == NULL)
+ if ((con = (struct rsession *)
+ calloc(1, sizeof(struct rsession))) == NULL)
goto err;
con->se_in.s = s;
@@ -2083,7 +2083,7 @@ relay_hash_addr(struct sockaddr_storage *ss, u_int32_t p)
}
int
-relay_from_table(struct session *con)
+relay_from_table(struct rsession *con)
{
struct relay *rlay = (struct relay *)con->se_relay;
struct host *host;
@@ -2143,7 +2143,7 @@ relay_from_table(struct session *con)
void
relay_natlook(int fd, short event, void *arg)
{
- struct session *con = (struct session *)arg;
+ struct rsession *con = (struct rsession *)arg;
struct relay *rlay = (struct relay *)con->se_relay;
struct ctl_natlook *cnl = con->se_cnl;
@@ -2167,7 +2167,7 @@ relay_natlook(int fd, short event, void *arg)
}
void
-relay_session(struct session *con)
+relay_session(struct rsession *con)
{
struct relay *rlay = (struct relay *)con->se_relay;
struct ctl_relay_event *in = &con->se_in, *out = &con->se_out;
@@ -2209,7 +2209,7 @@ relay_session(struct session *con)
}
void
-relay_bindanyreq(struct session *con, in_port_t port, int proto)
+relay_bindanyreq(struct rsession *con, in_port_t port, int proto)
{
struct relay *rlay = (struct relay *)con->se_relay;
struct ctl_bindany bnd;
@@ -2233,19 +2233,19 @@ relay_bindanyreq(struct session *con, in_port_t port, int proto)
void
relay_bindany(int fd, short event, void *arg)
{
- struct session *con = (struct session *)arg;
+ struct rsession *con = (struct rsession *)arg;
if (con->se_bnds == -1) {
relay_close(con, "bindany failed, invalid socket");
return;
}
- if (relay_connect((struct session *)con) == -1)
+ if (relay_connect((struct rsession *)con) == -1)
relay_close(con, "session failed");
}
int
-relay_connect(struct session *con)
+relay_connect(struct rsession *con)
{
struct relay *rlay = (struct relay *)con->se_relay;
int bnds = -1, ret;
@@ -2312,7 +2312,7 @@ relay_connect(struct session *con)
}
void
-relay_close(struct session *con, const char *msg)
+relay_close(struct rsession *con, const char *msg)
{
struct relay *rlay = (struct relay *)con->se_relay;
char ibuf[128], obuf[128], *ptr = NULL;
@@ -2398,7 +2398,7 @@ relay_dispatch_pfe(int fd, short event, void *ptr)
struct imsg imsg;
ssize_t n;
struct relay *rlay;
- struct session *con;
+ struct rsession *con;
struct ctl_natlook cnl;
struct timeval tv;
struct host *host;
@@ -2521,7 +2521,7 @@ relay_dispatch_pfe(int fd, short event, void *ptr)
void
relay_dispatch_parent(int fd, short event, void * ptr)
{
- struct session *con;
+ struct rsession *con;
struct imsgev *iev;
struct imsgbuf *ibuf;
struct imsg imsg;
@@ -2656,7 +2656,7 @@ relay_ssl_ctx_create(struct relay *rlay)
}
void
-relay_ssl_transaction(struct session *con, struct ctl_relay_event *cre)
+relay_ssl_transaction(struct rsession *con, struct ctl_relay_event *cre)
{
struct relay *rlay = (struct relay *)con->se_relay;
SSL *ssl;
@@ -2704,7 +2704,7 @@ relay_ssl_transaction(struct session *con, struct ctl_relay_event *cre)
void
relay_ssl_accept(int fd, short event, void *arg)
{
- struct session *con = (struct session *)arg;
+ struct rsession *con = (struct rsession *)arg;
struct relay *rlay = (struct relay *)con->se_relay;
int ret;
int ssl_err;
@@ -2763,7 +2763,7 @@ retry:
void
relay_ssl_connect(int fd, short event, void *arg)
{
- struct session *con = (struct session *)arg;
+ struct rsession *con = (struct rsession *)arg;
struct relay *rlay = (struct relay *)con->se_relay;
int ret;
int ssl_err;
@@ -2836,7 +2836,7 @@ relay_ssl_readcb(int fd, short event, void *arg)
{
struct bufferevent *bufev = arg;
struct ctl_relay_event *cre = (struct ctl_relay_event *)bufev->cbarg;
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct relay *rlay = (struct relay *)con->se_relay;
int ret = 0, ssl_err = 0;
short what = EVBUFFER_READ;
@@ -2911,7 +2911,7 @@ relay_ssl_writecb(int fd, short event, void *arg)
{
struct bufferevent *bufev = arg;
struct ctl_relay_event *cre = (struct ctl_relay_event *)bufev->cbarg;
- struct session *con = (struct session *)cre->con;
+ struct rsession *con = (struct rsession *)cre->con;
struct relay *rlay = (struct relay *)con->se_relay;
int ret = 0, ssl_err;
short what = EVBUFFER_WRITE;
@@ -3173,7 +3173,7 @@ relay_proto_cmp(struct protonode *a, struct protonode *b)
RB_GENERATE(proto_tree, protonode, nodes, relay_proto_cmp);
int
-relay_session_cmp(struct session *a, struct session *b)
+relay_session_cmp(struct rsession *a, struct rsession *b)
{
struct relay *rlay = (struct relay *)b->se_relay;
struct protocol *proto = rlay->rl_proto;
@@ -3184,4 +3184,4 @@ relay_session_cmp(struct session *a, struct session *b)
return ((int)a->se_id - b->se_id);
}
-SPLAY_GENERATE(session_tree, session, se_nodes, relay_session_cmp);
+SPLAY_GENERATE(session_tree, rsession, se_nodes, relay_session_cmp);
diff --git a/usr.sbin/relayd/relay_udp.c b/usr.sbin/relayd/relay_udp.c
index d5ff36f74d3..9f75de248f9 100644
--- a/usr.sbin/relayd/relay_udp.c
+++ b/usr.sbin/relayd/relay_udp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relay_udp.c,v 1.20 2009/06/05 23:39:51 pyr Exp $ */
+/* $OpenBSD: relay_udp.c,v 1.21 2009/08/07 11:21:53 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -58,17 +58,17 @@ struct shuffle relay_shuffle;
int relay_udp_socket(struct sockaddr_storage *, in_port_t,
struct protocol *);
-void relay_udp_request(struct session *);
+void relay_udp_request(struct rsession *);
void relay_udp_timeout(int, short, void *);
-void relay_dns_log(struct session *, u_int8_t *, size_t);
-void *relay_dns_validate(struct session *,
+void relay_dns_log(struct rsession *, u_int8_t *, size_t);
+void *relay_dns_validate(struct rsession *,
struct relay *, struct sockaddr_storage *,
u_int8_t *, size_t);
-int relay_dns_request(struct session *);
+int relay_dns_request(struct rsession *);
void relay_udp_response(int, short, void *);
-void relay_dns_result(struct session *, u_int8_t *, size_t);
-int relay_dns_cmp(struct session *, struct session *);
+void relay_dns_result(struct rsession *, u_int8_t *, size_t);
+int relay_dns_cmp(struct rsession *, struct rsession *);
void
relay_udp_privinit(struct relayd *x_env, struct relay *rlay)
@@ -173,7 +173,7 @@ relay_udp_socket(struct sockaddr_storage *ss, in_port_t port,
void
relay_udp_response(int fd, short sig, void *arg)
{
- struct session *con = (struct session *)arg;
+ struct rsession *con = (struct rsession *)arg;
struct relay *rlay = con->se_relay;
struct protocol *proto = rlay->rl_proto;
void *priv = NULL;
@@ -211,7 +211,7 @@ relay_udp_server(int fd, short sig, void *arg)
{
struct relay *rlay = (struct relay *)arg;
struct protocol *proto = rlay->rl_proto;
- struct session *con = NULL;
+ struct rsession *con = NULL;
struct ctl_natlook *cnl = NULL;
socklen_t slen;
struct timeval tv;
@@ -233,8 +233,8 @@ relay_udp_server(int fd, short sig, void *arg)
(priv = (*proto->validate)(NULL, rlay, &ss, buf, len)) == NULL)
return;
- if ((con = (struct session *)
- calloc(1, sizeof(struct session))) == NULL) {
+ if ((con = (struct rsession *)
+ calloc(1, sizeof(struct rsession))) == NULL) {
free(priv);
return;
}
@@ -337,7 +337,7 @@ relay_udp_server(int fd, short sig, void *arg)
void
relay_udp_timeout(int fd, short sig, void *arg)
{
- struct session *con = (struct session *)arg;
+ struct rsession *con = (struct rsession *)arg;
if (sig != EV_TIMEOUT)
fatalx("invalid timeout event");
@@ -378,7 +378,7 @@ struct relay_dnshdr {
} __packed;
void
-relay_dns_log(struct session *con, u_int8_t *buf, size_t len)
+relay_dns_log(struct rsession *con, u_int8_t *buf, size_t len)
{
struct relay_dnshdr *hdr = (struct relay_dnshdr *)buf;
@@ -403,11 +403,11 @@ relay_dns_log(struct session *con, u_int8_t *buf, size_t len)
}
void *
-relay_dns_validate(struct session *con, struct relay *rlay,
+relay_dns_validate(struct rsession *con, struct relay *rlay,
struct sockaddr_storage *ss, u_int8_t *buf, size_t len)
{
struct relay_dnshdr *hdr = (struct relay_dnshdr *)buf;
- struct session lookup;
+ struct rsession lookup;
u_int16_t key;
struct relay_dns_priv *priv, lpriv;
@@ -458,7 +458,7 @@ relay_dns_validate(struct session *con, struct relay *rlay,
}
int
-relay_dns_request(struct session *con)
+relay_dns_request(struct rsession *con)
{
struct relay *rlay = (struct relay *)con->se_relay;
struct relay_dns_priv *priv = (struct relay_dns_priv *)con->se_priv;
@@ -515,7 +515,7 @@ relay_dns_request(struct session *con)
}
void
-relay_dns_result(struct session *con, u_int8_t *buf, size_t len)
+relay_dns_result(struct rsession *con, u_int8_t *buf, size_t len)
{
struct relay *rlay = (struct relay *)con->se_relay;
struct relay_dns_priv *priv = (struct relay_dns_priv *)con->se_priv;
@@ -545,7 +545,7 @@ relay_dns_result(struct session *con, u_int8_t *buf, size_t len)
}
int
-relay_dns_cmp(struct session *a, struct session *b)
+relay_dns_cmp(struct rsession *a, struct rsession *b)
{
struct relay_dns_priv *ap = (struct relay_dns_priv *)a->se_priv;
struct relay_dns_priv *bp = (struct relay_dns_priv *)b->se_priv;
diff --git a/usr.sbin/relayd/relayd.c b/usr.sbin/relayd/relayd.c
index 7d832ef4df8..503493a63de 100644
--- a/usr.sbin/relayd/relayd.c
+++ b/usr.sbin/relayd/relayd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.c,v 1.90 2009/08/05 13:46:13 reyk Exp $ */
+/* $OpenBSD: relayd.c,v 1.91 2009/08/07 11:21:53 reyk Exp $ */
/*
* Copyright (c) 2007, 2008 Reyk Floeter <reyk@openbsd.org>
@@ -471,7 +471,7 @@ purge_config(struct relayd *env, u_int8_t what)
struct address *virt;
struct protocol *proto;
struct relay *rlay;
- struct session *sess;
+ struct rsession *sess;
if (what & PURGE_TABLES && env->sc_tables != NULL) {
while ((table = TAILQ_FIRST(env->sc_tables)) != NULL)
@@ -836,11 +836,11 @@ relay_find(struct relayd *env, objid_t id)
return (NULL);
}
-struct session *
+struct rsession *
session_find(struct relayd *env, objid_t id)
{
struct relay *rlay;
- struct session *con;
+ struct rsession *con;
TAILQ_FOREACH(rlay, env->sc_relays, rl_entry)
SPLAY_FOREACH(con, session_tree, &rlay->rl_sessions)
diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h
index 67fd5d09c76..7660b8a825c 100644
--- a/usr.sbin/relayd/relayd.h
+++ b/usr.sbin/relayd/relayd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: relayd.h,v 1.128 2009/08/07 11:10:23 reyk Exp $ */
+/* $OpenBSD: relayd.h,v 1.129 2009/08/07 11:21:53 reyk Exp $ */
/*
* Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org>
@@ -384,7 +384,7 @@ struct rdr {
TAILQ_HEAD(rdrlist, rdr);
struct relay;
-struct session {
+struct rsession {
objid_t se_id;
objid_t se_relayid;
struct ctl_relay_event se_in;
@@ -403,9 +403,9 @@ struct session {
struct ctl_natlook *se_cnl;
int se_bnds;
- SPLAY_ENTRY(session) se_nodes;
+ SPLAY_ENTRY(rsession) se_nodes;
};
-SPLAY_HEAD(session_tree, session);
+SPLAY_HEAD(session_tree, rsession);
enum nodeaction {
NODE_ACTION_NONE = 0,
@@ -507,11 +507,11 @@ struct protocol {
int response_nodes;
struct proto_tree response_tree;
- int (*cmp)(struct session *, struct session *);
- void *(*validate)(struct session *, struct relay *,
+ int (*cmp)(struct rsession *, struct rsession *);
+ void *(*validate)(struct rsession *, struct relay *,
struct sockaddr_storage *,
u_int8_t *, size_t);
- int (*request)(struct session *);
+ int (*request)(struct rsession *);
TAILQ_ENTRY(protocol) entry;
};
@@ -765,19 +765,19 @@ void hce_notify_done(struct host *, enum host_error);
pid_t relay(struct relayd *, int [2], int [2], int [RELAY_MAXPROC][2],
int [2], int [RELAY_MAXPROC][2]);
void relay_notify_done(struct host *, const char *);
-int relay_session_cmp(struct session *, struct session *);
+int relay_session_cmp(struct rsession *, struct rsession *);
int relay_load_certfiles(struct relay *);
-void relay_close(struct session *, const char *);
+void relay_close(struct rsession *, const char *);
void relay_natlook(int, short, void *);
-void relay_session(struct session *);
-int relay_from_table(struct session *);
+void relay_session(struct rsession *);
+int relay_from_table(struct rsession *);
int relay_socket_af(struct sockaddr_storage *, in_port_t);
int relay_cmp_af(struct sockaddr_storage *,
struct sockaddr_storage *);
RB_PROTOTYPE(proto_tree, protonode, se_nodes, relay_proto_cmp);
-SPLAY_PROTOTYPE(session_tree, session, se_nodes, relay_session_cmp);
+SPLAY_PROTOTYPE(session_tree, rsession, se_nodes, relay_session_cmp);
/* relay_udp.c */
void relay_udp_privinit(struct relayd *, struct relay *);
@@ -822,7 +822,7 @@ void event_again(struct event *, int, short,
void (*)(int, short, void *),
struct timeval *, struct timeval *, void *);
struct relay *relay_find(struct relayd *, objid_t);
-struct session *session_find(struct relayd *, objid_t);
+struct rsession *session_find(struct relayd *, objid_t);
struct relay *relay_findbyname(struct relayd *, const char *);
struct relay *relay_findbyaddr(struct relayd *, struct relay_config *);
int expand_string(char *, size_t, const char *, const char *);