1 /* Copyright (c) 2012-2021. The SimGrid Team.
2 * All rights reserved. */
4 /* This program is free software; you can redistribute it and/or modify it
5 * under the terms of the license (GNU LGPL) which comes with this package. */
10 kademlia_message_t new_message(unsigned int sender_id, unsigned int destination_id, answer_t answer,
11 sg_mailbox_t mailbox, const char* hostname)
13 kademlia_message_t msg = xbt_new(s_kademlia_message_t, 1);
15 msg->sender_id = sender_id;
16 msg->destination_id = destination_id;
18 msg->answer_to = mailbox;
19 msg->issuer_host_name = hostname;
24 void free_message(void* message)
26 const kademlia_message_t msg = (kademlia_message_t)message;
28 answer_free(msg->answer);