Suggestions regarding the SIM code

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Harald Welte laforge at gnumonks.org
Thu Sep 23 07:56:45 UTC 2010


Hi!

I just found some time to have a look at the recent commit history and
had a look at the SIM related code and had the following suggestions:

1) split the definitions from GSM TS 11.11 into a separate header file
   from the definitions that are OsmocomBB specific, and move the 11.11
   header file into libosmocore

2) use msgb's for SIM messages.  This way we can avoid all those manual
   buffer[N] = M type assignments and rather use msgb_put() constructs

3) even if not going for suggestion '2', it might be good to add some kind of a
   inline function abstracting out all the blocks that look like
+       buffer[0] = GSM1111_CLASS_GSM;
+       buffer[1] = GSM1111_INST_TERMINAL_PROFILE;
+       buffer[2] = 0x00;
+       buffer[3] = 0x00;
+       buffer[4] = length;
   with something like a "sim_buf_init(buffer, GSM11_INST_TERMINAL_PROFILE);"

Of course those are simply suggestions... maybe for the day where somebody on
this list is feeling bored and is looking for a quick and easy task to resolve.

Regards,
	Harald
-- 
- Harald Welte <laforge at gnumonks.org>           http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)




More information about the baseband-devel mailing list