[Midnightbsd-cvs] src [11284] trunk/usr.sbin/bluetooth/btpand: sync with freebsd
laffer1 at midnightbsd.org
laffer1 at midnightbsd.org
Wed Jul 4 09:28:18 EDT 2018
Revision: 11284
http://svnweb.midnightbsd.org/src/?rev=11284
Author: laffer1
Date: 2018-07-04 09:28:17 -0400 (Wed, 04 Jul 2018)
Log Message:
-----------
sync with freebsd
Modified Paths:
--------------
trunk/usr.sbin/bluetooth/bthidcontrol/Makefile
trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8
trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c
trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.h
trunk/usr.sbin/bluetooth/bthidcontrol/hid.c
trunk/usr.sbin/bluetooth/bthidcontrol/sdp.c
trunk/usr.sbin/bluetooth/bthidd/Makefile
trunk/usr.sbin/bluetooth/bthidd/bthidd.8
trunk/usr.sbin/bluetooth/bthidd/kbd.c
trunk/usr.sbin/bluetooth/bthidd/lexer.l
trunk/usr.sbin/bluetooth/bthidd/parser.y
trunk/usr.sbin/bluetooth/btpand/Makefile
trunk/usr.sbin/bluetooth/btpand/bnep.c
trunk/usr.sbin/bluetooth/btpand/bnep.h
trunk/usr.sbin/bluetooth/btpand/btpand.8
trunk/usr.sbin/bluetooth/btpand/btpand.c
trunk/usr.sbin/bluetooth/btpand/btpand.h
trunk/usr.sbin/bluetooth/btpand/channel.c
trunk/usr.sbin/bluetooth/btpand/client.c
trunk/usr.sbin/bluetooth/btpand/event.c
trunk/usr.sbin/bluetooth/btpand/event.h
trunk/usr.sbin/bluetooth/btpand/packet.c
trunk/usr.sbin/bluetooth/btpand/sdp.c
trunk/usr.sbin/bluetooth/btpand/sdp.h
trunk/usr.sbin/bluetooth/btpand/server.c
trunk/usr.sbin/bluetooth/btpand/tap.c
Property Changed:
----------------
trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8
trunk/usr.sbin/bluetooth/bthidd/bthidd.8
trunk/usr.sbin/bluetooth/bthidd/bthidd.conf.sample
trunk/usr.sbin/bluetooth/bthidd/lexer.l
trunk/usr.sbin/bluetooth/bthidd/parser.y
trunk/usr.sbin/bluetooth/btpand/btpand.8
Modified: trunk/usr.sbin/bluetooth/bthidcontrol/Makefile
===================================================================
--- trunk/usr.sbin/bluetooth/bthidcontrol/Makefile 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidcontrol/Makefile 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,5 +1,6 @@
-# $Id: Makefile,v 1.2 2013-01-01 17:41:47 laffer1 Exp $
# $MidnightBSD$
+# $Id: Makefile,v 1.2 2004/02/13 21:44:41 max Exp $
+# $FreeBSD: stable/10/usr.sbin/bluetooth/bthidcontrol/Makefile 128080 2004-04-10 00:18:00Z emax $
.PATH: ${.CURDIR}/../bthidd
@@ -6,7 +7,7 @@
PROG= bthidcontrol
MAN= bthidcontrol.8
SRCS= bthidcontrol.c hid.c lexer.l parser.y sdp.c
-WARNS?= 0
+WARNS?= 1
CFLAGS+= -DBTHIDCONTROL=1 -I${.CURDIR}/../bthidd
DPADD= ${LIBBLUETOOTH} ${LIBSDP} ${LIBUSBHID}
Modified: trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8
===================================================================
--- trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 2004 Maksim Yevmenkin <m_evmenkin at yahoo.com>
.\" All rights reserved.
.\"
@@ -22,8 +23,8 @@
.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
.\" SUCH DAMAGE.
.\"
-.\" $Id: bthidcontrol.8,v 1.3 2013-01-01 17:41:47 laffer1 Exp $
-.\" $MidnightBSD$
+.\" $Id: bthidcontrol.8,v 1.1 2004/02/13 21:44:41 max Exp $
+.\" $FreeBSD: stable/10/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8 236500 2012-06-03 06:57:47Z joel $
.\"
.Dd October 30, 2006
.Dt BTHIDCONTROL 8
@@ -83,7 +84,7 @@
.Nm
are:
.Pp
-.Bl -tag -offset indent -compact
+.Bl -tag -width "Forget" -offset indent -compact
.It Cm Query
.It Cm Dump
.It Cm Known
Property changes on: trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c
===================================================================
--- trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* bthidcontrol.c
*
@@ -25,8 +26,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bthidcontrol.c,v 1.3 2013-01-01 17:41:47 laffer1 Exp $
- * $MidnightBSD$
+ * $Id: bthidcontrol.c,v 1.2 2004/02/13 21:44:41 max Exp $
+ * $FreeBSD: stable/10/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.c 163811 2006-10-31 00:26:58Z markus $
*/
#include <sys/queue.h>
Modified: trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.h
===================================================================
--- trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.h 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.h 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* bthidcontrol.h
*
@@ -25,8 +26,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: bthidcontrol.h,v 1.2 2013-01-01 17:41:47 laffer1 Exp $
- * $MidnightBSD$
+ * $Id: bthidcontrol.h,v 1.1 2004/02/12 23:25:51 max Exp $
+ * $FreeBSD: stable/10/usr.sbin/bluetooth/bthidcontrol/bthidcontrol.h 128080 2004-04-10 00:18:00Z emax $
*/
#ifndef __BTHIDCONTROL_H__
Modified: trunk/usr.sbin/bluetooth/bthidcontrol/hid.c
===================================================================
--- trunk/usr.sbin/bluetooth/bthidcontrol/hid.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidcontrol/hid.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* hid.c
*
@@ -25,8 +26,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: hid.c,v 1.3 2013-01-01 17:41:47 laffer1 Exp $
- * $MidnightBSD$
+ * $Id: hid.c,v 1.3 2004/02/17 22:14:57 max Exp $
+ * $FreeBSD: stable/10/usr.sbin/bluetooth/bthidcontrol/hid.c 163811 2006-10-31 00:26:58Z markus $
*/
#include <sys/queue.h>
Modified: trunk/usr.sbin/bluetooth/bthidcontrol/sdp.c
===================================================================
--- trunk/usr.sbin/bluetooth/bthidcontrol/sdp.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidcontrol/sdp.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* sdp.c
*
@@ -25,8 +26,8 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: sdp.c,v 1.3 2013-01-01 17:41:47 laffer1 Exp $
- * $MidnightBSD$
+ * $Id: sdp.c,v 1.3 2004/02/17 22:14:57 max Exp $
+ * $FreeBSD: stable/10/usr.sbin/bluetooth/bthidcontrol/sdp.c 212296 2010-09-07 16:36:03Z emax $
*/
#include <sys/queue.h>
Modified: trunk/usr.sbin/bluetooth/bthidd/Makefile
===================================================================
--- trunk/usr.sbin/bluetooth/bthidd/Makefile 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidd/Makefile 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,6 +1,6 @@
+# $MidnightBSD$
# $Id: Makefile,v 1.6 2006/09/07 21:36:55 max Exp $
# $FreeBSD: stable/10/usr.sbin/bluetooth/bthidd/Makefile 249657 2013-04-19 19:45:00Z ed $
-# $MidnightBSD$
PROG= bthidd
MAN= bthidd.8
Modified: trunk/usr.sbin/bluetooth/bthidd/bthidd.8
===================================================================
--- trunk/usr.sbin/bluetooth/bthidd/bthidd.8 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidd/bthidd.8 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+.\" $MidnightBSD$
.\" Copyright (c) 2006 Maksim Yevmenkin <m_evmenkin at yahoo.com>
.\" All rights reserved.
.\"
@@ -24,7 +25,6 @@
.\"
.\" $Id: bthidd.8,v 1.1 2006/09/07 21:36:55 max Exp $
.\" $FreeBSD: stable/10/usr.sbin/bluetooth/bthidd/bthidd.8 208027 2010-05-13 12:07:55Z uqs $
-.\" $MidnightBSD$
.\"
.Dd September 7, 2006
.Dt BTHIDD 8
Property changes on: trunk/usr.sbin/bluetooth/bthidd/bthidd.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Index: trunk/usr.sbin/bluetooth/bthidd/bthidd.conf.sample
===================================================================
--- trunk/usr.sbin/bluetooth/bthidd/bthidd.conf.sample 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidd/bthidd.conf.sample 2018-07-04 13:28:17 UTC (rev 11284)
Property changes on: trunk/usr.sbin/bluetooth/bthidd/bthidd.conf.sample
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/bluetooth/bthidd/kbd.c
===================================================================
--- trunk/usr.sbin/bluetooth/bthidd/kbd.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidd/kbd.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -29,7 +29,7 @@
* SUCH DAMAGE.
*
* $Id: kbd.c,v 1.4 2006/09/07 21:06:53 max Exp $
- * $FreeBSD: stable/10/usr.sbin/bluetooth/bthidd/kbd.c 276791 2015-01-07 20:01:15Z emax $
+ * $FreeBSD: stable/10/usr.sbin/bluetooth/bthidd/kbd.c 291253 2015-11-24 12:25:34Z hselasky $
*/
#include <sys/consio.h>
@@ -226,8 +226,8 @@
/* Keyboard Int'l 7 8D */ -1, /* Unassigned */
/* Keyboard Int'l 8 8E */ -1, /* Unassigned */
/* Keyboard Int'l 9 8F */ -1, /* Unassigned */
-/* Keyboard Lang 1 90 */ 0x71, /* eisu */
-/* Keyboard Lang 2 91 */ 0x72, /* kana */
+/* Keyboard Lang 1 90 */ 0x71, /* Kana */
+/* Keyboard Lang 2 91 */ 0x72, /* Eisu */
/* Keyboard Lang 3 92 */ 0x78, /* F8 */
/* Keyboard Lang 4 93 */ 0x77, /* F7 */
/* Keyboard Lang 5 94 */ 0x76, /* F6 */
Modified: trunk/usr.sbin/bluetooth/bthidd/lexer.l
===================================================================
--- trunk/usr.sbin/bluetooth/bthidd/lexer.l 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidd/lexer.l 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
%{
/*
* lexer.l
@@ -30,7 +31,6 @@
*
* $Id: lexer.l,v 1.3 2006/09/07 21:06:53 max Exp $
* $FreeBSD: stable/10/usr.sbin/bluetooth/bthidd/lexer.l 250926 2013-05-23 05:42:35Z jkim $
- * $MidnightBSD$
*/
#include <bluetooth.h>
Property changes on: trunk/usr.sbin/bluetooth/bthidd/lexer.l
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/bluetooth/bthidd/parser.y
===================================================================
--- trunk/usr.sbin/bluetooth/bthidd/parser.y 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/bthidd/parser.y 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
%{
/*
* parser.y
@@ -30,7 +31,6 @@
*
* $Id: parser.y,v 1.7 2006/09/07 21:06:53 max Exp $
* $FreeBSD: stable/10/usr.sbin/bluetooth/bthidd/parser.y 235789 2012-05-22 16:33:10Z bapt $
- * $MidnightBSD$
*/
#include <sys/queue.h>
Property changes on: trunk/usr.sbin/bluetooth/bthidd/parser.y
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/bluetooth/btpand/Makefile
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/Makefile 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/Makefile 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,5 +1,6 @@
+# $MidnightBSD$
# $NetBSD: Makefile,v 1.2 2008/08/18 08:25:32 plunky Exp $
-# $MidnightBSD$
+# $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/Makefile 187938 2009-01-30 22:23:21Z emax $
PROG= btpand
MAN= btpand.8
Modified: trunk/usr.sbin/bluetooth/btpand/bnep.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/bnep.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/bnep.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: bnep.c,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/bnep.c 305287 2016-09-02 17:24:16Z dim $ */
#include <sys/cdefs.h>
__RCSID("$NetBSD: bnep.c,v 1.1 2008/08/17 13:20:57 plunky Exp $");
@@ -573,7 +574,7 @@
}
void
-bnep_send_control(channel_t *chan, uint8_t type, ...)
+bnep_send_control(channel_t *chan, unsigned type, ...)
{
packet_t *pkt;
uint8_t *p;
@@ -589,7 +590,7 @@
va_start(ap, type);
*p++ = BNEP_CONTROL;
- *p++ = type;
+ *p++ = (uint8_t)type;
switch(type) {
case BNEP_CONTROL_COMMAND_NOT_UNDERSTOOD:
Modified: trunk/usr.sbin/bluetooth/btpand/bnep.h
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/bnep.h 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/bnep.h 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: bnep.h,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/bnep.h 187938 2009-01-30 22:23:21Z emax $ */
/*
* Constants defined in the Bluetooth Network Encapsulation
Modified: trunk/usr.sbin/bluetooth/btpand/btpand.8
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/btpand.8 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/btpand.8 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,5 +1,6 @@
+.\" $MidnightBSD$
.\" $NetBSD: btpand.8,v 1.3 2008/08/17 14:43:07 plunky Exp $
-.\" $MidnightBSD$
+.\" $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/btpand.8 236500 2012-06-03 06:57:47Z joel $
.\"
.\" Copyright (c) 2008 Iain Hibbert
.\" All rights reserved.
@@ -128,7 +129,7 @@
Set L2CAP connection link mode.
Supported modes are:
.Pp
-.Bl -tag -compact
+.Bl -tag -width 8n -compact
.It auth
require devices to be paired.
.It encrypt
@@ -151,7 +152,7 @@
.Ar service
to provide or connect to, the following services are recognised:
.Pp
-.Bl -tag -compact
+.Bl -tag -width 8n -compact
.It GN
Group ad-hoc Network.
.It NAP
@@ -182,7 +183,7 @@
.Xr tap 4
interface, it will create a pid file and detach.
.Sh FILES
-.Bl -tag -compact
+.Bl -tag -width "Pa /etc/bluetooth/hosts" -compact
.It Pa /dev/tap
.It Pa /etc/bluetooth/hosts
.It Pa /var/run/sdp
Property changes on: trunk/usr.sbin/bluetooth/btpand/btpand.8
___________________________________________________________________
Added: svn:keywords
## -0,0 +1 ##
+MidnightBSD=%H
\ No newline at end of property
Modified: trunk/usr.sbin/bluetooth/btpand/btpand.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/btpand.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/btpand.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: btpand.c,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/btpand.c 299826 2016-05-15 03:15:36Z pfg $ */
#include <sys/cdefs.h>
__COPYRIGHT("@(#) Copyright (c) 2008 Iain Hibbert. All rights reserved.");
@@ -65,7 +66,7 @@
const char * desc;
} services[] = {
{ "PANU", SDP_SERVICE_CLASS_PANU, "Personal Area Networking User" },
- { "NAP", SDP_SERVICE_CLASS_NAP, "Network Acess Point" },
+ { "NAP", SDP_SERVICE_CLASS_NAP, "Network Access Point" },
{ "GN", SDP_SERVICE_CLASS_GN, "Group Network" },
};
Modified: trunk/usr.sbin/bluetooth/btpand/btpand.h
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/btpand.h 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/btpand.h 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: btpand.h,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/btpand.h 305287 2016-09-02 17:24:16Z dim $ */
#include <sys/types.h>
#include <sys/queue.h>
@@ -183,7 +184,7 @@
/* bnep.c */
bool bnep_send(channel_t *, packet_t *);
bool bnep_recv(packet_t *);
-void bnep_send_control(channel_t *, uint8_t, ...);
+void bnep_send_control(channel_t *, unsigned, ...);
/* channel.c */
void channel_init(void);
Modified: trunk/usr.sbin/bluetooth/btpand/channel.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/channel.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/channel.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: channel.c,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/channel.c 187938 2009-01-30 22:23:21Z emax $ */
#include <sys/cdefs.h>
__RCSID("$NetBSD: channel.c,v 1.1 2008/08/17 13:20:57 plunky Exp $");
Modified: trunk/usr.sbin/bluetooth/btpand/client.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/client.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/client.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: client.c,v 1.2 2008/12/06 20:01:14 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/client.c 241699 2012-10-18 16:34:00Z emax $ */
#include <sys/cdefs.h>
__RCSID("$NetBSD: client.c,v 1.2 2008/12/06 20:01:14 plunky Exp $");
@@ -47,7 +48,7 @@
struct sockaddr_l2cap sa;
channel_t *chan;
socklen_t len;
- int fd;
+ int fd, n;
uint16_t mru, mtu;
if (bdaddr_any(&remote_bdaddr))
@@ -97,6 +98,17 @@
exit(EXIT_FAILURE);
}
+ len = sizeof(n);
+ if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &n, &len) == -1) {
+ log_err("Could not read SO_RCVBUF");
+ exit(EXIT_FAILURE);
+ }
+ if (n < (mru * 10)) {
+ n = mru * 10;
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n)) == -1)
+ log_info("Could not increase SO_RCVBUF (from %d)", n);
+ }
+
len = sizeof(mtu);
if (getsockopt(fd, SOL_L2CAP, SO_L2CAP_OMTU, &mtu, &len) == -1) {
log_err("Could not get L2CAP OMTU: %m");
@@ -107,6 +119,27 @@
exit(EXIT_FAILURE);
}
+ len = sizeof(n);
+ if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &n, &len) == -1) {
+ log_err("Could not get socket send buffer size: %m");
+ close(fd);
+ return;
+ }
+ if (n < (mtu * 2)) {
+ n = mtu * 2;
+ if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &n, sizeof(n)) == -1) {
+ log_err("Could not set socket send buffer size (%d): %m", n);
+ close(fd);
+ return;
+ }
+ }
+ n = mtu;
+ if (setsockopt(fd, SOL_SOCKET, SO_SNDLOWAT, &n, sizeof(n)) == -1) {
+ log_err("Could not set socket low water mark (%d): %m", n);
+ close(fd);
+ return;
+ }
+
chan = channel_alloc();
if (chan == NULL)
exit(EXIT_FAILURE);
Modified: trunk/usr.sbin/bluetooth/btpand/event.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/event.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/event.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* event.h
*/
@@ -28,7 +29,7 @@
* SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/event.c 191232 2009-04-17 23:33:30Z emax $ */
/*
* Hack to provide libevent (see devel/libevent port) like API.
Modified: trunk/usr.sbin/bluetooth/btpand/event.h
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/event.h 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/event.h 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/*
* event.h
*/
@@ -28,7 +29,7 @@
* SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/event.h 228990 2011-12-30 10:58:14Z uqs $ */
/*
* Hack to provide libevent (see devel/libevent port) like API.
@@ -40,7 +41,7 @@
#define EV_READ 0x02
#define EV_WRITE 0x04
-#define EV_PERSIST 0x10 /* Persistant event */
+#define EV_PERSIST 0x10 /* Persistent event */
#define EV_PENDING (1 << 13) /* internal use only! */
#define EV_HAS_TIMEOUT (1 << 14) /* internal use only! */
#define EV_CURRENT (1 << 15) /* internal use only! */
Modified: trunk/usr.sbin/bluetooth/btpand/packet.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/packet.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/packet.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: packet.c,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/packet.c 187938 2009-01-30 22:23:21Z emax $ */
#include <sys/cdefs.h>
__RCSID("$NetBSD: packet.c,v 1.1 2008/08/17 13:20:57 plunky Exp $");
Modified: trunk/usr.sbin/bluetooth/btpand/sdp.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/sdp.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/sdp.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: sdp.c,v 1.2 2008/12/06 20:01:14 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/sdp.c 187938 2009-01-30 22:23:21Z emax $ */
#include <sys/cdefs.h>
__RCSID("$NetBSD: sdp.c,v 1.2 2008/12/06 20:01:14 plunky Exp $");
Modified: trunk/usr.sbin/bluetooth/btpand/sdp.h
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/sdp.h 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/sdp.h 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: sdp.h,v 1.2 2008/12/06 20:01:15 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/sdp.h 187938 2009-01-30 22:23:21Z emax $ */
#include <bluetooth.h>
#include <sdp.h>
Modified: trunk/usr.sbin/bluetooth/btpand/server.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/server.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/server.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: server.c,v 1.2 2009/01/24 17:29:28 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/server.c 241699 2012-10-18 16:34:00Z emax $ */
#include <sys/cdefs.h>
__RCSID("$NetBSD: server.c,v 1.2 2009/01/24 17:29:28 plunky Exp $");
@@ -177,6 +178,18 @@
return;
}
+ len = sizeof(n);
+ if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &n, &len) == -1) {
+ log_err("Could not read SO_RCVBUF");
+ close(fd);
+ return;
+ }
+ if (n < (mru * 10)) {
+ n = mru * 10;
+ if (setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &n, sizeof(n)) == -1)
+ log_info("Could not increase SO_RCVBUF (from %d)", n);
+ }
+
len = sizeof(mtu);
if (getsockopt(fd, SOL_L2CAP, SO_L2CAP_OMTU, &mtu, &len) == -1) {
log_err("Could not get L2CAP OMTU: %m");
Modified: trunk/usr.sbin/bluetooth/btpand/tap.c
===================================================================
--- trunk/usr.sbin/bluetooth/btpand/tap.c 2018-07-04 13:27:43 UTC (rev 11283)
+++ trunk/usr.sbin/bluetooth/btpand/tap.c 2018-07-04 13:28:17 UTC (rev 11284)
@@ -1,3 +1,4 @@
+/* $MidnightBSD$ */
/* $NetBSD: tap.c,v 1.1 2008/08/17 13:20:57 plunky Exp $ */
/*-
@@ -25,7 +26,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-/* $MidnightBSD$ */
+/* $FreeBSD: stable/10/usr.sbin/bluetooth/btpand/tap.c 187938 2009-01-30 22:23:21Z emax $ */
#include <sys/cdefs.h>
__RCSID("$NetBSD: tap.c,v 1.1 2008/08/17 13:20:57 plunky Exp $");
More information about the Midnightbsd-cvs
mailing list