aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-02 22:25:48 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-02 22:25:48 +0000
commit69c3a52cfa679175da8f06bdcb8e2e4195465e44 (patch)
tree73109126cfcf1a807c5dc1e778f40b955fc959c5 /src/include
parentc42deb089faffd654e27bf661ce85d5c1bb38b7a (diff)
downloadgnunet-69c3a52cfa679175da8f06bdcb8e2e4195465e44.tar.gz
gnunet-69c3a52cfa679175da8f06bdcb8e2e4195465e44.zip
avoid passing both PeerIdentity and Address (which contains PeerIdentity) if address is always present as then this is redundant
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_peer_lib.h19
-rw-r--r--src/include/gnunet_transport_service.h13
2 files changed, 14 insertions, 18 deletions
diff --git a/src/include/gnunet_peer_lib.h b/src/include/gnunet_peer_lib.h
index fbe13e2cf..30347a8ff 100644
--- a/src/include/gnunet_peer_lib.h
+++ b/src/include/gnunet_peer_lib.h
@@ -38,11 +38,10 @@ extern "C"
38#endif 38#endif
39 39
40/** 40/**
41 * A GNUNET_PEER_Id is simply a shorter 41 * A GNUNET_PEER_Id is simply a shorter version of a "struct
42 * version of a "struct GNUNET_PeerIdentifier" 42 * GNUNET_PeerIdentifier" that can be used inside of a GNUnet peer to
43 * that can be used inside of a GNUnet peer 43 * save memory when the same identifier needs to be used over and over
44 * to save memory when the same identifier 44 * again.
45 * needs to be used over and over again.
46 */ 45 */
47typedef unsigned int GNUNET_PEER_Id; 46typedef unsigned int GNUNET_PEER_Id;
48 47
@@ -82,10 +81,11 @@ GNUNET_PEER_change_rc (GNUNET_PEER_Id id, int delta);
82 * Decrement multiple RCs of peer identities by one. 81 * Decrement multiple RCs of peer identities by one.
83 * 82 *
84 * @param ids array of PIDs to decrement the RCs of 83 * @param ids array of PIDs to decrement the RCs of
85 * @param count size of the ids array 84 * @param count size of the @a ids array
86 */ 85 */
87void 86void
88GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count); 87GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids,
88 unsigned int count);
89 89
90 90
91/** 91/**
@@ -95,14 +95,15 @@ GNUNET_PEER_decrement_rcs (const GNUNET_PEER_Id *ids, unsigned int count);
95 * @param pid where to write the normal peer identity 95 * @param pid where to write the normal peer identity
96 */ 96 */
97void 97void
98GNUNET_PEER_resolve (GNUNET_PEER_Id id, struct GNUNET_PeerIdentity *pid); 98GNUNET_PEER_resolve (GNUNET_PEER_Id id,
99 struct GNUNET_PeerIdentity *pid);
99 100
100 101
101/** 102/**
102 * Convert an interned PID to a normal peer identity. 103 * Convert an interned PID to a normal peer identity.
103 * 104 *
104 * @param id interned PID to convert 105 * @param id interned PID to convert
105 * @return pointer to peer identity, valid as long 'id' is valid 106 * @return pointer to peer identity, valid as long @a id is valid
106 */ 107 */
107const struct GNUNET_PeerIdentity * 108const struct GNUNET_PeerIdentity *
108GNUNET_PEER_resolve2 (GNUNET_PEER_Id id); 109GNUNET_PEER_resolve2 (GNUNET_PEER_Id id);
diff --git a/src/include/gnunet_transport_service.h b/src/include/gnunet_transport_service.h
index d1b341a8c..a511a0e7d 100644
--- a/src/include/gnunet_transport_service.h
+++ b/src/include/gnunet_transport_service.h
@@ -41,7 +41,7 @@ extern "C"
41/** 41/**
42 * Version number of the transport API. 42 * Version number of the transport API.
43 */ 43 */
44#define GNUNET_TRANSPORT_VERSION 0x00000001 44#define GNUNET_TRANSPORT_VERSION 0x00000002
45 45
46 46
47/** 47/**
@@ -672,7 +672,7 @@ struct GNUNET_TRANSPORT_PeerMonitoringContext;
672 * @param cls closure 672 * @param cls closure
673 * @param peer peer this update is about, 673 * @param peer peer this update is about,
674 * NULL if this is the final last callback for a iteration operation 674 * NULL if this is the final last callback for a iteration operation
675 * @param address address, NULL for disconnect notification in monitor mode 675 * @param address address, NULL if this is the final callback for iteration op
676 * @param state current state this peer is in 676 * @param state current state this peer is in
677 * @param state_timeout timeout for the current state of the peer 677 * @param state_timeout timeout for the current state of the peer
678 */ 678 */
@@ -789,13 +789,11 @@ enum GNUNET_TRANSPORT_ValidationState
789 * the current state of the validation entry, 789 * the current state of the validation entry,
790 * 790 *
791 * If the monitoring was called with `one_shot==GNUNET_YES`, a final callback 791 * If the monitoring was called with `one_shot==GNUNET_YES`, a final callback
792 * with `peer==NULL` and `address==NULL` is executed. 792 * with `address==NULL` is executed.
793 * 793 *
794 * @param cls closure 794 * @param cls closure
795 * @param peer peer this update is about, 795 * @param address address this update is about,
796 * NULL if this is the final last callback for a iteration operation 796 * NULL if this is the final last callback for a iteration operation
797 * @param address address,
798 * NULL for disconnect notification in monitor mode
799 * @param last_validation when was this address last validated 797 * @param last_validation when was this address last validated
800 * @param valid_until when does this address expire 798 * @param valid_until when does this address expire
801 * @param next_validation time of the next validation operation 799 * @param next_validation time of the next validation operation
@@ -803,7 +801,6 @@ enum GNUNET_TRANSPORT_ValidationState
803 */ 801 */
804typedef void 802typedef void
805(*GNUNET_TRANSPORT_ValidationIterateCallback) (void *cls, 803(*GNUNET_TRANSPORT_ValidationIterateCallback) (void *cls,
806 const struct GNUNET_PeerIdentity *peer,
807 const struct GNUNET_HELLO_Address *address, 804 const struct GNUNET_HELLO_Address *address,
808 struct GNUNET_TIME_Absolute last_validation, 805 struct GNUNET_TIME_Absolute last_validation,
809 struct GNUNET_TIME_Absolute valid_until, 806 struct GNUNET_TIME_Absolute valid_until,
@@ -1061,5 +1058,3 @@ GNUNET_TRANSPORT_monitor_plugins_cancel (struct GNUNET_TRANSPORT_PluginMonitor *
1061/* ifndef GNUNET_TRANSPORT_SERVICE_H */ 1058/* ifndef GNUNET_TRANSPORT_SERVICE_H */
1062#endif 1059#endif
1063/* end of gnunet_transport_service.h */ 1060/* end of gnunet_transport_service.h */
1064
1065