Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions
dev.h File Reference
#include <linux/can.h>
#include <linux/can/netlink.h>
#include <linux/can/error.h>

Go to the source code of this file.

Data Structures

struct  can_priv
 

Macros

#define get_can_dlc(i)   (min_t(__u8, (i), CAN_MAX_DLC))
 
#define get_canfd_dlc(i)   (min_t(__u8, (i), CANFD_MAX_DLC))
 

Enumerations

enum  can_mode { CAN_MODE_STOP = 0, CAN_MODE_START, CAN_MODE_SLEEP }
 

Functions

u8 can_dlc2len (u8 can_dlc)
 
u8 can_len2dlc (u8 len)
 
struct net_devicealloc_candev (int sizeof_priv, unsigned int echo_skb_max)
 
void free_candev (struct net_device *dev)
 
int open_candev (struct net_device *dev)
 
void close_candev (struct net_device *dev)
 
int register_candev (struct net_device *dev)
 
void unregister_candev (struct net_device *dev)
 
int can_restart_now (struct net_device *dev)
 
void can_bus_off (struct net_device *dev)
 
void can_put_echo_skb (struct sk_buff *skb, struct net_device *dev, unsigned int idx)
 
unsigned int can_get_echo_skb (struct net_device *dev, unsigned int idx)
 
void can_free_echo_skb (struct net_device *dev, unsigned int idx)
 
struct sk_buffalloc_can_skb (struct net_device *dev, struct can_frame **cf)
 
struct sk_buffalloc_can_err_skb (struct net_device *dev, struct can_frame **cf)
 

Macro Definition Documentation

#define get_can_dlc (   i)    (min_t(__u8, (i), CAN_MAX_DLC))

Definition at line 64 of file dev.h.

#define get_canfd_dlc (   i)    (min_t(__u8, (i), CANFD_MAX_DLC))

Definition at line 65 of file dev.h.

Enumeration Type Documentation

enum can_mode
Enumerator:
CAN_MODE_STOP 
CAN_MODE_START 
CAN_MODE_SLEEP 

Definition at line 23 of file dev.h.

Function Documentation

struct sk_buff* alloc_can_err_skb ( struct net_device dev,
struct can_frame **  cf 
)
read

Definition at line 518 of file dev.c.

struct sk_buff* alloc_can_skb ( struct net_device dev,
struct can_frame **  cf 
)
read

Definition at line 500 of file dev.c.

struct net_device* alloc_candev ( int  sizeof_priv,
unsigned int  echo_skb_max 
)
read

Definition at line 536 of file dev.c.

void can_bus_off ( struct net_device dev)

Definition at line 472 of file dev.c.

u8 can_dlc2len ( u8  can_dlc)

Definition at line 42 of file dev.c.

void can_free_echo_skb ( struct net_device dev,
unsigned int  idx 
)

Definition at line 388 of file dev.c.

unsigned int can_get_echo_skb ( struct net_device dev,
unsigned int  idx 
)

Definition at line 362 of file dev.c.

u8 can_len2dlc ( u8  len)

Definition at line 60 of file dev.c.

void can_put_echo_skb ( struct sk_buff skb,
struct net_device dev,
unsigned int  idx 
)

Definition at line 311 of file dev.c.

int can_restart_now ( struct net_device dev)

Definition at line 446 of file dev.c.

void close_candev ( struct net_device dev)

Definition at line 608 of file dev.c.

void free_candev ( struct net_device dev)

Definition at line 571 of file dev.c.

int open_candev ( struct net_device dev)

Definition at line 583 of file dev.c.

int register_candev ( struct net_device dev)

Definition at line 782 of file dev.c.

void unregister_candev ( struct net_device dev)

Definition at line 792 of file dev.c.