Home
last modified time | relevance | path

Searched refs:rta (Results 1 – 25 of 50) sorted by relevance

12

/third_party/musl/src/network/
Dgetifaddrs.c111 struct rtattr *rta; in netlink_msg_to_ifaddr() local
115 for (rta = NLMSG_RTA(h, sizeof(*ifi)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { in netlink_msg_to_ifaddr()
116 if (rta->rta_type != IFLA_STATS) continue; in netlink_msg_to_ifaddr()
117 stats_len = RTA_DATALEN(rta); in netlink_msg_to_ifaddr()
134 for (rta = NLMSG_RTA(h, sizeof(*ifi)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { in netlink_msg_to_ifaddr()
135 switch (rta->rta_type) { in netlink_msg_to_ifaddr()
137 if (RTA_DATALEN(rta) < sizeof(ifs->name)) { in netlink_msg_to_ifaddr()
138 memcpy(ifs->name, RTA_DATA(rta), RTA_DATALEN(rta)); in netlink_msg_to_ifaddr()
143 …copy_lladdr(&ifs->ifa.ifa_addr, &ifs->addr, RTA_DATA(rta), RTA_DATALEN(rta), ifi->ifi_index, ifi->… in netlink_msg_to_ifaddr()
146 …copy_lladdr(&ifs->ifa.ifa_broadaddr, &ifs->ifu, RTA_DATA(rta), RTA_DATALEN(rta), ifi->ifi_index, i… in netlink_msg_to_ifaddr()
[all …]
Dnetlink.h85 #define RTA_DATA(rta) ((void*)((char*)(rta)+sizeof(struct rtattr))) argument
86 #define RTA_DATALEN(rta) ((rta)->rta_len-sizeof(struct rtattr)) argument
87 #define RTA_DATAEND(rta) ((char*)(rta)+(rta)->rta_len) argument
88 #define RTA_NEXT(rta) (struct rtattr*)((char*)(rta)+NETLINK_ALIGN((rta)->rta_len)) argument
89 #define RTA_OK(nlh,end) ((char*)(end)-(char*)(rta) >= sizeof(struct rtattr))
92 #define NLMSG_RTAOK(rta,nlh) RTA_OK(rta,NLMSG_DATAEND(nlh)) argument
Dif_nameindex.c29 struct rtattr *rta; in netlink_msg_to_nameindex() local
37 rta = NLMSG_RTA(h, sizeof(*ifi)); in netlink_msg_to_nameindex()
42 rta = NLMSG_RTA(h, sizeof(*ifa)); in netlink_msg_to_nameindex()
44 for (; NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { in netlink_msg_to_nameindex()
45 if (rta->rta_type != type) continue; in netlink_msg_to_nameindex()
47 namelen = RTA_DATALEN(rta) - 1; in netlink_msg_to_nameindex()
57 memcmp(map->name, RTA_DATA(rta), namelen) == 0) in netlink_msg_to_nameindex()
73 memcpy(map->name, RTA_DATA(rta), namelen); in netlink_msg_to_nameindex()
/third_party/musl/porting/liteos_a/user/src/network/
Dgetifaddrs.c120 struct rtattr *rta; in netlink_msg_to_ifaddr() local
124 for (rta = NLMSG_RTA(h, sizeof(*ifi)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { in netlink_msg_to_ifaddr()
125 if (rta->rta_type != IFLA_STATS) continue; in netlink_msg_to_ifaddr()
126 stats_len = RTA_DATALEN(rta); in netlink_msg_to_ifaddr()
143 for (rta = NLMSG_RTA(h, sizeof(*ifi)); NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { in netlink_msg_to_ifaddr()
144 switch (rta->rta_type) { in netlink_msg_to_ifaddr()
146 if (RTA_DATALEN(rta) < sizeof(ifs->name)) { in netlink_msg_to_ifaddr()
147 memcpy(ifs->name, RTA_DATA(rta), RTA_DATALEN(rta)); in netlink_msg_to_ifaddr()
152 …copy_lladdr(&ifs->ifa.ifa_addr, &ifs->addr, RTA_DATA(rta), RTA_DATALEN(rta), ifi->ifi_index, ifi->… in netlink_msg_to_ifaddr()
155 …copy_lladdr(&ifs->ifa.ifa_broadaddr, &ifs->ifu, RTA_DATA(rta), RTA_DATALEN(rta), ifi->ifi_index, i… in netlink_msg_to_ifaddr()
[all …]
Dif_nameindex.c30 struct rtattr *rta; in netlink_msg_to_nameindex() local
38 rta = NLMSG_RTA(h, sizeof(*ifi)); in netlink_msg_to_nameindex()
43 rta = NLMSG_RTA(h, sizeof(*ifa)); in netlink_msg_to_nameindex()
45 for (; NLMSG_RTAOK(rta, h); rta = RTA_NEXT(rta)) { in netlink_msg_to_nameindex()
46 if (rta->rta_type != type) continue; in netlink_msg_to_nameindex()
48 namelen = RTA_DATALEN(rta) - 1; in netlink_msg_to_nameindex()
58 memcmp(map->name, RTA_DATA(rta), namelen) == 0) in netlink_msg_to_nameindex()
74 memcpy(map->name, RTA_DATA(rta), namelen); in netlink_msg_to_nameindex()
/third_party/ltp/testcases/kernel/crypto/
Dcrypto_user01.c48 static void validate_attr(const struct rtattr *rta) in validate_attr() argument
50 switch (rta->rta_type) { in validate_attr()
52 const struct crypto_report_larval *p = RTA_DATA(rta); in validate_attr()
58 const struct crypto_report_hash *p = RTA_DATA(rta); in validate_attr()
64 const struct crypto_report_blkcipher *p = RTA_DATA(rta); in validate_attr()
71 const struct crypto_report_aead *p = RTA_DATA(rta); in validate_attr()
78 const struct crypto_report_comp *p = RTA_DATA(rta); in validate_attr()
84 const struct crypto_report_rng *p = RTA_DATA(rta); in validate_attr()
90 const struct crypto_report_cipher *p = RTA_DATA(rta); in validate_attr()
96 const struct crypto_report_akcipher *p = RTA_DATA(rta); in validate_attr()
[all …]
/third_party/wpa_supplicant/wpa_supplicant-2.9/src/drivers/
Dpriv_netlink.h64 #define RTA_OK(rta,len) \ argument
65 ((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \
66 (rta)->rta_len <= (len))
67 #define RTA_NEXT(rta,attrlen) \ argument
68 ((attrlen) -= RTA_ALIGN((rta)->rta_len), \
69 (struct rtattr *) (((char *)(rta)) + RTA_ALIGN((rta)->rta_len)))
72 #define RTA_DATA(rta) ((void *) (((char *) (rta)) + RTA_LENGTH(0))) argument
73 #define RTA_PAYLOAD(rta) ((int) ((rta)->rta_len) - RTA_LENGTH(0)) argument
Dnetlink.c177 struct rtattr *rta; in netlink_send_oper_ifla() local
196 rta = aliasing_hide_typecast( in netlink_send_oper_ifla()
199 rta->rta_type = IFLA_LINKMODE; in netlink_send_oper_ifla()
200 rta->rta_len = RTA_LENGTH(sizeof(char)); in netlink_send_oper_ifla()
201 *((char *) RTA_DATA(rta)) = linkmode; in netlink_send_oper_ifla()
205 rta = aliasing_hide_typecast( in netlink_send_oper_ifla()
208 rta->rta_type = IFLA_OPERSTATE; in netlink_send_oper_ifla()
209 rta->rta_len = RTA_LENGTH(sizeof(char)); in netlink_send_oper_ifla()
210 *((char *) RTA_DATA(rta)) = operstate; in netlink_send_oper_ifla()
/third_party/wpa_supplicant/wpa_supplicant-2.9_standard/src/drivers/
Dpriv_netlink.h64 #define RTA_OK(rta,len) \ argument
65 ((len) > 0 && (rta)->rta_len >= sizeof(struct rtattr) && \
66 (rta)->rta_len <= (len))
67 #define RTA_NEXT(rta,attrlen) \ argument
68 ((attrlen) -= RTA_ALIGN((rta)->rta_len), \
69 (struct rtattr *) (((char *)(rta)) + RTA_ALIGN((rta)->rta_len)))
72 #define RTA_DATA(rta) ((void *) (((char *) (rta)) + RTA_LENGTH(0))) argument
73 #define RTA_PAYLOAD(rta) ((int) ((rta)->rta_len) - RTA_LENGTH(0)) argument
Dnetlink.c177 struct rtattr *rta; in netlink_send_oper_ifla() local
196 rta = aliasing_hide_typecast( in netlink_send_oper_ifla()
199 rta->rta_type = IFLA_LINKMODE; in netlink_send_oper_ifla()
200 rta->rta_len = RTA_LENGTH(sizeof(char)); in netlink_send_oper_ifla()
201 *((char *) RTA_DATA(rta)) = linkmode; in netlink_send_oper_ifla()
205 rta = aliasing_hide_typecast( in netlink_send_oper_ifla()
208 rta->rta_type = IFLA_OPERSTATE; in netlink_send_oper_ifla()
209 rta->rta_len = RTA_LENGTH(sizeof(char)); in netlink_send_oper_ifla()
210 *((char *) RTA_DATA(rta)) = operstate; in netlink_send_oper_ifla()
/third_party/ltp/testcases/kernel/containers/share/
Dns_ifmove.c80 struct rtattr *rta; in main() local
110 rta = (struct rtattr *)(((char *) &req) + in main()
112 rta->rta_type = IFLA_NET_NS_PID; in main()
113 rta->rta_len = RTA_LENGTH(sizeof(int)); in main()
116 memcpy(RTA_DATA(rta), &pid, sizeof(pid)); in main()
/third_party/toybox/toys/pending/
Dip.c454 static void add_varlen_rtattr_to_buffer(struct rtattr *rta, int maxlen, in add_varlen_rtattr_to_buffer() argument
458 if (RTA_ALIGN(rta->rta_len) + RTA_ALIGN(len) > maxlen) { in add_varlen_rtattr_to_buffer()
461 subrta = (struct rtattr*)(((char*)rta) + RTA_ALIGN(rta->rta_len)); in add_varlen_rtattr_to_buffer()
467 rta->rta_len = NLMSG_ALIGN(rta->rta_len) + RTA_ALIGN(len); in add_varlen_rtattr_to_buffer()
470 static void add_uint32_rtattr_to_buffer(struct rtattr *rta, int maxlen, in add_uint32_rtattr_to_buffer() argument
472 add_varlen_rtattr_to_buffer(rta, maxlen, type, (char*)&attr, sizeof(attr)); in add_uint32_rtattr_to_buffer()
482 struct rtattr *rta; in add_string_to_rtattr() local
485 rta = (struct rtattr*)(((char*)n) + NLMSG_ALIGN(n->nlmsg_len)); in add_string_to_rtattr()
486 rta->rta_type = type; in add_string_to_rtattr()
487 rta->rta_len = len; in add_string_to_rtattr()
[all …]
/third_party/vk-gl-cts/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/spirv1p4/opselect/
Dvector_element_select.amber10 OpDecorate %rta ArrayStride 16
28 %rta = OpTypeRuntimeArray %int4
29 %block = OpTypeStruct %rta
Darray_select.amber11 OpDecorate %rta ArrayStride 4
35 %rta = OpTypeRuntimeArray %int
36 %struct = OpTypeStruct %rta
Dssbo_pointers_select.amber16 OpDecorate %rta ArrayStride 4
37 %rta = OpTypeRuntimeArray %int
39 %block = OpTypeStruct %rta
Darray_stride_select.amber11 OpDecorate %rta ArrayStride 4
35 %rta = OpTypeRuntimeArray %int
36 %struct = OpTypeStruct %rta
Dnested_array_select.amber13 OpDecorate %rta ArrayStride 4
36 %rta = OpTypeRuntimeArray %int
37 %block = OpTypeStruct %rta
Dnested_struct_select.amber14 OpDecorate %rta ArrayStride 4
36 %rta = OpTypeRuntimeArray %int
37 %block = OpTypeStruct %rta
Dwg_pointers_2_select.amber17 OpDecorate %rta ArrayStride 4
37 %rta = OpTypeRuntimeArray %int
39 %block = OpTypeStruct %rta
Dssbo_pointers_2_select.amber17 OpDecorate %rta ArrayStride 4
40 %rta = OpTypeRuntimeArray %int
42 %block = OpTypeStruct %rta
Dwg_pointers_select.amber17 OpDecorate %rta ArrayStride 4
37 %rta = OpTypeRuntimeArray %int
39 %block = OpTypeStruct %rta
/third_party/vk-gl-cts/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/spirv1p4/opptrnotequal/
Ddifferent_wgs_not_equal.amber12 OpDecorate %rta ArrayStride 4
22 %rta = OpTypeRuntimeArray %int
23 %struct = OpTypeStruct %rta
33 %ptr_ssbo_rta = OpTypePointer StorageBuffer %rta
Ddifferent_ssbos_not_equal.amber12 OpDecorate %rta ArrayStride 4
28 %rta = OpTypeRuntimeArray %int
29 %struct = OpTypeStruct %rta
31 %ptr_ssbo_rta = OpTypePointer StorageBuffer %rta
/third_party/vk-gl-cts/external/vulkancts/data/vulkan/amber/spirv_assembly/instruction/spirv1p4/opptrequal/
Ddifferent_ssbos_equal.amber12 OpDecorate %rta ArrayStride 4
28 %rta = OpTypeRuntimeArray %int
29 %struct = OpTypeStruct %rta
31 %ptr_ssbo_rta = OpTypePointer StorageBuffer %rta
/third_party/vk-gl-cts/external/amber/src/tests/cases/
Dshader_specialization.amber33 OpDecorate %rta ArrayStride 4
52 %rta = OpTypeRuntimeArray %int
53 %struct = OpTypeStruct %rta

12