master/eoe_request.h
changeset 2597 0e145bb05859
equal deleted inserted replaced
2596:d71acfbd7319 2597:0e145bb05859
       
     1 /******************************************************************************
       
     2  *
       
     3  *  $Id$
       
     4  *
       
     5  *  Copyright (C) 2006-2014  Florian Pose, Ingenieurgemeinschaft IgH
       
     6  *
       
     7  *  This file is part of the IgH EtherCAT Master.
       
     8  *
       
     9  *  The IgH EtherCAT Master is free software; you can redistribute it and/or
       
    10  *  modify it under the terms of the GNU General Public License version 2, as
       
    11  *  published by the Free Software Foundation.
       
    12  *
       
    13  *  The IgH EtherCAT Master is distributed in the hope that it will be useful,
       
    14  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
       
    15  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General
       
    16  *  Public License for more details.
       
    17  *
       
    18  *  You should have received a copy of the GNU General Public License along
       
    19  *  with the IgH EtherCAT Master; if not, write to the Free Software
       
    20  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
       
    21  *
       
    22  *  ---
       
    23  *
       
    24  *  The license mentioned above concerns the source code only. Using the
       
    25  *  EtherCAT technology and brand is only permitted in compliance with the
       
    26  *  industrial property and similar rights of Beckhoff Automation GmbH.
       
    27  *
       
    28  *****************************************************************************/
       
    29 
       
    30 /**
       
    31    \file
       
    32    EtherCAT EoE request structure.
       
    33 */
       
    34 
       
    35 /*****************************************************************************/
       
    36 
       
    37 #ifndef __EC_EOE_REQUEST_H__
       
    38 #define __EC_EOE_REQUEST_H__
       
    39 
       
    40 #include <linux/list.h>
       
    41 #include <linux/etherdevice.h> // ETH_ALEN
       
    42 
       
    43 #include "globals.h"
       
    44 
       
    45 /*****************************************************************************/
       
    46 
       
    47 /** Ethernet-over-EtherCAT set IP parameter request.
       
    48  */
       
    49 typedef struct {
       
    50     struct list_head list; /**< List item. */
       
    51     ec_internal_request_state_t state; /**< Request state. */
       
    52     unsigned long jiffies_sent; /**< Jiffies, when the request was sent. */
       
    53 
       
    54     uint8_t mac_address_included;
       
    55     uint8_t ip_address_included;
       
    56     uint8_t subnet_mask_included;
       
    57     uint8_t gateway_included;
       
    58     uint8_t dns_included;
       
    59     uint8_t name_included;
       
    60 
       
    61     unsigned char mac_address[ETH_ALEN];
       
    62     uint32_t ip_address;
       
    63     uint32_t subnet_mask;
       
    64     uint32_t gateway;
       
    65     uint32_t dns;
       
    66     char name[EC_MAX_HOSTNAME_SIZE];
       
    67 
       
    68     uint16_t result;
       
    69 } ec_eoe_request_t;
       
    70 
       
    71 /*****************************************************************************/
       
    72 
       
    73 void ec_eoe_request_init(ec_eoe_request_t *);
       
    74 
       
    75 /*****************************************************************************/
       
    76 
       
    77 #endif