1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/boardsupport/emulator/emulatorbsp/wpdpack/include/count_packets.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,62 @@
1.4 +/*
1.5 + * Copyright (c) 2001 - 2003
1.6 + * NetGroup, Politecnico di Torino (Italy)
1.7 + * All rights reserved.
1.8 + *
1.9 + * Redistribution and use in source and binary forms, with or without
1.10 + * modification, are permitted provided that the following conditions
1.11 + * are met:
1.12 + *
1.13 + * 1. Redistributions of source code must retain the above copyright
1.14 + * notice, this list of conditions and the following disclaimer.
1.15 + * 2. Redistributions in binary form must reproduce the above copyright
1.16 + * notice, this list of conditions and the following disclaimer in the
1.17 + * documentation and/or other materials provided with the distribution.
1.18 + * 3. Neither the name of the Politecnico di Torino nor the names of its
1.19 + * contributors may be used to endorse or promote products derived from
1.20 + * this software without specific prior written permission.
1.21 + *
1.22 + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
1.23 + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
1.24 + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
1.25 + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
1.26 + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
1.27 + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
1.28 + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
1.29 + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
1.30 + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
1.31 + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
1.32 + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
1.33 + *
1.34 + */
1.35 +
1.36 +#ifndef __count_packets
1.37 +#define __count_packets
1.38 +
1.39 +#ifdef WIN32
1.40 +#include "tme.h"
1.41 +#endif
1.42 +
1.43 +#ifdef __FreeBSD__
1.44 +
1.45 +#ifdef _KERNEL
1.46 +#include <net/tme/tme.h>
1.47 +#else
1.48 +#include <tme/tme.h>
1.49 +#endif
1.50 +
1.51 +#endif
1.52 +
1.53 +typedef struct __c_p_data
1.54 +{
1.55 + struct timeval timestamp;
1.56 + uint64 packets;
1.57 + uint64 bytes;
1.58 +}
1.59 + c_p_data;
1.60 +
1.61 +#define COUNT_PACKETS 0x00000000
1.62 +uint32 count_packets(uint8 *block, uint32 pkt_size, TME_DATA *data, MEM_TYPE *mem_ex, uint8 *mem_data);
1.63 +
1.64 +#endif
1.65 +