author | Florian Pose <fp@igh-essen.com> |
Fri, 12 May 2006 10:12:14 +0000 | |
changeset 232 | f6594a07cdda |
parent 231 | 767548c75bf3 |
child 246 | 0bf7c769de06 |
permissions | -rw-r--r-- |
231
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
1 |
/****************************************************************************** |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
2 |
* |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
3 |
* $Id$ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
4 |
* |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
5 |
* Copyright (C) 2006 Florian Pose, Ingenieurgemeinschaft IgH |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
6 |
* |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
7 |
* This file is part of the IgH EtherCAT Master. |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
8 |
* |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
9 |
* The IgH EtherCAT Master is free software; you can redistribute it |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
10 |
* and/or modify it under the terms of the GNU General Public License |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
11 |
* as published by the Free Software Foundation; version 2 of the License. |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
12 |
* |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
13 |
* The IgH EtherCAT Master is distributed in the hope that it will be |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
14 |
* useful, but WITHOUT ANY WARRANTY; without even the implied warranty of |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
16 |
* GNU General Public License for more details. |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
17 |
* |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
18 |
* You should have received a copy of the GNU General Public License |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
19 |
* along with the IgH EtherCAT Master; if not, write to the Free Software |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
20 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
21 |
* |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
22 |
*****************************************************************************/ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
23 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
24 |
/** |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
25 |
\file |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
26 |
Network interface for debugging purposes. |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
27 |
*/ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
28 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
29 |
/*****************************************************************************/ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
30 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
31 |
#include <linux/netdevice.h> |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
32 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
33 |
/*****************************************************************************/ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
34 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
35 |
/** |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
36 |
Debugging network interface. |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
37 |
*/ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
38 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
39 |
typedef struct |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
40 |
{ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
41 |
struct net_device *dev; /**< net_device for virtual ethernet device */ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
42 |
struct net_device_stats stats; /**< device statistics */ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
43 |
uint8_t opened; /**< net_device is opened */ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
44 |
} |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
45 |
ec_debug_t; |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
46 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
47 |
/*****************************************************************************/ |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
48 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
49 |
int ec_debug_init(ec_debug_t *); |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
50 |
void ec_debug_clear(ec_debug_t *); |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
51 |
void ec_debug_send(ec_debug_t *, const uint8_t *, size_t); |
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
52 |
|
767548c75bf3
Added debug interface for network monitors.
Florian Pose <fp@igh-essen.com>
parents:
diff
changeset
|
53 |
/*****************************************************************************/ |