GNUnet 0.22.2
rps.h File Reference

example IPC messages between RPS API and GNS service More...

Include dependency graph for rps.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  GNUNET_RPS_P2P_PullReplyMessage
 P2P Message to send PeerIDs to other peer. More...
 
struct  GNUNET_RPS_CS_SeedMessage
 Message from client to service with seed of peers. More...
 
struct  GNUNET_RPS_CS_SubStartMessage
 Message from client to service telling it to start a new sub. More...
 
struct  GNUNET_RPS_CS_SubStopMessage
 Message from client to service telling it to stop a new sub. More...
 
struct  GNUNET_RPS_CS_DEBUG_ViewRequest
 Message from client to service indicating that clients wants to get updates of the view. More...
 
struct  GNUNET_RPS_CS_DEBUG_ViewReply
 Message from service to client containing current update of view. More...
 
struct  GNUNET_RPS_CS_DEBUG_StreamRequest
 Message from client to service indicating that clients wants to get stream of biased peers. More...
 
struct  GNUNET_RPS_CS_DEBUG_StreamReply
 Message from service to client containing peer from biased stream. More...
 

Macros

#define GNUNET_RPS_CADET_PORT   31337
 Mesh port used by RPS. More...
 

Typedefs

typedef void(* PeerOp) (void *cls, const struct GNUNET_PeerIdentity *peer)
 Functions of this type can be used to be stored at a peer for later execution. More...
 
typedef int(* PeersIterator) (void *cls, const struct GNUNET_PeerIdentity *peer)
 Iterator over valid peers. More...
 

Enumerations

enum  Peers_PeerFlags { Peers_PULL_REPLY_PENDING = 0x01 , Peers_ONLINE = 0x20 , Peers_TO_DESTROY = 0x40 }
 Different flags indicating the status of another peer. More...
 
enum  Peers_ChannelFlags { Peers_CHANNEL_ESTABLISHED_TWICE = 0x1 , Peers_CHANNEL_CLEAN = 0x2 , Peers_CHANNEL_DESTROING = 0x4 }
 Keep track of the status of a channel. More...
 
enum  Peers_ChannelRole { Peers_CHANNEL_ROLE_SENDING = 0x01 , Peers_CHANNEL_ROLE_RECEIVING = 0x02 }
 The role of a channel. More...
 

Variables

struct GNUNET_STATISTICS_Handlestats
 Handle to the statistics service. More...
 

Detailed Description

example IPC messages between RPS API and GNS service

Author
Julius Bünger

Definition in file rps.h.

Macro Definition Documentation

◆ GNUNET_RPS_CADET_PORT

#define GNUNET_RPS_CADET_PORT   31337

Mesh port used by RPS.

Definition at line 31 of file rps.h.

Typedef Documentation

◆ PeerOp

typedef void(* PeerOp) (void *cls, const struct GNUNET_PeerIdentity *peer)

Functions of this type can be used to be stored at a peer for later execution.

Parameters
clsclosure
peerpeer to execute function on

Definition at line 317 of file rps.h.

◆ PeersIterator

typedef int(* PeersIterator) (void *cls, const struct GNUNET_PeerIdentity *peer)

Iterator over valid peers.

Parameters
clsclosure
peercurrent public peer id
Returns
GNUNET_YES if we should continue to iterate, GNUNET_NO if not.

Definition at line 328 of file rps.h.

Enumeration Type Documentation

◆ Peers_PeerFlags

Different flags indicating the status of another peer.

Enumerator
Peers_PULL_REPLY_PENDING 

If we are waiting for a reply from that peer (sent a pull request).

Peers_ONLINE 

We set this bit when we know the peer is online.

Peers_TO_DESTROY 

We set this bit when we are going to destroy the channel to this peer.

When cleanup_channel is called, we know that we wanted to destroy it. Otherwise the channel to the other peer was destroyed.

Definition at line 245 of file rps.h.

246{
251
252 /* IN_OTHER_GOSSIP_LIST = 0x02, unneeded? */
253 /* IN_OWN_SAMPLER_LIST = 0x04, unneeded? */
254 /* IN_OWN_GOSSIP_LIST = 0x08, unneeded? */
255
259 Peers_ONLINE = 0x20,
260
266 Peers_TO_DESTROY = 0x40,
267};
@ Peers_TO_DESTROY
We set this bit when we are going to destroy the channel to this peer.
Definition: rps.h:266
@ Peers_ONLINE
We set this bit when we know the peer is online.
Definition: rps.h:259
@ Peers_PULL_REPLY_PENDING
If we are waiting for a reply from that peer (sent a pull request).
Definition: rps.h:250

◆ Peers_ChannelFlags

Keep track of the status of a channel.

This is needed in order to know what to do with a channel when it's destroyed.

Enumerator
Peers_CHANNEL_ESTABLISHED_TWICE 

We destroyed the channel because the other peer established a second one.

Peers_CHANNEL_CLEAN 

The channel was removed because it was not needed any more.

This should be the sending channel.

Peers_CHANNEL_DESTROING 

We destroyed the channel because the other peer established a second one.

Definition at line 275 of file rps.h.

276{
281
287
292};
@ Peers_CHANNEL_CLEAN
The channel was removed because it was not needed any more.
Definition: rps.h:286
@ Peers_CHANNEL_DESTROING
We destroyed the channel because the other peer established a second one.
Definition: rps.h:291
@ Peers_CHANNEL_ESTABLISHED_TWICE
We destroyed the channel because the other peer established a second one.
Definition: rps.h:280

◆ Peers_ChannelRole

The role of a channel.

Sending or receiving.

Enumerator
Peers_CHANNEL_ROLE_SENDING 

Channel is used for sending.

Peers_CHANNEL_ROLE_RECEIVING 

Channel is used for receiving.

Definition at line 298 of file rps.h.

299{
304
309};
@ Peers_CHANNEL_ROLE_RECEIVING
Channel is used for receiving.
Definition: rps.h:308
@ Peers_CHANNEL_ROLE_SENDING
Channel is used for sending.
Definition: rps.h:303

Variable Documentation

◆ stats

struct GNUNET_STATISTICS_Handle* stats
extern

Handle to the statistics service.

Definition at line 462 of file gnunet-service-rps.c.