Lines Matching refs:tlv
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()
128 struct tlv_desc *tlv; in tipc_tlv_sprintf() local
133 tlv = (struct tlv_desc *)skb->data; in tipc_tlv_sprintf()
134 len = TLV_GET_LEN(tlv); in tipc_tlv_sprintf()
135 buf = TLV_DATA(tlv) + len; in tipc_tlv_sprintf()
141 TLV_SET_LEN(tlv, n + len); in tipc_tlv_sprintf()