Attention is currently required from: pespin.

fixeria has posted comments on this change. ( 
https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31455 )

Change subject: library/DIAMETER_Emulation: add API for generating Session-Id 
AVP
......................................................................


Patch Set 1:

(2 comments)

File library/DIAMETER_Emulation.ttcn:

https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31455/comment/f1955efe_720f1999
PS1, Line 90:   var uint32_t g_sess_id_seed_h32;
> I suspect that's because uint64_t is not supported in TTCN3?
It's supported, but... the problem is that bitwise and shift operators in 
TTCN-3 can be applied to bitstring, hexstring or octetstring, but *not to 
integers*. So when doing the initialization and then encoding I would need to 
convert to one of the supported types. I find this cumbersome.

  ";" & oct2char(int2oct(g_sess_id_seed, 8) >> 32)
  ";" & oct2char(int2oct(g_sess_id_seed, 8) and4b 'FFFFFFFF'O)

Alternatively, I could use substr(), but it's still rather clumsy:

  ";" & oct2char(substr(int2oct(g_sess_id_seed, 8), 0, 8))
  ";" & oct2char(substr(int2oct(g_sess_id_seed, 8), 8, 8))

I also would not say my solution is perfect, suggestions are welcome.


https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31455/comment/1afd3184_93790a15
PS1, Line 393:          [] DIAMETER_PROC.getcall(DIAMETEREM_gen_sess_id:{?,?}) 
-> param(identity) {
> ah so they are encoded visibly as 2 parts, weird.
Well, this encoding format is recommended by RFC3588, section 8.8. "Session-Id 
AVP".
I'll add this reference to the commit message.



--
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/31455
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I0fbd271ad123e9663aab5163915e1edbf5915bb6
Gerrit-Change-Number: 31455
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-CC: pespin <[email protected]>
Gerrit-Attention: pespin <[email protected]>
Gerrit-Comment-Date: Wed, 22 Feb 2023 18:25:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <[email protected]>
Gerrit-MessageType: comment

Reply via email to