{"id":16592440,"url":"https://github.com/hauleth/gen_icmp","last_synced_at":"2025-03-21T13:31:35.767Z","repository":{"id":43744532,"uuid":"267041715","full_name":"hauleth/gen_icmp","owner":"hauleth","description":"ICMP protocol implementation for Erlang without NIFs","archived":false,"fork":false,"pushed_at":"2022-02-22T15:32:04.000Z","size":21,"stargazers_count":34,"open_issues_count":2,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-12T23:20:59.253Z","etag":null,"topics":["erlang","icmp","icmp-ping","ping"],"latest_commit_sha":null,"homepage":"","language":"Erlang","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/hauleth.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}},"created_at":"2020-05-26T12:51:16.000Z","updated_at":"2024-03-02T10:45:55.000Z","dependencies_parsed_at":"2022-08-22T13:31:39.368Z","dependency_job_id":null,"html_url":"https://github.com/hauleth/gen_icmp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fgen_icmp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fgen_icmp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fgen_icmp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hauleth%2Fgen_icmp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hauleth","download_url":"https://codeload.github.com/hauleth/gen_icmp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221815631,"owners_count":16885193,"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":["erlang","icmp","icmp-ping","ping"],"created_at":"2024-10-11T23:20:54.741Z","updated_at":"2024-10-28T10:12:31.769Z","avatar_url":"https://github.com/hauleth.png","language":"Erlang","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `gen_icmp`\n\nICMP implementation for Erlang using `socket` (so for now only Unix support).\n\n## Usage\n\nTo send ICMP echo request as unprivileged user (works on macOS and Linux if\nuser group is within `sysctl net.ipv4.ping_group_range`):\n\n```erlang\n{ok, Socket} = gen_icmp:open().\n\nAddr = {127, 0, 0, 1}.\n\nok = gen_icmp:echoreq(Socket, Addr, \u003c\u003c1,2,3,4\u003e\u003e).\n\nreceive\n    {icmp, Addr, {echorep, #{data := \u003c\u003c1,2,3,4\u003e\u003e}}} -\u003e ok\nend.\n```\n\nIf you want to be sure of message order you can use `seq` option:\n\n```erlang\n{ok, Socket} = gen_icmp:open().\n\nAddr = {127, 0, 0, 1}.\n\nok = gen_icmp:echoreq(Socket, Addr, \u003c\u003c1,2,3,4\u003e\u003e, [{seq, 0}]).\nok = gen_icmp:echoreq(Socket, Addr, \u003c\u003c5,6,7,8\u003e\u003e, [{seq, 1}]).\n\nreceive\n    {icmp, Addr, {echorep, #{seq := Seq, data := Data}}} -\u003e\n      io:write(\"Received reply seq=~B data=~p~n\", [Seq, Data])\nend.\n```\n\n## License\n\nSee [Apache 2.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhauleth%2Fgen_icmp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhauleth%2Fgen_icmp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhauleth%2Fgen_icmp/lists"}