diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-02-04 12:12:31 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2008-02-04 12:12:31 +0000 |
commit | 18d744d61d17622f8d04988da05e208bbb933398 (patch) | |
tree | b7bed4a212e4a02564004092ea6219d4ab79c30e /usr.sbin/relayd | |
parent | fb05d07dafb11d39c0ddc99ed64460616651535f (diff) |
Move some prototypes from relay.c to relayd.h and remove there externs
in other places;
ok reyk@
Diffstat (limited to 'usr.sbin/relayd')
-rw-r--r-- | usr.sbin/relayd/relay.c | 9 | ||||
-rw-r--r-- | usr.sbin/relayd/relay_udp.c | 10 | ||||
-rw-r--r-- | usr.sbin/relayd/relayd.h | 10 |
3 files changed, 11 insertions, 18 deletions
diff --git a/usr.sbin/relayd/relay.c b/usr.sbin/relayd/relay.c index 0086cf66fa6..2ef58c05cdb 100644 --- a/usr.sbin/relayd/relay.c +++ b/usr.sbin/relayd/relay.c @@ -1,4 +1,4 @@ -/* $OpenBSD: relay.c,v 1.81 2008/02/04 12:05:26 thib Exp $ */ +/* $OpenBSD: relay.c,v 1.82 2008/02/04 12:12:30 thib Exp $ */ /* * Copyright (c) 2006, 2007 Reyk Floeter <reyk@openbsd.org> @@ -59,7 +59,6 @@ void relay_nodedebug(const char *, struct protonode *); void relay_protodebug(struct relay *); void relay_init(void); void relay_launch(void); -int relay_socket_af(struct sockaddr_storage *, in_port_t); int relay_socket(struct sockaddr_storage *, in_port_t, struct protocol *); int relay_socket_listen(struct sockaddr_storage *, in_port_t, @@ -69,15 +68,11 @@ int relay_socket_connect(struct sockaddr_storage *, in_port_t, void relay_accept(int, short, void *); void relay_input(struct session *); -void relay_close(struct session *, const char *); -void relay_session(struct session *); -void relay_natlook(int, short, void *); int relay_connect(struct session *); void relay_connected(int, short, void *); u_int32_t relay_hash_addr(struct sockaddr_storage *, u_int32_t); -int relay_from_table(struct session *); void relay_write(struct bufferevent *, void *); void relay_read(struct bufferevent *, void *); @@ -122,8 +117,6 @@ int relay_bufferevent_write_chunk(struct ctl_relay_event *, struct evbuffer *, size_t); int relay_bufferevent_write(struct ctl_relay_event *, void *, size_t); -int relay_cmp_af(struct sockaddr_storage *, - struct sockaddr_storage *); char *relay_load_file(const char *, off_t *); static __inline int relay_proto_cmp(struct protonode *, struct protonode *); diff --git a/usr.sbin/relayd/relay_udp.c b/usr.sbin/relayd/relay_udp.c index 4122630abaa..9d0f1a4422e 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.7 2008/01/31 12:12:50 thib Exp $ */ +/* $OpenBSD: relay_udp.c,v 1.8 2008/02/04 12:12:30 thib Exp $ */ /* * Copyright (c) 2007 Reyk Floeter <reyk@openbsd.org> @@ -53,14 +53,6 @@ extern int proc_id; extern struct imsgbuf *ibuf_pfe; extern int debug; -extern void relay_close(struct session *, const char *); -extern void relay_natlook(int, short, void *); -extern void relay_session(struct session *); -extern int relay_from_table(struct session *); -extern int relay_socket_af(struct sockaddr_storage *, in_port_t); -extern int relay_cmp_af(struct sockaddr_storage *, - struct sockaddr_storage *); - struct relayd *env = NULL; int relay_udp_socket(struct sockaddr_storage *, in_port_t, diff --git a/usr.sbin/relayd/relayd.h b/usr.sbin/relayd/relayd.h index 8b01ed8207c..e8c31a2ca99 100644 --- a/usr.sbin/relayd/relayd.h +++ b/usr.sbin/relayd/relayd.h @@ -1,4 +1,4 @@ -/* $OpenBSD: relayd.h,v 1.95 2008/02/04 12:05:26 thib Exp $ */ +/* $OpenBSD: relayd.h,v 1.96 2008/02/04 12:12:30 thib Exp $ */ /* * Copyright (c) 2006, 2007 Pierre-Yves Ritschard <pyr@openbsd.org> @@ -751,6 +751,14 @@ pid_t relay(struct relayd *, int [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_load_certfiles(struct relay *); +void relay_close(struct session *, const char *); +void relay_natlook(int, short, void *); +void relay_session(struct session *); +int relay_from_table(struct session *); +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); |