• Home
  • Raw
  • Download

Lines Matching refs:ntbl

125 	struct rtnl_neightbl *ntbl;  in neightbl_msg_parser()  local
130 ntbl = rtnl_neightbl_alloc(); in neightbl_msg_parser()
131 if (!ntbl) { in neightbl_msg_parser()
136 ntbl->ce_msgtype = n->nlmsg_type; in neightbl_msg_parser()
143 ntbl->nt_family = rtmsg->rtgen_family; in neightbl_msg_parser()
150 nla_strlcpy(ntbl->nt_name, tb[NDTA_NAME], NTBLNAMSIZ); in neightbl_msg_parser()
151 ntbl->ce_mask |= NEIGHTBL_ATTR_NAME; in neightbl_msg_parser()
154 ntbl->nt_gc_thresh1 = nla_get_u32(tb[NDTA_THRESH1]); in neightbl_msg_parser()
155 ntbl->ce_mask |= NEIGHTBL_ATTR_THRESH1; in neightbl_msg_parser()
159 ntbl->nt_gc_thresh2 = nla_get_u32(tb[NDTA_THRESH2]); in neightbl_msg_parser()
160 ntbl->ce_mask |= NEIGHTBL_ATTR_THRESH2; in neightbl_msg_parser()
164 ntbl->nt_gc_thresh3 = nla_get_u32(tb[NDTA_THRESH3]); in neightbl_msg_parser()
165 ntbl->ce_mask |= NEIGHTBL_ATTR_THRESH3; in neightbl_msg_parser()
169 ntbl->nt_gc_interval = nla_get_u32(tb[NDTA_GC_INTERVAL]); in neightbl_msg_parser()
170 ntbl->ce_mask |= NEIGHTBL_ATTR_GC_INTERVAL; in neightbl_msg_parser()
174 nla_memcpy(&ntbl->nt_config, tb[NDTA_CONFIG], in neightbl_msg_parser()
175 sizeof(ntbl->nt_config)); in neightbl_msg_parser()
176 ntbl->ce_mask |= NEIGHTBL_ATTR_CONFIG; in neightbl_msg_parser()
180 nla_memcpy(&ntbl->nt_stats, tb[NDTA_STATS], in neightbl_msg_parser()
181 sizeof(ntbl->nt_stats)); in neightbl_msg_parser()
182 ntbl->ce_mask |= NEIGHTBL_ATTR_STATS; in neightbl_msg_parser()
187 struct rtnl_neightbl_parms *p = &ntbl->nt_parms; in neightbl_msg_parser()
216 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in neightbl_msg_parser()
219 err = pp->pp_cb((struct nl_object *) ntbl, pp); in neightbl_msg_parser()
221 rtnl_neightbl_put(ntbl); in neightbl_msg_parser()
233 struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *) arg; in neightbl_dump_line() local
235 nl_dump_line(p, "%s", ntbl->nt_name); in neightbl_dump_line()
237 if (ntbl->nt_parms.ntp_mask & NEIGHTBLPARM_ATTR_IFINDEX) { in neightbl_dump_line()
246 ntbl->nt_parms.ntp_ifindex, in neightbl_dump_line()
250 nl_dump(p, "<%u> ", ntbl->nt_parms.ntp_ifindex); in neightbl_dump_line()
254 if (ntbl->ce_mask & NEIGHTBL_ATTR_CONFIG) in neightbl_dump_line()
255 nl_dump(p, "entries %u ", ntbl->nt_config.ndtc_entries); in neightbl_dump_line()
257 if (ntbl->ce_mask & NEIGHTBL_ATTR_PARMS) { in neightbl_dump_line()
259 struct rtnl_neightbl_parms *pa = &ntbl->nt_parms; in neightbl_dump_line()
272 struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *) arg; in neightbl_dump_details() local
276 if (ntbl->ce_mask & NEIGHTBL_ATTR_CONFIG) { in neightbl_dump_details()
278 ntbl->nt_config.ndtc_key_len, in neightbl_dump_details()
279 ntbl->nt_config.ndtc_entry_size, in neightbl_dump_details()
280 nl_msec2str(ntbl->nt_config.ndtc_last_flush, in neightbl_dump_details()
285 ntbl->nt_gc_thresh1, ntbl->nt_gc_thresh2, in neightbl_dump_details()
286 ntbl->nt_gc_thresh3, in neightbl_dump_details()
287 nl_msec2str(ntbl->nt_gc_interval, x, sizeof(x)), in neightbl_dump_details()
288 ntbl->nt_config.ndtc_hash_chain_gc); in neightbl_dump_details()
291 ntbl->nt_config.ndtc_hash_rnd, in neightbl_dump_details()
292 ntbl->nt_config.ndtc_hash_mask, in neightbl_dump_details()
293 nl_msec2str(ntbl->nt_config.ndtc_last_rand, in neightbl_dump_details()
297 if (ntbl->ce_mask & NEIGHTBL_ATTR_PARMS) { in neightbl_dump_details()
298 struct rtnl_neightbl_parms *pa = &ntbl->nt_parms; in neightbl_dump_details()
329 struct rtnl_neightbl *ntbl = (struct rtnl_neightbl *) arg; in neightbl_dump_stats() local
333 if (!(ntbl->ce_mask & NEIGHTBL_ATTR_STATS)) in neightbl_dump_stats()
343 ntbl->nt_stats.ndts_lookups, in neightbl_dump_stats()
344 ntbl->nt_stats.ndts_hits, in neightbl_dump_stats()
345 ntbl->nt_stats.ndts_res_failed, in neightbl_dump_stats()
346 ntbl->nt_stats.ndts_allocs, in neightbl_dump_stats()
347 ntbl->nt_stats.ndts_destroys); in neightbl_dump_stats()
354 ntbl->nt_stats.ndts_hash_grows, in neightbl_dump_stats()
355 ntbl->nt_stats.ndts_forced_gc_runs, in neightbl_dump_stats()
356 ntbl->nt_stats.ndts_periodic_gc_runs); in neightbl_dump_stats()
362 ntbl->nt_stats.ndts_rcv_probes_ucast, in neightbl_dump_stats()
363 ntbl->nt_stats.ndts_rcv_probes_mcast); in neightbl_dump_stats()
601 void rtnl_neightbl_set_family(struct rtnl_neightbl *ntbl, int family) in rtnl_neightbl_set_family() argument
603 ntbl->nt_family = family; in rtnl_neightbl_set_family()
604 ntbl->ce_mask |= NEIGHTBL_ATTR_FAMILY; in rtnl_neightbl_set_family()
607 void rtnl_neightbl_set_gc_interval(struct rtnl_neightbl *ntbl, uint64_t ms) in rtnl_neightbl_set_gc_interval() argument
609 ntbl->nt_gc_interval = ms; in rtnl_neightbl_set_gc_interval()
610 ntbl->ce_mask |= NEIGHTBL_ATTR_GC_INTERVAL; in rtnl_neightbl_set_gc_interval()
613 void rtnl_neightbl_set_gc_tresh1(struct rtnl_neightbl *ntbl, int thresh) in rtnl_neightbl_set_gc_tresh1() argument
615 ntbl->nt_gc_thresh1 = thresh; in rtnl_neightbl_set_gc_tresh1()
616 ntbl->ce_mask |= NEIGHTBL_ATTR_THRESH1; in rtnl_neightbl_set_gc_tresh1()
619 void rtnl_neightbl_set_gc_tresh2(struct rtnl_neightbl *ntbl, int thresh) in rtnl_neightbl_set_gc_tresh2() argument
621 ntbl->nt_gc_thresh2 = thresh; in rtnl_neightbl_set_gc_tresh2()
622 ntbl->ce_mask |= NEIGHTBL_ATTR_THRESH2; in rtnl_neightbl_set_gc_tresh2()
625 void rtnl_neightbl_set_gc_tresh3(struct rtnl_neightbl *ntbl, int thresh) in rtnl_neightbl_set_gc_tresh3() argument
627 ntbl->nt_gc_thresh3 = thresh; in rtnl_neightbl_set_gc_tresh3()
628 ntbl->ce_mask |= NEIGHTBL_ATTR_THRESH3; in rtnl_neightbl_set_gc_tresh3()
631 void rtnl_neightbl_set_name(struct rtnl_neightbl *ntbl, const char *name) in rtnl_neightbl_set_name() argument
633 strncpy(ntbl->nt_name, name, sizeof(ntbl->nt_name) - 1); in rtnl_neightbl_set_name()
634 ntbl->ce_mask |= NEIGHTBL_ATTR_NAME; in rtnl_neightbl_set_name()
637 void rtnl_neightbl_set_dev(struct rtnl_neightbl *ntbl, int ifindex) in rtnl_neightbl_set_dev() argument
639 ntbl->nt_parms.ntp_ifindex = ifindex; in rtnl_neightbl_set_dev()
640 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_IFINDEX; in rtnl_neightbl_set_dev()
641 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_dev()
649 void rtnl_neightbl_set_queue_len(struct rtnl_neightbl *ntbl, int len) in rtnl_neightbl_set_queue_len() argument
651 ntbl->nt_parms.ntp_queue_len = len; in rtnl_neightbl_set_queue_len()
652 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_QUEUE_LEN; in rtnl_neightbl_set_queue_len()
653 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_queue_len()
661 void rtnl_neightbl_set_proxy_queue_len(struct rtnl_neightbl *ntbl, int len) in rtnl_neightbl_set_proxy_queue_len() argument
663 ntbl->nt_parms.ntp_proxy_qlen = len; in rtnl_neightbl_set_proxy_queue_len()
664 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_PROXY_QLEN; in rtnl_neightbl_set_proxy_queue_len()
665 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_proxy_queue_len()
673 void rtnl_neightbl_set_app_probes(struct rtnl_neightbl *ntbl, int probes) in rtnl_neightbl_set_app_probes() argument
675 ntbl->nt_parms.ntp_app_probes = probes; in rtnl_neightbl_set_app_probes()
676 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_APP_PROBES; in rtnl_neightbl_set_app_probes()
677 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_app_probes()
685 void rtnl_neightbl_set_ucast_probes(struct rtnl_neightbl *ntbl, int probes) in rtnl_neightbl_set_ucast_probes() argument
687 ntbl->nt_parms.ntp_ucast_probes = probes; in rtnl_neightbl_set_ucast_probes()
688 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_UCAST_PROBES; in rtnl_neightbl_set_ucast_probes()
689 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_ucast_probes()
697 void rtnl_neightbl_set_mcast_probes(struct rtnl_neightbl *ntbl, int probes) in rtnl_neightbl_set_mcast_probes() argument
699 ntbl->nt_parms.ntp_mcast_probes = probes; in rtnl_neightbl_set_mcast_probes()
700 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_MCAST_PROBES; in rtnl_neightbl_set_mcast_probes()
701 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_mcast_probes()
709 void rtnl_neightbl_set_base_reachable_time(struct rtnl_neightbl *ntbl, in rtnl_neightbl_set_base_reachable_time() argument
712 ntbl->nt_parms.ntp_base_reachable_time = ms; in rtnl_neightbl_set_base_reachable_time()
713 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_BASE_REACHABLE_TIME; in rtnl_neightbl_set_base_reachable_time()
714 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_base_reachable_time()
722 void rtnl_neightbl_set_retrans_time(struct rtnl_neightbl *ntbl, uint64_t ms) in rtnl_neightbl_set_retrans_time() argument
724 ntbl->nt_parms.ntp_retrans_time = ms; in rtnl_neightbl_set_retrans_time()
725 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_RETRANS_TIME; in rtnl_neightbl_set_retrans_time()
726 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_retrans_time()
734 void rtnl_neightbl_set_gc_stale_time(struct rtnl_neightbl *ntbl, uint64_t ms) in rtnl_neightbl_set_gc_stale_time() argument
736 ntbl->nt_parms.ntp_gc_stale_time = ms; in rtnl_neightbl_set_gc_stale_time()
737 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_GC_STALETIME; in rtnl_neightbl_set_gc_stale_time()
738 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_gc_stale_time()
746 void rtnl_neightbl_set_delay_probe_time(struct rtnl_neightbl *ntbl, uint64_t ms) in rtnl_neightbl_set_delay_probe_time() argument
748 ntbl->nt_parms.ntp_probe_delay = ms; in rtnl_neightbl_set_delay_probe_time()
749 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_DELAY_PROBE_TIME; in rtnl_neightbl_set_delay_probe_time()
750 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_delay_probe_time()
758 void rtnl_neightbl_set_anycast_delay(struct rtnl_neightbl *ntbl, uint64_t ms) in rtnl_neightbl_set_anycast_delay() argument
760 ntbl->nt_parms.ntp_anycast_delay = ms; in rtnl_neightbl_set_anycast_delay()
761 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_ANYCAST_DELAY; in rtnl_neightbl_set_anycast_delay()
762 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_anycast_delay()
770 void rtnl_neightbl_set_proxy_delay(struct rtnl_neightbl *ntbl, uint64_t ms) in rtnl_neightbl_set_proxy_delay() argument
772 ntbl->nt_parms.ntp_proxy_delay = ms; in rtnl_neightbl_set_proxy_delay()
773 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_PROXY_DELAY; in rtnl_neightbl_set_proxy_delay()
774 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_proxy_delay()
782 void rtnl_neightbl_set_locktime(struct rtnl_neightbl *ntbl, uint64_t ms) in rtnl_neightbl_set_locktime() argument
784 ntbl->nt_parms.ntp_locktime = ms; in rtnl_neightbl_set_locktime()
785 ntbl->nt_parms.ntp_mask |= NEIGHTBLPARM_ATTR_LOCKTIME; in rtnl_neightbl_set_locktime()
786 ntbl->ce_mask |= NEIGHTBL_ATTR_PARMS; in rtnl_neightbl_set_locktime()