xref: /freebsd/usr.sbin/bluetooth/l2ping/l2ping.8 (revision b2c76c41be32f904179efed29c0ca04d53f3996c)
1.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com>
2.\" All rights reserved.
3.\"
4.\" Redistribution and use in source and binary forms, with or without
5.\" modification, are permitted provided that the following conditions
6.\" are met:
7.\" 1. Redistributions of source code must retain the above copyright
8.\"    notice, this list of conditions and the following disclaimer.
9.\" 2. Redistributions in binary form must reproduce the above copyright
10.\"    notice, this list of conditions and the following disclaimer in the
11.\"    documentation and/or other materials provided with the distribution.
12.\"
13.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
14.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
15.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
16.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
17.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
18.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
19.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
20.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
21.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
22.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
23.\" SUCH DAMAGE.
24.\"
25.\" $Id: l2ping.8,v 1.3 2003/05/21 01:00:19 max Exp $
26.\"
27.Dd March 29, 2011
28.Dt L2PING 8
29.Os
30.Sh NAME
31.Nm l2ping
32.Nd send L2CAP ECHO_REQUEST to remote devices
33.Sh SYNOPSIS
34.Nm
35.Op Fl fhn
36.Fl a Ar remote
37.Op Fl c Ar count
38.Op Fl i Ar wait
39.Op Fl S Ar source
40.Op Fl s Ar size
41.Sh DESCRIPTION
42The
43.Nm
44utility uses L2CAP
45.Dv ECHO_REQUEST
46datagram to elicit an L2CAP
47.Dv ECHO_RESPONSE
48datagram from a remote device.
49.Pp
50The options are as follows:
51.Bl -tag -width indent
52.It Fl a Ar remote
53Specify the remote device to ping.
54The remote device can be specified by either its BD_ADDR or name.
55If name was specified then the
56.Nm
57utility will attempt to resolve the name via
58.Xr bt_gethostbyname 3 .
59.It Fl c Ar count
60Number of packets to send.
61If this option is not specified,
62.Nm
63will operate until interrupted.
64.It Fl f
65Do not wait between sending each packet.
66.It Fl h
67Display usage message and exit.
68.It Fl i Ar wait
69Wait
70.Ar wait
71seconds between sending each packet.
72The default is to wait for one second between each packet.
73This option is ignored if
74.Fl f
75has been specified.
76.It Fl n
77Numeric output only.
78No attempt will be made to look up symbolic names for host addresses.
79.It Fl S Ar source
80Specify the local device which should be used to send L2CAP
81.Dv ECHO_REQUEST
82datagrams.
83The local device can be specified by either its BD_ADDR or name.
84If name was specified then the
85.Nm
86utility will attempt to resolve the name via
87.Xr bt_gethostbyname 3 .
88.It Fl s Ar size
89Specify the number of payload bytes to be sent.
90The default size is 44 bytes.
91It is calculated as minimum L2CAP MTU (48 bytes) minus the size of the L2CAP
92signalling command header (4 bytes).
93The maximum size is 65531 bytes.
94Is is calculated as maximum L2CAP MTU
95(65535 bytes) minus four bytes of payload reserved for
96.Nm
97internal use.
98Use this option with caution.
99Some implementations may not like large sizes and may hang or even crash.
100.El
101.Sh EXIT STATUS
102.Ex -std
103.Sh SEE ALSO
104.Xr bluetooth 3 ,
105.Xr netgraph 3 ,
106.Xr netgraph 4 ,
107.Xr ng_l2cap 4 ,
108.Xr l2control 8
109.Sh AUTHORS
110.An Maksim Yevmenkin Aq Mt emax@FreeBSD.org
111.Sh BUGS
112Could collect more statistic.
113Could check for duplicated, corrupted and lost packets.
114