diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-09-27 11:29:11 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-09-27 11:29:11 +0000 |
commit | 926f5a24e5a30566a51effb0e1752c15b0fa1e88 (patch) | |
tree | 744173dbd29bf685d2424db58f620b53c24cce1d /src/include | |
parent | b9ae190b8cfaa9124e284cc46595fa3b52b16696 (diff) | |
download | gnunet-926f5a24e5a30566a51effb0e1752c15b0fa1e88.tar.gz gnunet-926f5a24e5a30566a51effb0e1752c15b0fa1e88.zip |
move bloomfilter recalculation to block library
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_constants.h | 7 | ||||
-rw-r--r-- | src/include/gnunet_dht_service.h | 4 | ||||
-rw-r--r-- | src/include/gnunet_protocols.h | 41 |
3 files changed, 46 insertions, 6 deletions
diff --git a/src/include/gnunet_constants.h b/src/include/gnunet_constants.h index 190cabbb0..7315c9c73 100644 --- a/src/include/gnunet_constants.h +++ b/src/include/gnunet_constants.h | |||
@@ -128,6 +128,13 @@ extern "C" | |||
128 | #define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024) | 128 | #define GNUNET_CONSTANTS_MAX_ENCRYPTED_MESSAGE_SIZE (63 * 1024) |
129 | 129 | ||
130 | 130 | ||
131 | /** | ||
132 | * K-value that must be used for the bloom filters in 'GET' | ||
133 | * queries. | ||
134 | */ | ||
135 | #define GNUNET_CONSTANTS_BLOOMFILTER_K 16 | ||
136 | |||
137 | |||
131 | 138 | ||
132 | #if 0 /* keep Emacsens' auto-indent happy */ | 139 | #if 0 /* keep Emacsens' auto-indent happy */ |
133 | { | 140 | { |
diff --git a/src/include/gnunet_dht_service.h b/src/include/gnunet_dht_service.h index a8d4d67ec..4a5ab7684 100644 --- a/src/include/gnunet_dht_service.h +++ b/src/include/gnunet_dht_service.h | |||
@@ -46,10 +46,10 @@ extern "C" | |||
46 | #define GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 60) | 46 | #define GNUNET_DHT_DEFAULT_REPUBLISH_FREQUENCY GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MINUTES, 60) |
47 | 47 | ||
48 | /** | 48 | /** |
49 | * K-value that must be used for the bloom filter 'GET' | 49 | * K-value that must be used for the bloom filters in 'GET' |
50 | * queries. | 50 | * queries. |
51 | */ | 51 | */ |
52 | #define GNUNET_DHT_GET_BLOOMFILTER_K 16 | 52 | #define GNUNET_DHT_GET_BLOOMFILTER_K GNUNET_CONSTANTS_BLOOMFILTER_K |
53 | 53 | ||
54 | /** | 54 | /** |
55 | * Non-intelligent default DHT GET replication. | 55 | * Non-intelligent default DHT GET replication. |
diff --git a/src/include/gnunet_protocols.h b/src/include/gnunet_protocols.h index a9a60dde6..68e78b5bb 100644 --- a/src/include/gnunet_protocols.h +++ b/src/include/gnunet_protocols.h | |||
@@ -625,16 +625,51 @@ extern "C" | |||
625 | ******************************************************************************/ | 625 | ******************************************************************************/ |
626 | 626 | ||
627 | /** | 627 | /** |
628 | * Client wants to store item in DHT. | ||
629 | */ | ||
630 | #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT 142 | ||
631 | |||
632 | /** | ||
633 | * Client wants to lookup item in DHT. | ||
634 | */ | ||
635 | #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET 143 | ||
636 | |||
637 | /** | ||
638 | * Client wants to stop search in DHT. | ||
639 | */ | ||
640 | #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP 144 | ||
641 | |||
642 | /** | ||
643 | * Service returns result to client. | ||
644 | */ | ||
645 | #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT 145 | ||
646 | |||
647 | /** | ||
648 | * Peer is storing data in DHT. | ||
649 | */ | ||
650 | #define GNUNET_MESSAGE_TYPE_DHT_P2P_PUT 146 | ||
651 | |||
652 | /** | ||
653 | * Peer tries to find data in DHT. | ||
654 | */ | ||
655 | #define GNUNET_MESSAGE_TYPE_DHT_P2P_GET 147 | ||
656 | |||
657 | /** | ||
658 | * Data is returned to peer from DHT. | ||
659 | */ | ||
660 | #define GNUNET_MESSAGE_TYPE_DHT_P2P_RESULT 148 | ||
661 | |||
662 | // LEGACY types follow (pre3)...... | ||
663 | |||
664 | /** | ||
628 | * Local DHT route request type | 665 | * Local DHT route request type |
629 | */ | 666 | */ |
630 | #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE 142 | 667 | #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE 142 |
631 | #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET 142 | ||
632 | 668 | ||
633 | /** | 669 | /** |
634 | * Local generic DHT route result type | 670 | * Local generic DHT route result type |
635 | */ | 671 | */ |
636 | #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT 143 | 672 | #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_RESULT 143 |
637 | #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_RESULT 142 | ||
638 | 673 | ||
639 | /** | 674 | /** |
640 | * P2P DHT route request type | 675 | * P2P DHT route request type |
@@ -650,14 +685,12 @@ extern "C" | |||
650 | * Local generic DHT message stop type | 685 | * Local generic DHT message stop type |
651 | */ | 686 | */ |
652 | #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_STOP 146 | 687 | #define GNUNET_MESSAGE_TYPE_DHT_LOCAL_ROUTE_STOP 146 |
653 | #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_GET_STOP 146 | ||
654 | 688 | ||
655 | /** | 689 | /** |
656 | * Local and P2P DHT PUT message | 690 | * Local and P2P DHT PUT message |
657 | * (encapsulated in DHT_ROUTE message) | 691 | * (encapsulated in DHT_ROUTE message) |
658 | */ | 692 | */ |
659 | #define GNUNET_MESSAGE_TYPE_DHT_PUT 147 | 693 | #define GNUNET_MESSAGE_TYPE_DHT_PUT 147 |
660 | #define GNUNET_MESSAGE_TYPE_DHT_CLIENT_PUT 147 | ||
661 | 694 | ||
662 | /** | 695 | /** |
663 | * Local and P2P DHT GET message | 696 | * Local and P2P DHT GET message |