fp@231: /****************************************************************************** fp@231: * fp@231: * $Id$ fp@231: * fp@1326: * Copyright (C) 2006-2008 Florian Pose, Ingenieurgemeinschaft IgH fp@231: * fp@231: * This file is part of the IgH EtherCAT Master. fp@231: * fp@1326: * The IgH EtherCAT Master is free software; you can redistribute it and/or fp@1326: * modify it under the terms of the GNU General Public License version 2, as fp@1326: * published by the Free Software Foundation. fp@231: * fp@1326: * The IgH EtherCAT Master is distributed in the hope that it will be useful, fp@1326: * but WITHOUT ANY WARRANTY; without even the implied warranty of fp@1326: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General fp@1326: * Public License for more details. fp@231: * fp@1326: * You should have received a copy of the GNU General Public License along fp@1326: * with the IgH EtherCAT Master; if not, write to the Free Software fp@231: * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA fp@231: * fp@1363: * --- fp@1363: * fp@1363: * The license mentioned above concerns the source code only. Using the fp@1363: * EtherCAT technology and brand is only permitted in compliance with the fp@1363: * industrial property and similar rights of Beckhoff Automation GmbH. fp@246: * fp@231: *****************************************************************************/ fp@231: fp@231: /** fp@231: \file fp@231: Network interface for debugging purposes. fp@231: */ fp@231: fp@231: /*****************************************************************************/ fp@231: fp@1921: #ifndef __EC_DEBUG_H__ fp@1921: #define __EC_DEBUG_H__ fp@1921: fp@1921: #include "../devices/ecdev.h" fp@231: fp@231: /*****************************************************************************/ fp@231: fp@1921: /** Debugging network interface. fp@1921: */ fp@231: typedef struct fp@231: { fp@1921: ec_device_t *device; /**< Parent device. */ fp@231: struct net_device *dev; /**< net_device for virtual ethernet device */ fp@231: struct net_device_stats stats; /**< device statistics */ fp@1305: uint8_t registered; /**< net_device is opened */ fp@231: uint8_t opened; /**< net_device is opened */ fp@231: } fp@231: ec_debug_t; fp@231: fp@231: /*****************************************************************************/ fp@231: fp@1921: int ec_debug_init(ec_debug_t *, ec_device_t *, const char *); fp@231: void ec_debug_clear(ec_debug_t *); fp@1305: void ec_debug_register(ec_debug_t *, const struct net_device *); fp@1305: void ec_debug_unregister(ec_debug_t *); fp@231: void ec_debug_send(ec_debug_t *, const uint8_t *, size_t); fp@231: fp@1921: #endif fp@1921: fp@231: /*****************************************************************************/