build(deps): bump go-m3ua and go-sctp; the examples carry the network indicator

Merged
GO
16d ago
+51-81

The examples move to the current go-m3ua and go-sctp main (go-m3ua 6002607, go-sctp 001e3dd; go-m3ua now brings go-ctxsync), and use the network indicator the stack carries since #20.

  • ASP: -ni sets StackConfig.NetworkIndicator. Received DATA passes its NI to the stack, and every DATA it sends uses the NI of its TransferRequest.
  • SGP: the example no longer keeps its own table from point code to association, learnt from incoming DATA. go-m3ua already provides the SGP distribution function of RFC 4666 §1.4.2.4: Listener.DistributeData picks the ASPs of the Application Server by its traffic mode (§4.3.4.3) and queues while the AS is pending. The stack's messages go to it with the NI of their TransferRequest, so there is no per-network route for the example to track (192 → about 160 lines).
  • errors.AsType replaces errors.As.

This answers the review of #20: with it, both bundled examples propagate the indicator.

Verification

  • examples: go build, go vet, staticcheck, golangci-lint clean; no retracted module in the build list (go list -m -retracted all).
  • The ASP and SGP examples over M3UA/SCTP between two Linux containers, captured with tshark at the SGP. The ASP sends return-on-error user data to a subsystem the SGP does not have, and the SGP's stack returns it:
ScenarioRequest NIReply NI
Before: DistributeData on the library without the NI20, wrong network
-ni 222: UDTS, cause 0x04
default00
-ni 2 -segmentation-threshold 1602 (two XUDT segments)2: one XUDTS with the first segment's segmentation parameter

Every reply carries Routing Context 1 and swaps OPC and DPC (514 → 257). The ASP reports one N-NOTICE per run, and Wireshark shows no expert information. Before this change, the reply table and DistributeData returned the same UDTS and XUDTS frames.


Summary by cubic

Updates the bundled examples to the current go-m3ua and go-sctp and to carry the network indicator, so replies leave in the same network as the request they answer.

Changes

  • The ASP's -ni flag now sets StackConfig.NetworkIndicator; received DATA carries its NI into the stack, and outgoing DATA uses the NI of its TransferRequest.
  • The SGP drops its hand-rolled point-code-to-association table; Listener.DistributeData now routes responses by RFC 4666 §4.3.4.3 traffic mode. The example serves one Application Server; a multi-AS gateway would pick the AS from its routing keys.
  • errors.AsType replaces errors.As, and go-ctxsync joins the build as an indirect dependency.