Consistent GAUGER naming.
[oweals/gnunet.git] / src / peerinfo / peerinfo.h
1 /*
2      This file is part of GNUnet.
3      (C) 2009, 2010 Christian Grothoff (and other contributing authors)
4
5      GNUnet is free software; you can redistribute it and/or modify
6      it under the terms of the GNU General Public License as published
7      by the Free Software Foundation; either version 3, or (at your
8      option) any later version.
9
10      GNUnet is distributed in the hope that it will be useful, but
11      WITHOUT ANY WARRANTY; without even the implied warranty of
12      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13      General Public License for more details.
14
15      You should have received a copy of the GNU General Public License
16      along with GNUnet; see the file COPYING.  If not, write to the
17      Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18      Boston, MA 02111-1307, USA.
19 */
20
21 /**
22  * @file peerinfo/peerinfo.h
23  * @brief common internal definitions for peerinfo service
24  * @author Christian Grothoff
25  */
26 #include "gnunet_crypto_lib.h"
27 #include "gnunet_time_lib.h"
28 #include "gnunet_peerinfo_service.h"
29
30 #define DEBUG_PEERINFO GNUNET_NO
31
32 /**
33  * Message requesting a listing of all known peers,
34  * possibly restricted to the specified peer identity.
35  */
36 struct ListPeerMessage
37 {
38
39   /**
40    * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_GET
41    */
42   struct GNUNET_MessageHeader header;
43
44   /**
45    * Always zero.
46    */
47   uint32_t reserved GNUNET_PACKED;
48
49   /**
50    * Restrict to peers with this identity (optional
51    * field, check header.size!).
52    */
53   struct GNUNET_PeerIdentity peer;
54
55 };
56
57
58 /**
59  * Message used to inform the client about
60  * a particular peer; this message is optionally followed
61  * by a HELLO message for the respective peer (if available).
62  * Check the header.size field to see if a HELLO is
63  * present.
64  */
65 struct InfoMessage
66 {
67
68   /**
69    * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_INFO
70    */
71   struct GNUNET_MessageHeader header;
72
73   /**
74    * Always zero.
75    */
76   uint32_t reserved GNUNET_PACKED;
77
78   /**
79    * About which peer are we talking here?
80    */
81   struct GNUNET_PeerIdentity peer;
82
83 };
84
85
86 /* end of peerinfo.h */