diff --git a/share/man/man4/ng_btsocket.4 b/share/man/man4/ng_btsocket.4 index 27c77adad45..a127d17b265 100644 --- a/share/man/man4/ng_btsocket.4 +++ b/share/man/man4/ng_btsocket.4 @@ -25,7 +25,7 @@ .\" $Id: ng_btsocket.4,v 1.7 2003/05/21 19:37:35 max Exp $ .\" $FreeBSD$ .\" -.Dd November 13, 2012 +.Dd September 26, 2021 .Dt NG_BTSOCKET 4 .Os .Sh NAME @@ -114,12 +114,6 @@ Returns current value of the role switch parameter for the HCI node. Sets new value of the role switch parameter for the HCI node. .El .Pp -The -.Va net.bluetooth.hci.sockets.raw.ioctl_timeout -variable, that can be examined and set via -.Xr sysctl 8 , -controls the control request timeout (in seconds) for raw HCI sockets. -.Pp Raw HCI sockets support filters. The application can filter certain HCI datagram types. For HCI event datagrams the application can set additional filter. @@ -147,15 +141,45 @@ level can be used to obtain via or change via .Xr setsockopt 2 raw HCI socket's filter. +.Ss SYSCTL VARIABLES FOR RAW HCI SOCKETS +.Bl -tag -width foo +.It Va net.bluetooth.hci.sockets.raw.debug_level +Get or set the debug level for Bluetooth raw HCI sockets. +Each debug level includes messages from the lower levels. +.Bl -tag -width "Information" -compact +.It Disabled +0 (no messages) +.It Alert +1 +.It Errors +2 +.It Warnings +3 (default) +.It Information +4 +.El +.It Va net.bluetooth.hci.sockets.raw.ioctl_timeout +Get or set the control request timeout (in seconds) +for Bluetooth raw HCI sockets. Default is 5 seconds. +.It Va net.bluetooth.hci.sockets.raw.queue_drops +Get the number of input queue drops. Read-only. +.It Va net.bluetooth.hci.sockets.raw.queue_maxlen +Get the input queue maximum length, in items. +Default is 300. Read-only. +.It Va net.bluetooth.hci.sockets.raw.queue_len +Get the input queue length, in items. Read-only. +.El .Sh Dv BLUETOOTH_PROTO_L2CAP protocol The Bluetooth L2CAP socket address is defined as follows: .Bd -literal -offset indent /* Bluetooth version of struct sockaddr for L2CAP sockets */ struct sockaddr_l2cap { - u_char l2cap_len; /* total length */ - u_char l2cap_family; /* address family */ - uint16_t l2cap_psm; /* Protocol/Service Multiplexor */ - bdaddr_t l2cap_bdaddr; /* address */ + u_char l2cap_len; /* total length */ + u_char l2cap_family; /* address family */ + u_int16_t l2cap_psm; /* Protocol/Service Multiplexor */ + bdaddr_t l2cap_bdaddr; /* address */ + u_int16_t l2cap_cid; /* channel ID */ + u_int8_t l2cap_bdaddr_type; /* address type */ }; .Ed .Ss Dv SOCK_RAW L2CAP sockets @@ -198,12 +222,35 @@ Issues L2CAP .Dv GET_INFO request. .El -.Pp -The -.Va net.bluetooth.l2cap.sockets.raw.ioctl_timeout -variable, that can be examined and set via -.Xr sysctl 8 , -controls the control request timeout (in seconds) for raw L2CAP sockets. +.Ss SYSCTL VARIABLES FOR RAW L2CAP SOCKETS +.Bl -tag -width foo +.It Va net.bluetooth.l2cap.sockets.raw.debug_level +Get or set the debug level for Bluetooth raw L2CAP sockets. +Each debug level includes messages from the lower levels. +.Bl -tag -width "Information" -compact +.It Disabled +0 (no messages) +.It Alert +1 +.It Errors +2 +.It Warnings +3 (default) +.It Information +4 +.El +.It Va net.bluetooth.l2cap.sockets.raw.ioctl_timeout +Get or set the control request timeout (in seconds). +Default is 5 seconds. +.It Va net.bluetooth.l2cap.sockets.raw.queue_drops +Get the number of input queue drops. +Read-only. +.It Va net.bluetooth.l2cap.sockets.raw.queue_maxlen +Get the input queue maximum length, in items. +Default is 50. Read-only. +.It Va net.bluetooth.l2cap.sockets.raw.queue_len +Get the input queue length, in items. Read-only. +.El .Ss Dv SOCK_SEQPACKET L2CAP sockets Implemented by .Nm btsock_l2c @@ -264,6 +311,31 @@ Get (set) value of the flush timeout. Not implemented. .Ef .El +.Ss SYSCTL VARIABLES FOR SEQUENCED PACKET L2CAP SOCKETS +.Bl -tag -width foo +.It Va net.bluetooth.l2cap.sockets.seq.debug_level +Get or set the debug level for Bluetooth sequenced packet L2CAP sockets. +Each debug level includes messages from the lower levels. +.Bl -tag -width "Information" -compact +.It Disabled +0 (no messages) +.It Alert +1 +.It Errors +2 +.It Warnings +3 (default) +.It Information +4 +.El +.It Va net.bluetooth.l2cap.sockets.seq.queue_drops +Get the number of input queue drops. Read-only. +.It Va net.bluetooth.l2cap.sockets.seq.queue_maxlen +Get the input queue maximum length, in items. +Default is 50. Read-only. +.It Va net.bluetooth.l2cap.sockets.seq.queue_len +Get the input queue length, in items. Read-only. +.El .Sh Dv BLUETOOTH_PROTO_RFCOMM protocol The Bluetooth RFCOMM socket address is defined as follows: .Bd -literal -offset indent @@ -320,12 +392,52 @@ Note that application still can write/read bigger chunks to/from the socket. .It Dv SO_RFCOMM_FC_INFO Return the flow control information for the underlying RFCOMM channel. .El -.Pp -The -.Va net.bluetooth.rfcomm.sockets.stream.timeout -variable, that can be examined and set via -.Xr sysctl 8 , -controls the connection timeout (in seconds) for RFCOMM sockets. +.Ss SYSCTL VARIABLES FOR BLUETOOTH RFCOMM SOCKETS +.Bl -tag -width foo +.It Va net.bluetooth.rfcomm.sockets.stream.debug_level +Get or set the debug level for Bluetooth RFCOMM sockets. +Each debug level includes messages from the lower levels. +.Bl -tag -width "Information" -compact +.It Disabled +0 (no messages) +.It Alert +1 +.It Errors +2 +.It Warnings +3 +.It Information +4 (default) +.El +.It Va net.bluetooth.rfcomm.sockets.stream.timeout +Get or set the connection timeout (in seconds) for +RFCOMM sockets. The default is 60. +.El +.Sh SYSCTL VARIABLES FOR BLUETOOTH SEQUENCED SCO SOCKETS +.Bl -tag -width foo +.It Va net.bluetooth.sco.sockets.seq.debug_level +Get or set the debug level for Bluetooth sequenced packet SCO sockets. +Each debug level includes messages from the lower levels. +.Bl -tag -width "Information" -compact +.It Disabled +0 (no messages) +.It Alert +1 +.It Errors +2 +.It Warnings +3 (default) +.It Information +4 +.El +.It Va net.bluetooth.sco.sockets.seq.queue_drops +Get the number of input queue drops. Read-only. +.It Va net.bluetooth.sco.sockets.seq.queue_maxlen +Get the input queue maximum length, in items. +Default is 50. Read-only. +.It Va net.bluetooth.sco.sockets.seq.queue_len +Get the input queue length, in items. Read-only. +.El .Sh HOOKS These node types support hooks with arbitrary names (as long as they are unique) and always accept hook connection requests.