#ifndef  __SSL_TLV_H__
#define __SSL_TLV_H__

#include "types.h"

typedef struct{
    uint8_t len;
    uint8_t value[1];
}__attribute__((packed))lv_t, *lv_ptr;

typedef struct{
    uint8_t tag;
    uint8_t len;
    uint8_t value[1];
}__attribute__((packed))tlv_t, *tlv_ptr;

typedef struct{
    uint8_t tag;
    union{
        uint16_t len;
        struct{
            uint8_t len_lsb;
            uint8_t len_msb;
        };
    };
    uint8_t value[1];
}__attribute__((packed))tlv_widet, *tlv_wide_ptr;

#endif /*__SSL_TLV_H__*/

