ethernet.h

Go to the documentation of this file.
00001 /******************************************************************************
00002  *
00003  *  $Id: ethernet.h 490 2006-08-02 12:25:25Z fp $
00004  *
00005  *  Copyright (C) 2006  Florian Pose, Ingenieurgemeinschaft IgH
00006  *
00007  *  This file is part of the IgH EtherCAT Master.
00008  *
00009  *  The IgH EtherCAT Master is free software; you can redistribute it
00010  *  and/or modify it under the terms of the GNU General Public License
00011  *  as published by the Free Software Foundation; either version 2 of the
00012  *  License, or (at your option) any later version.
00013  *
00014  *  The IgH EtherCAT Master is distributed in the hope that it will be
00015  *  useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
00016  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00017  *  GNU General Public License for more details.
00018  *
00019  *  You should have received a copy of the GNU General Public License
00020  *  along with the IgH EtherCAT Master; if not, write to the Free Software
00021  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00022  *
00023  *  The right to use EtherCAT Technology is granted and comes free of
00024  *  charge under condition of compatibility of product made by
00025  *  Licensee. People intending to distribute/sell products based on the
00026  *  code, have to sign an agreement to guarantee that products using
00027  *  software based on IgH EtherCAT master stay compatible with the actual
00028  *  EtherCAT specification (which are released themselves as an open
00029  *  standard) as the (only) precondition to have the right to use EtherCAT
00030  *  Technology, IP and trade marks.
00031  *
00032  *****************************************************************************/
00033 
00039 /*****************************************************************************/
00040 
00041 #include <linux/list.h>
00042 #include <linux/netdevice.h>
00043 
00044 #include "../include/ecrt.h"
00045 #include "globals.h"
00046 #include "slave.h"
00047 #include "datagram.h"
00048 
00049 /*****************************************************************************/
00050 
00055 typedef struct
00056 {
00057     struct list_head queue; 
00058     struct sk_buff *skb; 
00059 }
00060 ec_eoe_frame_t;
00061 
00062 /*****************************************************************************/
00063 
00064 typedef struct ec_eoe ec_eoe_t; 
00072 struct ec_eoe
00073 {
00074     struct list_head list; 
00075     ec_slave_t *slave; 
00076     ec_datagram_t datagram; 
00077     void (*state)(ec_eoe_t *); 
00078     struct net_device *dev; 
00079     struct net_device_stats stats; 
00080     unsigned int opened; 
00081     struct sk_buff *rx_skb; 
00082     off_t rx_skb_offset; 
00083     size_t rx_skb_size; 
00084     uint8_t rx_expected_fragment; 
00085     struct list_head tx_queue; 
00086     unsigned int tx_queue_active; 
00087     unsigned int tx_queued_frames; 
00088     spinlock_t tx_queue_lock; 
00089     ec_eoe_frame_t *tx_frame; 
00090     uint8_t tx_frame_number; 
00091     uint8_t tx_fragment_number; 
00092     size_t tx_offset; 
00093 };
00094 
00095 /*****************************************************************************/
00096 
00097 int ec_eoe_init(ec_eoe_t *);
00098 void ec_eoe_clear(ec_eoe_t *);
00099 void ec_eoe_run(ec_eoe_t *);
00100 unsigned int ec_eoe_active(const ec_eoe_t *);
00101 void ec_eoe_print(const ec_eoe_t *);
00102 
00103 /*****************************************************************************/

Generated on Wed Aug 2 18:41:43 2006 for IgH EtherCAT master by  doxygen 1.4.6