{"id":30303869,"url":"https://github.com/otsmr/pnet_show","last_synced_at":"2025-08-17T06:34:31.852Z","repository":{"id":309431767,"uuid":"1036274124","full_name":"otsmr/pnet_show","owner":"otsmr","description":"Derive a `show` function for pnet_packet's to display the struct similar to scapy.","archived":false,"fork":false,"pushed_at":"2025-08-11T20:37:56.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-11T22:16:10.773Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://crates.io/crates/pnet_show","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/otsmr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2025-08-11T20:32:30.000Z","updated_at":"2025-08-11T20:39:37.000Z","dependencies_parsed_at":"2025-08-11T22:28:42.141Z","dependency_job_id":null,"html_url":"https://github.com/otsmr/pnet_show","commit_stats":null,"previous_names":["otsmr/pnet_show"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/otsmr/pnet_show","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otsmr%2Fpnet_show","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otsmr%2Fpnet_show/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otsmr%2Fpnet_show/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otsmr%2Fpnet_show/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/otsmr","download_url":"https://codeload.github.com/otsmr/pnet_show/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/otsmr%2Fpnet_show/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270816061,"owners_count":24650748,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-08-17T06:34:30.673Z","updated_at":"2025-08-17T06:34:31.828Z","avatar_url":"https://github.com/otsmr.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pnet_show\n\n`pnet_show` is a `proc-macro` crate, that derives a `.show()` function for [pnet_packet](https://docs.rs/pnet_packet/latest/pnet_packet/)'s to display the struct similar to scapy.\n\nFirst define your struct and add the derive `Show`.\n\n```rs\n#[packet]\n#[derive(Show)]\npub struct Tether {\n    version: u8,\n    unknown0: u8,\n    tether_type: u8,\n    unknown1: u8,\n    length: u16be,\n    unknown2: u16be,\n    unknown3: u32be,\n    crc32: u32be,\n    options: u16be,\n    function_id: u16be,\n    #[payload]\n    payload: Vec\u003cu8\u003e,\n}\n```\nCalling now `.show()` will then return a string displaying the struct including the values as follow:\n\n```plain\n##[ Tether ]##\n version: 1\n unknown0: 0\n tether_type: 5\n unknown1: 0\n length: 8\n unknown2: 0\n unknown3: 12\n cr032: 1035144919\n options: 257\n function_id: 1601\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotsmr%2Fpnet_show","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fotsmr%2Fpnet_show","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fotsmr%2Fpnet_show/lists"}