can_eth_gw Gateway Module
0.1
A bidirectional CAN to Ethernet Gateway (Kernel Module)
Main Page
Related Pages
Modules
Data Structures
Files
File List
Globals
All
Data Structures
Files
Functions
Variables
Enumerations
Enumerator
Macros
Groups
Pages
ce_gw_dev.h
Go to the documentation of this file.
1
11
/*****************************************************************************
12
* (C) Copyright 2013 Fabian Raab, Stefan Smarzly
13
*
14
* This file is part of CAN-Eth-GW.
15
*
16
* CAN-Eth-GW is free software: you can redistribute it and/or modify
17
* it under the terms of the GNU General Public License as published by
18
* the Free Software Foundation, either version 3 of the License, or
19
* (at your option) any later version.
20
*
21
* CAN-Eth-GW is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
* GNU General Public License for more details.
25
*
26
* You should have received a copy of the GNU General Public License
27
* along with CAN-Eth-GW. If not, see <http://www.gnu.org/licenses/>.
28
*****************************************************************************/
29
30
#ifndef __CE_GW_DEV_H__
31
#define __CE_GW_DEV_H__
32
33
#include <linux/version.h>
34
#include <linux/module.h>
35
#include <linux/kernel.h>
36
37
#include <linux/netdevice.h>
38
#include <linux/etherdevice.h>
39
#if LINUX_VERSION_CODE >= KERNEL_VERSION(3,7,0)
40
# include <uapi/linux/can.h>
41
# else
42
# if LINUX_VERSION_CODE >= KERNEL_VERSION(3,6,0)
43
# include <linux/can.h>
44
# else
45
# error Only Linux Kernel 3.6 and above are supported
46
# endif
47
#endif
48
#include "
ce_gw_main.h
"
49
50
enum
ce_gw_type
;
51
struct
ce_gw_job
;
52
63
struct
ce_gw_job_info
{
64
struct
hlist_head
job_src
;
65
struct
hlist_head
job_dst
;
66
};
67
78
extern
int
ce_gw_is_allocated_dev
(
struct
net_device *eth_dev);
79
89
extern
int
ce_gw_is_registered_dev
(
struct
net_device *eth_dev);
90
102
int
ce_gw_has_min_mtu
(
struct
net_device *dev,
enum
ce_gw_type
type, u32 flags);
103
115
void
ce_gw_dev_job_src_add
(
struct
ce_gw_job
*job);
116
128
extern
void
ce_gw_dev_job_dst_add
(
struct
ce_gw_job
*job);
129
148
extern
int
ce_gw_dev_job_add
(
struct
net_device *eth_dev,
struct
ce_gw_job
*job);
149
164
extern
void
ce_gw_dev_job_remove
(
struct
ce_gw_job
*job);
165
177
extern
struct
net_device *
ce_gw_dev_alloc
(
char
*dev_name);
178
186
extern
void
ce_gw_dev_free
(
struct
net_device *eth_dev);
187
203
extern
void
ce_gw_dev_setup
(
struct
net_device *dev,
enum
ce_gw_type
type,
204
__u32 flags);
205
217
extern
struct
net_device *
ce_gw_dev_create
(
enum
ce_gw_type
type, __u32 flags,
218
char
*dev_name);
219
229
extern
int
ce_gw_dev_register
(
struct
net_device *eth_dev);
230
238
extern
void
ce_gw_dev_unregister
(
struct
net_device *eth_dev);
239
249
int
ce_gw_dev_init_module
(
void
);
250
259
extern
void
ce_gw_dev_cleanup
(
void
);
260
261
#endif
262
ce_gw_dev.h
Generated on Mon Jul 22 2013 11:59:51 for can_eth_gw Gateway Module by
1.8.3.1