/net/nfc/ |
D | llcp_commands.c | 32 static u8 llcp_tlv8(const u8 *tlv, u8 type) in llcp_tlv8() argument 34 if (tlv[0] != type || tlv[1] != llcp_tlv_length[tlv[0]]) in llcp_tlv8() 37 return tlv[2]; in llcp_tlv8() 40 static u16 llcp_tlv16(const u8 *tlv, u8 type) in llcp_tlv16() argument 42 if (tlv[0] != type || tlv[1] != llcp_tlv_length[tlv[0]]) in llcp_tlv16() 45 return be16_to_cpu(*((__be16 *)(tlv + 2))); in llcp_tlv16() 49 static u8 llcp_tlv_version(const u8 *tlv) in llcp_tlv_version() argument 51 return llcp_tlv8(tlv, LLCP_TLV_VERSION); in llcp_tlv_version() 54 static u16 llcp_tlv_miux(const u8 *tlv) in llcp_tlv_miux() argument 56 return llcp_tlv16(tlv, LLCP_TLV_MIUX) & 0x7ff; in llcp_tlv_miux() [all …]
|
D | llcp_core.c | 857 const u8 *tlv = &skb->data[2]; in nfc_llcp_connect_sn() local 861 type = tlv[0]; in nfc_llcp_connect_sn() 862 length = tlv[1]; in nfc_llcp_connect_sn() 868 return &tlv[2]; in nfc_llcp_connect_sn() 872 tlv += length + 2; in nfc_llcp_connect_sn() 1281 const u8 *tlv; in nfc_llcp_recv_snl() local 1300 tlv = &skb->data[LLCP_HEADER_SIZE]; in nfc_llcp_recv_snl() 1306 type = tlv[0]; in nfc_llcp_recv_snl() 1307 length = tlv[1]; in nfc_llcp_recv_snl() 1311 tid = tlv[2]; in nfc_llcp_recv_snl() [all …]
|
D | llcp.h | 39 u8 *tlv; member
|
/net/ife/ |
D | ife.c | 102 const struct meta_tlvhdr *tlv; in __ife_tlv_meta_valid() local 105 if (unlikely(skbdata + sizeof(*tlv) > ifehdr_end)) in __ife_tlv_meta_valid() 108 tlv = (const struct meta_tlvhdr *)skbdata; in __ife_tlv_meta_valid() 109 tlvlen = ntohs(tlv->len); in __ife_tlv_meta_valid() 130 struct meta_tlvhdr *tlv; in ife_tlv_meta_decode() local 135 tlv = (struct meta_tlvhdr *)skbdata; in ife_tlv_meta_decode() 136 *dlen = ntohs(tlv->len) - NLA_HDRLEN; in ife_tlv_meta_decode() 137 *attrtype = ntohs(tlv->type); in ife_tlv_meta_decode() 148 struct meta_tlvhdr *tlv = (struct meta_tlvhdr *) skbdata; in ife_tlv_meta_next() local 149 u16 tlvlen = ntohs(tlv->len); in ife_tlv_meta_next() [all …]
|
/net/ipv6/ |
D | seg6_hmac.c | 87 struct sr6_tlv_hmac *tlv; in seg6_get_tlv_hmac() local 95 tlv = (struct sr6_tlv_hmac *) in seg6_get_tlv_hmac() 98 if (tlv->tlvhdr.type != SR6_TLV_HMAC || tlv->tlvhdr.len != 38) in seg6_get_tlv_hmac() 101 return tlv; in seg6_get_tlv_hmac() 242 struct sr6_tlv_hmac *tlv; in seg6_hmac_validate_skb() local 250 tlv = seg6_get_tlv_hmac(srh); in seg6_hmac_validate_skb() 253 if (idev->cnf.seg6_require_hmac > 0 && !tlv) in seg6_hmac_validate_skb() 261 if (idev->cnf.seg6_require_hmac == 0 && !tlv) in seg6_hmac_validate_skb() 266 hinfo = seg6_hmac_info_lookup(net, be32_to_cpu(tlv->hmackeyid)); in seg6_hmac_validate_skb() 273 if (memcmp(hmac_output, tlv->hmac, SEG6_HMAC_FIELD_LEN) != 0) in seg6_hmac_validate_skb() [all …]
|
D | seg6.c | 59 struct sr6_tlv *tlv; in seg6_validate_srh() local 62 if (trailing < sizeof(*tlv)) in seg6_validate_srh() 65 tlv = (struct sr6_tlv *)((unsigned char *)srh + tlv_offset); in seg6_validate_srh() 66 tlv_len = sizeof(*tlv) + tlv->len; in seg6_validate_srh()
|
D | calipso.c | 810 unsigned char *tlv = (unsigned char *)opt; in calipso_tlv_len() local 815 if (tlv[offset] == IPV6_TLV_PAD1) in calipso_tlv_len() 819 tlv_len = tlv[offset + 1] + 2; in calipso_tlv_len()
|
/net/tipc/ |
D | netlink_compat.c | 91 static inline int TLV_GET_DATA_LEN(struct tlv_desc *tlv) in TLV_GET_DATA_LEN() argument 93 return TLV_GET_LEN(tlv) - TLV_SPACE(0); in TLV_GET_DATA_LEN() 98 struct tlv_desc *tlv = (struct tlv_desc *)skb_tail_pointer(skb); in tipc_add_tlv() local 104 memset(tlv, 0, TLV_SPACE(len)); in tipc_add_tlv() 105 tlv->tlv_type = htons(type); in tipc_add_tlv() 106 tlv->tlv_len = htons(TLV_LENGTH(len)); in tipc_add_tlv() 108 memcpy(TLV_DATA(tlv), data, len); in tipc_add_tlv() 115 struct tlv_desc *tlv = (struct tlv_desc *)skb->data; in tipc_tlv_init() local 117 TLV_SET_LEN(tlv, 0); in tipc_tlv_init() 118 TLV_SET_TYPE(tlv, type); in tipc_tlv_init() [all …]
|
/net/atm/ |
D | mpc.c | 1340 uint8_t tlv[4 + 1 + 1 + 1 + ATM_ESA_LEN]; in set_mpc_ctrl_addr_rcvd() local 1342 tlv[0] = 00; tlv[1] = 0xa0; tlv[2] = 0x3e; tlv[3] = 0x2a; /* type */ in set_mpc_ctrl_addr_rcvd() 1343 tlv[4] = 1 + 1 + ATM_ESA_LEN; /* length */ in set_mpc_ctrl_addr_rcvd() 1344 tlv[5] = 0x02; /* MPOA client */ in set_mpc_ctrl_addr_rcvd() 1345 tlv[6] = 0x00; /* number of MPS MAC addresses */ in set_mpc_ctrl_addr_rcvd() 1347 memcpy(&tlv[7], mesg->MPS_ctrl, ATM_ESA_LEN); /* MPC ctrl ATM addr */ in set_mpc_ctrl_addr_rcvd() 1352 for (i = 7; i < sizeof(tlv); i++) in set_mpc_ctrl_addr_rcvd() 1353 dprintk_cont(" %02x", tlv[i]); in set_mpc_ctrl_addr_rcvd() 1360 tlv, sizeof(tlv)); in set_mpc_ctrl_addr_rcvd()
|
D | lec_arpc.h | 58 struct tlv { struct
|
/net/sched/ |
D | em_meta.c | 717 static int meta_var_dump(struct sk_buff *skb, struct meta_value *v, int tlv) in meta_var_dump() argument 720 nla_put(skb, tlv, v->len, (void *) v->val)) in meta_var_dump() 769 static int meta_int_dump(struct sk_buff *skb, struct meta_value *v, int tlv) in meta_int_dump() argument 772 if (nla_put(skb, tlv, sizeof(unsigned long), &v->val)) in meta_int_dump() 775 if (nla_put_u32(skb, tlv, v->val)) in meta_int_dump()
|
D | ematch.c | 437 int tcf_em_tree_dump(struct sk_buff *skb, struct tcf_ematch_tree *tree, int tlv) in tcf_em_tree_dump() argument 444 top_start = nla_nest_start_noflag(skb, tlv); in tcf_em_tree_dump()
|
/net/bluetooth/ |
D | mgmt_config.c | 81 #define TLV_GET_LE16(tlv) le16_to_cpu(*((__le16 *)(TO_TLV(tlv)->value))) argument
|