summaryrefslogtreecommitdiff
path: root/sys/netbt/bt_proto.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/netbt/bt_proto.c')
-rw-r--r--sys/netbt/bt_proto.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/sys/netbt/bt_proto.c b/sys/netbt/bt_proto.c
index e7ac31effdc..1bc8c573fae 100644
--- a/sys/netbt/bt_proto.c
+++ b/sys/netbt/bt_proto.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: bt_proto.c,v 1.2 2007/05/30 08:10:03 uwe Exp $ */
+/* $OpenBSD: bt_proto.c,v 1.3 2007/06/01 02:46:11 uwe Exp $ */
/*
* Copyright (c) 2004 Alexander Yurchenko <grange@openbsd.org>
*
@@ -22,8 +22,11 @@
#include <sys/timeout.h>
#include <netbt/bluetooth.h>
-#include <netbt/hci.h>
#include <netbt/bt_var.h>
+#include <netbt/hci.h>
+#include <netbt/l2cap.h>
+#include <netbt/rfcomm.h>
+#include <netbt/sco.h>
struct domain btdomain;
@@ -31,33 +34,31 @@ struct protosw btsw[] = {
{ SOCK_RAW, &btdomain, BTPROTO_HCI,
PR_ATOMIC | PR_ADDR,
NULL/*input*/, NULL/*output*/, NULL/*ctlinput*/,
- NULL/*hci_ctloutput*/, NULL/*hci_usrreq*/, NULL/*init*/,
+ hci_ctloutput, hci_usrreq, NULL/*init*/,
NULL/*fasttimo*/, NULL/*slowtimo*/, NULL/*drain*/,
NULL/*sysctl*/
},
-#if 0
- { SOCK_RAW, &btdomain, BLUETOOTH_PROTO_L2CAP,
- PR_ATOMIC | PR_ADDR,
+ { SOCK_SEQPACKET, &btdomain, BTPROTO_SCO,
+ PR_ATOMIC | PR_CONNREQUIRED,
NULL/*input*/, NULL/*output*/, NULL/*ctlinput*/,
- NULL/*ctloutput*/, l2cap_raw_usrreq, l2cap_raw_init,
+ sco_ctloutput, sco_usrreq, NULL/*init*/,
NULL/*fasttimo*/, NULL/*slowtimo*/, NULL/*drain*/,
NULL/*sysctl*/
},
- { SOCK_SEQPACKET, &btdomain, BLUETOOTH_PROTO_L2CAP,
+ { SOCK_SEQPACKET, &btdomain, BTPROTO_L2CAP,
PR_ATOMIC | PR_CONNREQUIRED,
NULL/*input*/, NULL/*output*/, NULL/*ctlinput*/,
l2cap_ctloutput, l2cap_usrreq, l2cap_init,
NULL/*fasttimo*/, NULL/*slowtimo*/, NULL/*drain*/,
NULL/*sysctl*/
},
- { SOCK_STREAM, &btdomain, BLUETOOTH_PROTO_RFCOMM,
- PR_ATOMIC | PR_CONNREQUIRED,
+ { SOCK_STREAM, &btdomain, BTPROTO_RFCOMM,
+ PR_CONNREQUIRED | PR_WANTRCVD,
NULL/*input*/, NULL/*output*/, NULL/*ctlinput*/,
rfcomm_ctloutput, rfcomm_usrreq, rfcomm_init,
NULL/*fasttimo*/, NULL/*slowtimo*/, NULL/*drain*/,
NULL/*sysctl*/
}
-#endif
};
struct domain btdomain = {