Commit 0f1548ab authored by Sebastian Hahn's avatar Sebastian Hahn
Browse files

Create main.h

parent a86f464f
......@@ -21,6 +21,7 @@
#include "connection_or.h"
#include "control.h"
#include "directory.h"
#include "main.h"
#include "router.h"
#include "routerlist.h"
#include "crypto.h"
......
......@@ -24,6 +24,7 @@
#include "dns.h"
#include "geoip.h"
#include "hibernate.h"
#include "main.h"
#include "rendclient.h"
#include "rendservice.h"
#include "router.h"
......
......@@ -26,6 +26,7 @@
#include "dns.h"
#include "dnsserv.h"
#include "geoip.h"
#include "main.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "router.h"
......
......@@ -22,6 +22,7 @@
#include "dnsserv.h"
#include "dirserv.h"
#include "hibernate.h"
#include "main.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "rendservice.h"
......
......@@ -20,6 +20,7 @@
#include "control.h"
#include "dirserv.h"
#include "geoip.h"
#include "main.h"
#include "router.h"
#include "routerlist.h"
......
......@@ -24,6 +24,7 @@
#include "dnsserv.h"
#include "geoip.h"
#include "hibernate.h"
#include "main.h"
#include "router.h"
#include "routerlist.h"
......
......@@ -19,6 +19,7 @@
#include "config.h"
#include "connection.h"
#include "cpuworker.h"
#include "main.h"
#include "router.h"
/** The maximum number of cpuworker processes we will keep around. */
......
......@@ -14,6 +14,7 @@
#include "dirserv.h"
#include "dirvote.h"
#include "geoip.h"
#include "main.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "router.h"
......
......@@ -19,6 +19,7 @@
#include "connection_edge.h"
#include "control.h"
#include "dns.h"
#include "main.h"
#include "router.h"
#include "ht.h"
#ifdef HAVE_EVENT2_DNS_H
......
......@@ -14,6 +14,7 @@
#include "connection.h"
#include "connection_edge.h"
#include "control.h"
#include "main.h"
#ifdef HAVE_EVENT2_DNS_H
#include <event2/dns.h>
#include <event2/dns_compat.h>
......
......@@ -26,6 +26,7 @@ hibernating, phase 2:
#include "connection.h"
#include "connection_edge.h"
#include "hibernate.h"
#include "main.h"
#include "router.h"
/** Possible values of hibernate_state */
......
......@@ -30,6 +30,7 @@
#include "dnsserv.h"
#include "geoip.h"
#include "hibernate.h"
#include "main.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "rendservice.h"
......
/* Copyright (c) 2001 Matej Pfajfar.
* Copyright (c) 2001-2004, Roger Dingledine.
* Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
* Copyright (c) 2007-2010, The Tor Project, Inc. */
/* See LICENSE for licensing information */
/**
* \file main.h
* \brief Header file for main.c.
**/
#ifndef _TOR_MAIN_H
#define _TOR_MAIN_H
extern int has_completed_circuit;
int connection_add(connection_t *conn);
int connection_remove(connection_t *conn);
void connection_unregister_events(connection_t *conn);
int connection_in_array(connection_t *conn);
void add_connection_to_closeable_list(connection_t *conn);
int connection_is_on_closeable_list(connection_t *conn);
smartlist_t *get_connection_array(void);
typedef enum watchable_events {
READ_EVENT=0x02,
WRITE_EVENT=0x04
} watchable_events_t;
void connection_watch_events(connection_t *conn, watchable_events_t events);
int connection_is_reading(connection_t *conn);
void connection_stop_reading(connection_t *conn);
void connection_start_reading(connection_t *conn);
int connection_is_writing(connection_t *conn);
void connection_stop_writing(connection_t *conn);
void connection_start_writing(connection_t *conn);
void connection_stop_reading_from_linked_conn(connection_t *conn);
void directory_all_unreachable(time_t now);
void directory_info_has_arrived(time_t now, int from_cache);
void ip_address_changed(int at_interface);
void dns_servers_relaunch_checks(void);
void control_signal_act(int the_signal);
void handle_signals(int is_parent);
int try_locking(or_options_t *options, int err_if_locked);
int have_lockfile(void);
void release_lockfile(void);
void tor_cleanup(void);
void tor_free_all(int postfork);
int tor_main(int argc, char *argv[]);
#ifdef MAIN_PRIVATE
int do_main_loop(void);
int do_list_fingerprint(void);
void do_hash_password(void);
int tor_init(int argc, char **argv);
#endif
#endif
......@@ -3268,59 +3268,6 @@ typedef enum {
DIRREQ_OR_CONN_BUFFER_FLUSHED = 4
} dirreq_state_t;
/********************************* main.c ***************************/
extern int has_completed_circuit;
int connection_add(connection_t *conn);
int connection_remove(connection_t *conn);
void connection_unregister_events(connection_t *conn);
int connection_in_array(connection_t *conn);
void add_connection_to_closeable_list(connection_t *conn);
int connection_is_on_closeable_list(connection_t *conn);
smartlist_t *get_connection_array(void);
typedef enum watchable_events {
READ_EVENT=0x02,
WRITE_EVENT=0x04
} watchable_events_t;
void connection_watch_events(connection_t *conn, watchable_events_t events);
int connection_is_reading(connection_t *conn);
void connection_stop_reading(connection_t *conn);
void connection_start_reading(connection_t *conn);
int connection_is_writing(connection_t *conn);
void connection_stop_writing(connection_t *conn);
void connection_start_writing(connection_t *conn);
void connection_stop_reading_from_linked_conn(connection_t *conn);
void directory_all_unreachable(time_t now);
void directory_info_has_arrived(time_t now, int from_cache);
void ip_address_changed(int at_interface);
void dns_servers_relaunch_checks(void);
void control_signal_act(int the_signal);
void handle_signals(int is_parent);
int try_locking(or_options_t *options, int err_if_locked);
int have_lockfile(void);
void release_lockfile(void);
void tor_cleanup(void);
void tor_free_all(int postfork);
int tor_main(int argc, char *argv[]);
#ifdef MAIN_PRIVATE
int do_main_loop(void);
int do_list_fingerprint(void);
void do_hash_password(void);
int tor_init(int argc, char **argv);
#endif
/********************************* microdesc.c *************************/
typedef struct microdesc_cache_t microdesc_cache_t;
......
......@@ -21,6 +21,7 @@
#include "connection_or.h"
#include "control.h"
#include "geoip.h"
#include "main.h"
#include "mempool.h"
#include "rendcommon.h"
#include "routerlist.h"
......
......@@ -15,6 +15,7 @@
#include "connection.h"
#include "connection_edge.h"
#include "directory.h"
#include "main.h"
#include "rendclient.h"
#include "rendcommon.h"
#include "routerlist.h"
......
......@@ -17,6 +17,7 @@
#include "dns.h"
#include "geoip.h"
#include "hibernate.h"
#include "main.h"
#include "router.h"
#include "routerlist.h"
......
......@@ -21,6 +21,7 @@
#include "dirvote.h"
#include "geoip.h"
#include "hibernate.h"
#include "main.h"
#include "rendcommon.h"
#include "rendservice.h"
#include "router.h"
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment