Re: [PATCH] Generic TLV module functions - Re: UCP/EMI to support E50_HPLMN and E50_AC
Andreas Fink <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
While we think about changing tlv, we should also think about having a "set of tlv" which you can apply to a smsc. In my case I have like 40 instances of the same SMSC and having 20 TLV configs for every smsc (as you specify smsc-id in it) is creating very long config files. What about group = tlv name = xxx tag = xxx length = xxx type = INTEGER/OCTSTR/NULLTERMINATED vendor-id = XXX and then under SMSC group = smpp vendor-tlv = xxx... this would automatically link a certain set of tlv's to a specific smpp. not sure if protocol is really needed in the tlv in that case. On 16 Jul 2014, at 17:35, Alexander Malysh <[email protected]> wrote: > Hi, > > idea is good but TLV is SMPP specific IMHO. Therefore I would not expect this as generic :-) > > Patch is hardcoded on many places. If you do it generic then please do it instead of just to name it so. > I would expect generic config groups that have proto inside of group and SMPP PDU just > fetch with constant they part instead of oct_imm("smpp-tlv"). > > so the group would be: > > group = tlv (Hier we have to think about better name, TLV is confusing) > protocol = smpp/ucp/cimd2 > name = xxx > tag = xxx > length = xxx > type = INTEGER/OCTSTR/NULTERMINATED > smsc-id = xxx;xxx1 > > Then SMPP PDU will just fetch by proto: > > generic_tlv_get_by_tag(TLV_PROTO_SMPP, smsc_id, tag); > > > And please avoid using typedefs it's really bad style: http://discuss.fogcreek.com/joelonsoftware1/default.asp?cmd=show&ixPost=10506 > > Alex > > Am 16.07.2014 um 16:40 schrieb Stipe Tolj <[email protected]>: > >> Am 10.07.2014 19:59, schrieb [email protected]: >>> Hi, >>> >>> I'm using the meta-data to get the E50_HPLMN and set the E50_AC. >>> >>> here's the patch to support that for the EMI protocol. If you guys have >>> a better way of doing so please feel free to give me a hint. >>> >>> I'd like to apply the patch in the main repo asap. >> >> Hi Mark, >> >> thanks a lot for the patch, we appreciate your willingness to contribute. >> >> In fact I had this being tackled in a more generic way, pulling the SMPP TLV code out of the SMPP specific modules into a generic gw/generic_tlv.[ch] module that can be used by any SMSC module. >> >> Please find it attached to this mail for review and voting for commiting to svn trunk. (Though, this WILL go into svn post 1.4.4-stable release). >> >> The SMPP module is modified accordingly, along with additions for CIMD2. I'm sure you will be able to add EMI/UCP too using the same function set. >> >> Stipe >> >> -- >> ------------------------------------------------------------------- >> Kölner Landstrasse 419 >> 40589 Düsseldorf, NRW, Germany >> >> Kannel Foundation tolj.org system architecture >> http://www.kannel.org/ http://www.tolj.org/ >> >> mailto:stolj_{at}_kannel.org mailto:st_{at}_tolj.org >> ------------------------------------------------------------------- >> <gateway-generic-tlv.diff> >
signature.asc
(application/pgp-signature, 841 B)
-----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIcBAEBAgAGBQJTxp6FAAoJEOtfx+3l1p1ni74P/j4OgyMpU8eozMmC+yPvAVje 5qLFCJSfc8QgO6L3Y9ns95NO3KJlP4mT3HP9oaozTJiseRCi9Y9P1HfOf9ygJtBS qN77PGSeLXdn5GTDsoobvT3Yxhvzd5+XBW7SVWRAW3cQFk3hV6aMp7e/nV/wCZqo 3KZZM8a9Sw/aERmUlfnaNPoxlH++xbIRgm620MK8PkRAYlkKD/ZaDsFFs4DDKv3S Qn4BpFk/UyHX0F8crb+OjK190YTrTJYHEs74bWOHxRwC73iEbaeKXtMV3A5zXzgx d/1KRomnfXfIfZzqiu7tpscTBzd9EjnBmYWRSdUvyoHELCJP2JdULVaXbn821KRK /r/khnCHTKvkG4mvX8tYaoOlUsLmGMqvQGa2mnsEFWtj1OgnIDLKtD9pLrDXPVUO oGH/0GWqPhb5vvchW/MDk6GRMbQkNhyxxcXBN8+tPfSd/IFdjXr8pa0f1wjIQDKt AdqtqxXkKvARKA9i9ZinvGyoa0H4vdVC3uek6TBjyqmm08f8wIdUfDhjpVxivm+L 5OsTvlgp6y10/FSznPS6QbyufocbWKw3lkV/V4fD/oRFrwk6y5zdzdLrNp0EqZVH dAwdUmV0SassbsQHfSanibPOJ+OT7PWrR7slKu/QViT6Py8E/QfSa4oS/0HQVWng Ba8mAlPgmScc5PhfkIQ/ =jvDU -----END PGP SIGNATURE-----