Lines 25-31
Link Here
|
25 |
.\" $Id: ng_btsocket.4,v 1.7 2003/05/21 19:37:35 max Exp $ |
25 |
.\" $Id: ng_btsocket.4,v 1.7 2003/05/21 19:37:35 max Exp $ |
26 |
.\" $FreeBSD$ |
26 |
.\" $FreeBSD$ |
27 |
.\" |
27 |
.\" |
28 |
.Dd November 13, 2012 |
28 |
.Dd September 26, 2021 |
29 |
.Dt NG_BTSOCKET 4 |
29 |
.Dt NG_BTSOCKET 4 |
30 |
.Os |
30 |
.Os |
31 |
.Sh NAME |
31 |
.Sh NAME |
Lines 114-125
Returns current value of the role switch parameter for the HCI node.
Link Here
|
114 |
Sets new value of the role switch parameter for the HCI node. |
114 |
Sets new value of the role switch parameter for the HCI node. |
115 |
.El |
115 |
.El |
116 |
.Pp |
116 |
.Pp |
117 |
The |
|
|
118 |
.Va net.bluetooth.hci.sockets.raw.ioctl_timeout |
119 |
variable, that can be examined and set via |
120 |
.Xr sysctl 8 , |
121 |
controls the control request timeout (in seconds) for raw HCI sockets. |
122 |
.Pp |
123 |
Raw HCI sockets support filters. |
117 |
Raw HCI sockets support filters. |
124 |
The application can filter certain HCI datagram types. |
118 |
The application can filter certain HCI datagram types. |
125 |
For HCI event datagrams the application can set additional filter. |
119 |
For HCI event datagrams the application can set additional filter. |
Lines 147-161
level can be used to obtain via
Link Here
|
147 |
or change via |
141 |
or change via |
148 |
.Xr setsockopt 2 |
142 |
.Xr setsockopt 2 |
149 |
raw HCI socket's filter. |
143 |
raw HCI socket's filter. |
|
|
144 |
.Ss SYSCTL VARIABLES FOR RAW HCI SOCKETS |
145 |
.Bl -tag -width foo |
146 |
.It Va net.bluetooth.hci.sockets.raw.debug_level |
147 |
Get or set the debug level for Bluetooth raw HCI sockets. |
148 |
Each debug level includes messages from the lower levels. |
149 |
.Bl -tag -width "Information" -compact |
150 |
.It Disabled |
151 |
0 (no messages) |
152 |
.It Alert |
153 |
1 |
154 |
.It Errors |
155 |
2 |
156 |
.It Warnings |
157 |
3 (default) |
158 |
.It Information |
159 |
4 |
160 |
.El |
161 |
.It Va net.bluetooth.hci.sockets.raw.ioctl_timeout |
162 |
Get or set the control request timeout (in seconds) |
163 |
for Bluetooth raw HCI sockets. Default is 5 seconds. |
164 |
.It Va net.bluetooth.hci.sockets.raw.queue_drops |
165 |
Get the number of input queue drops. Read-only. |
166 |
.It Va net.bluetooth.hci.sockets.raw.queue_maxlen |
167 |
Get the input queue maximum length, in items. |
168 |
Default is 300. Read-only. |
169 |
.It Va net.bluetooth.hci.sockets.raw.queue_len |
170 |
Get the input queue length, in items. Read-only. |
171 |
.El |
150 |
.Sh Dv BLUETOOTH_PROTO_L2CAP protocol |
172 |
.Sh Dv BLUETOOTH_PROTO_L2CAP protocol |
151 |
The Bluetooth L2CAP socket address is defined as follows: |
173 |
The Bluetooth L2CAP socket address is defined as follows: |
152 |
.Bd -literal -offset indent |
174 |
.Bd -literal -offset indent |
153 |
/* Bluetooth version of struct sockaddr for L2CAP sockets */ |
175 |
/* Bluetooth version of struct sockaddr for L2CAP sockets */ |
154 |
struct sockaddr_l2cap { |
176 |
struct sockaddr_l2cap { |
155 |
u_char l2cap_len; /* total length */ |
177 |
u_char l2cap_len; /* total length */ |
156 |
u_char l2cap_family; /* address family */ |
178 |
u_char l2cap_family; /* address family */ |
157 |
uint16_t l2cap_psm; /* Protocol/Service Multiplexor */ |
179 |
u_int16_t l2cap_psm; /* Protocol/Service Multiplexor */ |
158 |
bdaddr_t l2cap_bdaddr; /* address */ |
180 |
bdaddr_t l2cap_bdaddr; /* address */ |
|
|
181 |
u_int16_t l2cap_cid; /* channel ID */ |
182 |
u_int8_t l2cap_bdaddr_type; /* address type */ |
159 |
}; |
183 |
}; |
160 |
.Ed |
184 |
.Ed |
161 |
.Ss Dv SOCK_RAW L2CAP sockets |
185 |
.Ss Dv SOCK_RAW L2CAP sockets |
Lines 198-209
Issues L2CAP
Link Here
|
198 |
.Dv GET_INFO |
222 |
.Dv GET_INFO |
199 |
request. |
223 |
request. |
200 |
.El |
224 |
.El |
201 |
.Pp |
225 |
.Ss SYSCTL VARIABLES FOR RAW L2CAP SOCKETS |
202 |
The |
226 |
.Bl -tag -width foo |
203 |
.Va net.bluetooth.l2cap.sockets.raw.ioctl_timeout |
227 |
.It Va net.bluetooth.l2cap.sockets.raw.debug_level |
204 |
variable, that can be examined and set via |
228 |
Get or set the debug level for Bluetooth raw L2CAP sockets. |
205 |
.Xr sysctl 8 , |
229 |
Each debug level includes messages from the lower levels. |
206 |
controls the control request timeout (in seconds) for raw L2CAP sockets. |
230 |
.Bl -tag -width "Information" -compact |
|
|
231 |
.It Disabled |
232 |
0 (no messages) |
233 |
.It Alert |
234 |
1 |
235 |
.It Errors |
236 |
2 |
237 |
.It Warnings |
238 |
3 (default) |
239 |
.It Information |
240 |
4 |
241 |
.El |
242 |
.It Va net.bluetooth.l2cap.sockets.raw.ioctl_timeout |
243 |
Get or set the control request timeout (in seconds). |
244 |
Default is 5 seconds. |
245 |
.It Va net.bluetooth.l2cap.sockets.raw.queue_drops |
246 |
Get the number of input queue drops. |
247 |
Read-only. |
248 |
.It Va net.bluetooth.l2cap.sockets.raw.queue_maxlen |
249 |
Get the input queue maximum length, in items. |
250 |
Default is 50. Read-only. |
251 |
.It Va net.bluetooth.l2cap.sockets.raw.queue_len |
252 |
Get the input queue length, in items. Read-only. |
253 |
.El |
207 |
.Ss Dv SOCK_SEQPACKET L2CAP sockets |
254 |
.Ss Dv SOCK_SEQPACKET L2CAP sockets |
208 |
Implemented by |
255 |
Implemented by |
209 |
.Nm btsock_l2c |
256 |
.Nm btsock_l2c |
Lines 264-269
Get (set) value of the flush timeout.
Link Here
|
264 |
Not implemented. |
311 |
Not implemented. |
265 |
.Ef |
312 |
.Ef |
266 |
.El |
313 |
.El |
|
|
314 |
.Ss SYSCTL VARIABLES FOR SEQUENCED PACKET L2CAP SOCKETS |
315 |
.Bl -tag -width foo |
316 |
.It Va net.bluetooth.l2cap.sockets.seq.debug_level |
317 |
Get or set the debug level for Bluetooth sequenced packet L2CAP sockets. |
318 |
Each debug level includes messages from the lower levels. |
319 |
.Bl -tag -width "Information" -compact |
320 |
.It Disabled |
321 |
0 (no messages) |
322 |
.It Alert |
323 |
1 |
324 |
.It Errors |
325 |
2 |
326 |
.It Warnings |
327 |
3 (default) |
328 |
.It Information |
329 |
4 |
330 |
.El |
331 |
.It Va net.bluetooth.l2cap.sockets.seq.queue_drops |
332 |
Get the number of input queue drops. Read-only. |
333 |
.It Va net.bluetooth.l2cap.sockets.seq.queue_maxlen |
334 |
Get the input queue maximum length, in items. |
335 |
Default is 50. Read-only. |
336 |
.It Va net.bluetooth.l2cap.sockets.seq.queue_len |
337 |
Get the input queue length, in items. Read-only. |
338 |
.El |
267 |
.Sh Dv BLUETOOTH_PROTO_RFCOMM protocol |
339 |
.Sh Dv BLUETOOTH_PROTO_RFCOMM protocol |
268 |
The Bluetooth RFCOMM socket address is defined as follows: |
340 |
The Bluetooth RFCOMM socket address is defined as follows: |
269 |
.Bd -literal -offset indent |
341 |
.Bd -literal -offset indent |
Lines 320-331
Note that application still can write/read bigger chunks to/from the socket.
Link Here
|
320 |
.It Dv SO_RFCOMM_FC_INFO |
392 |
.It Dv SO_RFCOMM_FC_INFO |
321 |
Return the flow control information for the underlying RFCOMM channel. |
393 |
Return the flow control information for the underlying RFCOMM channel. |
322 |
.El |
394 |
.El |
323 |
.Pp |
395 |
.Ss SYSCTL VARIABLES FOR BLUETOOTH RFCOMM SOCKETS |
324 |
The |
396 |
.Bl -tag -width foo |
325 |
.Va net.bluetooth.rfcomm.sockets.stream.timeout |
397 |
.It Va net.bluetooth.rfcomm.sockets.stream.debug_level |
326 |
variable, that can be examined and set via |
398 |
Get or set the debug level for Bluetooth RFCOMM sockets. |
327 |
.Xr sysctl 8 , |
399 |
Each debug level includes messages from the lower levels. |
328 |
controls the connection timeout (in seconds) for RFCOMM sockets. |
400 |
.Bl -tag -width "Information" -compact |
|
|
401 |
.It Disabled |
402 |
0 (no messages) |
403 |
.It Alert |
404 |
1 |
405 |
.It Errors |
406 |
2 |
407 |
.It Warnings |
408 |
3 |
409 |
.It Information |
410 |
4 (default) |
411 |
.El |
412 |
.It Va net.bluetooth.rfcomm.sockets.stream.timeout |
413 |
Get or set the connection timeout (in seconds) for |
414 |
RFCOMM sockets. The default is 60. |
415 |
.El |
416 |
.Sh SYSCTL VARIABLES FOR BLUETOOTH SEQUENCED SCO SOCKETS |
417 |
.Bl -tag -width foo |
418 |
.It Va net.bluetooth.sco.sockets.seq.debug_level |
419 |
Get or set the debug level for Bluetooth sequenced packet SCO sockets. |
420 |
Each debug level includes messages from the lower levels. |
421 |
.Bl -tag -width "Information" -compact |
422 |
.It Disabled |
423 |
0 (no messages) |
424 |
.It Alert |
425 |
1 |
426 |
.It Errors |
427 |
2 |
428 |
.It Warnings |
429 |
3 (default) |
430 |
.It Information |
431 |
4 |
432 |
.El |
433 |
.It Va net.bluetooth.sco.sockets.seq.queue_drops |
434 |
Get the number of input queue drops. Read-only. |
435 |
.It Va net.bluetooth.sco.sockets.seq.queue_maxlen |
436 |
Get the input queue maximum length, in items. |
437 |
Default is 50. Read-only. |
438 |
.It Va net.bluetooth.sco.sockets.seq.queue_len |
439 |
Get the input queue length, in items. Read-only. |
440 |
.El |
329 |
.Sh HOOKS |
441 |
.Sh HOOKS |
330 |
These node types support hooks with arbitrary names (as long as they are |
442 |
These node types support hooks with arbitrary names (as long as they are |
331 |
unique) and always accept hook connection requests. |
443 |
unique) and always accept hook connection requests. |