can_eth_gw Gateway Module
0.1
A bidirectional CAN to Ethernet Gateway (Kernel Module)
|
void | ce_gw_can_rcv (struct sk_buff *can_skb, void *data) |
The gateway function for incoming CAN frames Receive CAN frame –> process –> send to ETH dev (skbuffer, struct receiver->data) More... | |
void | ce_gw_eth_rcv (struct sk_buff *eth_skb, void *data) |
The gateway function for incoming ETH frames Receive skb from ETH dev –> process –> send to CAN bus. More... | |
void ce_gw_can_rcv | ( | struct sk_buff * | can_skb, |
void * | data | ||
) |
The gateway function for incoming CAN frames Receive CAN frame –> process –> send to ETH dev (skbuffer, struct receiver->data)
can_skb | CAN sk buffer which should be translated to an ETH packet |
data | gwjob which is responsible for triggering this function |
check also for canfd flag not only Type and call function. You must also check then if the message then is really a canfd-frame or not.
call other translation functions. check for canfd-frame or only use canfd-frame casts.
Definition at line 759 of file ce_gw_main.c.
References ce_gw_can2net_alloc(), CE_GW_TYPE_ETH, CE_GW_TYPE_NET, CE_GW_TYPE_TCP, CE_GW_TYPE_UDP, ce_gw_job::dev, ce_gw_job::dropped_frames, ce_gw_job::dst, ce_gw_job::handled_frames, ce_gw_job::src, and ce_gw_job::type.
Referenced by ce_gw_register_can_src(), and ce_gw_unregister_can_src().
static void ce_gw_eth_rcv | ( | struct sk_buff * | eth_skb, |
void * | data | ||
) |
The gateway function for incoming ETH frames Receive skb from ETH dev –> process –> send to CAN bus.
eth_skb | ETH sk buffer with CAN frame as payload. Exact location of CAN frame depends on translation type (see enum ce_gw_type) |
data | gwjob which is responsible for triggering this function |
Definition at line 829 of file ce_gw_main.c.
References ce_gw_net2can_alloc(), CE_GW_TYPE_ETH, CE_GW_TYPE_NET, CE_GW_TYPE_TCP, CE_GW_TYPE_UDP, ce_gw_job::dev, ce_gw_job::dropped_frames, ce_gw_job::dst, ce_gw_job::handled_frames, ce_gw_job::id, and ce_gw_job::type.
Referenced by ce_gw_dev_start_xmit().