{"id":26852940,"url":"https://github.com/linouxis9/oxirush-nas","last_synced_at":"2025-03-30T23:02:08.158Z","repository":{"id":282611601,"uuid":"940291330","full_name":"linouxis9/oxirush-nas","owner":"linouxis9","description":"oxirush-nas is a 5G NAS message encoder/decoder","archived":false,"fork":false,"pushed_at":"2025-03-15T19:13:16.000Z","size":38,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-15T19:34:35.744Z","etag":null,"topics":["5g","5g-core-network","5g-simulation","5gc","amf","gnb","gnodeb","nas","packetrusher","rust","rust-library","ue"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/linouxis9.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}},"created_at":"2025-02-27T23:33:07.000Z","updated_at":"2025-03-15T19:13:12.000Z","dependencies_parsed_at":"2025-03-15T19:44:38.386Z","dependency_job_id":null,"html_url":"https://github.com/linouxis9/oxirush-nas","commit_stats":null,"previous_names":["linouxis9/oxirush-nas"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linouxis9%2Foxirush-nas","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linouxis9%2Foxirush-nas/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linouxis9%2Foxirush-nas/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/linouxis9%2Foxirush-nas/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/linouxis9","download_url":"https://codeload.github.com/linouxis9/oxirush-nas/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246390866,"owners_count":20769477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["5g","5g-core-network","5g-simulation","5gc","amf","gnb","gnodeb","nas","packetrusher","rust","rust-library","ue"],"created_at":"2025-03-30T23:01:19.819Z","updated_at":"2025-03-30T23:02:07.977Z","avatar_url":"https://github.com/linouxis9.png","language":"Rust","funding_links":[],"categories":["Protocols"],"sub_categories":["NAS 4G/5G and Milenage"],"readme":"# oxirush-nas\n\n[![Crates.io](https://img.shields.io/crates/v/oxirush-nas.svg)](https://crates.io/crates/oxirush-nas)\n[![Documentation](https://docs.rs/oxirush-nas/badge.svg)](https://docs.rs/oxirush-nas)\n[![License](https://img.shields.io/badge/license-Apache--2.0-blue.svg)](LICENSE)\n\n\u003e ⚠️ **Note**: This library is currently in active development and not all features may be available.\n\nA fast, memory-safe library for encoding and decoding 5G Non-Access Stratum (NAS) messages, written in Rust.\n\nPart of the future [OxiRush](https://github.com/linouxis9/oxirush) project - a comprehensive next-generation 5G Core Network testing framework.\n\n## Overview\n\n`oxirush-nas` provides a robust implementation for working with 5G NAS protocol messages and IEs, which are used for the communication between the User Equipment (UE) and the 5G Core Network.\n\n## Features\n\n- **Complete Protocol Support**: Full implementation of 5G NAS protocol as defined in 3GPP TS 24.501\n- **High Performance**: Optimized for speed and minimal memory usage\n- **Type Safety**: Leverages Rust's type system to prevent protocol errors at compile time\n\n## Installation\n\nAdd the following to your `Cargo.toml`:\n\n```toml\n[dependencies]\noxirush-nas = \"0.1\"\n```\n\n## Usage Examples\n\n### Basic Message Decoding and Encoding\n\n```rust\nuse oxirush_nas::{decode_nas_5gs_message, encode_nas_5gs_message, Nas5gsMessage};\nuse anyhow::Result;\n\n#[test]\nfn test() -\u003e Result\u003c()\u003e {\n    // Example NAS message bytes (Registration Request)\n    let nas_bytes = hex::decode(\"7e004179000d0199f9070000000000000010022e08a020000000000000\")?;\n    \n    // Decode the message\n    let parsed_message = decode_nas_5gs_message(\u0026nas_bytes)?;\n    \n    // Print message details\n    match \u0026parsed_message {\n        Nas5gsMessage::Gmm(header, message) =\u003e {\n            println!(\"Message Type: {:?}\", header.message_type);\n\n            match \u0026message {\n                Nas5gmmMessage::RegistrationRequest(reg_request) =\u003e{\n                    println!(\"Registration Type Value: {}\", reg_request.fgs_registration_type.value);\n                    println!(\"Mobile Identity Length: {}\", reg_request.fgs_mobile_identity.length);\n                    \n                    if let Some(sec_cap) = \u0026reg_request.ue_security_capability {\n                        println!(\"UE Security Capability: {:?}\", sec_cap.value);\n                    }\n                },\n                _ =\u003e  println!(\"Not a RegistrationRequest message\"),\n            }\n        },\n        _ =\u003e println!(\"Not a GMM message\"),\n    }\n    \n    // Re-encode the message\n    let encoded_message = encode_nas_5gs_message(\u0026parsed_message)?;\n    \n    // Verify encoding matches the original\n    println!(\"Encoding matches original: {}\", nas_bytes == encoded_message);\n\n    Ok(())\n}\n```\n## Documentation\n\nFor more detailed documentation, see:\n\n- [oxirush-nas's API Reference](https://docs.rs/oxirush-nas)\n- [3GPP TS 24.501 Specification](https://www.3gpp.org/DynaReport/24501.htm)\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\nPlease make sure your code passes all tests and adheres to the project's coding style.\n\n### Developer Certificate of Origin (DCO)\n\nBy contributing to this project, you agree to the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). This means that you have the right to submit your contributions and you agree to license them according to the project's license.\n\nAll commits should be signed-off with `git commit -s` to indicate your agreement to the DCO.\n\n## License\n\nCopyright 2025 Valentin D'Emmanuele\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n## Acknowledgements\n\nOxiRush is inspired by the [PacketRusher](https://github.com/HewlettPackard/PacketRusher) project, reimplemented in Rust for improved performance and safety.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinouxis9%2Foxirush-nas","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flinouxis9%2Foxirush-nas","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flinouxis9%2Foxirush-nas/lists"}