{"id":20066308,"url":"https://github.com/ossobv/rtpsniff","last_synced_at":"2025-05-05T18:32:39.349Z","repository":{"id":23234507,"uuid":"26592084","full_name":"ossobv/rtpsniff","owner":"ossobv","description":"Standalone RTP sniffing tool.","archived":false,"fork":false,"pushed_at":"2019-04-09T14:18:29.000Z","size":98,"stargazers_count":18,"open_issues_count":6,"forks_count":13,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-04-24T03:42:30.577Z","etag":null,"topics":["cli","protocol-analyzer","realtime","rtp"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ossobv.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":"2014-11-13T14:42:56.000Z","updated_at":"2024-02-27T19:47:49.000Z","dependencies_parsed_at":"2022-08-21T22:30:28.839Z","dependency_job_id":null,"html_url":"https://github.com/ossobv/rtpsniff","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/ossobv%2Frtpsniff","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossobv%2Frtpsniff/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossobv%2Frtpsniff/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ossobv%2Frtpsniff/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ossobv","download_url":"https://codeload.github.com/ossobv/rtpsniff/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224461886,"owners_count":17315116,"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":["cli","protocol-analyzer","realtime","rtp"],"created_at":"2024-11-13T13:56:02.228Z","updated_at":"2024-11-13T13:56:02.924Z","avatar_url":"https://github.com/ossobv.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"RTPSniff\n========\n\nRTPSniff is a tool to sniff RTP traffic and show stats about it.\n\n(I'm considering renaming `rtpsniff` to `rtpstat` -- like `vmstat` --\nsince it prints a status update every N seconds.)\n\n\nTODO\n----\n\n* Add example zabbix template.\n\n* Add logging to `/var/run` instead of syslog. That helps zabbix.\n  (Don't forget to include options to set the user and the file permissions.)\n\n* Also log the unixtime and interval. If needed, the zabbix reader can then\n  divide by interval to get packets/second. And zabbix can check if the unixtime\n  is recent enough to consider this value.\n\n* Allow output of either all streams or only those \"with issues\".\n\n* Change the interface:\n  * `rtpsniff 10` should show the summary every 10 seconds, like\n    `vmstat`.\n  * `-v` should make things verbose.\n  * `-i` for the interface (take eth0 by default).\n  * `-b` for bpf filter? or `-p` for pcap-style filter?\n    and default to udp and not 53? add example for filtering even\n    ports only?\n    `udp and not port 53 and (udp[1] \u0026 1 = 0) and (udp[3] \u0026 1 = 0)`\n  * Take into account that we may want to dump the contents.\n\n* Decide the best form of output. Allow sequence reordering as long as\n  it's within reasonable limits.\n\n* Output requirements are:\n  * Always show the total packets next to the percentage. Because only a\n    percentage is misleading when there are only a few streams.\n\n  * A total of the RTP loss/badness; preferably a percentage.\n\n  * List of streams with issues.\n\n  * Current output looks like this:\n\n            RTP: 21x.17x.21x.18x:5014 \u003e 19x.3x.11x.10x:17886, \\\n              ssrc: 4022267390, packets: 43, seq: 47, lost: 5, \\\n              graps: 5, late: 0, jump: 0\n            RTP: 19x.3x.11x.10x:14136 \u003e 21x.17x.21x.18x:5012, \\\n              ssrc: 4022267390, packets: 39, seq: 47, lost: 4, \\\n              graps: 4, late: 0, jump: 0\n            RTP-SUM: streams 1097, not-lost 214039, lost 69 (0.03%), \\\n              late 140 (0.07%)\n\n  * For starters, the individual streams should get a loss counter.\n\n* Move libpcap stuff out of rtpsniff.c and into sniff\\_pcap.c.\n\n* Move rtp stuff out of sniff\\_rtp.c into cap\\_rtp.c.\n\n* Document/note that timestamps are not used, only sequence numbers.\n\n* Document/note that the streams also include RTCP.\n\n* Features:\n  * Parse RTCP from the wire and print that.\n\n  * Create a \"jitter/reorder\"-buffer to store sequence numbers:\n \n            100: [UUUUUUUUU] (91..99)\n            104: [UUUUUx...] (95..103)\n            102: [UUUUUx.x.] (95..103)\n\n    That way we could count dupes and properly check reordering.\n    (Store as 2bitfield? `00=unknown, 11=set, 01=skipped?\n    init=0, increment: val=(val\u003c\u003c2)|3, skip: val=(val\u003c\u003c2)|1\n    oldmask=(val\u003c\u003c(2*seqdiff))\u00260x3`)\n\n\nDocs\n----\n  \n* This is an adapted version of lightcount, altered to sniff RTP\n  traffic and show which streams have packet loss.\n  URL: https://code.osso.nl/projects/lightcount\n\n* Simulating packet loss from the gateway:\n\n        # 45% drop should be sufficient to get a nice robotic sound.\n        iptables -I FORWARD -d SOME_IP -p udp \\\n          -m statistic --mode random --probability 0.45 -j DROP\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossobv%2Frtpsniff","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fossobv%2Frtpsniff","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fossobv%2Frtpsniff/lists"}