1/* 2 * Copyright (c) 2007-2012, ETH Zurich. 3 * All rights reserved. 4 * 5 * This file is distributed under the terms in the attached LICENSE file. 6 * If you do not find this file, copies can be found by writing to: 7 * ETH Zurich D-INFK, Universitaetstrasse 6, CH-8092 Zurich. Attn: Systems Group. 8 */ 9 10#ifndef NET_INTERFACES_H_ 11#define NET_INTERFACES_H_ 12 13#include <stdlib.h> 14 15#include <barrelfish/barrelfish.h> 16#include <net_interfaces/flags.h> 17 18 19extern void *buffer_base; 20extern size_t buffer_size; 21extern size_t buffer_count; 22 23 24void benchmark_init(void); 25void benchmark_argument(char *arg); 26void benchmark_rx_done(size_t idx, size_t len, uint64_t more, uint64_t flags); 27void benchmark_tx_done(size_t idx); 28void benchmark_do_pending_work(void); 29 30void net_if_init(const char* cardname, uint64_t qid); 31void net_if_terminate(void); 32errval_t buffer_tx_add(size_t idx, size_t offset, size_t len, 33 size_t more_chunks, uint64_t flags); 34errval_t buffer_rx_add(size_t idx); 35void benchmark_get_mac_address(uint8_t *mac); 36uint64_t get_tx_bufferid(void); 37uint64_t get_rx_bufferid(void); 38 39#endif // ndef NET_INTERFACES_H_ 40 41