Age | Commit message (Collapse) | Author | Files | Lines |
|
Original file from wireshark.git (packet-gsm_csn1.c) is being built and
maintained as a C file. There's no real need for us to maintain it as a
C++, and doing so will make both files derive over time (as already
happened). Let's keep it as a C compiler (which btw seems to be more
strict) to make it easier to port patches back and forth wireshark.git.
Take the chance to move some declarations we added to csn1.h to be able
to build it out of wireshark. Let's keep those in a separate header file
to ease looking for differences.
Change-Id: I818a8ae947f002d35142f9f5473454cfd80e1830
|
|
When switching to C compiler, it will warn/error. Use #if 0 as in the
original wireshark.git epan/dissectors/packet-gsm_rlcmac.c code.
Change-Id: If1be50947c02208f15892d99edeb394fb4f52b75
|
|
That's only allowed under C++.
Change-Id: I0da8849a0fb7f9a7ee5e726edea87e91dc411ea8
|
|
The later is only accepted when compiling as c++.
Change-Id: Ib5004643d4eff3bc9d11b66ddaf262f1c0d2aef6
|
|
This fix was spotted by wireshark.git developers while reviewing port of
osmo-pcu commit e50ce6e45c4509805807d599cadf1a1b23d37f63.
Related: https://code.wireshark.org/review/c/36574/
Fixes: e50ce6e45c4509805807d599cadf1a1b23d37f63
Change-Id: Ic5fc3252f61b6a042d9c3def7a6a32b311dd9d9e
|
|
There's two variants for the Ms Radio Access Capabilities.
* The usual encoding with spare bits (usually to fill up to octet boundary)
as defined in TS 24.008 Table 10.5.146
And there's too:
* MS Radio Access Capabilities 2 IE from TS44.060 section 12.30, which is
the same but removing all spare bits, and which is used in messages like
Packet Resource Request and Additional MS RAC messages.
The later is used basically for messages having extra IEs after the MS
Radio Access capabilities IE, since they are encoded immediatelly
afterwards.
So this patch does:
* Adds the expected spare bits (M_PADDING) to MS_Radio_Access_capability_t
* Creates a new MS_Radio_Access_capability2_t without padding
* Updates code to use the new "2" version where needed.
Note RLCMACTest long de/encoding line logs change only because the name
of the struct changes (the "2" is added).
Change-Id: Ibd756f80a03452a651e2771dbc628d701e55ac4b
|
|
Change-Id: I6a6e79d7e12cd5e8e969bf0eaa30ddac6b0aa7d3
|
|
This way the macros can be used to access the arrays themselves and
calculate its static size to enable validation later.
In the case of Packet_Access_Reject_t, modify the description to use a
M_REC_TARRAY_1 object to get rid of access to 2nd element. The new
description is the correct one, since the first element is mandatory
according to TS 44.060 Table 11.2.1.
Change-Id: I6f10350d4734360c7a15a702c72b59efd84987ee
|
|
Change-Id: Ieec8e6e0823c6f6985f9d343af6d503b8fe9e6ab
|
|
Port from wireshark.git de028e81c53f9c45ccc5adb3bffd2f16ae2017bf
This commit breaks transcoding of the test vectors containing
the MS RA Capability IE due to the reasons explained in [1].
The more fields we add, the longer gets the output of the CSN.1
encoder. This is not critical, since we never need to encode
messages containing the MS RA Capability IE on practice.
[1] Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0
|
|
This is how this field is named in Wireshark.
Change-Id: I140443c48af8e4bb1b6279e6de986879b7d9c276
|
|
The main idea of this change is to demonstrate a weakness of the
CSN.1 codec that most likely causes a unit test breakage in [1].
The problem seems to be that the transitional structures, where
the CSN.1 decoder stores the results, do not contain any details
about presence of the optional fields (such as M_UINT_OR_NULL).
In other words, it's impossible to know whether some optional
field is omitted in the encoded message (NULL), or is it just
set to 0. This means that the encoder will always include all
optional fields, even if they're not present in the original
message.
[1] Ibb4cbd3f5865415fd547e95fc24ff31df1aed4c0
Change-Id: Ic46d6e56768f516203d27d8e7a5adb77afdf32b7
|
|
Change-Id: I48fd701566e1364ce7fccaa3e3a1a0296b932988
|
|
The implementation of CSN.1 codec was taken from Wireshark, where
it's implemented in pure C. For some reason it was mixed with C++
specific features, mostly using references in parameter
declaration. Not sure what are the benefits.
Change-Id: I56d8b7fbd2f9f4e0bdd6b09d0366fe7eb7aa327a
|
|
Port from wireshark.git f751918476bdde65f2289b86245a3c30dace6730.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I70d4ff3e137b5fd13d367bd4ea6ab501e81e7a87
|
|
Port from wireshark.git aa3bbe5aebdc180172e7956719b26199e4784fcc.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I808ec66011cdfe8e1193298f7fb7e92d25b45be4
|
|
Port from wireshark.git 07fc801684ebff7aff02505cdb2c120caea846e0.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: Iceb59c58406180bc57fe6eb27127b4d11a0a3df7
|
|
Output was incorrect before this patch. LOPC was being called without
having any initial LOGP, and trailing newline was usually missing at the
end.
Since csnDecoder/encoder functions are recursive, it's difficult to
handle logging state in a coherent way inside them. Let's better simply
control start/end of logging related topics in the callers of those
functions, and simply use LOGPC everywhere in csn1.cpp.
Change-Id: I50da7560939fac360b7545e2a6bfaf45ed0c4832
|
|
Those messages are self contained and don't need LOGPC.
Change-Id: Iea79e030563cd29bfc9750ff5c3e398c590a7307
|
|
Change-Id: I0c5e1b870608b0622b239791effd5c5878e230bc
|
|
Port from wireshark.git 575e4df4aa3392ffd09ca372859573f09f0a5c57
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I2a05a057b6f441364502a96f9f34872c7e251a36
|
|
Port from wireshark.git a4a5adb68b898f770e2addf9168d796979ebe237.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I23fb2199fc8f9cc3e5bd475e2558ee8d482df1e1
|
|
is missing
Port from wireshark.git c4ead251da7199cfd746d378c51eb8c30d09a6ba.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: Ib9b8eafd69d3b45b0d631ba9635689807b472b73
|
|
referenced hf.
Port from wireshark.git e97273a35d101516decbc7d98fcc6c6b3f193962.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: Id20d31e9ebd851b45d5f3280f3e229d8d7ae2cea
|
|
Change-Id: I3b50cf386d417ba73b97f48b3000f69d9a54c8c9
|
|
Port of wireshark.git 7e9411fee3a101b53693210f7a38789fd4c70ba2.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I89d488c1f349c556e40a9d13895b1309d5140212
|
|
This is a port of wireshark.git commit
2f024256bf337400ef3a82fa75e6d48d5707e059.
From 78516187d821b8d19d16987b1d6bc855ee7cbe10 Mon Sep 17 00:00:00 2001
From: Sylvain Munaut <tnt@246tNt.com>
Date: Sat, 4 Feb 2012 10:00:22 +0100
Subject: [PATCH 4/6] packet-csn1: Allow CHOICE elements to re-process the bits used for the choice
We may want to display more detail, or the sub-element should be
displayed with its headers or whatever ...
Change-Id: I3a5a95d5f918b8f17a2400a6d0c4d855ecacea7e
|
|
Port from iwireshark.git commit cc6d4341e65ef2e8d8488fe0ac0f236ece0dd844.
It looks like it makes no difference to us now, but other EGPRS messages
may use it in the future.
Ported-by: Pau Espin Pedrol <pespin@sysmocom.de>
Change-Id: I34039370c292e62790a38abb59f55c69fffa88e8
|
|
Currently code using that function in osmo-pcu is disabled, allegadly
because SGSN was sending incorrect values, but it looks more like a CSN1
issue.
Related: OS#1525, OS#3499
Change-Id: I92c86397f988afaa791871d823a45fa85054f3bb
|
|
Change-Id: I381618eb55cc513cfa9c2e384c27cead0935c8bf
|
|
The osmocore bitvec is exact the same, but use a pointer instead of
a reference.
Change-Id: Id8f797631d89aa12b6e48efb2dc153a3e2f059f7
|
|
This uses the CSN.1 decoder to fully parse the radio access
capabilities as defined by TS 24.008, 10.5.5.12a.
Sponsored-by: On-Waves ehf
|
|
1. ar.direction variable was not initialized
2. overrunning array "data->RLC_DATA" of 20 bytes at byte offset 22 using index "i" (which evaluates to 22)
|
|
decoding. Part 1.
Generic improvements to the csn.1 dissector include:
• Added a flag to the type descriptor structure so that any type can (potentially) flagged as xxx_OR_NULL. This was specifically needed for UINT_OR_NULL for the ms capabilities struct.
• Changed the CSN_SERIALIZE so that the length of the length field can be specified.
• For CSN_NEXT_EXIST removed the requirement that the next type be CSN_END, to allow truncation of multiple IEs.
• For CSN_LEFT_ALIGNED_VAR_BITMAP corrected the handling of bit_offset.
• Added a new type CSN_PADDING_BITS to make inspection of padding bits more convenient.
• Improved the CSN_RECURSIVE_TARRAY_1 to show the array index.
Improvements to the gsm_rlcmac dissector include:
• Rework the definition of EGPRS Ack/Nack Description so that the length IE (and absence thereof) is handled correctly.
• Added Padding Bits definitions to all PDUs
• Change the Multislot_capability_t and Content_t definitions to allow truncation at any IE
|
|
We use unsigned int type for readIndex and writeIndex parameters in bitvec_read_field() and bitvec_write_field() functions.
|
|
The code corresponds to commit a9aa4777cc1144897a77dfb6c5c3d7325705251e
in openbts-p2.8.git (Tue Jun 12 18:14:49 2012 +0400)
|