• Home
  • Raw
  • Download

Lines Matching refs:rta

399 	struct rtattr *rta;  in if_copyrt()  local
418 rta = (struct rtattr *)RTM_RTA(rtm); in if_copyrt()
420 while (RTA_OK(rta, len)) { in if_copyrt()
421 switch (rta->rta_type) { in if_copyrt()
423 memcpy(&rt->dest.s_addr, RTA_DATA(rta), in if_copyrt()
427 memcpy(&rt->gate.s_addr, RTA_DATA(rta), in if_copyrt()
431 memcpy(&prefsrc.s_addr, RTA_DATA(rta), in if_copyrt()
436 *(unsigned int *)RTA_DATA(rta)); in if_copyrt()
439 rt->metric = *(unsigned int *)RTA_DATA(rta); in if_copyrt()
442 rta = RTA_NEXT(rta, len); in if_copyrt()
465 struct rtattr *rta; in if_copyrt6() local
483 rta = (struct rtattr *)RTM_RTA(rtm); in if_copyrt6()
485 while (RTA_OK(rta, len)) { in if_copyrt6()
486 switch (rta->rta_type) { in if_copyrt6()
488 memcpy(&rt->dest.s6_addr, RTA_DATA(rta), in if_copyrt6()
492 memcpy(&rt->gate.s6_addr, RTA_DATA(rta), in if_copyrt6()
497 *(unsigned int *)RTA_DATA(rta)); in if_copyrt6()
500 rt->metric = *(unsigned int *)RTA_DATA(rta); in if_copyrt6()
503 rta = RTA_NEXT(rta, len); in if_copyrt6()
582 struct rtattr *rta; in link_addr() local
605 rta = (struct rtattr *)IFA_RTA(ifa); in link_addr()
613 while (RTA_OK(rta, len)) { in link_addr()
614 switch (rta->rta_type) { in link_addr()
617 memcpy(&dest.s_addr, RTA_DATA(rta), in link_addr()
622 memcpy(&addr.s_addr, RTA_DATA(rta), in link_addr()
626 rta = RTA_NEXT(rta, len); in link_addr()
635 while (RTA_OK(rta, len)) { in link_addr()
636 switch (rta->rta_type) { in link_addr()
638 memcpy(&addr6.s6_addr, RTA_DATA(rta), in link_addr()
642 rta = RTA_NEXT(rta, len); in link_addr()
694 struct rtattr *rta; in link_neigh() local
705 rta = (struct rtattr *)RTM_RTA(r); in link_neigh()
717 while (RTA_OK(rta, len)) { in link_neigh()
718 switch (rta->rta_type) { in link_neigh()
720 memcpy(&addr6.s6_addr, RTA_DATA(rta), in link_neigh()
724 rta = RTA_NEXT(rta, len); in link_neigh()
739 struct rtattr *rta, *hwaddr; in link_netlink() local
765 rta = (struct rtattr *)(void *)((char *)ifi +NLMSG_ALIGN(sizeof(*ifi))); in link_netlink()
770 while (RTA_OK(rta, len)) { in link_netlink()
771 switch (rta->rta_type) { in link_netlink()
779 strlcpy(ifn, RTA_DATA(rta), sizeof(ifn)); in link_netlink()
782 hwaddr = rta; in link_netlink()
785 rta = RTA_NEXT(rta, len); in link_netlink()
880 struct rtattr *rta; in add_attr_l() local
887 rta = NLMSG_TAIL(n); in add_attr_l()
888 rta->rta_type = type; in add_attr_l()
889 rta->rta_len = len; in add_attr_l()
891 memcpy(RTA_DATA(rta), data, alen); in add_attr_l()
902 struct rtattr *rta; in add_attr_32() local
909 rta = NLMSG_TAIL(n); in add_attr_32()
910 rta->rta_type = type; in add_attr_32()
911 rta->rta_len = len; in add_attr_32()
912 memcpy(RTA_DATA(rta), &data, sizeof(data)); in add_attr_32()
1499 rta_add_attr_32(struct rtattr *rta, unsigned short maxlen, in rta_add_attr_32() argument
1505 if (RTA_ALIGN(rta->rta_len) + len > maxlen) { in rta_add_attr_32()
1511 (((char*)rta) + RTA_ALIGN(rta->rta_len)); in rta_add_attr_32()
1515 rta->rta_len = (unsigned short)(NLMSG_ALIGN(rta->rta_len) + len); in rta_add_attr_32()