2 This file is part of GNUnet.
3 Copyright (C) 2009, 2010 GNUnet e.V.
5 GNUnet is free software: you can redistribute it and/or modify it
6 under the terms of the GNU Affero General Public License as published
7 by the Free Software Foundation, either version 3 of the License,
8 or (at your option) any later version.
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 Affero General Public License for more details.
15 You should have received a copy of the GNU Affero General Public License
16 along with this program. If not, see <http://www.gnu.org/licenses/>.
18 SPDX-License-Identifier: AGPL3.0-or-later
22 * @file peerinfo/peerinfo.h
23 * @brief common internal definitions for peerinfo service
24 * @author Christian Grothoff
30 #include "gnunet_crypto_lib.h"
31 #include "gnunet_time_lib.h"
32 #include "gnunet_peerinfo_service.h"
35 GNUNET_NETWORK_STRUCT_BEGIN
38 * Message requesting a listing of peers,
39 * restricted to the specified peer identity.
41 struct ListPeerMessage
44 * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_GET
46 struct GNUNET_MessageHeader header;
49 * Include friend only HELLOs and peers in callbacks
51 uint32_t include_friend_only GNUNET_PACKED;
54 * Restrict to peers with this identity (optional
55 * field, check header.size!).
57 struct GNUNET_PeerIdentity peer;
61 * Message requesting a listing of all peers,
62 * restricted to the specified peer identity.
64 struct ListAllPeersMessage
67 * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL
69 struct GNUNET_MessageHeader header;
72 * Include friend only HELLOs and peers in callbacks
74 uint32_t include_friend_only GNUNET_PACKED;
79 * Header for all communications.
84 * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY
86 struct GNUNET_MessageHeader header;
89 * Include friend only HELLOs and peers in callbacks
91 uint32_t include_friend_only GNUNET_PACKED;
96 * Message used to inform the client about
97 * a particular peer; this message is optionally followed
98 * by a HELLO message for the respective peer (if available).
99 * Check the header.size field to see if a HELLO is
105 * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_INFO
107 struct GNUNET_MessageHeader header;
112 uint32_t reserved GNUNET_PACKED;
115 * About which peer are we talking here?
117 struct GNUNET_PeerIdentity peer;
119 GNUNET_NETWORK_STRUCT_END
121 /*#ifndef PEERINFO_H*/
123 /* end of peerinfo.h */