[asterisk-dev] extend IAX2 IE proposal
Russell Bryant
russell at digium.com
Mon Dec 11 17:48:32 MST 2006
Markku Korpi wrote:
> Tilghman Lesher wrote:
>> On Sunday 10 December 2006 19:17, Russell Bryant wrote:
>>> Derek Smithies wrote:
>>>> Suppose someone uses this mechanism to send a 100 K datablock.
>>> It would not be possible to send a block of data this size using this
>>> proposal. The SEGMENT proposal as described would only allow a
>>> maximum of
>>> 17 segments (0xF0 to 0xFF) of 255 bytes each. This would be a
>>> maximum of
>>> roughly 4.25 kB.
>>
>> 16 segments, actually, for 4080 (4096 - 16) bytes.
Well, it depends if the range was from 0xF0 to 0xFF or 0xF1 to 0xFF, inclusive. :)
> I thought that 16 segments would be plenty, and tried to save one
> octet... However the concern about exceeding the limit is certainly
> legitimate in (not so distant) future applications.
>
> We could raise the max number of segments by moving the sequence number
> to Octet 4 and using only one IE element identifier (This means that the
> Segment IE is repeated). The IAX protocol itself takes care of message
> retransmission, so numbering of the segments should be sufficient. This
> gives us max. 256 segments (i.e. ~64k total length of the IE).
> The format would then look like this:
>
> 1
> 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> | SEGMENT | Data Length | SEGMENT IE identifier (e.g. 0xF0)
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> | Segmented IE | Segment No | Segmented IE
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> : Segmented IE DATA :
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
> We should also define that the segmented data (i.e. Octets 5 and 6 of
> the first segment) needs to include the total length field of the
> segmented IE. This would allow better checking of message integrity.
I was thinking of this exact same idea. Another reason for choosing this over
the previous proposal is that we only take up a single IE identifier, as opposed
to 16. This method takes up an extra byte to store the segment number, but
given that you had to segment the IE in the first place, you're already sending
a significant enough amount of information where the extra byte does not make
much of a difference.
Unless there is any opposition, this proposal gets my vote.
--
Russell Bryant
Software Engineer
Digium, Inc.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: russell.vcf
Type: text/x-vcard
Size: 266 bytes
Desc: not available
Url : http://lists.digium.com/pipermail/asterisk-dev/attachments/20061211/a5c9422b/russell.vcf
More information about the asterisk-dev
mailing list