Searched refs:rta (Results 1 – 6 of 6) sorted by relevance
/tools/testing/selftests/net/mptcp/ |
D | pm_nl_ctl.c | 320 struct rtattr *rta; in resolve_mptcp_pm_netlink() local 328 rta = (void *)(data + off); in resolve_mptcp_pm_netlink() 330 rta->rta_type = CTRL_ATTR_FAMILY_NAME; in resolve_mptcp_pm_netlink() 331 rta->rta_len = RTA_LENGTH(namelen); in resolve_mptcp_pm_netlink() 332 memcpy(RTA_DATA(rta), MPTCP_PM_NAME, namelen); in resolve_mptcp_pm_netlink() 333 off += NLMSG_ALIGN(rta->rta_len); in resolve_mptcp_pm_netlink() 344 struct rtattr *rta, *addr; in dsf() local 407 rta = (void *)(data + off); in dsf() 408 if (inet_pton(AF_INET, params[arg], RTA_DATA(rta))) { in dsf() 410 rta->rta_type = MPTCP_PM_ADDR_ATTR_ADDR4; in dsf() [all …]
|
/tools/testing/selftests/net/ |
D | udpgso.c | 362 struct rtattr *rta; in set_route_mtu() local 393 rta = (void *)(data + off); in set_route_mtu() 394 rta->rta_type = RTA_DST; in set_route_mtu() 395 rta->rta_len = RTA_LENGTH(alen); in set_route_mtu() 397 memcpy(RTA_DATA(rta), &addr4, alen); in set_route_mtu() 399 memcpy(RTA_DATA(rta), &addr6, alen); in set_route_mtu() 400 off += NLMSG_ALIGN(rta->rta_len); in set_route_mtu() 402 rta = (void *)(data + off); in set_route_mtu() 403 rta->rta_type = RTA_OIF; in set_route_mtu() 404 rta->rta_len = RTA_LENGTH(sizeof(int)); in set_route_mtu() [all …]
|
D | tap.c | 36 struct rtattr *rta = in rtattr_add() local 38 rta->rta_type = type; in rtattr_add() 39 rta->rta_len = RTA_LENGTH(len); in rtattr_add() 40 nh->nlmsg_len = RTA_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len); in rtattr_add() 41 return rta; in rtattr_add() 59 struct rtattr *rta = rtattr_add(nh, type, strlen(s)); in rtattr_add_str() local 61 memcpy(RTA_DATA(rta), s, strlen(s)); in rtattr_add_str() 62 return rta; in rtattr_add_str() 68 struct rtattr *rta = rtattr_add(nh, type, strlen(s) + 1); in rtattr_add_strsz() local 70 strcpy(RTA_DATA(rta), s); in rtattr_add_strsz() [all …]
|
D | tun.c | 74 struct rtattr *rta; in tun_delete() local 90 rta = (struct rtattr *)(((char *)&req) + NLMSG_ALIGN(req.nh.nlmsg_len)); in tun_delete() 91 rta->rta_type = IFLA_IFNAME; in tun_delete() 92 rta->rta_len = RTA_LENGTH(IFNAMSIZ); in tun_delete() 93 req.nh.nlmsg_len += rta->rta_len; in tun_delete() 94 memcpy(RTA_DATA(rta), dev, IFNAMSIZ); in tun_delete()
|
/tools/testing/selftests/bpf/prog_tests/ |
D | xfrm_info.c | 174 struct rtattr *rta = in rtattr_add() local 176 rta->rta_type = type; in rtattr_add() 177 rta->rta_len = RTA_LENGTH(len); in rtattr_add() 178 nh->nlmsg_len = RTA_ALIGN(nh->nlmsg_len) + RTA_ALIGN(rta->rta_len); in rtattr_add() 179 return rta; in rtattr_add() 185 struct rtattr *rta = rtattr_add(nh, type, strlen(s)); in rtattr_add_str() local 187 memcpy(RTA_DATA(rta), s, strlen(s)); in rtattr_add_str() 188 return rta; in rtattr_add_str()
|
/tools/testing/selftests/bpf/ |
D | xsk.c | 393 struct rtattr *rta; in xsk_set_mtu() local 406 rta = (struct rtattr *)(((char *)&req) + NLMSG_ALIGN(req.nh.nlmsg_len)); in xsk_set_mtu() 407 rta->rta_type = IFLA_MTU; in xsk_set_mtu() 408 rta->rta_len = RTA_LENGTH(sizeof(unsigned int)); in xsk_set_mtu() 410 memcpy(RTA_DATA(rta), &mtu, sizeof(mtu)); in xsk_set_mtu()
|