{"id":18773897,"url":"https://github.com/ejunjsh/ping","last_synced_at":"2025-12-14T02:30:17.764Z","repository":{"id":109691052,"uuid":"148890073","full_name":"ejunjsh/ping","owner":"ejunjsh","description":"a ping command line from unp","archived":false,"fork":false,"pushed_at":"2018-09-20T12:46:25.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2024-12-29T08:41:56.296Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/ejunjsh.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":"2018-09-15T09:56:42.000Z","updated_at":"2018-09-20T12:46:27.000Z","dependencies_parsed_at":"2023-03-13T14:05:05.354Z","dependency_job_id":null,"html_url":"https://github.com/ejunjsh/ping","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/ejunjsh%2Fping","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejunjsh%2Fping/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejunjsh%2Fping/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ejunjsh%2Fping/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ejunjsh","download_url":"https://codeload.github.com/ejunjsh/ping/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239680985,"owners_count":19679509,"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":[],"created_at":"2024-11-07T19:36:10.218Z","updated_at":"2025-12-14T02:30:17.720Z","avatar_url":"https://github.com/ejunjsh.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ping\n\na ping command line from unp, this code just let me pratice the related gcc command.\n\n__Notice: this code only build on macos__\n\n## build share library\n\n    gcc lib/*.c -shared -fPIC -o libunp.so -w\n\n## build static library\n\n    cd lib/\n    gcc -c *.c -w\n    cd -\n    ar rv libunp2.a lib/*.o\n\n## build executable file with share library\n\n    gcc *.c -Ilib/  -o ping  -L. -lunp -D__APPLE_USE_RFC_3542 -w\n\n## build executable file with static library\n\n    gcc *.c -Ilib/  -o ping  -L. -lunp2 -D__APPLE_USE_RFC_3542 -w\n\n\n## run\n\n    # the raw socket need root permission\n    sudo ./ping www.baidu.com\n\n## check dependencies of executable file\n\n    # use share library\n    otool -L ping\n    ping:\n            libunp.so (compatibility version 0.0.0, current version 0.0.0)\n            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)\n\n\n    # use static library\n    otool -L ping\n    ping:\n            /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.50.4)\n    \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejunjsh%2Fping","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fejunjsh%2Fping","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fejunjsh%2Fping/lists"}