master/debug.h
changeset 1989 6aa393418fb3
parent 1921 d9cf40facbc4
equal deleted inserted replaced
1988:ea38efeeb7b3 1989:6aa393418fb3
    32    Network interface for debugging purposes.
    32    Network interface for debugging purposes.
    33 */
    33 */
    34 
    34 
    35 /*****************************************************************************/
    35 /*****************************************************************************/
    36 
    36 
    37 #include <linux/netdevice.h>
    37 #ifndef __EC_DEBUG_H__
       
    38 #define __EC_DEBUG_H__
       
    39 
       
    40 #include "../devices/ecdev.h"
    38 
    41 
    39 /*****************************************************************************/
    42 /*****************************************************************************/
    40 
    43 
    41 /**
    44 /** Debugging network interface.
    42    Debugging network interface.
    45  */
    43 */
       
    44 
       
    45 typedef struct
    46 typedef struct
    46 {
    47 {
       
    48     ec_device_t *device; /**< Parent device. */
    47     struct net_device *dev; /**< net_device for virtual ethernet device */
    49     struct net_device *dev; /**< net_device for virtual ethernet device */
    48     struct net_device_stats stats; /**< device statistics */
    50     struct net_device_stats stats; /**< device statistics */
    49     uint8_t registered; /**< net_device is opened */
    51     uint8_t registered; /**< net_device is opened */
    50     uint8_t opened; /**< net_device is opened */
    52     uint8_t opened; /**< net_device is opened */
    51 }
    53 }
    52 ec_debug_t;
    54 ec_debug_t;
    53 
    55 
    54 /*****************************************************************************/
    56 /*****************************************************************************/
    55 
    57 
    56 int ec_debug_init(ec_debug_t *, const char *);
    58 int ec_debug_init(ec_debug_t *, ec_device_t *, const char *);
    57 void ec_debug_clear(ec_debug_t *);
    59 void ec_debug_clear(ec_debug_t *);
    58 void ec_debug_register(ec_debug_t *, const struct net_device *);
    60 void ec_debug_register(ec_debug_t *, const struct net_device *);
    59 void ec_debug_unregister(ec_debug_t *);
    61 void ec_debug_unregister(ec_debug_t *);
    60 void ec_debug_send(ec_debug_t *, const uint8_t *, size_t);
    62 void ec_debug_send(ec_debug_t *, const uint8_t *, size_t);
    61 
    63 
       
    64 #endif
       
    65 
    62 /*****************************************************************************/
    66 /*****************************************************************************/