* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
* USA
- *
- * $Id: listener.h 6 2005-09-10 01:02:21Z nenolod $
*/
#ifndef INCLUDED_listener_h
struct Listener
{
- struct Listener *next; /* list node pointer */
+ rb_dlink_node lnode; /* list node */
const char *name; /* listener name */
rb_fde_t *F; /* file descriptor */
int ref_count; /* number of connection references */
int active; /* current state of listener */
int ssl; /* ssl listener */
int defer_accept; /* use TCP_DEFER_ACCEPT */
- struct rb_sockaddr_storage addr;
- struct DNSQuery *dns_query;
- char vhost[HOSTLEN + 1]; /* virtual name of listener */
+ bool sctp; /* use SCTP */
+ int wsock; /* wsock listener */
+ struct rb_sockaddr_storage addr[2];
+ char vhost[(HOSTLEN * 2) + 1]; /* virtual name of listener */
};
-extern void add_listener(int port, const char *vaddr_ip, int family, int ssl, int defer_accept);
+extern void add_tcp_listener(int port, const char *vaddr_ip, int family, int ssl, int defer_accept, int wsock);
+extern void add_sctp_listener(int port, const char *vaddr_ip1, const char *vaddr_ip2, int ssl, int wsock);
extern void close_listener(struct Listener *listener);
extern void close_listeners(void);
extern const char *get_listener_name(const struct Listener *listener);