{"id":13775546,"url":"https://github.com/yadutaf/tracepkt","last_synced_at":"2025-05-11T07:32:52.951Z","repository":{"id":141843498,"uuid":"96786668","full_name":"yadutaf/tracepkt","owner":"yadutaf","description":"Trace a ping packet journey across network interfaces and namespace on recent Linux. Supports IPv4 and IPv6.","archived":true,"fork":false,"pushed_at":"2019-02-24T17:00:24.000Z","size":16,"stargazers_count":240,"open_issues_count":1,"forks_count":55,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-11-17T10:40:01.523Z","etag":null,"topics":["ebpf","networking","tracing"],"latest_commit_sha":null,"homepage":"https://blog.yadutaf.fr/2017/07/28/tracing-a-packet-journey-using-linux-tracepoints-perf-ebpf/","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/yadutaf.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}},"created_at":"2017-07-10T14:26:21.000Z","updated_at":"2024-10-20T15:41:59.000Z","dependencies_parsed_at":"2024-01-07T01:19:21.600Z","dependency_job_id":"8cebe647-8c59-4275-9b73-ea333056981d","html_url":"https://github.com/yadutaf/tracepkt","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/yadutaf%2Ftracepkt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yadutaf%2Ftracepkt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yadutaf%2Ftracepkt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yadutaf%2Ftracepkt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yadutaf","download_url":"https://codeload.github.com/yadutaf/tracepkt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253534084,"owners_count":21923515,"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":["ebpf","networking","tracing"],"created_at":"2024-08-03T17:01:40.867Z","updated_at":"2025-05-11T07:32:47.937Z","avatar_url":"https://github.com/yadutaf.png","language":"C","funding_links":[],"categories":["C","\u003ca id=\"eec238a1a2657b70f7bbbe68a4421249\"\u003e\u003c/a\u003e其他"],"sub_categories":["\u003ca id=\"b239f12aca7aa942b45836032cbef99a\"\u003e\u003c/a\u003e转换"],"readme":"# Tracepkt\n\nTrace a ping packet on the L2 layer, as it crosses Linux network interfaces and namespaces. Supports IPv4 and IPv6.\n\n```console\n\u003e modprobe ip_tables ip6_tables\n\u003e sudo python tracepkt.py 172.17.0.2\n    NETWORK NS        INTERFACE    TYPE ADDRESSES                          IPTABLES\n[           0]                  request 172.17.0.1 -\u003e 172.17.0.2               nat.OUTPUT      :ACCEPT\n[           0]                  request 172.17.0.1 -\u003e 172.17.0.2            filter.OUTPUT      :ACCEPT\n[  4026531992]          docker0 request 172.17.0.1 -\u003e 172.17.0.2               nat.POSTROUTING :ACCEPT\n[  4026531992]          docker0 request 172.17.0.1 -\u003e 172.17.0.2          \n[  4026531992]      veth61528aa request 172.17.0.1 -\u003e 172.17.0.2          \n[  4026533448]             eth0 request 172.17.0.1 -\u003e 172.17.0.2          \n[  4026533448]             eth0   reply 172.17.0.2 -\u003e 172.17.0.1          \n[  4026531992]      veth61528aa   reply 172.17.0.2 -\u003e 172.17.0.1          \n[  4026531992]          docker0   reply 172.17.0.2 -\u003e 172.17.0.1          \n[  4026531992]          docker0   reply 172.17.0.2 -\u003e 172.17.0.1            filter.INPUT       :ACCEPT\n```\n\nThe first 2 packets going from the current network namespace to a Docker container and going back, crossing a veth pair and a bridge.\n\n## Features\n\n* Record crossed Linux network interfaces\n* Record crossed Linux network namespaces\n* Record crossed iptables chains\n\n**Note**: The iptables tracing support is ***experimental***. Tracing which specific\nrule matches within a chain is not supported. This would require to hook into\n``trace_packet`` netfilter function which is unfortunatly ``static`` and\ntherefore private.\n\n## The full story\n\nThis project started as an illustration for a blog post on perf and eBPF https://blog.yadutaf.fr/2017/07/28/tracing-a-packet-journey-using-linux-tracepoints-perf-ebpf/.\n\n## Usage\n\nTo use this project, you need a working / recent BCC install on your system. Read more about BCC on their Github repository: https://github.com/iovisor/bcc.\n\nAdditionally, you'll need a recent kernel (presumably \u003e= 4.7) and full root privilege.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyadutaf%2Ftracepkt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyadutaf%2Ftracepkt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyadutaf%2Ftracepkt/lists"}