I am looking to narrow down my tcpdump by packet length. I know I can `| grep but I was wondering if I can pass this particular packet length as an option in 'tcpdump'. I am trying to write a script to show me all present MPEG-TS multicast on the network using the following command:
sudo tcpdump -c 1000 -ti <network_interface> multicast | grep 1316 | sort | uniq
So this command works and gives me exactly the output I want but I was thinking I could simplify it by passing the length in the tcpdump command, something like:
sudo tcpdump -c 1000 -ti <network_interface> multicast and length 1316 | sort | uniq