libsocketcan.h File Reference

API overview. More...

`#include <linux/can/netlink.h>`
Include dependency graph for libsocketcan.h:
This graph shows which files directly or indirectly include this file:

## Functions

int | can_do_restart (const char *name)
| can_do_restart - restart the can interface More...
int | can_do_stop (const char *name)
| can_do_stop - stop the can interface More...
int | can_do_start (const char *name)
| can_do_start - start the can interface More...
int | can_set_restart_ms (const char *name, __u32 restart_ms)
| can_set_restart_ms - set interval of auto restart. More...
int | can_set_bittiming (const char *name, struct can_bittiming *bt)
| can_set_bittiming - setup the bittiming. More...
int | can_set_ctrlmode (const char *name, struct can_ctrlmode *cm)
| can_set_ctrlmode - setup the control mode. More...
int | can_set_bitrate (const char *name, __u32 bitrate)
| can_set_bitrate - setup the bitrate. More...
int | can_set_bitrate_samplepoint (const char *name, __u32 bitrate, __u32 sample_point)
| can_set_bitrate_samplepoint - setup the bitrate. More...
int | can_get_restart_ms (const char *name, __u32 *restart_ms)
| can_get_restart_ms - get the current interval of auto restarting. More...
int | can_get_bittiming (const char *name, struct can_bittiming *bt)
| can_get_bittiming - get the current bittimnig configuration. More...
int | can_get_ctrlmode (const char *name, struct can_ctrlmode *cm)
| can_get_ctrlmode - get the current control mode. More...
int | can_get_state (const char *name, int *state)
| can_get_state - get the current state of the device More...
int | can_get_clock (const char *name, struct can_clock *clock)
| can_get_clock - get the current clock struct. More...
int | can_get_bittiming_const (const char *name, struct can_bittiming_const *btc)
| can_get_bittiming_const - get the current bittimnig constant. More...
int | can_get_berr_counter (const char *name, struct can_berr_counter *bc)
| can_get_berr_counter - get the tx/rx error counter. More...
int | can_get_device_stats (const char *name, struct can_device_stats *cds)
| can_get_device_stats - get the can_device_stats. More...
int | can_get_link_stats (const char *name, struct rtnl_link_stats64 *rls)
| can_get_link_statistics - get RX/TX statistics (64 bits version) More...

## Detailed Description

API overview.

can_do_start
int can_do_start(const char *name)
can_do_start - start the can interface
Definition: libsocketcan.c:714
can_get_ctrlmode
int can_get_ctrlmode(const char *name, struct can_ctrlmode *cm)
can_get_ctrlmode - get the current control mode.
Definition: libsocketcan.c:1072
can_clock
Definition: can_netlink.h:61
can_set_bitrate_samplepoint
int can_set_bitrate_samplepoint(const char *name, __u32 bitrate, __u32 sample_point)
can_set_bitrate_samplepoint - setup the bitrate.
Definition: libsocketcan.c:965
can_set_bittiming
int can_set_bittiming(const char *name, struct can_bittiming *bt)
can_set_bittiming - setup the bittiming.
Definition: libsocketcan.c:910
can_device_stats
Definition: can_netlink.h:105
can_get_restart_ms
int can_get_restart_ms(const char *name, __u32 *restart_ms)
can_get_restart_ms - get the current interval of auto restarting.
Definition: libsocketcan.c:1029
open_nl_sock
static int open_nl_sock()
open_nl_sock - open a netlink socket
Definition: libsocketcan.c:291
can_get_bittiming
int can_get_bittiming(const char *name, struct can_bittiming *bt)
can_get_bittiming - get the current bittimnig configuration.
Definition: libsocketcan.c:1050
can_bittiming_const
Definition: can_netlink.h:46
do_set_nl_link
static int do_set_nl_link(int fd, __u8 if_state, const char *name, struct req_info *req_info)
do_set_nl_link - setup linkinfo
Definition: libsocketcan.c:592
can_set_restart_ms
int can_set_restart_ms(const char *name, __u32 restart_ms)
can_set_restart_ms - set interval of auto restart.
Definition: libsocketcan.c:802
can_set_ctrlmode
int can_set_ctrlmode(const char *name, struct can_ctrlmode *cm)
can_set_ctrlmode - setup the control mode.
Definition: libsocketcan.c:863
can_get_bittiming_const
int can_get_bittiming_const(const char *name, struct can_bittiming_const *btc)
can_get_bittiming_const - get the current bittimnig constant.
Definition: libsocketcan.c:1130
can_do_stop
int can_do_stop(const char *name)
can_do_stop - stop the can interface
Definition: libsocketcan.c:732
can_ctrlmode
Definition: can_netlink.h:89
libsocketcan.h
API overview.
can_get_berr_counter
int can_get_berr_counter(const char *name, struct can_berr_counter *bc)
can_get_berr_counter - get the tx/rx error counter.
Definition: libsocketcan.c:1157
can_do_restart
int can_do_restart(const char *name)
can_do_restart - restart the can interface
Definition: libsocketcan.c:753
can_berr_counter
Definition: can_netlink.h:81
send_dump_request
static int send_dump_request(int fd, const char *name, int family, int type)
send_dump_request - send a dump linkinfo request
Definition: libsocketcan.c:251
set_link
static int set_link(const char *name, __u8 if_state, struct req_info *req_info)
set_link - open a netlink socket and setup linkinfo
Definition: libsocketcan.c:686
can_set_bitrate
int can_set_bitrate(const char *name, __u32 bitrate)
can_set_bitrate - setup the bitrate.
Definition: libsocketcan.c:938
get_link
static int get_link(const char *name, __u8 acquire, void *res)
get_link - get linkinfo
Definition: libsocketcan.c:556
can_get_device_stats
int can_get_device_stats(const char *name, struct can_device_stats *cds)
can_get_device_stats - get the can_device_stats.
Definition: libsocketcan.c:1178
can_get_state
int can_get_state(const char *name, int *state)
can_get_state - get the current state of the device
Definition: libsocketcan.c:1004
send_mod_request
static int send_mod_request(int fd, struct nlmsghdr *n)
send_mod_request - send a linkinfo modification request
Definition: libsocketcan.c:166
can_bittiming
Definition: can_netlink.h:30
can_get_clock
int can_get_clock(const char *name, struct can_clock *clock)
can_get_clock - get the current clock struct.
Definition: libsocketcan.c:1093
do_get_nl_link
static int do_get_nl_link(int fd, __u8 acquire, const char *name, void *res)
do_get_nl_link - get linkinfo
Definition: libsocketcan.c:353
parse_rtattr
static void parse_rtattr(struct rtattr **tb, int max, struct rtattr *rta, int len)
this method parse attributions of link info
Definition: libsocketcan.c:98
can_get_link_stats
int can_get_link_stats(const char *name, struct rtnl_link_stats64 *rls)
can_get_link_statistics - get RX/TX statistics (64 bits version)
Definition: libsocketcan.c:1204