libnl: /data/src/libnl/include/netlink/route/link/can.h Source File

libnl 3.12.0

can.h
1/* SPDX-License-Identifier: LGPL-2.1-only */
2/*
3 * Copyright (c) 2012 Benedikt Spranger <b.spranger@linutronix.de>
4 */
5
6#ifndef NETLINK_LINK_CAN_H_
7#define NETLINK_LINK_CAN_H_
8
9#include <netlink/netlink.h>
10#include <netlink/route/link.h>
11#include <linux/can/netlink.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17struct can_bittiming_const;
18struct can_bittiming;
19struct can_berr_counter;
20
21extern int rtnl_link_is_can(struct rtnl_link *link);
22
23extern char *rtnl_link_can_ctrlmode2str(int, char *, size_t);
24extern int rtnl_link_can_str2ctrlmode(const char *);
25
26extern int rtnl_link_can_restart(struct rtnl_link *);
27extern int rtnl_link_can_freq(struct rtnl_link *, uint32_t *);
28extern int rtnl_link_can_state(struct rtnl_link *, uint32_t *);
29
30extern int rtnl_link_can_berr_rx(struct rtnl_link *);
31extern int rtnl_link_can_berr_tx(struct rtnl_link *);
32extern int rtnl_link_can_berr(struct rtnl_link *, struct can_berr_counter *);
33
34extern int rtnl_link_can_get_bt_const(struct rtnl_link *,
35 struct can_bittiming_const *);
36extern int rtnl_link_can_get_bittiming(struct rtnl_link *,
37 struct can_bittiming *);
38extern int rtnl_link_can_set_bittiming(struct rtnl_link *,
39 const struct can_bittiming *);
40
41extern int rtnl_link_can_get_bitrate(struct rtnl_link *, uint32_t *);
42extern int rtnl_link_can_set_bitrate(struct rtnl_link *, uint32_t);
43
44extern int rtnl_link_can_get_sample_point(struct rtnl_link *, uint32_t *);
45extern int rtnl_link_can_set_sample_point(struct rtnl_link *, uint32_t);
46
47extern int rtnl_link_can_get_restart_ms(struct rtnl_link *, uint32_t *);
48extern int rtnl_link_can_set_restart_ms(struct rtnl_link *, uint32_t);
49
50extern int rtnl_link_can_get_ctrlmode(struct rtnl_link *, uint32_t *);
51extern int rtnl_link_can_set_ctrlmode(struct rtnl_link *, uint32_t);
52extern int rtnl_link_can_unset_ctrlmode(struct rtnl_link *, uint32_t);
53
54extern int rtnl_link_can_get_data_bittiming_const(struct rtnl_link *,
55 struct can_bittiming_const *);
56extern int rtnl_link_can_set_data_bittiming_const(struct rtnl_link *,
57 const struct can_bittiming_const *);
58extern int rtnl_link_can_get_data_bittiming(struct rtnl_link *,
59 struct can_bittiming *);
60extern int rtnl_link_can_set_data_bittiming(struct rtnl_link *,
61 const struct can_bittiming *);
62
63extern int rtnl_link_can_get_device_stats(struct rtnl_link *,
64 struct can_device_stats *);
65
66#ifdef __cplusplus
67}
68#endif
69
70#endif
rtnl_link_can_berr_rx
int rtnl_link_can_berr_rx(struct rtnl_link *)
Get CAN RX bus error count.
Definition can.c:488
rtnl_link_can_set_restart_ms
int rtnl_link_can_set_restart_ms(struct rtnl_link *, uint32_t)
Set CAN device restart intervall.
Definition can.c:725
rtnl_link_can_get_restart_ms
int rtnl_link_can_get_restart_ms(struct rtnl_link *, uint32_t *)
Get CAN device restart intervall.
Definition can.c:702
rtnl_link_can_get_ctrlmode
int rtnl_link_can_get_ctrlmode(struct rtnl_link *, uint32_t *)
Get CAN control mode.
Definition can.c:744
rtnl_link_can_freq
int rtnl_link_can_freq(struct rtnl_link *, uint32_t *)
Get CAN base frequency.
Definition can.c:447
rtnl_link_can_get_bittiming
int rtnl_link_can_get_bittiming(struct rtnl_link *, struct can_bittiming *)
Get CAN device bit-timing.
Definition can.c:572
rtnl_link_can_unset_ctrlmode
int rtnl_link_can_unset_ctrlmode(struct rtnl_link *, uint32_t)
Unset a CAN Control Mode.
Definition can.c:787
rtnl_link_can_set_data_bittiming_const
int rtnl_link_can_set_data_bittiming_const(struct rtnl_link *, const struct can_bittiming_const *)
Set CAN FD device data bit-timing-const.
Definition can.c:831
rtnl_link_is_can
int rtnl_link_is_can(struct rtnl_link *link)
Check if link is a CAN link.
Definition can.c:417
rtnl_link_can_get_data_bittiming
int rtnl_link_can_get_data_bittiming(struct rtnl_link *, struct can_bittiming *)
Get CAN FD device data bit-timing.
Definition can.c:853
rtnl_link_can_restart
int rtnl_link_can_restart(struct rtnl_link *)
Restart CAN device.
Definition can.c:428
rtnl_link_can_set_sample_point
int rtnl_link_can_set_sample_point(struct rtnl_link *, uint32_t)
Set CAN device sample point.
Definition can.c:683
rtnl_link_can_set_data_bittiming
int rtnl_link_can_set_data_bittiming(struct rtnl_link *, const struct can_bittiming *)
Set CAN FD device data bit-timing.
Definition can.c:877
rtnl_link_can_get_sample_point
int rtnl_link_can_get_sample_point(struct rtnl_link *, uint32_t *)
Get CAN device sample point.
Definition can.c:660
rtnl_link_can_set_bittiming
int rtnl_link_can_set_bittiming(struct rtnl_link *, const struct can_bittiming *)
Set CAN device bit-timing.
Definition can.c:596
rtnl_link_can_set_bitrate
int rtnl_link_can_set_bitrate(struct rtnl_link *, uint32_t)
Set CAN device bit-rate.
Definition can.c:641
rtnl_link_can_get_device_stats
int rtnl_link_can_get_device_stats(struct rtnl_link *, struct can_device_stats *)
Get CAN device stats.
Definition can.c:899
rtnl_link_can_get_data_bittiming_const
int rtnl_link_can_get_data_bittiming_const(struct rtnl_link *, struct can_bittiming_const *)
Get CAN FD hardware-dependent data bit-timing constant.
Definition can.c:807
rtnl_link_can_get_bitrate
int rtnl_link_can_get_bitrate(struct rtnl_link *, uint32_t *)
Get CAN device bit-timing.
Definition can.c:618
rtnl_link_can_berr_tx
int rtnl_link_can_berr_tx(struct rtnl_link *)
Get CAN TX bus error count.
Definition can.c:506
rtnl_link_can_state
int rtnl_link_can_state(struct rtnl_link *, uint32_t *)
Get CAN state.
Definition can.c:469
rtnl_link_can_get_bt_const
int rtnl_link_can_get_bt_const(struct rtnl_link *, struct can_bittiming_const *)
Get CAN hardware-dependent bit-timing constant.
Definition can.c:548
rtnl_link_can_set_ctrlmode
int rtnl_link_can_set_ctrlmode(struct rtnl_link *, uint32_t)
Set a CAN Control Mode.
Definition can.c:767
rtnl_link_can_berr
int rtnl_link_can_berr(struct rtnl_link *, struct can_berr_counter *)
Get CAN bus error count.
Definition can.c:525
rtnl_link
Link object.
Definition nl-route.h:29