can_eth_gw Gateway Module
0.1
A bidirectional CAN to Ethernet Gateway (Kernel Module)
|
Control Area Network - Ethernet - Gateway - Netlink. More...
#include <linux/version.h>
#include <net/genetlink.h>
#include <net/netlink.h>
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/netlink.h>
#include "ce_gw_main.h"
#include <uapi/linux/netlink.h>
#include <asm-generic/errno-base.h>
#include <asm-generic/errno.h>
Go to the source code of this file.
#define | CE_GW_GE_FAMILY_NAME "CE_GW" |
#define | CE_GW_GE_FAMILY_VERSION 2 |
#define | CE_GW_USER_HDR_SIZE 0 |
#define | CE_GW_NO_FLAG 0 |
#define | CE_GW_A_MAX (__CE_GW_A_MAX - 1) |
#define | CE_GW_C_MAX (__CE_GW_C_MAX - 1) |
enum | { CE_GW_A_UNSPEC, CE_GW_A_DATA, CE_GW_A_SRC, CE_GW_A_DST, CE_GW_A_ID, CE_GW_A_FLAGS, CE_GW_A_TYPE, CE_GW_A_HNDL, CE_GW_A_DROP, __CE_GW_A_MAX } |
enum | { CE_GW_C_UNSPEC, CE_GW_C_ECHO, CE_GW_C_ADD, CE_GW_C_DEL, CE_GW_C_LIST, __CE_GW_C_MAX } |
static struct nla_policy | ce_gw_genl_policy [CE_GW_A_MAX+1] |
Netlink Policy - Defines the Type for the Netlink Attributes. More... | |
static struct genl_family | ce_gw_genl_family |
Generic Netlink Family. More... | |
struct genl_ops | ce_gw_genl_ops_echo |
details of ce_gw_netlink_echo() More... | |
struct genl_ops | ce_gw_genl_ops_add |
details of ce_gw_netlink_add() More... | |
struct genl_ops | ce_gw_genl_ops_del |
details of ce_gw_netlink_del() More... | |
struct genl_ops | ce_gw_genl_ops_list |
details of ce_gw_netlink_list() More... | |
int | ce_gw_netlink_echo (struct sk_buff *skb_info, struct genl_info *info) |
Generic Netlink Command - Sends a massage back. More... | |
int | ce_gw_netlink_add (struct sk_buff *skb_info, struct genl_info *info) |
add a virtual ethernet device or a route More... | |
int | ce_gw_netlink_del (struct sk_buff *skb_info, struct genl_info *info) |
Deletes a device by name or a route by ID. More... | |
int | ce_gw_netlink_list (struct sk_buff *skb_info, struct genl_info *info) |
Send informations of one or more routes to userspace. More... | |
int | ce_gw_netlink_init (void) |
Must called once at module init. More... | |
void | ce_gw_netlink_exit (void) |
Must called once at module exit. More... | |
Control Area Network - Ethernet - Gateway - Netlink.
Definition in file ce_gw_netlink.c.
#define CE_GW_A_MAX (__CE_GW_A_MAX - 1) |
Maximum Number of Attribute
Definition at line 70 of file ce_gw_netlink.c.
#define CE_GW_C_MAX (__CE_GW_C_MAX - 1) |
Maximum Number of Commands
Definition at line 117 of file ce_gw_netlink.c.
#define CE_GW_GE_FAMILY_NAME "CE_GW" |
Netlink Family Settings
Definition at line 47 of file ce_gw_netlink.c.
#define CE_GW_GE_FAMILY_VERSION 2 |
Definition at line 48 of file ce_gw_netlink.c.
#define CE_GW_NO_FLAG 0 |
Definition at line 50 of file ce_gw_netlink.c.
Referenced by ce_gw_netlink_echo(), and ce_gw_netlink_list().
#define CE_GW_USER_HDR_SIZE 0 |
user header size
Definition at line 49 of file ce_gw_netlink.c.
anonymous enum |
Definition at line 58 of file ce_gw_netlink.c.
anonymous enum |
Enumerator | |
---|---|
CE_GW_C_UNSPEC |
Only a Dummy to skip index 0. |
CE_GW_C_ECHO |
Sends a message back. Calls ce_gw_nl_echo(). |
CE_GW_C_ADD |
Add a gateway. Calls ce_gw_netlink_add(). |
CE_GW_C_DEL |
Delate a gateway. Calls ce_gw_netlink_del(). |
CE_GW_C_LIST |
list active gateways. Calls ce_gw_netlink_list(). |
__CE_GW_C_MAX |
Maximum Number of Commands plus 1 |
Definition at line 109 of file ce_gw_netlink.c.