Commit Graph

29 Commits

Author SHA1 Message Date
Pablo Neira Ayuso 136f453dd2 src: use new library libosmogsm and new path to headers in libosmocore
libosmogsm is a new library that is distributed in the libosmocore.
Now, openbsc depends on it. This patch gets openbsc with this
change.

This patch also rewrites all include path to the new
osmocom/[gsm|core]

Signed-off-by: Pablo Neira Ayuso <pablo@gnumonks.org>
2011-03-23 18:17:56 +01:00
Harald Welte 9af6ddfcec License change: We are now AGPLv3+ instead of GPLv2+
The reason for this is quite simple: We want to make sure anyone
running a customized version of OpenBSC to operate a network will
have to release all custom modifiations to the source code.
2011-01-01 15:39:34 +01:00
Holger Hans Peter Freyther d859a24f7d ipa-firmware: Fix the write out of the firmware parts
Use the start address inside the header entry, the start is relative
to the surrounding SDP record which is located in our base offset, when
writing it out also ignore four bytes of something (crc?).
2010-03-22 11:50:30 +01:00
Holger Hans Peter Freyther 38722cca48 ipa-firmware: Write the firmware parts to a file
The first non working version to dump the content of the sdp
to the terminal..
2010-03-22 11:22:54 +01:00
Holger Hans Peter Freyther f63bf4d8f1 ipa-firmware: Add the entry first and then seek
The sub entry might not be a SDP file so it is best to add the
read entry, add it to the list and then attempt to recursively
parse this one.
2010-03-22 10:14:46 +01:00
Holger Hans Peter Freyther e6678dcedb ipa-firmware: Lift the requirement of having a table_offset of zero
Make the code work/skip the other table and find the entries
at the given offset. This appears to work.
2010-03-22 10:05:26 +01:00
Holger Hans Peter Freyther 57e9300142 ipa-firmware: Remove the part_length from the struct sdp_firmware
* The length of the table is not at a fixed position. We will need
  to read the offset, seek there, read the data, convert it to the
  host endianes.
* Prepare the code to work with offsets of 0...
2010-03-22 09:59:57 +01:00
Holger Hans Peter Freyther c88181a7df ipa-firmware: Look at the table offset
* The two dummy bytes appear to be an offset, check that
  they are zero and refuse to work when they are not.
2010-03-22 09:51:43 +01:00
Holger Hans Peter Freyther 622ab49311 ipa-firmware: Remove dummy check...
We have derefenced that way before and would have crashed already.
2010-03-22 09:28:50 +01:00
Holger Hans Peter Freyther 91ed1f75c4 ipa-firmware: The more_more_magic is to indicate the payload
* Ignore the value of the field there is no sematnic change
  to the content of the file..
2010-03-22 09:27:43 +01:00
Harald Welte dfe6c7d910 split 'libosmocore' from openbsc codebase
This library is intended to collect all generic/common funcitionality
of all Osmocom.org projects, including OpenBSC but also OsmocomBB

The library currently includes the following modules:

bitvec, comp128, gsm_utils, msgb, select, signal, statistics, talloc, timer,
tlv_parse, linuxlist

msgb allocation error debugging had to be temporarily disabled as it depends on
'debug.c' functionality which at the moment remains in OpenBSC
2010-02-20 16:27:23 +01:00
Holger Hans Peter Freyther dade8980e3 [ipaccess] Move firmware analysis into the ipaccess-config utility
* This turns ipaccess-firmware.c into a plain helper, fix the
  ipaccess name...
2009-12-30 07:08:39 +01:00
Holger Hans Peter Freyther af351a21f2 [ipaccess] Start using talloc in the firmware code
* We are not leaking anything... *yeah*, talloc rocks
2009-12-30 06:42:17 +01:00
Holger Hans Peter Freyther 0183edd18c [ipaccess] Change the name to be slightly better.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther c9f8a6dca3 [ipaccess] Expose the sub header list as well.. 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 4a98cad85e [ipaccess] Turn firmware parsing into a routine so it can be used
* text3 seems to be a version as the text content starts
  with a 'v'
* move the sdp_firmware into the ipaccess.h and declare
  the function. The headers are returned through a list.
2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 8f99562474 [ipaccess] Add return values to the analyze_file 2009-12-30 06:42:16 +01:00
Holger Hans Peter Freyther 67b05d590b [ipaccess] There is only one second magic number
* The second magic number is only a short and it is
  the same for all of my cases
* This also means that the first and second header
  are the same which means the unknown 8 byte are
  header and file size... and the 122 bytes are
  actually multiple strings (just all empty on the
  outermost SDP). Adding the strings left us with 120
  bytes so we have two bytes of unknown usage..
* This is now capable of parsing outer and inner SDP
  files and print their header.
2009-12-30 04:40:52 +01:00
Holger Hans Peter Freyther 1684e79365 [ipaccess] Allow to parse the second magic2 as well
* The internal SDP appears to have a different magic number
  than the first entry and a slightly different packet format
* There are 8 byte of binary for at the beginning and the header
  ends with a table pointing to some strings and then the actual
  firmware follows.
* We currently only parse the strings of that header.
2009-12-30 04:40:52 +01:00
Holger Hans Peter Freyther b1414d99c4 [ipaccess] Start the parser recursively...
* Start parsing the sub SDPs with the same analyze method
2009-12-30 04:40:52 +01:00
Holger Hans Peter Freyther 1029f84435 [ipaccess] Read the " SDP" and version first and then the rest of the header
Read everything we need to determine the version first and then
the rest. This will allow to be able to poke into the other SDP
bits.
2009-12-30 04:40:51 +01:00
Holger Hans Peter Freyther e29be15ac5 [ipaccess] The firmware format is recursive...
The something3 points to the next start of the SDP
entry. The four bytes in front of the " SDP" are not
known and just discarded. Prepare to be able to
recursively parse the SDP header...
2009-12-30 04:40:51 +01:00
Holger Hans Peter Freyther ebdcee27b8 [ipaccess] Start reading the header entry
* Read the entry and print it out
2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 07a4026b38 [ipaccess] Start figuring out what the header entry is meaning.. 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther c823c89c76 [ipaccess] Use the u_intX_t types in the firmware tool 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 567b3261d9 [ipaccess] Attempt to read the header entries.. 2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 46a920c36c [ipaccess] Do not pick in the wrong headers...
I must have picked in the wrong section of these
files... There are some kind of header entries
that are all 138 byte long and this is the total
length...
2009-12-29 08:38:12 +01:00
Holger Hans Peter Freyther 30b9ecda33 [ipaccess] Verify the size part of the header 2009-12-27 14:07:40 +01:00
Holger Hans Peter Freyther 426da090db [ipaccess] Move ipaccess utilities into a dedicated subdirectory 2009-12-24 11:28:29 +01:00