static void
core_startup (void *cls,
- struct GNUNET_CORE_Handle *core,
+ struct GNUNET_CORE_Handle *core __attribute__((unused)),
const struct GNUNET_PeerIdentity *my_identity,
- const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey)
+ const struct GNUNET_CRYPTO_RsaPublicKeyBinaryEncoded *publicKey __attribute__((unused)))
{
struct GNUNET_MESH_Handle *handle = cls;
memcpy (&handle->myself, my_identity, sizeof (struct GNUNET_PeerIdentity));
struct
GNUNET_TIME_Relative
maxdelay,
- const struct GNUNET_PeerIdentity *target,
+ const struct GNUNET_PeerIdentity *target __attribute__((unused)),
size_t
notify_size,
GNUNET_CONNECTION_TransmitReadyNotify
* Function that frees everything from a hashmap
*/
static int
-free_iterate(void* cls, const GNUNET_HashCode* hash, void* value)
+free_iterate(void* cls __attribute__((unused)), const GNUNET_HashCode* hash __attribute__((unused)), void* value)
{
GNUNET_free(value);
return GNUNET_YES;
* Function scheduled as very last function, cleans up after us
*/
static void
-cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx) {
+cleanup(void* cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext* tskctx) {
GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
GNUNET_CONTAINER_multihashmap_iterate(udp_connections,
* Receive packets from the helper-process
*/
static void
-message_token (void *cls,
- void *client, const struct GNUNET_MessageHeader *message)
+message_token (void *cls __attribute__((unused)),
+ void *client __attribute__((unused)), const struct GNUNET_MessageHeader *message)
{
GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER);
* "OFFERED-PORT:HOSTNAME:HOST-PORT" (SPACE <more of those>)*
*/
static void
-read_service_conf (void *cls, const char *section, const char *option,
+read_service_conf (void *cls __attribute__((unused)), const char *section, const char *option,
const char *value)
{
char *cpy;
* The messages are one GNUNET_HashCode for the service followed by a struct tcp_pkt
*/
static int
-receive_tcp_service (void *cls,
+receive_tcp_service (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender __attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Received TCP-Packet\n");
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
}
static int
-receive_tcp_remote (void *cls,
+receive_tcp_remote (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender __attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
}
static int
-receive_udp_remote (void *cls,
+receive_udp_remote (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender __attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
* The messages are one GNUNET_HashCode for the service, followed by a struct udp_pkt
*/
static int
-receive_udp_service (void *cls,
+receive_udp_service (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender __attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct udp_pkt *pkt = (struct udp_pkt *) (desc + 1);
*/
static void
run (void *cls,
- char *const *args,
- const char *cfgfile, const struct GNUNET_CONFIGURATION_Handle *cfg_)
+ char *const *args __attribute__((unused)),
+ const char *cfgfile __attribute__((unused)), const struct GNUNET_CONFIGURATION_Handle *cfg_)
{
static const struct GNUNET_MESH_MessageHandler handlers[] = {
{receive_udp_service, GNUNET_MESSAGE_TYPE_SERVICE_UDP, 0},
* {{{
*/
size_t
-send_query(void* cls, size_t size, void* buf) {
+send_query(void* cls __attribute__((unused)), size_t size, void* buf) {
size_t len;
/*
* Send the rehijack-message
* Connect to the service-dns
*/
void
-connect_to_service_dns (void *cls,
+connect_to_service_dns (void *cls __attribute__((unused)),
const struct GNUNET_SCHEDULER_TaskContext *tc) {
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
* handle it
*/
void
-dns_answer_handler(void* cls, const struct GNUNET_MessageHeader *msg) {
+dns_answer_handler(void* cls __attribute__((unused)), const struct GNUNET_MessageHeader *msg) {
/* the service disconnected, reconnect after short wait */
if (msg == NULL)
{
* Send an dns-answer-packet to the helper
*/
void
-helper_write(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tsdkctx) {
+helper_write(void* cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext* tsdkctx) {
if (tsdkctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN)
return;
* Receive packets from the helper-process
*/
void
-message_token (void *cls,
- void *client, const struct GNUNET_MessageHeader *message)
+message_token (void *cls __attribute__((unused)),
+ void *client __attribute__((unused)), const struct GNUNET_MessageHeader *message)
{
GNUNET_assert (ntohs (message->type) == GNUNET_MESSAGE_TYPE_VPN_HELPER);
*{{{
*/
static void
-cleanup(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tskctx) {
+cleanup(void* cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext* tskctx) {
GNUNET_assert (0 != (tskctx->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
/* stop the helper */
}
static void
-collect_mappings(void* cls, const struct GNUNET_SCHEDULER_TaskContext* tc) {
+collect_mappings(void* cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext* tc) {
if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
return;
void
send_icmp_response(void* cls, const struct GNUNET_SCHEDULER_TaskContext *tc) {
+ if ( (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN) != 0)
+ return;
+
struct ip6_icmp* request = cls;
struct ip6_icmp* response = alloca(ntohs(request->shdr.size));
void
send_pkt_to_peer (void *cls,
const struct GNUNET_PeerIdentity *peer,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
/* peer == NULL means that all peers in this request are connected */
if (peer == NULL) return;
}
static int
-receive_udp_back (void *cls, struct GNUNET_MESH_Tunnel* tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+receive_udp_back (void *cls __attribute__((unused)), struct GNUNET_MESH_Tunnel* tunnel,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender __attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct remote_addr* s = (struct remote_addr*)desc;
}
static int
-receive_tcp_back (void *cls, struct GNUNET_MESH_Tunnel* tunnel,
- void **tunnel_ctx,
- const struct GNUNET_PeerIdentity *sender,
+receive_tcp_back (void *cls __attribute__((unused)), struct GNUNET_MESH_Tunnel* tunnel,
+ void **tunnel_ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender __attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
GNUNET_HashCode *desc = (GNUNET_HashCode *) (message + 1);
struct remote_addr* s = (struct remote_addr*)desc;
*/
static void
run (void *cls,
- char *const *args,
- const char *cfgfile,
+ char *const *args __attribute__((unused)),
+ const char *cfgfilep __attribute__((unused)),
const struct GNUNET_CONFIGURATION_Handle *cfg_)
{
static const struct GNUNET_MESH_MessageHandler handlers[] = {
* Hijack all outgoing DNS-Traffic but for traffic leaving "our" port.
*/
static void
-hijack (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+hijack (void *cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext *tc)
{
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))
return;
}
-void mesh_connect (void* cls, const struct GNUNET_PeerIdentity* peer, const struct GNUNET_TRANSPORT_ATS_Information *atsi) {
+void mesh_connect (void* cls, const struct GNUNET_PeerIdentity* peer, const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused))) {
GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Connected to peer %x\n", *((unsigned long*)peer));
struct tunnel_cls *cls_ = (struct tunnel_cls*)cls;
}
static int
-receive_mesh_query (void *cls,
+receive_mesh_query (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender __attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
struct dns_pkt *dns = (struct dns_pkt*)(message + 1);
}
static int
-receive_mesh_answer (void *cls,
+receive_mesh_answer (void *cls __attribute__((unused)),
struct GNUNET_MESH_Tunnel *tunnel,
- void **ctx,
- const struct GNUNET_PeerIdentity *sender,
+ void **ctx __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *sender __attribute__((unused)),
const struct GNUNET_MessageHeader *message,
- const struct GNUNET_TRANSPORT_ATS_Information *atsi)
+ const struct GNUNET_TRANSPORT_ATS_Information *atsi __attribute__((unused)))
{
/* TODo: size check */
struct dns_pkt *dns = (struct dns_pkt *) (message + 1);
*/
static void
receive_dht(void *cls,
- struct GNUNET_TIME_Absolute exp,
- const GNUNET_HashCode *key,
- const struct GNUNET_PeerIdentity *const *get_path,
- const struct GNUNET_PeerIdentity *const *put_path,
+ struct GNUNET_TIME_Absolute exp __attribute__((unused)),
+ const GNUNET_HashCode *key __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *const *get_path __attribute__((unused)),
+ const struct GNUNET_PeerIdentity *const *put_path __attribute__((unused)),
enum GNUNET_BLOCK_Type type,
size_t size,
const void *data) {
* This receives a GNUNET_MESSAGE_TYPE_REHIJACK and rehijacks the DNS
*/
static void
-rehijack(void *cls,
+rehijack(void *cls __attribute__((unused)),
struct GNUNET_SERVER_Client *client,
- const struct GNUNET_MessageHeader *message) {
+ const struct GNUNET_MessageHeader *message __attribute__((unused))) {
unhijack(dnsoutport);
GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_SECONDS, hijack, NULL);
* This receives the dns-payload from the daemon-vpn and sends it on over the udp-socket
*/
static void
-receive_query(void *cls,
+receive_query(void *cls __attribute__((unused)),
struct GNUNET_SERVER_Client *client,
const struct GNUNET_MessageHeader *message) {
struct query_packet* pkt = (struct query_packet*)message;
* Read a response-packet of the UDP-Socket
*/
static void
-read_response (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
+read_response (void *cls __attribute__((unused)), const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct sockaddr_in addr;
socklen_t addrlen = sizeof (addr);
* @param tc unused
*/
static void
-cleanup_task (void *cls,
+cleanup_task (void *cls __attribute__((unused)),
const struct GNUNET_SCHEDULER_TaskContext *tc)
{
GNUNET_assert(0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN));
* @param section the current section
*/
void
-publish_iterate (void *cls, const char *section)
+publish_iterate (void *cls __attribute__((unused)), const char *section)
{
char *udp_redirects, *tcp_redirects, *alternative_names, *alternative_name,
*keyfile;
* Publish a DNS-record in the DHT. This is up to now just for testing.
*/
static void
-publish_names (void *cls,
+publish_names (void *cls __attribute__((unused)),
const struct GNUNET_SCHEDULER_TaskContext *tc) {
char *services;
if (0 != (tc->reason & GNUNET_SCHEDULER_REASON_SHUTDOWN))