Home
last modified time | relevance | path

Searched refs:attrlen (Results 1 – 18 of 18) sorted by relevance

/linux-6.6.21/lib/
Dnlattr.c386 int minlen = 0, attrlen = nla_len(nla), type = nla_type(nla); in validate_nla() local
400 if (nla_attr_len[pt->type] && attrlen != nla_attr_len[pt->type]) { in validate_nla()
436 if (attrlen > 0) in validate_nla()
441 if (attrlen != sizeof(struct nla_bitfield32)) in validate_nla()
451 minlen = min_t(int, attrlen, pt->len + 1); in validate_nla()
453 minlen = attrlen; in validate_nla()
462 if (attrlen < 1) in validate_nla()
468 if (buf[attrlen - 1] == '\0') in validate_nla()
469 attrlen--; in validate_nla()
471 if (attrlen > pt->len) in validate_nla()
[all …]
/linux-6.6.21/drivers/net/ethernet/rocker/
Drocker_tlv.c33 int attrtype, int attrlen, const void *data) in rocker_tlv_put() argument
36 int total_size = rocker_tlv_total_size(attrlen); in rocker_tlv_put()
45 tlv->len = rocker_tlv_attr_size(attrlen); in rocker_tlv_put()
46 memcpy(rocker_tlv_data(tlv), data, attrlen); in rocker_tlv_put()
47 memset((char *) tlv + tlv->len, 0, rocker_tlv_padlen(attrlen)); in rocker_tlv_put()
Drocker_tlv.h136 int attrtype, int attrlen, const void *data);
/linux-6.6.21/net/802/
Dmrp.c368 u8 attrtype, u8 attrlen) in mrp_pdu_append_msg_hdr() argument
383 mh->attrlen = attrlen; in mrp_pdu_append_msg_hdr()
389 const void *firstattrvalue, u8 attrlen) in mrp_pdu_append_vecattr_hdr() argument
393 if (skb_tailroom(app->pdu) < sizeof(*vah) + attrlen) in mrp_pdu_append_vecattr_hdr()
395 vah = __skb_put(app->pdu, sizeof(*vah) + attrlen); in mrp_pdu_append_vecattr_hdr()
397 memcpy(vah->firstattrvalue, firstattrvalue, attrlen); in mrp_pdu_append_vecattr_hdr()
399 memcpy(mrp_cb(app->pdu)->attrvalue, firstattrvalue, attrlen); in mrp_pdu_append_vecattr_hdr()
423 mrp_cb(app->pdu)->mh->attrlen != attr->len) { in mrp_pdu_append_vecattr_event()
655 mrp_cb(skb)->mh->attrlen, in mrp_pdu_parse_vecattr_event()
711 if (sizeof(struct mrp_skb_cb) + mrp_cb(skb)->mh->attrlen > in mrp_pdu_parse_vecattr()
[all …]
/linux-6.6.21/include/net/
Dnetlink.h526 struct nlattr *__nla_reserve(struct sk_buff *skb, int attrtype, int attrlen);
528 int attrlen, int padattr);
529 void *__nla_reserve_nohdr(struct sk_buff *skb, int attrlen);
530 struct nlattr *nla_reserve(struct sk_buff *skb, int attrtype, int attrlen);
532 int attrlen, int padattr);
533 void *nla_reserve_nohdr(struct sk_buff *skb, int attrlen);
534 void __nla_put(struct sk_buff *skb, int attrtype, int attrlen,
536 void __nla_put_64bit(struct sk_buff *skb, int attrtype, int attrlen,
538 void __nla_put_nohdr(struct sk_buff *skb, int attrlen, const void *data);
539 int nla_put(struct sk_buff *skb, int attrtype, int attrlen, const void *data);
[all …]
Dmrp.h17 u8 attrlen; member
/linux-6.6.21/include/uapi/linux/netfilter/
Dnfnetlink_compat.h41 #define NFA_NEXT(nfa,attrlen) ((attrlen) -= NFA_ALIGN((nfa)->nfa_len), \ argument
/linux-6.6.21/net/core/
Dlwtunnel.c194 int attrlen; in lwtunnel_valid_encap_type_attr() local
197 attrlen = rtnh_attrlen(rtnh); in lwtunnel_valid_encap_type_attr()
198 if (attrlen > 0) { in lwtunnel_valid_encap_type_attr()
200 nla_entype = nla_find(attrs, attrlen, RTA_ENCAP_TYPE); in lwtunnel_valid_encap_type_attr()
/linux-6.6.21/net/netfilter/
Dnfnetlink.c259 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_msg() local
276 attr, attrlen, in nfnetlink_rcv_msg()
497 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_batch() local
514 attr, attrlen, in nfnetlink_rcv_batch()
609 int attrlen = nlh->nlmsg_len - min_len; in nfnetlink_rcv_skb_batch() local
622 err = nla_parse_deprecated(cda, NFNL_BATCH_MAX, attr, attrlen, in nfnetlink_rcv_skb_batch()
/linux-6.6.21/fs/xfs/libxfs/
Dxfs_attr_remote.h9 int xfs_attr3_rmt_blocks(struct xfs_mount *mp, int attrlen);
Dxfs_attr_remote.c52 int attrlen) in xfs_attr3_rmt_blocks() argument
56 return (attrlen + buflen - 1) / buflen; in xfs_attr3_rmt_blocks()
58 return XFS_B_TO_FSB(mp, attrlen); in xfs_attr3_rmt_blocks()
/linux-6.6.21/net/ipv4/
Dfib_semantics.c701 int attrlen; in fib_get_nhs() local
720 attrlen = rtnh_attrlen(rtnh); in fib_get_nhs()
721 if (attrlen > 0) { in fib_get_nhs()
724 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in fib_get_nhs()
725 nlav = nla_find(attrs, attrlen, RTA_VIA); in fib_get_nhs()
745 nla = nla_find(attrs, attrlen, RTA_FLOW); in fib_get_nhs()
754 fib_cfg.fc_encap = nla_find(attrs, attrlen, RTA_ENCAP); in fib_get_nhs()
758 nla = nla_find(attrs, attrlen, RTA_ENCAP_TYPE); in fib_get_nhs()
938 int attrlen; in fib_nh_match() local
946 attrlen = rtnh_attrlen(rtnh); in fib_nh_match()
[all …]
/linux-6.6.21/fs/nfs/
Dcallback_xdr.c108 unsigned int attrlen; in decode_bitmap() local
113 attrlen = ntohl(*p); in decode_bitmap()
114 p = xdr_inline_decode(xdr, attrlen << 2); in decode_bitmap()
117 if (likely(attrlen > 0)) in decode_bitmap()
119 if (attrlen > 1) in decode_bitmap()
Dnfs4xdr.c1611 uint32_t attrlen = 0; in encode_readdir() local
1629 attrlen = i+1; in encode_readdir()
1635 p = reserve_space(xdr, 12 + (attrlen << 2)); in encode_readdir()
1638 *p++ = cpu_to_be32(attrlen); in encode_readdir()
1639 for (i = 0; i < attrlen; i++) in encode_readdir()
3281 static int decode_attr_length(struct xdr_stream *xdr, uint32_t *attrlen, unsigned int *savep) in decode_attr_length() argument
3288 *attrlen = be32_to_cpup(p); in decode_attr_length()
4297 static int verify_attr_len(struct xdr_stream *xdr, unsigned int savep, uint32_t attrlen) in verify_attr_len() argument
4299 unsigned int attrwords = XDR_QUADLEN(attrlen); in verify_attr_len()
4444 uint32_t attrlen, bitmap[3] = {0}; in decode_server_caps() local
[all …]
/linux-6.6.21/net/mpls/
Daf_mpls.c848 int attrlen; in mpls_count_nexthops() local
851 attrlen = rtnh_attrlen(rtnh); in mpls_count_nexthops()
852 nla = nla_find(attrs, attrlen, RTA_VIA); in mpls_count_nexthops()
863 nla = nla_find(attrs, attrlen, RTA_NEWDST); in mpls_count_nexthops()
896 int attrlen; in mpls_nh_build_multi() local
911 attrlen = rtnh_attrlen(rtnh); in mpls_nh_build_multi()
912 if (attrlen > 0) { in mpls_nh_build_multi()
915 nla_via = nla_find(attrs, attrlen, RTA_VIA); in mpls_nh_build_multi()
916 nla_newdst = nla_find(attrs, attrlen, RTA_NEWDST); in mpls_nh_build_multi()
/linux-6.6.21/include/uapi/linux/
Drtnetlink.h223 #define RTA_NEXT(rta,attrlen) ((attrlen) -= RTA_ALIGN((rta)->rta_len), \ argument
/linux-6.6.21/net/ipv6/
Droute.c5243 int attrlen; in ip6_route_multipath_add() local
5265 attrlen = rtnh_attrlen(rtnh); in ip6_route_multipath_add()
5266 if (attrlen > 0) { in ip6_route_multipath_add()
5269 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in ip6_route_multipath_add()
5278 r_cfg.fc_encap = nla_find(attrs, attrlen, RTA_ENCAP); in ip6_route_multipath_add()
5283 nla = nla_find(attrs, attrlen, RTA_ENCAP_TYPE); in ip6_route_multipath_add()
5431 int attrlen; in ip6_route_multipath_del() local
5443 attrlen = rtnh_attrlen(rtnh); in ip6_route_multipath_del()
5444 if (attrlen > 0) { in ip6_route_multipath_del()
5447 nla = nla_find(attrs, attrlen, RTA_GATEWAY); in ip6_route_multipath_del()
/linux-6.6.21/fs/btrfs/
Dsend.c716 #define TLV_PUT(sctx, attrtype, data, attrlen) \ argument
718 ret = tlv_put(sctx, attrtype, data, attrlen); \