Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Mike Perry
Tor
Commits
a86f464f
Commit
a86f464f
authored
Jul 22, 2010
by
Sebastian Hahn
Browse files
Create hibernate.h
parent
dc2f1666
Changes
11
Hide whitespace changes
Inline
Side-by-side
src/or/command.c
View file @
a86f464f
...
...
@@ -24,6 +24,7 @@
#include
"config.h"
#include
"control.h"
#include
"cpuworker.h"
#include
"hibernate.h"
#include
"router.h"
#include
"routerlist.h"
...
...
src/or/config.c
View file @
a86f464f
...
...
@@ -23,6 +23,7 @@
#include
"dirvote.h"
#include
"dns.h"
#include
"geoip.h"
#include
"hibernate.h"
#include
"rendclient.h"
#include
"rendservice.h"
#include
"router.h"
...
...
src/or/connection_edge.c
View file @
a86f464f
...
...
@@ -21,6 +21,7 @@
#include
"dns.h"
#include
"dnsserv.h"
#include
"dirserv.h"
#include
"hibernate.h"
#include
"rendclient.h"
#include
"rendcommon.h"
#include
"rendservice.h"
...
...
src/or/control.c
View file @
a86f464f
...
...
@@ -23,6 +23,7 @@
#include
"dirserv.h"
#include
"dnsserv.h"
#include
"geoip.h"
#include
"hibernate.h"
#include
"router.h"
#include
"routerlist.h"
...
...
src/or/dirserv.c
View file @
a86f464f
...
...
@@ -13,6 +13,7 @@
#include
"directory.h"
#include
"dirserv.h"
#include
"dirvote.h"
#include
"hibernate.h"
#include
"router.h"
#include
"routerlist.h"
...
...
src/or/hibernate.c
View file @
a86f464f
...
...
@@ -25,6 +25,7 @@ hibernating, phase 2:
#include
"config.h"
#include
"connection.h"
#include
"connection_edge.h"
#include
"hibernate.h"
#include
"router.h"
/** Possible values of hibernate_state */
...
...
src/or/hibernate.h
0 → 100644
View file @
a86f464f
/* 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 hibernate.h
* \brief Header file for hibernate.c.
**/
#ifndef _TOR_HIBERNATE_H
#define _TOR_HIBERNATE_H
int
accounting_parse_options
(
or_options_t
*
options
,
int
validate_only
);
int
accounting_is_enabled
(
or_options_t
*
options
);
void
configure_accounting
(
time_t
now
);
void
accounting_run_housekeeping
(
time_t
now
);
void
accounting_add_bytes
(
size_t
n_read
,
size_t
n_written
,
int
seconds
);
int
accounting_record_bandwidth_usage
(
time_t
now
,
or_state_t
*
state
);
void
hibernate_begin_shutdown
(
void
);
int
we_are_hibernating
(
void
);
void
consider_hibernation
(
time_t
now
);
int
getinfo_helper_accounting
(
control_connection_t
*
conn
,
const
char
*
question
,
char
**
answer
,
const
char
**
errmsg
);
void
accounting_set_bandwidth_usage_from_state
(
or_state_t
*
state
);
#endif
src/or/main.c
View file @
a86f464f
...
...
@@ -29,6 +29,7 @@
#include
"dns.h"
#include
"dnsserv.h"
#include
"geoip.h"
#include
"hibernate.h"
#include
"rendclient.h"
#include
"rendcommon.h"
#include
"rendservice.h"
...
...
src/or/or.h
View file @
a86f464f
...
...
@@ -3268,22 +3268,6 @@ typedef enum {
DIRREQ_OR_CONN_BUFFER_FLUSHED
=
4
}
dirreq_state_t
;
/********************************* hibernate.c **********************/
int
accounting_parse_options
(
or_options_t
*
options
,
int
validate_only
);
int
accounting_is_enabled
(
or_options_t
*
options
);
void
configure_accounting
(
time_t
now
);
void
accounting_run_housekeeping
(
time_t
now
);
void
accounting_add_bytes
(
size_t
n_read
,
size_t
n_written
,
int
seconds
);
int
accounting_record_bandwidth_usage
(
time_t
now
,
or_state_t
*
state
);
void
hibernate_begin_shutdown
(
void
);
int
we_are_hibernating
(
void
);
void
consider_hibernation
(
time_t
now
);
int
getinfo_helper_accounting
(
control_connection_t
*
conn
,
const
char
*
question
,
char
**
answer
,
const
char
**
errmsg
);
void
accounting_set_bandwidth_usage_from_state
(
or_state_t
*
state
);
/********************************* main.c ***************************/
extern
int
has_completed_circuit
;
...
...
src/or/router.c
View file @
a86f464f
...
...
@@ -16,6 +16,7 @@
#include
"dirserv.h"
#include
"dns.h"
#include
"geoip.h"
#include
"hibernate.h"
#include
"router.h"
#include
"routerlist.h"
...
...
src/or/routerlist.c
View file @
a86f464f
...
...
@@ -20,6 +20,7 @@
#include
"dirserv.h"
#include
"dirvote.h"
#include
"geoip.h"
#include
"hibernate.h"
#include
"rendcommon.h"
#include
"rendservice.h"
#include
"router.h"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment