source: hybrid/branches/releng-9.0/nanobsd/files/usr/local/sbin/find-nanostation@ 10485

Last change on this file since 10485 was 10417, checked in by rick, 13 years ago

Merging and cleanups of files found in various other places and trees of SVN.

  • Property svn:executable set to *
File size: 546 bytes
Line 
1#!/bin/sh
2# Discover nanostation using CDPv1 packets
3# Credits: http://sidewynder.blogspot.com/2005/07/tcpdump-filter-for-capturing-only.html
4
5if [ "x$1" = "x" ]; then
6 echo "Usage: $0 <iface> [count]" 1>&2
7 echo "Find (lost) Nanostation IP using 'count' CDPv1 packet(s)"
8 echo "Normally CDPv1 packets get send every minute" 1>&2
9 echo "Interface hints: `ifconfig -l`" 1>&2
10 exit 1
11fi
12IFACE=$1
13# By default the local and remote will announce a broadcast.
14COUNT=${2-2}
15
16
17tcpdump -nn -v -i $IFACE -s 1500 -c $COUNT 'ether[18:4] == 0x000c2000'
Note: See TracBrowser for help on using the repository browser.