[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[rohc] ROHCv2 IP-ID encoding.



Kristofer, Ghyslain,

There may be a problem in the FN of draft-ietf-rohc-rfc3095bis-rohcv2-
profiles-01.txt for ip-id with ip_id_beh <2 (sequential & swapped sequential).

There is no relationship between ip_id field and ip_id_offset, when using
compressed format 'long' in encoding optional_ip_id_lsb used by co_common and
enc_ipid_dyn used in dynamic chain. How do ip_id_offset get an initial value (if
not set by long) when format nbo/non_nbo applies a lsb to the field?

I am looking at this from the decompressor's point of view. The FN only describes
it for the compressor. Shouldn't it be both ways...

The first time nbo or non_nbo is used, ip_id_offset will be undefined. Applying a
lsb to an undefined field will make the format fail?

As far as I can see, the ipid.ULENGTH attribute is undefined for nbo and non_nbo
in ip_id_lsb used by optional_ip_id (co_common)?

Am I getting this right or have I missed something? Please have a look at this.

See FN below for encoding methods used in co_common...

ip_id_lsb(behavior, k)
{
  UNCOMPRESSED {
    ip_id [ 16 ];
  }

  CONTROL {
    ip_id_offset [ 16 ];
    ip_id_nbo    [ 16 ];
  }

  COMPRESSED nbo {
    ENFORCE(behavior == IP_ID_BEHAVIOR_SEQUENTIAL);
    ENFORCE(ip_id_offset.UVALUE == ip_id.UVALUE - msn.UVALUE);
    ip_id_offset =:= lsb(k, ((2^k) / 4) - 1) [ k ];
  }

  COMPRESSED non_nbo {
    ENFORCE(behavior == IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED);
    ENFORCE(ip_id_nbo.UVALUE ==
            (ip_id.UVALUE / 256) + (ip_id.UVALUE % 256) * 256);
    ENFORCE(ip_id_nbo.ULENGTH == 16);
    ENFORCE(ip_id_offset.UVALUE == ip_id_nbo.UVALUE - msn.UVALUE);
    ip_id_offset =:= lsb(k, ((2^k) / 4) - 1) [ k ];
  }
}

optional_ip_id_lsb(behavior, indicator)
{
  UNCOMPRESSED {
    ip_id [ 16 ];
  }

  COMPRESSED short {
    ENFORCE((behavior == IP_ID_BEHAVIOR_SEQUENTIAL) ||
            (behavior == IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
    ENFORCE(indicator == 0);
    ip_id =:= ip_id_lsb(behavior, 8) [ 8 ];
  }

  COMPRESSED long {
    ENFORCE((behavior == IP_ID_BEHAVIOR_SEQUENTIAL) ||
            (behavior == IP_ID_BEHAVIOR_SEQUENTIAL_SWAPPED));
    ENFORCE(indicator == 1);
    ip_id =:= irregular(16)  [ 16 ];

  }

  COMPRESSED not_present {
    ENFORCE((behavior == IP_ID_BEHAVIOR_RANDOM) ||
            (behavior == IP_ID_BEHAVIOR_ZERO));
  }
}

/Calle

_______________________________________________
Rohc mailing list
Rohc at ietf.org
https://www1.ietf.org/mailman/listinfo/rohc