source: hybrid/branches/releng-9.0/nanobsd/files/tools/find-nanostation@ 10829

Last change on this file since 10829 was 10720, checked in by rick, 13 years ago

Plaats de handige tools in de ... tools directory :-)

  • 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.