+/*
+ * This shouldn't really be exposed...
+ */
+typedef struct listen_socket_t {
+ /*
+ * For normal sockets.
+ */
+ fr_ipaddr_t my_ipaddr;
+ int my_port;
+
+ const char *interface;
+#ifdef SO_BROADCAST
+ int broadcast;
+#endif
+
+ /* for outgoing sockets */
+ home_server *home;
+ fr_ipaddr_t other_ipaddr;
+ int other_port;
+
+ int proto;
+
+#ifdef WITH_TCP
+ /* for a proxy connecting to home servers */
+ time_t last_packet;
+ time_t opened;
+ fr_event_t *ev;
+
+ /* for clients connecting to the server */
+ int max_connections;
+ int num_connections;
+ struct listen_socket_t *parent;
+ RADCLIENT *client;
+
+ RADIUS_PACKET *packet; /* for reading partial packets */
+#endif
+ RADCLIENT_LIST *clients;
+} listen_socket_t;
+
+#define RAD_LISTEN_STATUS_INIT (0)
+#define RAD_LISTEN_STATUS_KNOWN (1)
+#define RAD_LISTEN_STATUS_REMOVE_FD (2)
+#define RAD_LISTEN_STATUS_CLOSED (3)
+#define RAD_LISTEN_STATUS_FINISH (4)