IgH EtherCAT Master  1.5.2
eoe_request.c
Go to the documentation of this file.
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 
34 /*****************************************************************************/
35 
36 #include <linux/module.h>
37 #include <linux/jiffies.h>
38 #include <linux/slab.h>
39 
40 #include "eoe_request.h"
41 
42 /*****************************************************************************/
43 
47  ec_eoe_request_t *req
48  )
49 {
50  INIT_LIST_HEAD(&req->list);
51  req->state = EC_INT_REQUEST_INIT;
52  req->jiffies_sent = 0U;
53 
54  req->mac_address_included = 0;
55  req->ip_address_included = 0;
56  req->subnet_mask_included = 0;
57  req->gateway_included = 0;
58  req->dns_included = 0;
59  req->name_included = 0;
60 
61  memset(req->mac_address, 0x00, ETH_ALEN);
62  req->ip_address = 0;
63  req->subnet_mask = 0;
64  req->gateway = 0;
65  req->dns = 0;
66  req->name[0] = 0x00;
67 
68  req->result = 0x0000;
69 }
70 
71 /*****************************************************************************/
unsigned long jiffies_sent
Jiffies, when the request was sent.
Definition: eoe_request.h:52
void ec_eoe_request_init(ec_eoe_request_t *req)
EoE request constructor.
Definition: eoe_request.c:46
EtherCAT EoE request structure.
Ethernet-over-EtherCAT set IP parameter request.
Definition: eoe_request.h:49
ec_internal_request_state_t state
Request state.
Definition: eoe_request.h:51
struct list_head list
List item.
Definition: eoe_request.h:50