digraph G {
rankdir=TB
labelloc=t; label="SCCP/SS7 use in OsmoHNBGW"

	subgraph cluster_ss0 {
		label=""
		ss0 [label="cs7 instance 0\n local pc: 1.1.1"]
		ss0ab [label="address book"]
		ss0 -> ss0ab

		msc0a [label="2.2.2"]
		sgsn0a [label="3.3.3"]
		msc1a [label="5.5.5"]
		ss0ab -> msc0a,sgsn0a,msc1a
	}

	sccp0 [label="hnbgw_sccp_user for '0'\n .osmo_sccp_instance\n .osmo_ss7_user SSN: RANAP"];
	ss0 -> sccp0 [dir=back]

	msc0 [label="hnbgw_cnlink 'msc0'\n .domain = IuCS\n .sccp_addr -> 2.2.2"]
	sccp0 -> msc0 [dir=back]
	msc0a -> msc0 [dir=back]

	cs0 [label="UE CS conn\n hnbgw_context_map"]
	cs1 [label="UE CS conn\n hnbgw_context_map"]
	msc0 -> cs0,cs1

	sgsn0 [label="hnbgw_cnlink 'sgsn0'\n .domain = IuPS\n .sccp_addr -> 3.3.3"]
	sccp0 -> sgsn0 [dir=back]
	sgsn0a -> sgsn0 [dir=back]

	ps0 [label="UE PS conn\n hnbgw_context_map"]
	sgsn0 -> ps0

	subgraph cluster_ss1 {
		label=""
		ss1 [label="cs7 instance 1\n local pc: 4.4.4"]
		ss1ab [label="address book"]
		ss1 -> ss1ab

		sgsn1a [label="6.6.6"]
		ss1ab -> sgsn1a
	}

	sccp1 [label="hnbgw_sccp_user for '1'\n .osmo_sccp_instance\n .osmo_ss7_user SSN: RANAP"];
	ss1 -> sccp1 [dir=back]

	msc1 [label="hnbgw_cnlink 'msc1'\n .domain = IuCS\n .sccp_addr -> 5.5.5"]
	sccp0 -> msc1 [dir=back]
	msc1a -> msc1 [dir=back]

	cs2 [label="UE CS conn\n hnbgw_context_map"]
	msc1 -> cs2

	sgsn1 [label="hnbgw_cnlink 'sgsn1'\n .domain = IuPS\n .sccp_addr -> 6.6.6"]
	sccp1 -> sgsn1 [dir=back]
	sgsn1a -> sgsn1 [dir=back]

	ps2 [label="UE PS conn\n hnbgw_context_map"]
	sgsn1 -> ps2

	subgraph cluster_sccp_inst {
		label="global sccp.users (llist)"
		sccp0
		sccp1
	}

	subgraph cluster_cnpool_iucs {
		label="global cnpool_iucs"
		msc0
		msc1
	}
	subgraph cluster_cnpool_iups {
		label="global cnpool_iups"
		sgsn0
		sgsn1
	}
}
