IE DL Buffering Suggested Packet Count (Type = 48) encoding/decoding issues (spec: 8.2.30)
ivan4th opened this issue · comments
Ivan Shvedunov commented
From the spec:
The Packet Count value is encoded with the number of octets defined in
the Length field, e.g. when n=2, the range of the Packet Count value is
from 0 to 65535.
The length shall be set to "1" or "2" octets.
The library always uses 16 bits for this value.
Code:
https://github.com/travelping/pfcplib/blob/master/priv/ie_gen_v1.erl#L192-L193
Andreas Schultz commented
I only see this as an issue for the decoder. It should be able to handle 8 bit and 16 bit encoding.
Always encoding as 16 bit should make no difference (except for wasting one byte).
Ivan Shvedunov commented
I agree. Still, we need to fix the decoder