While I'm here looking at the mailing list, I have been thinking about
asking about the following, and no need to delay it, I suppose -
Upcoming OsmoDevCon attendees may have noticed the proposed and
scheduled session on CSFB testing.
Well, since - and sort of because that session was accepted, (and also
an iPhone 6 that supports the band of an eNB I have at home dropped into
my possession) - I've been prompted to advance my knowledge and
understanding of issues, and the iPhone (6 at least) is now doing MO
CSFB perfectly, and I think I see what some other observed issues are about.
I'm still happy if there's interest to do the session of course,
although maybe some might question whether it is more productive to just
file tickets/issues and work them out the usual way.
This email is not to suggest in any way to cancel the session, but
rather to ask if maybe we might expand the scope.
I'm thinking for example also testing 2G data. The older basic 2G + GPRS
"chocolate bar" type phones I have don't work anymore, they used to.
(not sure what one might actually do with such a device and GPRS these
days, but that's not the point, right?)
Someone (vadim?) brought a 2G (was it a credit card?) terminal once to
devcon. Does it work? that kind of thing. So thinking about all this,
I'm asking the question of whether there is interest to have a kind of
events style setup during the conference. lynxis I think has a server
for that, or maybe it's only a VM?
I don't mean a distracting always-on setup, and I don't mean to put
emphasis on cellular projects. But if we did want to have something
multi RAT, available for anybody who might want to glance in that
direction (during a USSE for example), then some (small) amount of
logistics preparation is necessary, no?
Thanks.
k.
Hi all,
While working with open5gs + kamailio, one traditionally always needed two HSS:
* the open5gs one with its mongodb and nodejs hell
* the FHoSS one for the kamailio IMS core
For some time there's now PyHSS, which supports both EPS and IMS subscriptions, which
is of course nice. docker_open5gs meanwhile also has switched to using it as default.
The big problem is that it doesn't actually state which license it is
under, which makes it legally impossible to [re]distribute it, or to even make a fork
of the repository, as that would be a violation of copyright. At least German users
are abel to legally use it, as under German copyright law you don't need
a license from the copyright holder to use a program that you have obtained legally.
In order to automatize the steps described in the open5gs_docker to create
subscribers, I've just hacked up a small tool, see
https://gitea.osmocom.org/laforge/pyhss-tool/src/branch/master/pyhss-tool.py
Using that tool, it's as easy as
pyhss-tool.py subscriber-create --imsi 001011111111111 --msisdn 1111 --k 000102030405060708090a0b0c0d0e0f --opc 00000000000000000000000000000000
or
pyhss-tool.py subscriber-delete --imsi 001011111111111
to add/remove subscribers. You will still need to manually create the
internet and ims APNs via the REST interface; I'll probably also add
that capability to the tool.
Once it's a bit more tested, I also would like to contribute it
upstream, at least once that is possible. To do that I'd have to make a
pull request, and making that pull request requires me to create a fork,
which is a copyright violation. wtf.
If that legal situation has cleared up, it might be worth considering either adding
native GSUP support to PyHSS (so it can be used by osmo-{msc,sgsn}, or to have
a converter like osmo_gsup2dia (the inverse of the existing osmo_dia2gsup).
Regards,
Harald
--
- Harald Welte <laforge(a)osmocom.org> https://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)
Ace your NURS FPX 4000 assessments with our expert tutors! Get personalized, online assessment help for NURS FPX 4000 Assessment 1 to 4 and complete your BSN and MSN in one billing cycle. High-quality tutoring designed for success.
Introduction to NURS FPX 4000 Series Assessments
Embarking on the NURS FPX 4000 series can be a pivotal step in your nursing career. These assessments are crucial for understanding complex healthcare concepts, developing critical thinking, and applying knowledge practically. Whether you're tackling NURS FPX 4000 Assessment 1 or moving forward to NURS FPX 4000 Assessment 4, each step is an opportunity to excel and prove your competency in the nursing field.
Why Choose Our Services for Your Nursing Assessments?
Our online tutoring platform specializes in guiding nursing students through their BSN and MSN programs with ease and efficiency. If you aim to complete your nursing program within one billing cycle, our expert tutors are here to provide you with the support and resources you need. From NURS FPX 4000 Assessment 2 to the comprehensive NURS FPX 4000 Assessment 3, we cover all bases.
Personalized Tutoring Approach
We understand that each student has unique learning needs. That's why our tutoring service is personalized, focusing on the specific requirements of assessments like NURS FPX 4000 Assessment 4. Our approach ensures that you not only meet but exceed the expectations set by these rigorous assessments.
Expert Tutors at Your Service
Our team consists of experienced tutors who are not just experts in their field but are also intimately familiar with the structure and demands of the NURS FPX series. Whether you're looking for "Hire assessment help writer" or need someone to "Take my Assessment," our professionals are equipped to assist you in navigating through NURS FPX 4000 Assessment 1 and beyond.
Achieve Your Goals in One Billing Cycle
The journey to completing your BSN and MSN program is challenging but rewarding. With our focused tutoring for the NURS FPX 4000 series, including targeted help for NURS FPX 4000 Assessment 2 and NURS FPX 4000 Assessment 3, we make it possible to achieve your academic goals swiftly. Our strategy includes intensive review sessions, practical application exercises, and comprehensive support materials that prepare you for success.
Comprehensive Support for All Assessments
Understanding the depth of knowledge required for assessments like NURS FPX 4000 Assessment 4 is crucial. Our services offer detailed guidance for each assessment in the series, ensuring you're well-prepared for every challenge. From "Online assessment help" to "Write my assessment," we provide a range of services designed to support your academic journey.
Your Pathway to Success in Nursing
Choosing our tutoring services for your NURS FPX 4000 series assessments is more than just academic support; it's an investment in your future. With our expert guidance, personalized tutoring, and comprehensive resources, completing your BSN and MSN program in one billing cycle is within reach. Start your journey toward nursing excellence today and take the first step towards a successful career with confidence.
Don't let the challenges of NURS FPX 4000 assessments hold you back. Hire an assessment help writer today and unlock your potential in the nursing field. Contact us to learn more about how we can help you achieve your goals.
Excel in NURS FPX 4010 Assessments with Our Expert Online Tutoring
Dominate your NURS FPX 4010 assessments with our specialized tutoring services. From Assessment 1 to 4, we provide comprehensive support to complete your nursing program with top grades. Start your success story today!
Introduction to NURS FPX 4010 Series Assessments
The NURS FPX 4010 series represents a significant milestone in the journey of nursing students. It challenges students to apply their knowledge in real-world scenarios, enhancing their clinical reasoning and decision-making skills. Whether you're just starting with NURS FPX 4010 Assessment 1 or gearing up for NURS FPX 4010 Assessment 4, each assessment is a step closer to achieving your academic and professional goals in nursing.
Why Our Tutoring Services Are Essential for Your Success
Navigating through the NURS FPX 4010 series requires more than just hard work; it demands strategic study plans and insights from experienced professionals. Our tutoring services are designed to guide you through each assessment, including NURS FPX 4010 Assessment 2 and NURS FPX 4010 Assessment 3, ensuring you grasp the core concepts and apply them effectively.
Customized Learning for Maximum Impact
We believe in a personalized approach to learning, recognizing that each student has unique strengths and challenges. Our tutors tailor their teaching methods to suit your individual needs, focusing on areas that require additional attention, such as NURS FPX 4010 Assessment 4, to maximize your learning outcome.
Expert Tutors Ready to Assist You
Our team comprises seasoned nursing educators who excel in their respective fields. They bring a wealth of knowledge and practical experience, providing invaluable insights into successfully completing assessments like NURS FPX 4010 Assessment 1. With our experts, you're not just preparing for an exam; you're gearing up for a successful career in nursing.
Achieve Excellence in One Billing Cycle
Our goal is to help you complete your BSN and MSN programs efficiently, without compromising the depth of learning. By focusing on crucial assessments, including NURS FPX 4010 Assessment 2 and NURS FPX 4010 Assessment 3, we streamline your study process to ensure you're exam-ready in the shortest possible time.
Comprehensive Support Tailored to Your Needs
From "Write my assessment" to "Online assessment help," we offer a range of services to support your academic journey. Our comprehensive tutoring package includes review sessions, practice questions, and personalized feedback, covering every aspect of the NURS FPX 4010 Assessment 4 and beyond.
Your Partner in Nursing Education
Choosing our tutoring services for the NURS FPX 4010 series is a step towards academic excellence and professional mastery. With our personalized support, expert guidance, and comprehensive resources, you'll be well-equipped to tackle each assessment with confidence and achieve your goals in the competitive field of nursing.
Elevate your nursing education with our expert tutors. Contact us now to learn how we can help you excel in the NURS FPX 4010 series and advance your career with confidence.
Excel in NURS FPX 4010 Assessments with Our Expert Online Tutoring
Dominate your NURS FPX 4010 assessments with our specialized tutoring services. From Assessment 1 to 4, we provide comprehensive support to complete your nursing program with top grades. Start your success story today!
Introduction to NURS FPX 4010 Series Assessments
The NURS FPX 4010 series represents a significant milestone in the journey of nursing students. It challenges students to apply their knowledge in real-world scenarios, enhancing their clinical reasoning and decision-making skills. Whether you're just starting with NURS FPX 4010 Assessment 1 or gearing up for <a href=https://www.etutors.us/assessment-4-stakeholder-presentation/> NURS FPX 4010 Assessment 4</a>. , each assessment is a step closer to achieving your academic and professional goals in nursing.
Why Our Tutoring Services Are Essential for Your Success
Navigating through the NURS FPX 4010 series requires more than just hard work; it demands strategic study plans and insights from experienced professionals. Our tutoring services are designed to guide you through each assessment, including NURS FPX 4010 Assessment 2 and for <a href=https://www.etutors.us/nurs-fpx4010-assessment-3/>NURS FPX 4010 Assessment 3</a>. , ensuring you grasp the core concepts and apply them effectively.
Customized Learning for Maximum Impact
We believe in a personalized approach to learning, recognizing that each student has unique strengths and challenges. Our tutors tailor their teaching methods to suit your individual needs, focusing on areas that require additional attention, such as NURS FPX 4010 Assessment 4, to maximize your learning outcome.
Expert Tutors Ready to Assist You
Our team comprises seasoned nursing educators who excel in their respective fields. They bring a wealth of knowledge and practical experience, providing invaluable insights into successfully completing assessments like <a href=https://www.etutors.us/nurs-fpx4010-assessment-1-collaboration/>NURS FPX 4010</a>. . With our experts, you're not just preparing for an exam; you're gearing up for a successful career in nursing.
Achieve Excellence in One Billing Cycle
Our goal is to help you complete your BSN and MSN programs efficiently, without compromising the depth of learning. By focusing on crucial assessments, including <a href=https://www.etutors.us/nurs-fpx-4010-assessment-2//>NURS FPX 4010 Assessment 2</a>. and NURS FPX 4010 Assessment 3, we streamline your study process to ensure you're exam-ready in the shortest possible time.
Comprehensive Support Tailored to Your Needs
From "Write my assessment" to "Online assessment help," we offer a range of services to support your academic journey. Our comprehensive tutoring package includes review sessions, practice questions, and personalized feedback, covering every aspect of the NURS FPX 4010 Assessment 4 and beyond.
<a href=https://www.etutors.us/nurs-fpx-4010/>Partner in Nursing Education</a>.
Choosing our tutoring services for the NURS FPX 4010 series is a step towards academic excellence and professional mastery. With our personalized support, expert guidance, and comprehensive resources, you'll be well-equipped to tackle each assessment with confidence and achieve your goals in the competitive field of nursing.
Elevate your nursing education with our expert tutors. Contact us now to learn how we can help you excel in the NURS FPX 4010 series and advance your career with confidence.
Excel in NURS FPX 4010 Assessments with Our Expert Online Tutoring
Dominate your NURS FPX 4010 assessments with our specialized tutoring services. From Assessment 1 to 4, we provide comprehensive support to complete your nursing program with top grades. Start your success story today!
Introduction to NURS FPX 4010 Series Assessments
The NURS FPX 4010 series represents a significant milestone in the journey of nursing students. It challenges students to apply their knowledge in real-world scenarios, enhancing their clinical reasoning and decision-making skills. Whether you're just starting with NURS FPX 4010 Assessment 1 or gearing up for <a href=https://www.etutors.us/assessment-4-stakeholder-presentation/> NURS FPX 4010 Assessment 4</a>. , each assessment is a step closer to achieving your academic and professional goals in nursing.
Why Our Tutoring Services Are Essential for Your Success
Navigating through the NURS FPX 4010 series requires more than just hard work; it demands strategic study plans and insights from experienced professionals. Our tutoring services are designed to guide you through each assessment, including NURS FPX 4010 Assessment 2 and for <a href=https://www.etutors.us/nurs-fpx4010-assessment-3/>NURS FPX 4010 Assessment 3</a>. , ensuring you grasp the core concepts and apply them effectively.
Customized Learning for Maximum Impact
We believe in a personalized approach to learning, recognizing that each student has unique strengths and challenges. Our tutors tailor their teaching methods to suit your individual needs, focusing on areas that require additional attention, such as NURS FPX 4010 Assessment 4, to maximize your learning outcome.
Expert Tutors Ready to Assist You
Our team comprises seasoned nursing educators who excel in their respective fields. They bring a wealth of knowledge and practical experience, providing invaluable insights into successfully completing assessments like <a href=https://www.etutors.us/nurs-fpx4010-assessment-1-collaboration/>NURS FPX 4010</a>. . With our experts, you're not just preparing for an exam; you're gearing up for a successful career in nursing.
Achieve Excellence in One Billing Cycle
Our goal is to help you complete your BSN and MSN programs efficiently, without compromising the depth of learning. By focusing on crucial assessments, including <a href=https://www.etutors.us/nurs-fpx-4010-assessment-2//>NURS FPX 4010 Assessment 2</a>. and NURS FPX 4010 Assessment 3, we streamline your study process to ensure you're exam-ready in the shortest possible time.
Comprehensive Support Tailored to Your Needs
From "Write my assessment" to "Online assessment help," we offer a range of services to support your academic journey. Our comprehensive tutoring package includes review sessions, practice questions, and personalized feedback, covering every aspect of the NURS FPX 4010 Assessment 4 and beyond.
<a href=https://www.etutors.us/nurs-fpx-4010/>Partner in Nursing Education</a>.
Choosing our tutoring services for the NURS FPX 4010 series is a step towards academic excellence and professional mastery. With our personalized support, expert guidance, and comprehensive resources, you'll be well-equipped to tackle each assessment with confidence and achieve your goals in the competitive field of nursing.
Elevate your nursing education with our expert tutors. Contact us now to learn how we can help you excel in the NURS FPX 4010 series and advance your career with confidence.
Hi
Many thanks Harald for you answer
Yes, Ericsson SGSN MKX uses Classic mode (not ip-sns), and the osmo-pcu is configured with this line: gb-dialect classic.
We took the time to check the SGSN, BSC & network configuration and all seems well configured.
We continue to check and test but no way for now to correct this NS initialization step, and this error: NS_STATUS, Cause PROTOCOL ERROR - unspecified.
So, if you have other ideas of what could be the problem, you're welcome.
In addition, if you know someone who had set up this configuration, we would be very interested by he way of BSC and BTS, SGSN were configured.
Best regards
Jean-Marc
Orange Restricted
____________________________________________________________________________________________________________
Ce message et ses pieces jointes peuvent contenir des informations confidentielles ou privilegiees et ne doivent donc
pas etre diffuses, exploites ou copies sans autorisation. Si vous avez recu ce message par erreur, veuillez le signaler
a l'expediteur et le detruire ainsi que les pieces jointes. Les messages electroniques etant susceptibles d'alteration,
Orange decline toute responsabilite si ce message a ete altere, deforme ou falsifie. Merci.
This message and its attachments may contain confidential or privileged information that may be protected by law;
they should not be distributed, used or copied without authorisation.
If you have received this email in error, please notify the sender and delete this message and its attachments.
As emails may be altered, Orange is not liable for messages that have been modified, changed or falsified.
Thank you.
Dear experts,
We are trying to connect an osmocom platform to an Ericsson platform, and are trying to make funtional 2G.
We use a VM for OSMO-BSC, a VM for OSMO-BTS-TRX + OSMO-PCU, and a Raspberry PI (trx-lms)
Concerning the Gb, we connected the OSMO-PCU to an MKX Ericsson, and we have an error at the NS setup step.
The communication between the SGSN Ericsson and the OSMO-PCU seems ok (IP / routing OK)
We hope that the Ericsson MKX SGSN is well configured.
We can see some packets: OSMO-PCU ---> SGSN : NS_RESET, Cause: P&M intervention, NS VCI: 0x1388, NSEI: 5000
and a response from the SGSN: NS_STATUS, Cause PROTOCOL ERROR - unspecified.
What could be the problem ? timers ? ns-vci, nsvc 1, encapsulation,...
Did someone test this: OSMOCOM with an ERICSSON SGSN ?
One point is that the nsvci is only defined on the BSC (not on the SGSN)
Many thanks in advance,
Best regards
Hoping that you could help us
Jean-Marc
-----------------------
BSC CONFIGURATION
-----------------------
bts 0
type osmo-bts
description LimeSDR Based BTS
band GSM900
cell_identity 41023
location_area_code 390
base_station_id_code 63
ms max power 15
cell reselection hysteresis 4
rxlev access min 0
radio-link-timeout 32
channel allocator mode chan-req ascending
channel allocator mode assignment ascending
channel allocator mode handover ascending
channel allocator mode vgcs-vbs ascending
rach tx integer 9
rach max transmission 7
rach max-delay 63
channel-description attach 1
channel-description bs-pa-mfrms 5
channel-description bs-ag-blks-res 1
no nch-position
no access-control-class-ramping
early-classmark-sending forbidden
early-classmark-sending-3g allowed
ipa unit-id 901 0
oml ipa stream-id 255 line 0
neighbor-list mode automatic
codec-support fr
gprs ns timer tns-block 3
gprs ns timer tns-block-retries 3
gprs ns timer tns-reset 3
gprs ns timer tns-reset-retries 3
gprs ns timer tns-test 30
gprs ns timer tns-alive 3
gprs ns timer tns-alive-retries 10
gprs nsei 5000
gprs nsvc 0 nsvci 5000
gprs nsvc 0 local udp port 23001
gprs nsvc 0 remote ip 172.20.168.220
gprs nsvc 0 remote udp port 2157
...
-----------------------
PCU CONFIGURATION
-----------------------
ns
timer tns-block 3
timer tns-block-retries 3
timer tns-reset 3
timer tns-reset-retries 3
timer tns-test 30
timer tns-alive 3
timer tns-alive-retries 10
timer tsns-prov 3
timer tsns-size-retries 3
timer tsns-config-retries 3
timer tsns-procedures-retries 3
pcu
flow-control-interval 10
cs 2
cs max 4
cs threshold 10 33
cs downgrade-threshold 200
cs link-quality-ranges cs1 6 cs2 5 8 cs3 7 13 cs4 12
mcs link-quality-ranges mcs1 6 mcs2 5 8 mcs3 7 13 mcs4 12 15 mcs5 14 17 mcs6 16 18 mcs7 17 20 mcs8 19 24 mcs9 23
mcs max 9
window-size 64 0
queue idle-ack-delay 10
queue codel
Hello everyone,
Could any of you please review the merge request "GSMTAP: check version field" [1]?
The purpose is to check the content of the 'version' field in gsmtap header and act in case of unknown versions.
Cheers,
Mauro
[1] https://gitlab.com/wireshark/wireshark/-/merge_requests/14623
Hi all,
I'm currently working on 2G to 3G TrFO voice negotiation. In practice, that
means, to be able to negotiate a set of AMR rates via SDP. And that, in turn,
means that we handle fmtp properly in SDP strings.
SDP is not only used in SIP to the other call leg, but also in the MGCP to the
media gateway.
- So we have a bunch of SDP and fmtp related code in osmo-mgw.git.
- Separately, we have an SDP implementation in osmo-msc.git, because the SDP
code in osmo-mgw.git was too tightly coupled with other code to be able to
reuse it for MNCC->SIP.
For fmtp negotiation, I now want similar things in both mgw and msc.
What I want to do now, is move the SDP implementation from osmo-msc.git to
osmo-mgw.git/libosmo-mgcp-client and make it public API: a common place that
will also enable all other MGCP clients to work with AMR fmtp.
All of this was just the intro =) the question I would like to put out there is
about API design: static or dynamic, and opaque or transparent.
Am I overthinking this? Or would you like to overthink it with me?
== static or dynamic ==
In osmo-msc.git, the SDP structs so far are fully static and self-contained.
The cool thing is that they can be copied around quite easily and there is no
need for passing talloc ctx pointers, no need to worry about ownership,
memleaks and double frees. But it also means that it uses fixed sizes:
- char encoding_name[16],
- char fmtp[256],
- struct sdp_audio_codec codecs[32]
and so on.
Unfortunately, RFC-8866 does not define any limits whatsoever on number of
characters or number of codecs in an SDP message. Quoting:
"although no length limit is given, it is recommended that they be short"
Thanks for nothing! >:(
So for static API design, we need to now pick a good size for every single item
in advance.
When fmtp has max 256 bytes and codec lists have max 32 entries, even an empty
list will use 32 * 256+ bytes: lots of heap allocations.
And the limits are hard: anyone wanting to correctly express more than 32
different codec variants can simply not use this library.
Dynamic seems a much better fit for RFC-8866.
There is practically no limit at all on string length / list length.
Also the caller allocates not one byte more memory than is actually needed.
The argument has been going back and forth in my head for weeks. Static makes
things so much simpler. But what sizes should we dictate. Ok then dynamic. But
these days we have "infinite" memory, the bottleneck is CPU time, so if we can
be static, we are gracious on very cheap real estate (memory) while saving a
lot of the precious stuff (cycles). Ok then static. But with all those AMR
variants that are coming up, I want to at least be able to represent all of
them in one list, so I need at least 64 entries. And let's allow long fmtp
strings, who knows. Then we'll end up with ~20kb of data that every codec list
out there will use up, even if it is empty. Even if it is just a temporary
local variable. Even if it is just dragged along for a rare use case and never
actually needed. Is it really faster to allocate 100 times more memory
statically versus allocating just enough but dynamically?
In the end I decided for dynamic allocation.
When I started adding talloc ctx args, I wanted the API to be simple, so every
single part of the puzzle is now its own dynamic allocation:
struct osmo_sdp_msg {
char *username; // talloc_strdup()
char *session_name; // talloc_strdup()
[...]
struct osmo_sdp_codec_list *codecs; // osmo_sdp_codec_list_alloc()
// llist_head
// -> osmo_sdp_codec_alloc()
// \___ char *encoding_name -> talloc_strdup()
// _ char *fmtp -> talloc_strdup()
// -next-> osmo_sdp_codec_alloc()
// \___ ...
// -next-> osmo_sdp_codec_alloc()
// \___ ...
};
All of this used to be just a single self-contained struct.
You might ask, why is 'codecs', which is just the llist_head, a separate
allocation? Because I want the API to trivially figure out the talloc parent
context to allocate items from:
osmo_codec_list_add(my_list, my_codec);
and not have to worry about the individual code paths' parent context to
allocate new entries from:
osmo_codec_list_add(&my_obj->my_list, my_obj->backpointer.backpointer.ctx, my_codec);
So the only functions with a talloc ctx argument are
osmo_codec_alloc(ctx) and
osmo_codec_list_alloc(ctx)
This style has a tendency to spread:
Now I want to also make osmo-msc's struct codec_filter a dynamic allocation,
because the codec_filter_foo() currently have no ctx argument; they still use
the static SDP structs. When the codec_filter pointer itself is the neat
logical talloc parent of the codec lists it uses, then I don't need to add a
separate ctx arg everywhere now.
Am I taking this too far now?
Am I overthinking it and either way is fine?
== opaque vs transparent ==
I can either have the full struct definition in the .h file = transparent, or I
can hide the struct in the .c file and provide lots of getter and setter
functions = opaque.
Both ways have a major advantage over the other:
- opaque means that we can freely extend the API without any ABI breakage,
ever.
- transparent means that callers can easily define const arrays of data
structures. In my case, I want to keep const lists of const codecs for e.g.
test data in unit tests, for listing known codecs in codec_mapping.c, for
defining default codec configuration.
transparent allows:
const struct osmo_sdp_codec ran_defaults = {
{ .encoding_name = "AMR", .rate = 8000, .fmtp = "octet-align=1;mode-set=0,2,4,7", .payload_type = 112, },
{ .encoding_name = "AMR", .rate = 8000, .fmtp = "octet-align=1;mode-set=0,2,4", .payload_type = 112, },
{ .encoding_name = "AMR", .rate = 8000, .fmtp = "mode-set=0,2,4,7", .payload_type = 112, },
{ .encoding_name = "AMR", .rate = 8000, .fmtp = "mode-set=0,2,4", .payload_type = 112, },
{ .encoding_name = "GSM-EFR", .rate = 8000, .payload_type = 110, },
{ .encoding_name = "GSM", .rate = 8000, .payload_type = 3, },
{ .encoding_name = "GSM-HR-08", .rate = 8000, .payload_type = 111, },
};
int i;
for (i = 0; i < ARRAY_SIZE(ran_defaults); i++)
osmo_sdp_codec_list_add(g_ran_codecs_cfg, &defaults[i])
printf("%s", codec->encoding_name);
if (!strcmp(codec->encoding_name, "AMR"))
printf(":%s", codec->fmtp);
same in opaque:
osmo_sdp_codec_list_add(g_ran_codecs_cfg, "AMR", 8000, "octet-align=1;mode-set=0,2,4,7", 112);
osmo_sdp_codec_list_add(g_ran_codecs_cfg, "AMR", 8000, "octet-align=1;mode-set=0,2,4", 112);
osmo_sdp_codec_list_add(g_ran_codecs_cfg, "AMR", 8000, "mode-set=0,2,4,7", 112);
osmo_sdp_codec_list_add(g_ran_codecs_cfg, "AMR", 8000, "mode-set=0,2,4", 112);
osmo_sdp_codec_list_add(g_ran_codecs_cfg, "GSM-EFR", 8000, NULL, 110);
osmo_sdp_codec_list_add(g_ran_codecs_cfg, "GSM", 8000, NULL, 3);
osmo_sdp_codec_list_add(g_ran_codecs_cfg, "GSM-HR-08", 8000, NULL, 111);
printf("%s", osmo_sdp_codec_get_encoding_name(codec));
if (!strcmp(osmo_sdp_codec_get_encoding_name(codec), "AMR"))
printf(":%s", osmo_sdp_codec_get_ftmp(codec));
The opaque looks alright in comparison, but
- being able to enlist a struct osmo_sdp_codec in a const array is powerful,
allowing the paradigm to replace code complexity by good data structures.
So used in codec_mapping.c in osmo-msc.
- requiring getters and setters for each end every member creates a long list
of API functions: 'get' and 'set' for each orthogonal member; we might be
tempted to "dupe" many llist_*() functions for osmo_sdp_codec_list.
- having to call functions for each end every member makes the code a lot more
noisy.
- it forces all allocation decisions down onto the caller = only using the API
author's favorite dynamic allocation, hello memleaks etc.
IMHO, opaque APIs are often lots of code with very low density of actually
important stuff.
/* This function gets foo. */
struct foo *get_foo(x)
{
return x->foo;
}
This is so plump and boring!!
Currently I am following the transparent way,
and putting 'bool v2;' extension flags for a distant future in the structs'
ends.
But there has been a discussion here that the truly good APIs are opaque.
talloc, libSDL, libsndfile come to mind.
== both ==
Finally, these two aspects are interdependent:
An opaque API *has* to be dynamic.
So far, I am moving from the transparent+static implementation to
transparent+dynamic.
Should I also go the "next" step to opaque+dynamic? I don't really want to...
I've had these considerations many times in my life, and there never seems to
be the one best way.
Thanks for your thoughts!
If you need more code reference for what I am talking about:
old static:
https://cgit.osmocom.org/osmo-msc/tree/include/osmocom/msc/sdp_msg.h?id=1b1…https://cgit.osmocom.org/osmo-msc/tree/src/libmsc/sdp_msg.c?id=1b1a39bea1c5…
new dynamic+transparent:
https://cgit.osmocom.org/osmo-mgw/tree/include/osmocom/sdp?h=neels/sdp&id=2…https://cgit.osmocom.org/osmo-mgw/tree/src/libosmo-sdp?h=neels/sdp&id=24c09…
~N
--
- Neels Hofmeyr <nhofmeyr(a)sysmocom.de> http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschäftsführer / Managing Directors: Harald Welte