1f2bb1caeSJulian Elischer.\" ng_l2cap.4 2f2bb1caeSJulian Elischer.\" 3878ed226SJulian Elischer.\" Copyright (c) 2001-2002 Maksim Yevmenkin <m_evmenkin@yahoo.com> 4878ed226SJulian Elischer.\" All rights reserved. 5878ed226SJulian Elischer.\" 6878ed226SJulian Elischer.\" Redistribution and use in source and binary forms, with or without 7878ed226SJulian Elischer.\" modification, are permitted provided that the following conditions 8878ed226SJulian Elischer.\" are met: 9878ed226SJulian Elischer.\" 1. Redistributions of source code must retain the above copyright 10878ed226SJulian Elischer.\" notice, this list of conditions and the following disclaimer. 11878ed226SJulian Elischer.\" 2. Redistributions in binary form must reproduce the above copyright 12878ed226SJulian Elischer.\" notice, this list of conditions and the following disclaimer in the 13878ed226SJulian Elischer.\" documentation and/or other materials provided with the distribution. 14878ed226SJulian Elischer.\" 15878ed226SJulian Elischer.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 16878ed226SJulian Elischer.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 17878ed226SJulian Elischer.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 18878ed226SJulian Elischer.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 19878ed226SJulian Elischer.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 20878ed226SJulian Elischer.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 21878ed226SJulian Elischer.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 22878ed226SJulian Elischer.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 23878ed226SJulian Elischer.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 24878ed226SJulian Elischer.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 25878ed226SJulian Elischer.\" SUCH DAMAGE. 26878ed226SJulian Elischer.\" 27f2bb1caeSJulian Elischer.\" $Id: ng_l2cap.4,v 1.2 2003/04/28 20:16:29 max Exp $ 28878ed226SJulian Elischer.\" $FreeBSD$ 29878ed226SJulian Elischer.Dd July 4, 2002 30878ed226SJulian Elischer.Dt NG_L2CAP 4 31878ed226SJulian Elischer.Os 32878ed226SJulian Elischer.Sh NAME 33f2bb1caeSJulian Elischer.Nm l2cap 34878ed226SJulian Elischer.Nd Netgraph node type that implements Bluetooth Logical Link Control and 35878ed226SJulian ElischerAdaptation Protocol (L2CAP) 36878ed226SJulian Elischer.Sh SYNOPSIS 37878ed226SJulian Elischer.In sys/types.h 38878ed226SJulian Elischer.In netgraph/ng_message.h 39878ed226SJulian Elischer.In netgraph/netgraph.h 40878ed226SJulian Elischer.In netgraph/ng_hci.h 41878ed226SJulian Elischer.In netgraph/ng_l2cap.h 42878ed226SJulian Elischer.Sh DESCRIPTION 43878ed226SJulian ElischerThe 44f2bb1caeSJulian Elischer.Nm 45878ed226SJulian Elischernode type is a Netgraph node type that implements Bluetooth Logical Link 46878ed226SJulian ElischerControl and Adaptation Protocol as per chapter D of the Bluetooth Specification 47878ed226SJulian ElischerBook v1.1. 48878ed226SJulian Elischer.Pp 49878ed226SJulian ElischerL2CAP provides connection-oriented and connectionless data services to upper 50878ed226SJulian Elischerlayer protocols with protocol multiplexing capability, segmentation and 51f2bb1caeSJulian Elischerreassembly operation, and group abstractions. L2CAP permits higher level 52878ed226SJulian Elischerprotocols and applications to transmit and receive L2CAP data packets up to 53878ed226SJulian Elischer64 kilobytes in length. 54f2bb1caeSJulian Elischer.Ss L2CAP assumptions 55878ed226SJulian Elischer.Bl -enum -offset indent 56878ed226SJulian Elischer.It 57f2bb1caeSJulian ElischerThe ACL link between two units is set up. The Baseband provides orderly 58878ed226SJulian Elischerdelivery of data packets, although there might be individual packet corruption 59f2bb1caeSJulian Elischerand duplicates. No more than 1 ACL link exists between any two devices. 60878ed226SJulian Elischer.It 61878ed226SJulian ElischerThe Baseband always provides the impression of full-duplex communication 62f2bb1caeSJulian Elischerchannels. This does not imply that all L2CAP communications are bi-directional. 63878ed226SJulian ElischerMulticasts and unidirectional traffic (e.g., video) do not require duplex 64878ed226SJulian Elischerchannels. 65878ed226SJulian Elischer.It 66878ed226SJulian ElischerL2CAP provides a reliable channel using the mechanisms available at the 67f2bb1caeSJulian ElischerBaseband layer. The Baseband always performs data integrity checks when 68878ed226SJulian Elischerrequested and resends data until it has been successfully acknowledged or 69f2bb1caeSJulian Elischera timeout occurs. Because acknowledgements may be lost, timeouts may 70878ed226SJulian Elischeroccur even after the data has been successfully sent. 71878ed226SJulian Elischer.El 72878ed226SJulian Elischer.Sh L2CAP GENERAL OPERATION 73878ed226SJulian ElischerThe Logical Link Control and Adaptation Protocol (L2CAP) is based around the 74878ed226SJulian Elischerconcept of 75f2bb1caeSJulian Elischer.Em channels . 76f2bb1caeSJulian ElischerEach channel is bound to a single protocol in a many-to-one fashion. Multiple 77878ed226SJulian Elischerchannels can be bound to the same protocol, but a channel cannot be bound to 78f2bb1caeSJulian Elischermultiple protocols. Each L2CAP packet received on a channel is directed to 79878ed226SJulian Elischerthe appropriate higher level protocol. 80878ed226SJulian Elischer.Pp 81878ed226SJulian ElischerEach one of the end-points of an L2CAP channel is referred to by a channel 82f2bb1caeSJulian Elischeridentifier. Channel identifiers (CIDs) are local names representing a logical 83f2bb1caeSJulian Elischerchannel end-point on the device. Identifiers from 0x0001 to 0x003F are reserved 84f2bb1caeSJulian Elischerfor specific L2CAP functions. The null identifier (0x0000) is defined as an 85878ed226SJulian Elischerillegal identifier and must never be used as a destination end-point. 86f2bb1caeSJulian ElischerAll L2CAP signalling commands are sent to CID 0x0001. CID 0x0002 is reserved 87f2bb1caeSJulian Elischerfor group-oriented channel. The same CID must not be reused as a local L2CAP 88878ed226SJulian Elischerchannel endpoint for multiple simultaneous L2CAP channels between a local 89878ed226SJulian Elischerdevice and some remote device. 90878ed226SJulian Elischer.Pp 91878ed226SJulian ElischerCID assignment is relative to a particular device and a device can assign CIDs 92f2bb1caeSJulian Elischerindependently from other devices. Thus, even if the same CID value has been 93878ed226SJulian Elischerassigned to (remote) channel endpoints by several remote devices connected 94878ed226SJulian Elischerto a single local device, the local device can still uniquely associate each 95878ed226SJulian Elischerremote CID with a different device. 96f2bb1caeSJulian Elischer.Ss Channel operational states 97f2bb1caeSJulian Elischer.Bl -tag -width foobar 98878ed226SJulian Elischer.It Dv NG_L2CAP_CLOSED 99f2bb1caeSJulian ElischerIn this state, there is no channel associated with this CID. This is the only 100f2bb1caeSJulian Elischerstate when a link level connection (Baseband) may not exist. Link disconnection 101f2bb1caeSJulian Elischerforces all other states into the NG_L2CAP_CLOSED state. 102878ed226SJulian Elischer.It Dv NG_L2CAP_W4_L2CAP_CON_RSP 103878ed226SJulian ElischerIn this state, the CID represents a local end-point and an L2CAP Connect 104878ed226SJulian ElischerRequest message has been sent referencing this endpoint and it is now waiting 105878ed226SJulian Elischerfor the corresponding L2CAP Connect Response message. 106878ed226SJulian Elischer.It Dv NG_L2CAP_W4_L2CA_CON_RSP 107878ed226SJulian ElischerIn this state, the remote end-point exists and an L2CAP Connect Request has 108f2bb1caeSJulian Elischerbeen received by the local L2CAP entity. An L2CA Connect Indication has been 109878ed226SJulian Elischersent to the upper layer and the part of the local L2CAP entity processing the 110f2bb1caeSJulian Elischerreceived L2CAP Connect Request waits for the corresponding response. The 111f2bb1caeSJulian Elischerresponse may require a security check to be performed. 112878ed226SJulian Elischer.It Dv NG_L2CAP_CONFIG 113878ed226SJulian ElischerIn this state, the connection has been established but both sides are still 114f2bb1caeSJulian Elischernegotiating the channel parameters. The Configuration state may also be 115f2bb1caeSJulian Elischerentered when the channel parameters are being renegotiated. Prior to entering 116f2bb1caeSJulian Elischerthe NG_L2CAP_CONFIG state, all outgoing data traffic is suspended since 117f2bb1caeSJulian Elischerthe traffic parameters of the data traffic are to be renegotiated. Incoming 118878ed226SJulian Elischerdata traffic is accepted until the remote channel endpoint has entered 119f2bb1caeSJulian Elischerthe NG_L2CAP_CONFIG state. In the NG_L2CAP_CONFIG state, both sides will issue 120878ed226SJulian ElischerL2CAP Configuration Request messages if only defaults are being used, a null 121f2bb1caeSJulian Elischermessage will be sent. If a large amount of parameters need to be negotiated, 122878ed226SJulian Elischermultiple messages will be sent to avoid any MTU limitations and negotiate 123f2bb1caeSJulian Elischerincrementally. Moving from the NG_L2CAP_CONFIG state to the NG_L2CAP_OPEN state 124f2bb1caeSJulian Elischerrequires both sides to be ready. An L2CAP entity is ready when it has received 125878ed226SJulian Elischera positive response to its final request and it has positively responded to 126878ed226SJulian Elischerthe final request from the remote device. 127878ed226SJulian Elischer.It Dv NG_L2CAP_OPEN 128878ed226SJulian ElischerIn this state, the connection has been established and configured, and data 129878ed226SJulian Elischerflow may proceed. 130878ed226SJulian Elischer.It Dv NG_L2CAP_W4_L2CAP_DISCON_RSP 131878ed226SJulian ElischerIn this state, the connection is shutting down and an L2CAP Disconnect Request 132f2bb1caeSJulian Elischermessage has been sent. This state is now waiting for the corresponding response. 133878ed226SJulian Elischer.It Dv NG_L2CAP_W4_L2CA_DISCON_RSP 134878ed226SJulian ElischerIn this state, the connection on the remote endpoint is shutting down and an 135f2bb1caeSJulian ElischerL2CAP Disconnect Request message has been received. An L2CA Disconnect 136878ed226SJulian ElischerIndication has been sent to the upper layer to notify the owner of the CID 137f2bb1caeSJulian Elischerthat the remote endpoint is being closed. This state is now waiting for the 138878ed226SJulian Elischercorresponding response from the upper layer before responding to the remote 139878ed226SJulian Elischerendpoint. 140878ed226SJulian Elischer.El 141878ed226SJulian Elischer.Ss Protocol Multiplexing 142878ed226SJulian ElischerL2CAP supports protocol multiplexing because the Baseband Protocol does not 143878ed226SJulian Elischersupport any 144878ed226SJulian Elischer.Dq type 145878ed226SJulian Elischerfield identifying the higher layer protocol being multiplexed above it. 146878ed226SJulian ElischerL2CAP is able to distinguish between upper layer protocols such as the Service 147878ed226SJulian ElischerDiscovery Protocol, RFCOMM and Telephony Control. 148878ed226SJulian Elischer.Ss Segmentation and Reassembly 149f2bb1caeSJulian ElischerThe data packets defined by the Baseband Protocol are limited in size. Large 150878ed226SJulian ElischerL2CAP packets must be segmented into multiple smaller Baseband packets prior 151f2bb1caeSJulian Elischerto their transmission over the air. Similarly, multiple received Baseband 152878ed226SJulian Elischerpackets may be reassembled into a single larger L2CAP packet. 153878ed226SJulian Elischer.Ss Quality of Service 154878ed226SJulian ElischerThe L2CAP connection establishment process allows the exchange of information 155878ed226SJulian Elischerregarding the quality of service (QoS) expected between two Bluetooth units. 156878ed226SJulian Elischer.Ss Groups 157878ed226SJulian ElischerThe Baseband Protocol supports the concept of a piconet, a group of devices 158f2bb1caeSJulian Elischersynchronously hopping together using the same clock. The L2CAP group 159878ed226SJulian Elischerabstraction permits implementations to efficiently map protocol groups on to 160878ed226SJulian Elischerpiconets. 161878ed226SJulian Elischer.Pp 162878ed226SJulian ElischerThe following features are outside the scope of L2CAP responsibilities: 163878ed226SJulian Elischer.Bl -dash -offset indent 164878ed226SJulian Elischer.It 165878ed226SJulian ElischerL2CAP does not transport audio designated for SCO links. 166878ed226SJulian Elischer.It 167878ed226SJulian ElischerL2CAP does not enforce a reliable channel or ensure data integrity, 168878ed226SJulian Elischerthat is, L2CAP performs no retransmissions or checksum calculations. 169878ed226SJulian Elischer.It 170878ed226SJulian ElischerL2CAP does not support a reliable multicast channel. 171878ed226SJulian Elischer.It 172878ed226SJulian ElischerL2CAP does not support the concept of a global group name. 173878ed226SJulian Elischer.El 174878ed226SJulian Elischer.Sh HOOKS 175878ed226SJulian ElischerThis node type supports the following hooks: 176878ed226SJulian Elischer.Pp 177878ed226SJulian Elischer.Bl -tag -width foobar 178878ed226SJulian Elischer.It Dv hci 179878ed226SJulian ElischerBluetooth Host Controller Interface downstream hook. 180878ed226SJulian Elischer.It Dv l2c 181f2bb1caeSJulian ElischerUpper layer protocol upstream hook. Usually Bluetooth L2CAP sockets layer 182878ed226SJulian Elischeris connected to the hook. 183878ed226SJulian Elischer.It Dv ctl 184f2bb1caeSJulian ElischerControl hook. Usually Bluetooth raw L2CAP sockets layer is connected 185f2bb1caeSJulian Elischerto the hook. 186878ed226SJulian Elischer.El 187878ed226SJulian Elischer.Sh INTERFACE TO THE UPPER LAYER PROTOCOLS (L2CA CONTROL MESSAGES) 188878ed226SJulian ElischerBluetooth specification says that L2CA request must block until response 189f2bb1caeSJulian Elischeris ready. L2CAP node uses 190f2bb1caeSJulian Elischer.Dq token 191f2bb1caeSJulian Elischerfield from Netgraph message header to match L2CA request and response. The 192f2bb1caeSJulian Elischerupper layer protocol must populate 193f2bb1caeSJulian Elischer.Dq token . 194f2bb1caeSJulian ElischerL2CAP node will queue request and start processing. Later, when response is 195f2bb1caeSJulian Elischerready or timeout has occur L2CAP node will create new Netgraph message, set 196f2bb1caeSJulian Elischer.Dq token 197878ed226SJulian Elischerand 198878ed226SJulian Elischer.Dv NFG_RESP 199f2bb1caeSJulian Elischerflag and send message to the upper layer. Note that L2CA indication messages 200878ed226SJulian Elischerwill not populate 201f2bb1caeSJulian Elischer.Dq token 202878ed226SJulian Elischerand will not set 203878ed226SJulian Elischer.Dv NGF_RESP 204f2bb1caeSJulian Elischerflag. There is no reason for this, because they are just notifications and do 205878ed226SJulian Elischernot require acknowledgment. 206f2bb1caeSJulian Elischer.Pp 207f2bb1caeSJulian Elischer.Bl -tag -width foo 208878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_CON 209878ed226SJulian ElischerRequests the creation of a channel representing a logical connection to a 210f2bb1caeSJulian Elischerphysical address. Input parameters are the target protocol (PSM) and remote 211f2bb1caeSJulian Elischerdevice's 48-bit address (BD_ADDR). Output parameters are the local CID (LCID) 212f2bb1caeSJulian Elischerallocated by the local L2CAP entity, and Result of the request. If Result 213878ed226SJulian Elischerindicates a pending notification, the Status value may contain more information 214878ed226SJulian Elischerof what processing is delaying the establishment of the connection. 215878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_CON_IND 216878ed226SJulian ElischerThis message includes the parameters for the address of the remote device that 217878ed226SJulian Elischerissued the connection request, the local CID representing the channel being 218878ed226SJulian Elischerrequested, the Identifier contained in the request, and the PSM value the 219878ed226SJulian Elischerrequest is targeting. 220878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_CON_RSP 221f2bb1caeSJulian ElischerIssues a response to a connection request event indication. Input parameters 222878ed226SJulian Elischerare the remote device's 48-bit address, Identifier sent in the request, local 223f2bb1caeSJulian ElischerCID, the Response code, and the Status attached to the Response code. The 224f2bb1caeSJulian Elischeroutput parameter is the Result of the service request. This primitive must be 225878ed226SJulian Elischercalled no more than once after receiving the indication. 226878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_CFG 227878ed226SJulian ElischerRequests the initial configuration (or reconfiguration) of a channel to a new 228f2bb1caeSJulian Elischerset of channel parameters. Input parameters are the local CID endpoint, new 229878ed226SJulian Elischerincoming receivable MTU (InMTU), new outgoing flow spec-ification, and flush 230f2bb1caeSJulian Elischerand link timeouts. Output parameters are the Result, accepted incoming MTU 231878ed226SJulian Elischer(InMTU), the remote side's flow requests, and flush and link timeouts. 232878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_CFG_IND 233878ed226SJulian ElischerThis message includes the parameters indicating the local CID of the channel 234878ed226SJulian Elischerthe request has been sent to, the outgoing MTU size (maximum packet that can 235878ed226SJulian Elischerbe sent across the channel) and the flowspec describing the characteristics of 236f2bb1caeSJulian Elischerthe incoming data. All other channel parameters are set to their default values if not provided by the remote device. 237878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_CFG_RSP 238f2bb1caeSJulian ElischerIssues a response to a configuration request event indication. Input parameters 239878ed226SJulian Elischerinclude the local CID of the endpoint being configured, outgoing transmit MTU 240878ed226SJulian Elischer(which may be equal or less to the OutMTU parameter in the configuration 241f2bb1caeSJulian Elischerindication event) and the accepted flowspec for incoming traffic. The output 242f2bb1caeSJulian Elischerparameter is the Result value. 243878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_QOS_IND 244878ed226SJulian ElischerThis message includes the parameter indicating the address of the remote 245878ed226SJulian ElischerBluetooth device where the QoS contract has been violated. 246878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_DISCON 247f2bb1caeSJulian ElischerRequests the disconnection of the channel. Input parameter is the CID 248f2bb1caeSJulian Elischerrepresenting the local channel endpoint. Output parameter is Result. Result 249878ed226SJulian Elischeris zero if a L2CAP Disconnect Response is received, otherwise a non-zero value 250f2bb1caeSJulian Elischeris returned. Once disconnection has been requested, no process will be able to 251878ed226SJulian Elischersuccessfully read or write from the CID. 252878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_DISCON_IND 253878ed226SJulian ElischerThis message includes the parameter indicating the local CID the request has 254878ed226SJulian Elischerbeen sent to. 255878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_WRITE 256f2bb1caeSJulian ElischerResponse to transfer of data request. Actual data must be received from 257878ed226SJulian Elischerappropriate upstream hook and must be prepended with header defined as follows. 258f2bb1caeSJulian Elischer.Pp 259878ed226SJulian Elischer.Bd -literal -offset indent 260878ed226SJulian Elischer/* L2CA data packet header */ 261878ed226SJulian Elischertypedef struct { 262878ed226SJulian Elischer u_int32_t token; /* token to use in L2CAP_L2CA_WRITE */ 263878ed226SJulian Elischer u_int16_t length; /* length of the data */ 264878ed226SJulian Elischer u_int16_t lcid; /* local channel ID */ 265878ed226SJulian Elischer} __attribute__ ((packed)) ng_l2cap_l2ca_hdr_t; 266878ed226SJulian Elischer.Ed 267878ed226SJulian Elischer.Pp 268878ed226SJulian ElischerThe output parameters are Result and Length of data written. 269878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GRP_CREATE 270878ed226SJulian ElischerRequests the creation of a CID to represent a logical connection to multiple 271f2bb1caeSJulian Elischerdevices. Input parameter is the PSM value that the outgoing connectionless 272f2bb1caeSJulian Elischertraffic is labelled with, and the filter used for incoming traffic. Output 273f2bb1caeSJulian Elischerparameter is the CID representing the local endpoint. On creation, the group 274878ed226SJulian Elischeris empty but incoming traffic destined for the PSM value is readable. 275f2bb1caeSJulian Elischer.Em This request has not been implemented . 276878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GRP_CLOSE 277878ed226SJulian ElischerThe use of this message closes down a Group. 278f2bb1caeSJulian Elischer.Em This request has not been implemented . 279878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GRP_ADD_MEMBER 280f2bb1caeSJulian ElischerRequests the addition of a member to a group. The input parameter includes the 281878ed226SJulian ElischerCID representing the group and the BD_ADDR of the group member to be added. 282878ed226SJulian ElischerThe output parameter Result confirms the success or failure of the request. 283f2bb1caeSJulian Elischer.Em This request has not been implemented . 284878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GRP_REM_MEMBER 285f2bb1caeSJulian ElischerRequests the removal of a member from a group. The input parameters include 286878ed226SJulian Elischerthe CID representing the group and BD_ADDR of the group member to be removed. 287878ed226SJulian ElischerThe output parameter Result confirms the success or failure of the request. 288f2bb1caeSJulian Elischer.Em This request has not been implemented . 289878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GRP_MEMBERSHIP 290f2bb1caeSJulian ElischerRequests a report of the members of a group. The input parameter CID represents 291f2bb1caeSJulian Elischerthe group being queried. The output parameter Result confirms the success or 292f2bb1caeSJulian Elischerfailure of the operation. If the Result is successful, BD_ADDR_Lst is a list 293878ed226SJulian Elischerof the Bluetooth addresses of the N members of the group. 294f2bb1caeSJulian Elischer.Em This request has not been implemented . 295878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_PING 296878ed226SJulian ElischerInitiates a L2CA Echo Request message and the reception of the corresponding 297f2bb1caeSJulian ElischerL2CAP Echo Response message. The input parameters are remote Bluetooth device 298f2bb1caeSJulian ElischerBD_ADDR, Echo Data and Length of the echo data. The output parameters are 299878ed226SJulian ElischerResult, Echo Data and Length of the echo data. 300878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GET_INFO 301878ed226SJulian ElischerInitiates a L2CA Information Request message and the reception of the 302f2bb1caeSJulian Elischercorresponding L2CAP Info Response message. The input parameters are remote 303f2bb1caeSJulian ElischerBluetooth device BD_ADDR and Information Type. The output parameters are 304878ed226SJulian ElischerResult, Information Data and Size of the information data. 305878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_ENABLE_CLT 306f2bb1caeSJulian ElischerRequest to disable (enable) the reception of connectionless packets. The input 307878ed226SJulian Elischerparameter is the PSM value indicating service that should be blocked 308878ed226SJulian Elischer(unblocked) and Enable flag. 309878ed226SJulian Elischer.El 310878ed226SJulian Elischer.Sh NETGRAPH CONTROL MESSAGES 311878ed226SJulian ElischerThis node type supports the generic control messages, plus the following: 312f2bb1caeSJulian Elischer.Bl -tag -width foo 313878ed226SJulian Elischer.It Dv NGM_L2CAP_NODE_GET_FLAGS 314878ed226SJulian ElischerReturns current state for the node. 315878ed226SJulian Elischer.It Dv NGM_L2CAP_NODE_GET_DEBUG 316878ed226SJulian ElischerReturns an integer containing the current debug level for the node. 317878ed226SJulian Elischer.It Dv NGM_L2CAP_NODE_SET_DEBUG 318878ed226SJulian ElischerThis command takes an integer argument and sets current debug level 319878ed226SJulian Elischerfor the node. 320878ed226SJulian Elischer.It Dv NGM_L2CAP_NODE_GET_CON_LIST 321878ed226SJulian ElischerReturns list of active baseband connections (i.e. ACL links). 322878ed226SJulian Elischer.It Dv NGM_L2CAP_NODE_GET_CHAN_LIST 323878ed226SJulian ElischerReturns list of active L2CAP channels. 324f2bb1caeSJulian Elischer.It Dv NGM_L2CAP_NODE_GET_AUTO_DISCON_TIMO 325f2bb1caeSJulian ElischerReturns an integer containing the current value of the auto disconnect 326f2bb1caeSJulian Elischertimeout (in sec). 327f2bb1caeSJulian Elischer.It Dv NGM_L2CAP_NODE_SET_AUTO_DISCON_TIMO 328f2bb1caeSJulian ElischerThis command accepts an integer and sets the value of the auto disconnect 329f2bb1caeSJulian Elischertimeout (in sec). The special value of 0 (zero) disables auto disconnect 330f2bb1caeSJulian Elischertimeout. 331878ed226SJulian Elischer.El 332878ed226SJulian Elischer.Sh SHUTDOWN 333f2bb1caeSJulian ElischerThis node shuts down upon receipt of a NGM_SHUTDOWN control message, or 334878ed226SJulian Elischerwhen all hooks have been disconnected. 335878ed226SJulian Elischer.Sh BUGS 336f2bb1caeSJulian ElischerMost likely. Please report if found. 337878ed226SJulian Elischer.Sh SEE ALSO 338878ed226SJulian Elischer.Xr netgraph 4 , 339f2bb1caeSJulian Elischer.Xr ngctl 8 , 340878ed226SJulian Elischer.Xr l2control 8 , 341f2bb1caeSJulian Elischer.Xr l2ping 8 342878ed226SJulian Elischer.Sh HISTORY 343878ed226SJulian ElischerThe 344f2bb1caeSJulian Elischer.Nm 345878ed226SJulian Elischernode type was implemented in 346878ed226SJulian Elischer.Fx 5.0 . 347878ed226SJulian Elischer.Sh AUTHORS 348878ed226SJulian Elischer.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com 349