{"id":26853048,"url":"https://github.com/wmnsk/go-m3ua","last_synced_at":"2026-01-28T09:08:25.245Z","repository":{"id":52015657,"uuid":"154088522","full_name":"wmnsk/go-m3ua","owner":"wmnsk","description":"M3UA implementation in pure Golang.","archived":false,"fork":false,"pushed_at":"2025-06-27T20:12:39.000Z","size":6089,"stargazers_count":54,"open_issues_count":4,"forks_count":31,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-08-14T15:40:28.629Z","etag":null,"topics":["m3ua","protocol","signaling","ss7","telecom"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wmnsk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-10-22T04:48:18.000Z","updated_at":"2025-07-31T08:13:33.000Z","dependencies_parsed_at":"2025-06-27T21:29:45.053Z","dependency_job_id":null,"html_url":"https://github.com/wmnsk/go-m3ua","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/wmnsk/go-m3ua","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmnsk%2Fgo-m3ua","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmnsk%2Fgo-m3ua/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmnsk%2Fgo-m3ua/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmnsk%2Fgo-m3ua/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wmnsk","download_url":"https://codeload.github.com/wmnsk/go-m3ua/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wmnsk%2Fgo-m3ua/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28843199,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-28T07:39:25.367Z","status":"ssl_error","status_checked_at":"2026-01-28T07:39:24.487Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["m3ua","protocol","signaling","ss7","telecom"],"created_at":"2025-03-30T23:01:21.748Z","updated_at":"2026-01-28T09:08:25.239Z","avatar_url":"https://github.com/wmnsk.png","language":"Go","funding_links":[],"categories":["Protocols"],"sub_categories":["SS7/SIGTRAN"],"readme":"# go-m3ua\n\nSimple M3UA protocol implementation in the Go programming language.\n\n[![CI status](https://github.com/wmnsk/go-m3ua/actions/workflows/go.yml/badge.svg)](https://github.com/wmnsk/go-m3ua/actions/workflows/go.yml)\n[![golangci-lint](https://github.com/wmnsk/go-m3ua/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/wmnsk/go-m3ua/actions/workflows/golangci-lint.yml)\n[![Go Reference](https://pkg.go.dev/badge/github.com/wmnsk/go-m3ua.svg)](https://pkg.go.dev/github.com/wmnsk/go-m3ua)\n[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/wmnsk/go-m3ua/blob/main/LICENSE)\n\n## Quickstart\n\n### Installation\n\nRun `go mod tidy` in your project's directory to collect the required packages automatically.\n\n_This project follows [the Release Policy of Go](https://golang.org/doc/devel/release.html#policy)._\n\n_*Non-Linux machines are NOT supported, as this package relies much on [`github.com/ishidawataru/sctp`](https://github.com/ishidawataru/sctp)._\n\n### Trying Examples\n\nWorking examples are available in [examples directory](./examples/).\nJust executing the following commands, you can see the client and server setting up M3UA connection.\n\n```shell-session\n# Run Server first\ncd examples/server\ngo run m3ua-server.go\n\n// Run Client then\ncd examples/client\ngo run m3ua-client.go\n```\n\nThere is also an example for Point Code format conversion, which works like this;\n\n```shell-session\n$ ./pc-conv -raw 1234 -variant 3-8-3\n2023/04/05 06:07:08 PC successfully converted.\n        Raw: 1234, Formatted: 0-154-2, Variant: 3-8-3\n$ \n$ ./pc-conv -str 1-234-5 -variant 4-3-7\n2023/04/05 06:07:08 PC successfully converted.\n        Raw: 29957, Formatted: 1-234-5, Variant: 4-3-7\n```\n\n### For Developers\n\nThe API design is kept as similar as possible to other protocols in standard `net` package. To establish M3UA connection as client/server, you can use `Dial()` and `Listen()`/`Accept()` without caring about the underlying SCTP association, as go-m3ua handles it together with M3UA ASPSM \u0026 ASPTM procedures.\n\nHere is an example to develop your own M3UA client using go-m3ua.\n\nFirst, you need to create `*Config` used to setup/maintain M3UA connection.\n\n```go\nconfig := m3ua.NewClientConfig(\n    \u0026m3ua.HeartbeatInfo{\n        Enabled:  true,\n        Interval: time.Duration(3 * time.Second),\n        Timer:    time.Duration(10 * time.Second),\n    },\n    0x11111111, // OriginatingPointCode\n    0x22222222, // DestinationPointCode\n    1,          // AspIdentifier\n    params.TrafficModeLoadshare, // TrafficModeType\n    0,                     // NetworkAppearance\n    0,                     // CorrelationID\n    []uint32{1, 2},        // RoutingContexts\n    params.ServiceIndSCCP, // ServiceIndicator\n    0, // NetworkIndicator\n    0, // MessagePriority\n    1, // SignalingLinkSelection\n)\n// set nil on unnecessary paramters.\nconfig.CorrelationID = nil\n```\n\nThen, prepare network addresses and context and try to connect with `Dial()`.\n\n```go\n// setup SCTP peer on the specified IPs and Port.\nraddr, err := sctp.ResolveSCTPAddr(\"sctp\", SERVER_IPS)\nif err != nil {\n    log.Fatal(err)\n}\n\nctx := context.Background()\nctx, cancel := context.WithCancel(ctx)\ndefer cancel()\n\nconn, err := m3ua.Dial(ctx, \"m3ua\", nil, raddr, config)\nif err != nil {\n    log.Fatalf(\"Failed to dial M3UA: %s\", err)\n}\ndefer conn.Close()\n```\n\nNow you can `Read()` / `Write()` data from/to the remote endpoint.\n\n```go\nif _, err := conn.Write(d); err != nil {\n    log.Fatalf(\"Failed to write M3UA data: %s\", err)\n}\nlog.Printf(\"Successfully sent M3UA data: %x\", d)\n\nbuf := make([]byte, 1500)\nn, err := conn.Read(buf)\nif err != nil {\n    log.Fatal(err)\n}\n\nlog.Printf(\"Successfully read M3UA data: %x\", buf[:n])\n```\n\nSee [example/server directory](./examples/server) for server example.\n\n## Supported Features\n\n### Messages\n\n| Class    | Message                                         | Supported | Notes                                                          |\n|----------|-------------------------------------------------|-----------|----------------------------------------------------------------|\n| Transfer | Payload Data Message (DATA)                     | Yes       | [RFC4666#3.3](https://tools.ietf.org/html/rfc4666#section-3.3) |\n| SSNM     | Destination Unavailable (DUNA)                  | Yes       | [RFC4666#3.4](https://tools.ietf.org/html/rfc4666#section-3.4) |\n|          | Destination Available (DAVA)                    | Yes       |                                                                |\n|          | Destination State Audit (DAUD)                  | Yes       |                                                                |\n|          | Signalling Congestion (SCON)                    | Yes       |                                                                |\n|          | Destination User Part Unavailable (DUPU)        | Yes       |                                                                |\n|          | Destination Restricted (DRST)                   | Yes       |                                                                |\n| ASPSM    | ASP Up                                          | Yes       | [RFC4666#3.5](https://tools.ietf.org/html/rfc4666#section-3.5) |\n|          | ASP Up Acknowledgement (ASP Up Ack)             | Yes       |                                                                |\n|          | ASP Down                                        | Yes       |                                                                |\n|          | ASP Down Acknowledgement (ASP Down Ack)         | Yes       |                                                                |\n|          | Heartbeat (BEAT)                                | Yes       |                                                                |\n|          | Heartbeat Acknowledgement (BEAT Ack)            | Yes       |                                                                |\n| RKM      | Registration Request (REG REQ)                  |           | [RFC4666#3.6](https://tools.ietf.org/html/rfc4666#section-3.6) |\n|          | Registration Response (REG RSP)                 |           |                                                                |\n|          | Deregistration Request (DEREG REQ)              |           |                                                                |\n|          | Deregistration Response (DEREG RSP)             |           |                                                                |\n| ASPTM    | ASP Active                                      | Yes       | [RFC4666#3.7](https://tools.ietf.org/html/rfc4666#section-3.7) |\n|          | ASP Active Acknowledgement (ASP Active Ack)     | Yes       |                                                                |\n|          | ASP Inactive                                    | Yes       |                                                                |\n|          | ASP Inactive Acknowledgement (ASP Inactive Ack) | Yes       |                                                                |\n| MGMT     | Error                                           | Yes       | [RFC4666#3.8](https://tools.ietf.org/html/rfc4666#section-3.8) |\n|          | Notify                                          | Yes       |                                                                |\n\n### Parameters\n\n| Type          | Parameters                   | Supported | Notes |\n|---------------|------------------------------|-----------|-------|\n| Common        | INFO String                  | Yes       |       |\n|               | Routing Context              | Yes       |       |\n|               | Diagnostic Information       | Yes       |       |\n|               | Heartbeat Data               | Yes       |       |\n|               | Traffic Mode Type            | Yes       |       |\n|               | Error Code                   | Yes       |       |\n|               | Status                       | Yes       |       |\n|               | ASP Identifier               | Yes       |       |\n| M3UA-specific | Network Appearance           | Yes       |       |\n|               | User/Cause                   | Yes       |       |\n|               | Congestion Indications       | Yes       |       |\n|               | Concerned Destination        | Yes       |       |\n|               | Routing Key                  | Yes       |       |\n|               | Registration Result          | Yes       |       |\n|               | Deregistration Result        | Yes       |       |\n|               | Local Routing Key Identifier | Yes       |       |\n|               | Destination Point Code       | Yes       |       |\n|               | Service Indicators           | Yes       |       |\n|               | Originating Point Code List  | Yes       |       |\n|               | Protocol Data                | Yes       |       |\n|               | Registration Status          | Yes       |       |\n|               | Deregistration Status        | Yes       |       |\n\n## Disclaimer\n\nThis is still experimental project. In some part, the behavior is not fully compliant with RFC, and some of the features are not even implemented yet.\n\nAlso note that some exported APIs may be changed without any notice before first release (v1.0.0).\n\n## Author\n\nYoshiyuki Kurauchi ([Website](https://wmnsk.com/))\n\n## LICENSE\n\n[MIT](https://github.com/wmnsk/go-m3ua/blob/main/LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmnsk%2Fgo-m3ua","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwmnsk%2Fgo-m3ua","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwmnsk%2Fgo-m3ua/lists"}