Home
last modified time | relevance | path

Searched refs:nla_len (Results 1 – 25 of 29) sorted by relevance

12

/freebsd/tests/atf_python/sys/netlink/
H A Dattrs.py27 def nla_len(self): member in NlAttr
40 prepend, self.nla_len, type_str, self.nla_type, self._print_attr_value()
48 nla_len, nla_type = struct.unpack("@HH", data[:4])
49 if nla_len > len(data):
51 if nla_len < 4:
56 nla_len, nla_type = struct.unpack("@HH", data[:4])
92 def nla_len(self): member in NlAttrNested
102 prepend, self.nla_len, type_str, self.nla_type
119 def nla_len(self): member in NlAttrU32
128 nla_len, nla_type = struct.unpack("@HH", data[:4])
[all …]
H A Dmessage.py181 nla_list, nla_len = self.parse_nla_list(data[offset:])
182 offset += nla_len
205 nla_len, raw_nla_type = struct.unpack("@HH", data[off : off + 4])
206 if nla_len + off > len(data):
209 nla_len, len(data) - off
213 val = self.parse_child(data[off + 4 : off + nla_len], nla_type, attr_map)
215 off += align4(nla_len)
222 nla_len, raw_nla_type = struct.unpack("@HH", data[off : off + 4])
223 if nla_len + off > len(data):
226 nla_len, len(data) - off
[all …]
H A Dnetlink_generic.py247 def nla_len(self): member in NlAttrTS
256 nla_len, nla_type = struct.unpack("@HH", data[: NlAttr.HDR_LEN])
257 assert nla_len == NlAttr.HDR_LEN + NlAttrTS.DATA_LEN
261 nla_len, nla_type = struct.unpack("@HH", data[: NlAttr.HDR_LEN])
H A Dnetlink_route.py532 nla_len, nla_type = struct.unpack("@HH", data[:4])
533 data_len = nla_len - 4
552 nla_len, nla_type = struct.unpack("@HH", data[:4])
553 data_len = nla_len - 4
577 def nla_len(self): member in NlAttrVia
585 nla_len, nla_type, family = struct.unpack("@HHB", data[:5])
/freebsd/sys/netlink/route/
H A Diface_drivers.c125 int nla_len = sizeof(struct nlattr) * 3 + in _nl_store_ifp_cookie() local
127 struct nlattr *nla_cookie = npt_alloc(npt, nla_len); in _nl_store_ifp_cookie()
130 nla_cookie->nla_len = nla_len; in _nl_store_ifp_cookie()
134 nla->nla_len = sizeof(struct nlattr) + sizeof(ifindex); in _nl_store_ifp_cookie()
139 nla->nla_len = sizeof(struct nlattr) + ifname_len + 1; in _nl_store_ifp_cookie()
H A Drt.c164 int nla_len = sizeof(struct nlattr) * 2 + sizeof(uint32_t); in dump_rc_nhop_mtu() local
165 struct nlattr *nla = nlmsg_reserve_data(nw, nla_len, struct nlattr); in dump_rc_nhop_mtu()
170 nla->nla_len = nla_len; in dump_rc_nhop_mtu()
173 nla->nla_len = sizeof(struct nlattr) + sizeof(uint32_t); in dump_rc_nhop_mtu()
443 data_len = nla->nla_len - sizeof(struct nlattr); in nlattr_get_multipath()
H A Dnexthop.c412 int nla_len = sizeof(struct nlattr); in dump_nhgrp() local
413 nla_len += NETLINK_ALIGN(num_nhops * sizeof(struct nexthop_grp)); in dump_nhgrp()
414 struct nlattr *nla = nlmsg_reserve_data(nw, nla_len, struct nlattr); in dump_nhgrp()
418 nla->nla_len = nla_len; in dump_nhgrp()
H A Dneigh.c388 if (attrs.nda_lladdr->nla_len != sizeof(struct nlattr) + addrlen) { in rtnl_handle_newneigh()
391 (int)attrs.nda_lladdr->nla_len - (int)sizeof(struct nlattr), addrlen); in rtnl_handle_newneigh()
H A Diface.c150 int nla_len = sizeof(struct nlattr) + sizeof(*stats); in get_stats() local
151 struct nlattr *nla = nlmsg_reserve_data(nw, nla_len, struct nlattr); in get_stats()
155 nla->nla_len = nla_len; in get_stats()
/freebsd/contrib/wpa/src/drivers/
H A Ddriver_nl80211_capa.c267 num = nla_len(tb) / sizeof(u32); in get_akm_suites_info()
358 nla_data(nl_akms), nla_len(nl_akms), NULL); in get_iface_akm_suites_info()
446 num = nla_len(tb) / sizeof(u32); in wiphy_info_cipher_suites()
544 len = nla_len(tb); in wiphy_info_ext_feature_flags()
851 nla_len(attr), NULL); in wiphy_info_extended_capab()
864 len = nla_len(tb1[NL80211_ATTR_EXT_CAPA]); in wiphy_info_extended_capab()
874 len = nla_len(tb1[NL80211_ATTR_EXT_CAPA_MASK]); in wiphy_info_extended_capab()
1032 os_malloc(nla_len(tb[NL80211_ATTR_EXT_CAPA])); in wiphy_info_handler()
1036 nla_len(tb[NL80211_ATTR_EXT_CAPA])); in wiphy_info_handler()
1038 nla_len(tb[NL80211_ATTR_EXT_CAPA]); in wiphy_info_handler()
[all …]
H A Ddriver_nl80211_event.c318 event.assoc_info.req_ies_len = nla_len(req_ie); in mlme_event_assoc()
361 nla_len(tb[NL80211_ATTR_VENDOR_DATA]), NULL); in qca_drv_connect_fail_reason_code_handler()
507 nla_len(link), NULL); in nl80211_parse_qca_vendor_mlo_link_info()
545 nla_parse(tb, NL80211_ATTR_MAX, nla_data(link), nla_len(link), in nl80211_parse_mlo_link_info()
651 if (ieee802_11_parse_elems(nla_data(req_ie), nla_len(req_ie), in nl80211_update_rejected_links_info()
653 ieee802_11_parse_elems(nla_data(resp_ie), nla_len(resp_ie), in nl80211_update_rejected_links_info()
747 ml_ie = get_ml_ie(nla_data(resp_ie), nla_len(resp_ie), in nl80211_parse_mlo_info()
969 event.assoc_reject.resp_ies_len = nla_len(resp_ie); in mlme_event_connect()
1020 event.assoc_info.req_ies_len = nla_len(req_ie); in mlme_event_connect()
1038 event.assoc_info.resp_ies_len = nla_len(resp_ie); in mlme_event_connect()
[all …]
H A Ddriver_nl80211_scan.c765 ie_len = nla_len(bss[NL80211_BSS_INFORMATION_ELEMENTS]); in nl80211_parse_bss_info()
772 beacon_ie_len = nla_len(bss[NL80211_BSS_BEACON_IES]); in nl80211_parse_bss_info()
1120 nla_data(nl_vendor), nla_len(nl_vendor), NULL); in scan_cookie_handler()
/freebsd/sys/netlink/
H A Dnetlink_ctl.h51 #define NLA_DATA_LEN(_nla) ((_nla)->nla_len - NLA_HDRLEN)
60 #define NLA_NEXT(_attr) (struct nlattr *)((char *)_attr + NLA_ALIGN(_attr->nla_len))
66 _attr = (_len -= NLA_ALIGN(_attr->nla_len), NLA_NEXT(_attr)))
H A Dnetlink_message_parser.c85 MPASS(nla->nla_len >= sizeof(struct nlattr)); in nlmsg_report_cookie()
95 nla->nla_len = sizeof(*nla) + sizeof(uint32_t); in nlmsg_report_cookie_u32()
138 nla, nla->nla_type, nla->nla_len, len); in nl_parse_attrs_raw()
139 if (nla->nla_len < sizeof(struct nlattr)) { in nl_parse_attrs_raw()
142 nla, nla->nla_type, nla->nla_len); in nl_parse_attrs_raw()
169 nla->nla_type, nla->nla_len);
186 if (nla->nla_len < sizeof(struct nlattr)) in nl_get_attrs_bmask_raw()
542 NL_LOG(LOG_DEBUG3, "STORING %p len %d", nla, nla->nla_len); in nlf_get_ifp()
H A Dnetlink_message_writer.h186 nla->nla_len = nlattr_save_offset(nw) - off; in nlattr_set_len()
213 nla->nla_len = sz; in _nlmsg_reserve_attr()
225 MPASS(nla_src->nla_len >= sizeof(struct nlattr)); in nlattr_add_raw()
228 nla_src->nla_len - sizeof(struct nlattr), in nlattr_add_raw()
H A Dnetlink_snl.h57 #define NLA_DATA_LEN(_nla) ((int)((_nla)->nla_len - NLA_HDRLEN))
63 #define NLA_NEXT(_attr) (struct nlattr *)(void *)((char *)_attr + NLA_ALIGN(_attr->nla_len))
463 if (nla->nla_len < sizeof(struct nlattr)) in snl_parse_attrs_raw()
741 int data_len = nla->nla_len - data_off; in snl_attr_get_parray_sz()
785 void *ptr = snl_allocz(ss, nla->nla_len); in snl_attr_dup_nla()
788 memcpy(ptr, nla, nla->nla_len); in snl_attr_dup_nla()
1131 nla->nla_len = sz; in snl_reserve_msg_attr_raw()
1150 nla->nla_len = attr_len + sizeof(struct nlattr); in snl_add_msg_attr()
1166 int attr_len = nla_src->nla_len - sizeof(struct nlattr); in snl_add_msg_attr_raw()
1269 nla->nla_len = NETLINK_ALIGN(snl_get_msg_offset(nw) - off); in snl_end_attr_nested()
H A Dnetlink.h232 uint16_t nla_len; /* Total attribute length */ member
H A Dnetlink_domain.c635 .nla.nla_len = sizeof(struct nlattr) + sizeof(uint32_t), in nl_createcontrol()
640 .nla.nla_len = sizeof(struct nlattr) + sizeof(uint32_t), in nl_createcontrol()
/freebsd/sys/compat/linux/
H A Dlinux_netlink.c135 nla->nla_type, nla->nla_len, attrs_len); in rtnl_route_from_linux()
236 struct nlattr *nla = nlmsg_reserve_data(nw, nla_orig->nla_len, struct nlattr); in nlmsg_copy_nla()
238 memcpy(nla, nla_orig, nla_orig->nla_len); in nlmsg_copy_nla()
296 RT_LOG(LOG_DEBUG3, "reading attr %d len %d", nla->nla_type, nla->nla_len); in nlmsg_copy_all_nla()
297 if (nla->nla_len < sizeof(struct nlattr)) { in nlmsg_copy_all_nla()
/freebsd/tests/sys/netlink/
H A Dnetlink_socket.c265 nla = (struct nlattr *)((char *)nla + NLA_ALIGN(nla->nla_len))) { in nla_RTA_DST()
295 .rta_dst.nla_len = sizeof(struct in_addr) + in ATF_TC_BODY()
299 .rta_oif.nla_len = sizeof(uint32_t) + sizeof(struct nlattr), in ATF_TC_BODY()
/freebsd/contrib/libfido2/src/
H A Dnetlink.c135 if ((nlalen = h.u.nla.nla_len) < sizeof(h.u) || nlalen > *len || in nla_from_buf()
173 if (cnt > a->u.nla.nla_len || in nla_read()
177 a->u.nla.nla_len = (uint16_t)(a->u.nla.nla_len - cnt); in nla_read()
283 a.u.nla.nla_len = (uint16_t)(len + sizeof(a.u)); in nlmsg_setattr()
/freebsd/lib/libc/rpc/
H A Dsvc_nl.c305 body->nla_len = sizeof(struct nlattr) + xdr_getpos(&xdrs); in svc_nl_reply()
307 body->nla_len; in svc_nl_reply()
/freebsd/sys/contrib/dev/athk/ath11k/
H A Dtestmode.c324 buf_len = nla_len(tb[ATH11K_TM_ATTR_DATA]); in ath11k_tm_cmd_wmi()
418 buf_len = nla_len(tb[ATH11K_TM_ATTR_DATA]); in ath11k_tm_cmd_wmi_ftm()
/freebsd/sys/contrib/dev/mediatek/mt76/
H A Dtestmode.c493 if (nla_len(cur) != 1 || in mt76_testmode_cmd()
507 if (nla_len(cur) != ETH_ALEN || idx >= 3) in mt76_testmode_cmd()
/freebsd/usr.bin/netstat/
H A Droute_netlink.c298 .nla_fibnum.nla_len = sizeof(struct nlattr) + sizeof(uint32_t), in p_rtable_netlink()

12