GNUnet 0.22.0
cadet_api_drop_message.c
Go to the documentation of this file.
1/*
2 This file is part of GNUnet.
3 Copyright (C) 2011, 2017, 2019 GNUnet e.V.
4
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.
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 Affero General Public License for more details.
14
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/>.
17
18 SPDX-License-Identifier: AGPL3.0-or-later
19*/
25#include "platform.h"
26#include "cadet.h"
27
35static void
38 uint16_t type)
39{
41 struct GNUNET_MQ_Envelope *env;
42
44
45 message->ccn = ccn;
46 message->type = type;
47
49 "Dropping message for channel of type %s (%d)\n", type ==
51 "GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY" : "UNKNOWN", type);
52
54
55}
56
57
58/* end of cadet_api_drop_message.c */
struct GNUNET_MQ_Handle * mq
Definition: 003.c:5
struct GNUNET_MQ_Envelope * env
Definition: 005.c:1
static 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.
static uint32_t type
Type string converted to DNS type value.
#define GNUNET_log(kind,...)
@ GNUNET_ERROR_TYPE_INFO
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:305
#define GNUNET_MQ_msg(mvar, type)
Allocate a GNUNET_MQ_Envelope.
Definition: gnunet_mq_lib.h:78
#define GNUNET_MESSAGE_TYPE_CADET_DROP_CADET_MESSAGE
Request to drop a message of type X to peer y.
#define GNUNET_MESSAGE_TYPE_CADET_CHANNEL_DESTROY
Ask the cadet service to destroy a channel.
Number uniquely identifying a channel of a client.
Definition: cadet.h:101
Message to drop another message of specific type.
Definition: cadet.h:321
struct GNUNET_CADET_ClientChannelNumber ccn
ID of the channel we want to drop a message for.
Definition: cadet.h:336
uint16_t type
Type of the message this handler covers, in host byte order.
Definition: cadet.h:331
Handle to a message queue.
Definition: mq.c:87