GNUnet  0.11.x
Functions
cadet_api_drop_message.c File Reference

cadet api: client implementation of cadet service More...

#include "platform.h"
#include "cadet.h"
Include dependency graph for cadet_api_drop_message.c:

Go to the source code of this file.

Functions

void GNUNET_CADET_drop_message (struct GNUNET_MQ_Handle *mq, struct GNUNET_CADET_ClientChannelNumber ccn, uint16_t type)
 Drop the next cadet message of a given type. More...
 

Detailed Description

cadet api: client implementation of cadet service

Author
t3sserakt

Definition in file cadet_api_drop_message.c.

Function Documentation

◆ GNUNET_CADET_drop_message()

void GNUNET_CADET_drop_message ( struct GNUNET_MQ_Handle mq,
struct GNUNET_CADET_ClientChannelNumber  ccn,
uint16_t  type 
)

Drop the next cadet message of a given type.

Parameters
mqmessage queue
ccnclient channel number.
typeof cadet message to be dropped.

Definition at line 37 of file cadet_api_drop_message.c.

References GNUNET_CADET_RequestDropCadetMessage::ccn, env, GNUNET_ERROR_TYPE_INFO, GNUNET_log, GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY, GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE, GNUNET_MQ_msg, GNUNET_MQ_send(), type, and GNUNET_CADET_RequestDropCadetMessage::type.

40 {
42  struct GNUNET_MQ_Envelope *env;
43 
45 
46  message->ccn = ccn;
47  message->type = type;
48 
50  "Dropping message for channel of type %s (%d)\n", type ==
52  "GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY" : "UNKNOWN", type);
53 
54  GNUNET_MQ_send (mq, env);
55 
56 }
#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY
Ask the cadet service to destroy a channel.
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
Definition: gnunet_mq_lib.h:67
uint16_t type
Type of the message this handler covers, in host byte order.
Definition: cadet.h:332
struct GNUNET_CADET_ClientChannelNumber ccn
ID of the channel we want to drop a message for.
Definition: cadet.h:337
#define GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE
Request to drop a message of type X to peer y.
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
#define GNUNET_log(kind,...)
enum GNUNET_TESTBED_UnderlayLinkModelType type
the type of this model
void GNUNET_MQ_send(struct GNUNET_MQ_Handle *mq, struct GNUNET_MQ_Envelope *ev)
Send a message with the given message queue.
Definition: mq.c:355
Message to drop another message of specific type.
Definition: cadet.h:321
Here is the call graph for this function: