SUA on-link cb?

Harald Welte laforge at
Mon Apr 4 16:27:36 UTC 2016

Hi Neels,

On Mon, Apr 04, 2016 at 05:55:50PM +0200, Neels Hofmeyr wrote:

> My point is, I don't see N-CONNECT primitives in wireshark. 

As a primitive is something between two layers on your local protocol
stack, you will never see that in wireshark.  The actual protocol
message payload at the given layer boundary is one attribute (typically
called DATA) of the primitive.

To translate it in IP: The 'connect()', 'bind()', 'recvmsg()' primitive
at the TCP/UDP User SAP (BSD socket intreface) between the UDP protocol
implementation an your application is also not observed in wireshark.

Instead of calling 'connect()' on a TCP socket, in an ITU primtive
world, you send a N-CONNET.request primitive to the TCP Provider.

Instead of getting an incoming connection via 'accept()', you get a
N-CONNECT.indication from the TCP provider.  Primitives are just a
different way of an API to talk to a protocol stack (or rather a layer
in a stack).

> So it seems to me there's no use hooking on those  ... or is it
> because the osmo sccp code simply fails to do that negotiation?

Which negotiation?

> When I place debug output (using printf to make sure debug log levels
> aren't disabled) in the N-CONNECT prim rx code in osmo-hnbgw, I also don't
> get any hits when connecting omso-hnbgw to the CN.

This is because the SCCP User SAP apparently is not yet generating those

> Assuming osmo-sccp is working correctly,

As usual, I only implement those bits that were immediately needed/used
at the time it was written.  Very likely the primitives you need are
simply not generated yet.

> I already have the on-connect callback implemented as described before,
> which does register when connecting to the CN. So I'll commit it on
> libosmo-sccp branch sysmocom/iu and use that to send a Reset.

all communication between the SCCP user (application) and SCCP provider
should go through the same SAP interface.  A call-bcak from a
lower-layer transport library like libosmo-netif should be trasnformed
into a SCCP User SAP primitive an then sent to the SCCP User via the

- Harald Welte <laforge at> 
"Privacy in residential applications is a desirable marketing option."
                                                  (ETSI EN 300 175-7 Ch. A6)

More information about the OpenBSC mailing list