-/*
- * Copyright (C) 2008-2009 Stig Venaas <venaas@uninett.no>
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * copyright notice and this permission notice appear in all copies.
- */
-
-#include <signal.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netdb.h>
-#include <string.h>
-#include <unistd.h>
-#include <limits.h>
-#ifdef SYS_SOLARIS9
-#include <fcntl.h>
-#endif
-#include <sys/time.h>
-#include <sys/types.h>
-#include <sys/select.h>
-#include <ctype.h>
-#include <sys/wait.h>
-#include <arpa/inet.h>
-#include <regex.h>
-#include <pthread.h>
-#include "list.h"
-#include "hostport.h"
-#include "radsecproxy.h"
-
-#ifdef RADPROT_TCP
-#include "debug.h"
-#include "util.h"
-static void setprotoopts(struct commonprotoopts *opts);
-static char **getlistenerargs();
-void *tcplistener(void *arg);
-int tcpconnect(struct server *server, struct timeval *when, int timeout, char * text);
-void *tcpclientrd(void *arg);
-int clientradputtcp(struct server *server, unsigned char *rad);
-void tcpsetsrcres();
-
-static const struct protodefs protodefs = {
- "tcp",
- NULL, /* secretdefault */
- SOCK_STREAM, /* socktype */
- "1812", /* portdefault */
- 0, /* retrycountdefault */
- 0, /* retrycountmax */
- REQUEST_RETRY_INTERVAL * REQUEST_RETRY_COUNT, /* retryintervaldefault */
- 60, /* retryintervalmax */
- DUPLICATE_INTERVAL, /* duplicateintervaldefault */
- setprotoopts, /* setprotoopts */
- getlistenerargs, /* getlistenerargs */
- tcplistener, /* listener */
- tcpconnect, /* connecter */
- tcpclientrd, /* clientconnreader */
- clientradputtcp, /* clientradput */
- NULL, /* addclient */
- NULL, /* addserverextra */
- tcpsetsrcres, /* setsrcres */
- NULL /* initextra */
-};
-
-static struct addrinfo *srcres = NULL;
-static uint8_t handle;
-static struct commonprotoopts *protoopts = NULL;
-const struct protodefs *tcpinit(uint8_t h) {
- handle = h;
- return &protodefs;
-}