• Home
  • Raw
  • Download

Lines Matching full:link

2  * lib/route/link/can.c		CAN Link Info
13 * @ingroup link
15 * Controller Area Network link module
18 * \b Link Type Name: "can"
31 #include <netlink-private/route/link/api.h>
32 #include <netlink/route/link/can.h>
72 static int can_alloc(struct rtnl_link *link) in can_alloc() argument
80 link->l_info = ci; in can_alloc()
85 static int can_parse(struct rtnl_link *link, struct nlattr *data, in can_parse() argument
92 NL_DBG(3, "Parsing CAN link info"); in can_parse()
97 if ((err = can_alloc(link)) < 0) in can_parse()
100 ci = link->l_info; in can_parse()
153 static void can_free(struct rtnl_link *link) in can_free() argument
155 struct can_info *ci = link->l_info; in can_free()
158 link->l_info = NULL; in can_free()
192 static void can_dump_line(struct rtnl_link *link, struct nl_dump_params *p) in can_dump_line() argument
194 struct can_info *ci = link->l_info; in can_dump_line()
202 static void can_dump_details(struct rtnl_link *link, struct nl_dump_params *p) in can_dump_details() argument
204 struct can_info *ci = link->l_info; in can_dump_details()
292 static int can_put_attrs(struct nl_msg *msg, struct rtnl_link *link) in can_put_attrs() argument
294 struct can_info *ci = link->l_info; in can_put_attrs()
345 #define IS_CAN_LINK_ASSERT(link) \ argument
346 if ((link)->l_info_ops != &can_info_ops) { \
347 APPBUG("Link is not a CAN link. set type \"can\" first."); \
358 * Check if link is a CAN link
359 * @arg link Link object
361 * @return True if link is a CAN link, otherwise false is returned.
363 int rtnl_link_is_can(struct rtnl_link *link) in rtnl_link_is_can() argument
365 return link->l_info_ops && !strcmp(link->l_info_ops->io_name, "can"); in rtnl_link_is_can()
370 * @arg link Link object
374 int rtnl_link_can_restart(struct rtnl_link *link) in rtnl_link_can_restart() argument
376 struct can_info *ci = link->l_info; in rtnl_link_can_restart()
378 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_restart()
388 * @arg link Link object
393 int rtnl_link_can_freq(struct rtnl_link *link, uint32_t *freq) in rtnl_link_can_freq() argument
395 struct can_info *ci = link->l_info; in rtnl_link_can_freq()
397 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_freq()
411 * @arg link Link object
415 int rtnl_link_can_state(struct rtnl_link *link, uint32_t *state) in rtnl_link_can_state() argument
417 struct can_info *ci = link->l_info; in rtnl_link_can_state()
419 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_state()
430 * @arg link Link object
434 int rtnl_link_can_berr_rx(struct rtnl_link *link) in rtnl_link_can_berr_rx() argument
436 struct can_info *ci = link->l_info; in rtnl_link_can_berr_rx()
438 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_berr_rx()
448 * @arg link Link object
452 int rtnl_link_can_berr_tx(struct rtnl_link *link) in rtnl_link_can_berr_tx() argument
454 struct can_info *ci = link->l_info; in rtnl_link_can_berr_tx()
456 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_berr_tx()
466 * @arg link Link object
471 int rtnl_link_can_berr(struct rtnl_link *link, struct can_berr_counter *berr) in rtnl_link_can_berr() argument
473 struct can_info *ci = link->l_info; in rtnl_link_can_berr()
475 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_berr()
489 * @arg link Link object
494 int rtnl_link_can_get_bt_const(struct rtnl_link *link, in rtnl_link_can_get_bt_const() argument
497 struct can_info *ci = link->l_info; in rtnl_link_can_get_bt_const()
499 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_get_bt_const()
513 * @arg link Link object
518 int rtnl_link_can_get_bittiming(struct rtnl_link *link, in rtnl_link_can_get_bittiming() argument
521 struct can_info *ci = link->l_info; in rtnl_link_can_get_bittiming()
523 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_get_bittiming()
537 * @arg link Link object
542 int rtnl_link_can_set_bittiming(struct rtnl_link *link, in rtnl_link_can_set_bittiming() argument
545 struct can_info *ci = link->l_info; in rtnl_link_can_set_bittiming()
547 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_set_bittiming()
559 * @arg link Link object
564 int rtnl_link_can_get_bitrate(struct rtnl_link *link, uint32_t *bitrate) in rtnl_link_can_get_bitrate() argument
566 struct can_info *ci = link->l_info; in rtnl_link_can_get_bitrate()
568 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_get_bitrate()
582 * @arg link Link object
587 int rtnl_link_can_set_bitrate(struct rtnl_link *link, uint32_t bitrate) in rtnl_link_can_set_bitrate() argument
589 struct can_info *ci = link->l_info; in rtnl_link_can_set_bitrate()
591 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_set_bitrate()
601 * @arg link Link object
606 int rtnl_link_can_get_sample_point(struct rtnl_link *link, uint32_t *sp) in rtnl_link_can_get_sample_point() argument
608 struct can_info *ci = link->l_info; in rtnl_link_can_get_sample_point()
610 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_get_sample_point()
624 * @arg link Link object
629 int rtnl_link_can_set_sample_point(struct rtnl_link *link, uint32_t sp) in rtnl_link_can_set_sample_point() argument
631 struct can_info *ci = link->l_info; in rtnl_link_can_set_sample_point()
633 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_set_sample_point()
643 * @arg link Link object
648 int rtnl_link_can_get_restart_ms(struct rtnl_link *link, uint32_t *interval) in rtnl_link_can_get_restart_ms() argument
650 struct can_info *ci = link->l_info; in rtnl_link_can_get_restart_ms()
652 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_get_restart_ms()
666 * @arg link Link object
671 int rtnl_link_can_set_restart_ms(struct rtnl_link *link, uint32_t interval) in rtnl_link_can_set_restart_ms() argument
673 struct can_info *ci = link->l_info; in rtnl_link_can_set_restart_ms()
675 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_set_restart_ms()
685 * @arg link Link object
690 int rtnl_link_can_get_ctrlmode(struct rtnl_link *link, uint32_t *ctrlmode) in rtnl_link_can_get_ctrlmode() argument
692 struct can_info *ci = link->l_info; in rtnl_link_can_get_ctrlmode()
694 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_get_ctrlmode()
708 * @arg link Link object
713 int rtnl_link_can_set_ctrlmode(struct rtnl_link *link, uint32_t ctrlmode) in rtnl_link_can_set_ctrlmode() argument
715 struct can_info *ci = link->l_info; in rtnl_link_can_set_ctrlmode()
717 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_set_ctrlmode()
728 * @arg link Link object
733 int rtnl_link_can_unset_ctrlmode(struct rtnl_link *link, uint32_t ctrlmode) in rtnl_link_can_unset_ctrlmode() argument
735 struct can_info *ci = link->l_info; in rtnl_link_can_unset_ctrlmode()
737 IS_CAN_LINK_ASSERT(link); in rtnl_link_can_unset_ctrlmode()