diff options
author | Sree Harsha Totakura <totakura@in.tum.de> | 2013-12-12 07:27:06 +0000 |
---|---|---|
committer | Sree Harsha Totakura <totakura@in.tum.de> | 2013-12-12 07:27:06 +0000 |
commit | a4595aba1b63bb9f9cc11457bcf5d9cab72b06e0 (patch) | |
tree | cbdcffb5115cf65d63f45c2022800db9f80441f4 /src/testbed | |
parent | 9dbf3b587010260ad2e26450a86a37ecd298df11 (diff) | |
download | gnunet-a4595aba1b63bb9f9cc11457bcf5d9cab72b06e0.tar.gz gnunet-a4595aba1b63bb9f9cc11457bcf5d9cab72b06e0.zip |
- underlay link model message
Diffstat (limited to 'src/testbed')
-rw-r--r-- | src/testbed/testbed.h | 35 | ||||
-rw-r--r-- | src/testbed/testbed_api_underlay.c | 5 |
2 files changed, 40 insertions, 0 deletions
diff --git a/src/testbed/testbed.h b/src/testbed/testbed.h index f08d693e6..107e1c5bb 100644 --- a/src/testbed/testbed.h +++ b/src/testbed/testbed.h | |||
@@ -770,6 +770,41 @@ struct GNUNET_TESTBED_ManagePeerServiceMessage | |||
770 | }; | 770 | }; |
771 | 771 | ||
772 | 772 | ||
773 | /** | ||
774 | * Message to send underlay link model of a peer. This message will be | ||
775 | * forwarded to the controller running the peer. | ||
776 | */ | ||
777 | struct GNUNET_TESTBED_UnderlayLinkModelMsg | ||
778 | { | ||
779 | /** | ||
780 | * Type is GNUNET_MESSAGE_TYPE_UNDERLAYLINKMODELMSG | ||
781 | */ | ||
782 | struct GNUNET_MessageHeader header; | ||
783 | |||
784 | /** | ||
785 | * The number of peer entries contained in this message | ||
786 | */ | ||
787 | uint32_t nentries GNUNET_PACKED; | ||
788 | |||
789 | /** | ||
790 | * The number of link properties contained in this message | ||
791 | */ | ||
792 | uint32_t nprops GNUNET_PACKED; | ||
793 | |||
794 | /** | ||
795 | * Array of ids of peers to be in the blacklist/whitelist. Each id is of type | ||
796 | * uint32_t. Number of ids should be equal to nentries. | ||
797 | */ | ||
798 | |||
799 | /** | ||
800 | * Array of link properties. Each link property is to be arraged in a | ||
801 | * sequence of four integers of type uint32_t: peer_id, latency, loss and | ||
802 | * bandwidth. | ||
803 | */ | ||
804 | |||
805 | }; | ||
806 | |||
807 | |||
773 | /**************************************/ | 808 | /**************************************/ |
774 | /* Barriers IPC messages and protocol */ | 809 | /* Barriers IPC messages and protocol */ |
775 | /**************************************/ | 810 | /**************************************/ |
diff --git a/src/testbed/testbed_api_underlay.c b/src/testbed/testbed_api_underlay.c index 4244a26ad..a1c90ac6e 100644 --- a/src/testbed/testbed_api_underlay.c +++ b/src/testbed/testbed_api_underlay.c | |||
@@ -38,6 +38,11 @@ struct LinkProperty | |||
38 | struct LinkProperty *next; | 38 | struct LinkProperty *next; |
39 | 39 | ||
40 | /** | 40 | /** |
41 | * the peer whose link is defined by these properties | ||
42 | */ | ||
43 | struct GNUNET_TESTBED_Peer *peer; | ||
44 | |||
45 | /** | ||
41 | * latency of the link in microseconds | 46 | * latency of the link in microseconds |
42 | */ | 47 | */ |
43 | uint32_t latency; | 48 | uint32_t latency; |