Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tools/xdpdump]: cleaning up open source version of xdpdump #53

Closed

Commits on Sep 19, 2019

  1. [tools/xdpdump]: cleaning up xdpdump

    cleaning up by:
    - removing unused headers
    - as we have Pcap related helpers in katran/lib - start using em
    and remove local copy
    - fixing path in includes
    
    as far as i remember this version of xdpdump was not synced w/ internal
    (aka this one is open source only)
    
    Tested-By:
    running compiled version:
    ```
    $ sudo ./build/tools/xdpdump/xdpdump -map_path=/sys/fs/bpf/jmp_ens33 -pcap_path=/tmp/test.pcap -packet_limit=10
    
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    src: 172.16.250.1 dst: 172.16.250.129
    proto: 6 sport: 60511 dport: 22 pkt size: 66 chunk size: 66
    
    $ tcpdump -vvvnnnr /tmp/test.pcap
    16:49:29.573973 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x8d3d (correct), seq 217898079, ack 2217887599, win 2031, options [nop,nop,TS val 1104478813 ecr 2058237080], length 0
    16:49:29.574011 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x8b4f (correct), seq 0, ack 485, win 2040, options [nop,nop,TS val 1104478814 ecr 2058237080], length 0
    16:49:29.574269 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x8a20 (correct), seq 0, ack 785, win 2043, options [nop,nop,TS val 1104478814 ecr 2058237080], length 0
    16:49:29.575771 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x8978 (correct), seq 0, ack 949, win 2045, options [nop,nop,TS val 1104478815 ecr 2058237081], length 0
    16:49:29.576890 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x88d2 (correct), seq 0, ack 1113, win 2045, options [nop,nop,TS val 1104478816 ecr 2058237082], length 0
    16:49:29.578182 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x882c (correct), seq 0, ack 1277, win 2045, options [nop,nop,TS val 1104478817 ecr 2058237083], length 0
    16:49:29.579414 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x8785 (correct), seq 0, ack 1441, win 2045, options [nop,nop,TS val 1104478818 ecr 2058237085], length 0
    16:49:29.580249 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x86df (correct), seq 0, ack 1605, win 2045, options [nop,nop,TS val 1104478819 ecr 2058237086], length 0
    16:49:29.581277 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x8639 (correct), seq 0, ack 1769, win 2045, options [nop,nop,TS val 1104478820 ecr 2058237087], length 0
    16:49:29.582412 IP (tos 0x20, ttl 64, id 0, offset 0, flags [DF], proto TCP (6), length 52)
        172.16.250.1.60511 > 172.16.250.129.22: Flags [.], cksum 0x8593 (correct), seq 0, ack 1933, win 2045, options [nop,nop,TS val 1104478821 ecr 2058237088], length 0
    ```
    tehnerd committed Sep 19, 2019
    Configuration menu
    Copy the full SHA
    4e1ede7 View commit details
    Browse the repository at this point in the history