Subject: [P2PSIP] Route Logging in RELOAD

From: Jaime Jimenez <[email-masked]>
Date: Tue, 10 Mar 2009 13:16:21 +0200

Hi,

I have a question about the Forwarding Header of RELOAD, particularly 
the Route Logging.

       enum { (255) } RouteLogExtensionType;

       struct {
         RouteLogExtensionType     type;
         uint16                    length;

         select (type){
           /* Extension values go here */
         } extension;
       } RouteLogExtension;

       enum {
          reserved(0),
          tcp_tls(1),
          udp_dtls(2),
          (255)
       } OverlayLink;

       struct {
         opaque                 version<0..28-1>;    /* A string */
         OverlayLink            linkProtocol;            /* TCP or UDP */
         NodeId                 id;
         uint32                 uptime;
         IpAddressPort          address;
         opaque                 certificate<0..216-1>;
         RouteLogExtension      extensions<0..216-1>;
       } RouteLogEntry;

       struct {
          RouteLogEntry         entries<0..216-1>;
       } RouteLog;

The structure defines a RouteLogExtension but I could not interprete 
whether it defines many extensions for each RouteLogEntry or just one.

In the case there are many we have a problem when we parse an encoded 
message since we do not know the length of the RouteLogExtension 
structure or the number of extensions there are. So, if there were many, 
it might be convenient to have a field specifying the length of the list 
of entries.

Thanks, Jaime Jiménez.

---

From: Eric Rescorla <[email-masked]>
Date: Tue, 10 Mar 2009 07:42:11 -0700

AES256-SHAAt Tue, 10 Mar 2009 13:16:21 +0200,
> whether it defines many extensions for each RouteLogEntry or just one.

Many. That syntax means that they're laid end to end up to a total length
of 2^16-1.

> it might be convenient to have a field specifying the length of the list 

Those are both there.

RouteLogExtension.length is the length of each extension.
RouteLogEntry.extensions has a length field.

-Ekr