Comment #1 on issue 233 by [email protected]: Bad encoding of CellGlobalIdOrServiceAreaIdOrLAI parameters in some MAP primitives
http://code.google.com/p/jss7/issues/detail?id=233

1. The issue itself appeared after parsing a trace. When decoding of LocationInformationGPRS primitive CellGlobalIdOrServiceAreaIdOrLAI decoding failes because it's encoding contradicts with a specification.
CellGlobalIdOrServiceAreaIdOrLAI itself is a choice of two octet
strings: CellGlobalIdOrServiceAreaIdFixedLength (7 bytes length) or
LAIFixedLength (5 bytes length). The encoding of
CellGlobalIdOrServiceAreaIdOrLAI itself may be:
- for CellGlobalIdOrServiceAreaIdFixedLength case:
128 7 x x x x x x x
- for LAIFixedLength case:
129 5 y y y y y

When CellGlobalIdOrServiceAreaIdOrLAI is included in LocationInformationGPRS: cellGlobalIdOrServiceAreaIdOrLAI [0] CellGlobalIdOrServiceAreaIdOrLAI OPTIONAL
it has also extra context-specific tag ([0]) and in proper
implementing must be (way 1):
- for CellGlobalIdOrServiceAreaIdFixedLength case:
160 9 128 7 x x x x x x x
- for LAIFixedLength case:
160 9 129 5 y y y y y
But in cap-v3-gprs.pcap trace we have another encoding way (way 2):
- for CellGlobalIdOrServiceAreaIdFixedLength case:
160 7 x x x x x x x
- for LAIFixedLength case:
160 5 y y y y y
The selection between choices (CellGlobalIdOrServiceAreaIdFixedLength
or LAIFixedLength) can be made by a primitive length (5 or 7). So we
can implement both ways of decoding.

2. But the question is: what way should we select for encoding (proper
way 1 or way 2)?
To create a pcap file with the way 1 encoding I made an update for
MAP/CAP Functional tests for they can now write all test messages into
a pcap file. So if we need to create a pcap file (and observe it later
in Wireshark) we need add a configuration line at the start of
functional test:
this.saveTrafficInFile();
(look for example at a commented now line 809 in
code.google.com/p/jss7/source/browse/map/map-impl/src/test/java/org/mobicents/protocols/ss7/map/functional/MAPFunctionalTest.java).
This feature I guess helps us to test if we have a proper primitives
encoding or not by Wireshark.

So the result of testing is: Wireshark understands both ways. And we
can use the proper way 1 for encoding.

http://code.google.com/p/jss7/source/detail?r=52cf4ca6160261367a6de297e6c941bdf0627bab


--

--- You received this message because you are subscribed to the Google Groups "mobicents-all-issues-changes" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to