• Marek Lindner's avatar
    batman-adv: tvlv - basic infrastructure · ef261577
    Marek Lindner authored
    The goal is to provide the infrastructure for sending, receiving and
    parsing information 'containers' while preserving backward
    compatibility. TVLV (based on the commonly known Type Length Value
    technique) was chosen as the format for those containers. Even if a
    node does not know the tvlv type of a certain container it can simply
    skip the current container and proceed with the next. Past experience
    has shown features evolve over time, so a 'version' field was added
    right from the start to allow differentiating between feature
    variants - hence the name: T(ype) V(ersion) L(ength) V(alue).
    
    This patch introduces the basic TVLV infrastructure:
     * register / unregister tvlv containers to be sent with each OGM
       (on primary interfaces only)
     * register / unregister callback handlers to be called upon
       finding the corresponding tvlv type in a tvlv buffer
     * unicast tvlv send / receive API calls
    Signed-off-by: default avatarMarek Lindner <lindner_marek@yahoo.de>
    Signed-off-by: default avatarSpyros Gasteratos <morfeas3000@gmail.com>
    Signed-off-by: default avatarAntonio Quartulli <antonio@meshcoding.com>
    ef261577
types.h 38.5 KB