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"
36 GNUNET_NETWORK_STRUCT_BEGIN
39 * Message requesting a listing of peers,
40 * restricted to the specified peer identity.
42 struct ListPeerMessage
46 * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_GET
48 struct GNUNET_MessageHeader header;
51 * Include friend only HELLOs and peers in callbacks
53 uint32_t include_friend_only GNUNET_PACKED;
56 * Restrict to peers with this identity (optional
57 * field, check header.size!).
59 struct GNUNET_PeerIdentity peer;
64 * Message requesting a listing of all peers,
65 * restricted to the specified peer identity.
67 struct ListAllPeersMessage
70 * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_GET_ALL
72 struct GNUNET_MessageHeader header;
75 * Include friend only HELLOs and peers in callbacks
77 uint32_t include_friend_only GNUNET_PACKED;
83 * Header for all communications.
88 * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_NOTIFY
90 struct GNUNET_MessageHeader header;
93 * Include friend only HELLOs and peers in callbacks
95 uint32_t include_friend_only GNUNET_PACKED;
101 * Message used to inform the client about
102 * a particular peer; this message is optionally followed
103 * by a HELLO message for the respective peer (if available).
104 * Check the header.size field to see if a HELLO is
111 * Type will be GNUNET_MESSAGE_TYPE_PEERINFO_INFO
113 struct GNUNET_MessageHeader header;
118 uint32_t reserved GNUNET_PACKED;
121 * About which peer are we talking here?
123 struct GNUNET_PeerIdentity peer;
126 GNUNET_NETWORK_STRUCT_END
128 /*#ifndef PEERINFO_H*/
130 /* end of peerinfo.h */