Lines Matching refs:tlv
254 #define TLV_DATA(tlv) ((void *)((char *)(tlv) + TLV_LENGTH(0))) argument
256 static inline int TLV_OK(const void *tlv, __u16 space) in TLV_OK() argument
268 (__be16_to_cpu(((struct tlv_desc *)tlv)->tlv_len) <= space); in TLV_OK()
271 static inline int TLV_CHECK(const void *tlv, __u16 space, __u16 exp_type) in TLV_CHECK() argument
273 return TLV_OK(tlv, space) && in TLV_CHECK()
274 (__be16_to_cpu(((struct tlv_desc *)tlv)->tlv_type) == exp_type); in TLV_CHECK()
277 static inline int TLV_GET_LEN(struct tlv_desc *tlv) in TLV_GET_LEN() argument
279 return __be16_to_cpu(tlv->tlv_len); in TLV_GET_LEN()
282 static inline void TLV_SET_LEN(struct tlv_desc *tlv, __u16 len) in TLV_SET_LEN() argument
284 tlv->tlv_len = __cpu_to_be16(len); in TLV_SET_LEN()
287 static inline int TLV_CHECK_TYPE(struct tlv_desc *tlv, __u16 type) in TLV_CHECK_TYPE() argument
289 return (__be16_to_cpu(tlv->tlv_type) == type); in TLV_CHECK_TYPE()
292 static inline void TLV_SET_TYPE(struct tlv_desc *tlv, __u16 type) in TLV_SET_TYPE() argument
294 tlv->tlv_type = __cpu_to_be16(type); in TLV_SET_TYPE()
297 static inline int TLV_SET(void *tlv, __u16 type, void *data, __u16 len) in TLV_SET() argument
303 tlv_ptr = (struct tlv_desc *)tlv; in TLV_SET()