static int fp_priority(struct filter_node *filter, struct pico_frame *f) { /* TODO do priority-stuff */ IGNORE_PARAMETER(filter); IGNORE_PARAMETER(f); return 0; }
static int pico_icmp4_process_out(struct pico_protocol *self, struct pico_frame *f) { IGNORE_PARAMETER(self); IGNORE_PARAMETER(f); dbg("Called %s\n", __FUNCTION__); return 0; }
uint32_t pico_timer_add(pico_time expire, void (*timer)(pico_time, void *), void *arg) { IGNORE_PARAMETER(expire); IGNORE_PARAMETER(timer); IGNORE_PARAMETER(arg); return NULL; }
void dns_sd_claimed_callback( pico_mdns_rtree *tree, char *str, void *arg ) { printf("DONE - Registering DNS-SD Service\n"); IGNORE_PARAMETER(tree); IGNORE_PARAMETER(str); IGNORE_PARAMETER(arg); }
static int pico_icmp4_process_in(struct pico_protocol *self, struct pico_frame *f) { struct pico_icmp4_hdr *hdr = (struct pico_icmp4_hdr *) f->transport_hdr; IGNORE_PARAMETER(self); if (hdr->type == PICO_ICMP_ECHO) { hdr->type = PICO_ICMP_ECHOREPLY; /* outgoing frames require a f->len without the ethernet header len */ if (f->dev->eth) f->len -= PICO_SIZE_ETHHDR; pico_icmp4_checksum(f); pico_ipv4_rebound(f); } else if (hdr->type == PICO_ICMP_UNREACH) { f->net_hdr = f->transport_hdr + PICO_ICMPHDR_UN_SIZE; pico_ipv4_unreachable(f, hdr->code); } else if (hdr->type == PICO_ICMP_ECHOREPLY) { #ifdef PICO_SUPPORT_PING ping_recv_reply(f); #endif pico_frame_discard(f); } else { pico_frame_discard(f); } return 0; }
static void pico_dns_client_retransmission(pico_time now, void *arg) { struct pico_dns_query *q = NULL; struct pico_dns_query dummy; IGNORE_PARAMETER(now); if(!arg) return; /* search for the dns query and free used space */ dummy.id = *(uint16_t *)arg; q = (struct pico_dns_query *)pico_tree_findKey(&DNSTable, &dummy); PICO_FREE(arg); /* dns query successful? */ if (!q) { return; } if (q->retrans++ <= PICO_DNS_CLIENT_MAX_RETRANS) { q->q_ns = pico_dns_client_next_ns(&q->q_ns.ns); pico_dns_client_send(q); } else { pico_err = PICO_ERR_EIO; q->callback(NULL, q->arg); pico_dns_client_del_query(q->id); } }
static int fp_drop(struct filter_node *filter, struct pico_frame *f) { IGNORE_PARAMETER(filter); ipf_dbg("ipfilter> drop\n"); pico_frame_discard(f); return 1; }
void callback( pico_mdns_rtree *tree, char *str, void *arg ) { kv_vector vector = { 0 }; /* This doesn't even gets called, tests exit before possible callback */ IGNORE_PARAMETER(str); IGNORE_PARAMETER(arg); IGNORE_PARAMETER(tree); fail_unless(pico_dns_sd_register_service("Hello World!", "_kerberos._udp", 88, &vector, 120, callback, NULL) == 0, "dns_sd_register_service failed!\n"); }
static int fp_reject(struct filter_node *filter, struct pico_frame *f) { /* TODO check first if sender is pico itself or not */ IGNORE_PARAMETER(filter); ipf_dbg("ipfilter> reject\n"); (void)pico_icmp4_packet_filtered(f); pico_frame_discard(f); return 1; }
static int http_redirect_response(int accept_socket, HTTP_RECV_INFO *http_recv_info, char *location) { IGNORE_PARAMETER(http_recv_info); char buffer[FILENAME_MAX]; snprintf(buffer, sizeof(buffer),"HTTP/1.1 301 Found\r\n" "Location: %s\r\n" "\r\n", location ); send( accept_socket , buffer , strlen( buffer ) + 1 , 0 ); debug_log_output("Redirect to %s",location); return 0; }
void dns_sd_init_callback( pico_mdns_rtree *tree, char *str, void *arg ) { PICO_DNS_SD_KV_VECTOR_DECLARE(key_value_pair_vector); IGNORE_PARAMETER(str); IGNORE_PARAMETER(arg); IGNORE_PARAMETER(tree); pico_dns_sd_kv_vector_add(&key_value_pair_vector, "key", "value"); printf("DONE - Initialising DNS Service Discovery module.\n"); if (pico_dns_sd_register_service(service_name, "_http._tcp", 80, &key_value_pair_vector, TTL, dns_sd_claimed_callback, NULL) < 0) { printf("Registering service failed!\n"); } fully_initialized = 1; }
static void next_ping(uint32_t now, void *arg) { struct pico_icmp4_ping_cookie *newcookie, *cookie = (struct pico_icmp4_ping_cookie *)arg; IGNORE_PARAMETER(now); if(pico_tree_findKey(&Pings,cookie)){ if (cookie->seq < cookie->count) { newcookie = pico_zalloc(sizeof(struct pico_icmp4_ping_cookie)); if (!newcookie) return; memcpy(newcookie, cookie, sizeof(struct pico_icmp4_ping_cookie)); newcookie->seq++; pico_tree_insert(&Pings,newcookie); send_ping(newcookie); } } }
static void ping_timeout(uint32_t now, void *arg) { struct pico_icmp4_ping_cookie *cookie = (struct pico_icmp4_ping_cookie *)arg; IGNORE_PARAMETER(now); if(pico_tree_findKey(&Pings,cookie)){ if (cookie->err == PICO_PING_ERR_PENDING) { struct pico_icmp4_stats stats; stats.dst = cookie->dst; stats.seq = cookie->seq; stats.time = 0; stats.size = cookie->size; stats.err = PICO_PING_ERR_TIMEOUT; dbg(" ---- Ping timeout!!!\n"); cookie->cb(&stats); } pico_tree_delete(&Pings,cookie); pico_free(cookie); } }
int mock_callback(struct mld_timer *t) { IGNORE_PARAMETER(t); return 0; }
bool CConsole::ExecuteString(const char* command) { // TODO: implement IGNORE_PARAMETER(command); return false; }
static inline int pico_ipv4_crc_check(struct pico_frame *f) { IGNORE_PARAMETER(f); return 1; }
/* Used in pico_sntp_cleanup */ void pico_timer_cancel(uint32_t t) { IGNORE_PARAMETER(t); }