1878ed226SJulian Elischer.\" ng_l2cap.4 2878ed226SJulian 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.\" 27878ed226SJulian Elischer.\" $Id: ng_l2cap.4,v 1.4 2002/11/12 17:16:19 max Exp $ 28878ed226SJulian Elischer.\" $FreeBSD$ 29878ed226SJulian Elischer.Dd July 4, 2002 30878ed226SJulian Elischer.Dt NG_L2CAP 4 31878ed226SJulian Elischer.Os 32878ed226SJulian Elischer.Sh NAME 33878ed226SJulian 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 44878ed226SJulian 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 51878ed226SJulian 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. 54878ed226SJulian Elischer.Ss L2CAP assumptions 55878ed226SJulian Elischer.Bl -enum -offset indent 56878ed226SJulian Elischer.It 57878ed226SJulian 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 59878ed226SJulian 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 62878ed226SJulian 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 67878ed226SJulian ElischerBaseband layer. The Baseband always performs data integrity checks when 68878ed226SJulian Elischerrequested and resends data until it has been successfully acknowledged or 69878ed226SJulian 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 75878ed226SJulian Elischer.Em channels . 76878ed226SJulian 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 78878ed226SJulian 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 82878ed226SJulian Elischeridentifier. Channel identifiers (CIDs) are local names representing a logical 83878ed226SJulian Elischerchannel end-point on the device. Identifiers from 0x0001 to 0x003F are reserved 84878ed226SJulian 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. 86878ed226SJulian ElischerAll L2CAP signalling commands are sent to CID 0x0001. CID 0x0002 is reserved 87878ed226SJulian 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 92878ed226SJulian 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. 96878ed226SJulian Elischer.Ss Channel operational states 97878ed226SJulian Elischer.Bl -tag -width foobar 98878ed226SJulian Elischer.It Dv NG_L2CAP_CLOSED 99878ed226SJulian ElischerIn this state, there is no channel associated with this CID. This is the only 100878ed226SJulian Elischerstate when a link level connection (Baseband) may not exist. Link disconnection 101878ed226SJulian 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 108878ed226SJulian 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 110878ed226SJulian Elischerreceived L2CAP Connect Request waits for the corresponding response. The 111878ed226SJulian 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 114878ed226SJulian Elischernegotiating the channel parameters. The Configuration state may also be 115878ed226SJulian Elischerentered when the channel parameters are being renegotiated. Prior to entering 116878ed226SJulian Elischerthe NG_L2CAP_CONFIG state, all outgoing data traffic is suspended since 117878ed226SJulian Elischerthe traffic parameters of the data traffic are to be renegotiated. Incoming 118878ed226SJulian Elischerdata traffic is accepted until the remote channel endpoint has entered 119878ed226SJulian 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 121878ed226SJulian 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 123878ed226SJulian Elischerincrementally. Moving from the NG_L2CAP_CONFIG state to the NG_L2CAP_OPEN state 124878ed226SJulian 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 132878ed226SJulian 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 135878ed226SJulian 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 137878ed226SJulian 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 149878ed226SJulian 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 151878ed226SJulian 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 158878ed226SJulian 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 181878ed226SJulian ElischerUpper layer protocol upstream hook. Usually Bluetooth L2CAP sockets layer 182878ed226SJulian Elischeris connected to the hook. 183878ed226SJulian Elischer.It Dv ctl 184878ed226SJulian ElischerControl hook. Usually Bluetooth raw L2CAP sockets layer is connected 185878ed226SJulian 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 189878ed226SJulian Elischeris ready. L2CAP node uses 190878ed226SJulian Elischer.Dq token 191878ed226SJulian Elischerfield from Netgraph message header to match L2CA request and response. The 192878ed226SJulian Elischerupper layer protocol must populate 193878ed226SJulian Elischer.Dq token . 194878ed226SJulian ElischerL2CAP node will queue request and start processing. Later, when response is 195878ed226SJulian Elischerready or timeout has occur L2CAP node will create new Netgraph message, set 196878ed226SJulian Elischer.Dq token 197878ed226SJulian Elischerand 198878ed226SJulian Elischer.Dv NFG_RESP 199878ed226SJulian Elischerflag and send message to the upper layer. Note that L2CA indication messages 200878ed226SJulian Elischerwill not populate 201878ed226SJulian Elischer.Dq token 202878ed226SJulian Elischerand will not set 203878ed226SJulian Elischer.Dv NGF_RESP 204878ed226SJulian Elischerflag. There is no reason for this, because they are just notifications and do 205878ed226SJulian Elischernot require acknowledgment. 206878ed226SJulian Elischer.Pp 207878ed226SJulian 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 210878ed226SJulian Elischerphysical address. Input parameters are the target protocol (PSM) and remote 211878ed226SJulian Elischerdevice's 48-bit address (BD_ADDR). Output parameters are the local CID (LCID) 212878ed226SJulian 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 221878ed226SJulian 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 223878ed226SJulian ElischerCID, the Response code, and the Status attached to the Response code. The 224878ed226SJulian 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 228878ed226SJulian Elischerset of channel parameters. Input parameters are the local CID endpoint, new 229878ed226SJulian Elischerincoming receivable MTU (InMTU), new outgoing flow spec-ification, and flush 230878ed226SJulian 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 236878ed226SJulian 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 238878ed226SJulian 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 241878ed226SJulian Elischerindication event) and the accepted flowspec for incoming traffic. The output 242878ed226SJulian 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 247878ed226SJulian ElischerRequests the disconnection of the channel. Input parameter is the CID 248878ed226SJulian 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 250878ed226SJulian 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 256878ed226SJulian 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. 258878ed226SJulian 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 271878ed226SJulian Elischerdevices. Input parameter is the PSM value that the outgoing connectionless 272878ed226SJulian Elischertraffic is labelled with, and the filter used for incoming traffic. Output 273878ed226SJulian 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. 275878ed226SJulian 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. 278878ed226SJulian Elischer.Em This request has not been implemented . 279878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GRP_ADD_MEMBER 280878ed226SJulian 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. 283878ed226SJulian Elischer.Em This request has not been implemented . 284878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GRP_REM_MEMBER 285878ed226SJulian 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. 288878ed226SJulian Elischer.Em This request has not been implemented . 289878ed226SJulian Elischer.It Dv NGM_L2CAP_L2CA_GRP_MEMBERSHIP 290878ed226SJulian ElischerRequests a report of the members of a group. The input parameter CID represents 291878ed226SJulian Elischerthe group being queried. The output parameter Result confirms the success or 292878ed226SJulian 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. 294878ed226SJulian 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 297878ed226SJulian ElischerL2CAP Echo Response message. The input parameters are remote Bluetooth device 298878ed226SJulian 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 302878ed226SJulian Elischercorresponding L2CAP Info Response message. The input parameters are remote 303878ed226SJulian 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 306878ed226SJulian 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: 312878ed226SJulian 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. 324878ed226SJulian Elischer.El 325878ed226SJulian Elischer.Sh SHUTDOWN 326878ed226SJulian ElischerThis node shuts down upon receipt of a NGM_SHUTDOWN control message, or 327878ed226SJulian Elischerwhen all hooks have been disconnected. 328878ed226SJulian Elischer.Sh BUGS 329878ed226SJulian ElischerMost likely. Please report if found. 330878ed226SJulian Elischer.Sh SEE ALSO 331878ed226SJulian Elischer.Xr netgraph 4 , 332878ed226SJulian Elischer.Xr ngctl 8 , 333878ed226SJulian Elischer.Xr l2control 8 , 334878ed226SJulian Elischer.Xr l2ping 8 335878ed226SJulian Elischer.Sh HISTORY 336878ed226SJulian ElischerThe 337878ed226SJulian Elischer.Nm 338878ed226SJulian Elischernode type was implemented in 339878ed226SJulian Elischer.Fx 5.0 . 340878ed226SJulian Elischer.Sh AUTHORS 341878ed226SJulian Elischer.An Maksim Yevmenkin Aq m_evmenkin@yahoo.com 342