TCPDump of messages

21 views
Skip to first unread message

Newcastle Lifeboat

unread,
Jul 1, 2020, 10:03:56 AM7/1/20
to kplex
Hi Folks.

Not having any issues as such (apart of disconnections every now and then) but just looking advice.

When I do a TCPDump of my connection to see what I'm receiving, I seem to get a load of other information. Is this normal or Is there a way I can filter out this info and just receive the actual message info.


I've added a screenshot below

Regards

Declan


Keith Young

unread,
Jul 1, 2020, 3:41:46 PM7/1/20
to kplex
Add "-l" to tcpdump to make it line buffered rather than block buffered when writing to a pipe and then push it through a perl/python/sed/awk filter e.g.:
sudo tcpdump -i eth0 -A -l port xxxx | sed -n 's/.*\(!AIVDM,.*\*..\)$/\1/p'
? (assuming you only want AIS VDM sentences...)

Newcastle Lifeboat

unread,
Jul 6, 2020, 4:56:07 AM7/6/20
to kplex
Cheers Keith

That works great. Many thanks

Declan
Reply all
Reply to author
Forward
0 new messages