_BRB_L2CA_OPEN_ENHANCED_CHANNEL structure

The _BRB_L2CA_OPEN_ENHANCED_CHANNEL structure is used to open an enhanced L2CAP channel to a remote device, or send a response for accepting/rejecting an incoming enhanced L2CAP connection request that was initiated by a remote device.

Syntax


typedef struct _BRB_L2CA_OPEN_ENHANCED_CHANNEL {
  BRB_HEADER                              Hdr;
  L2CAP_CHANNEL_HANDLE                    ChannelHandle;
  union {
    struct {
      USHORT Response;
      USHORT ResponseStatus;
    };
    USHORT Psm;
  };
  ULONG                                   ChannelFlags;
  BTH_ADDR                                BtAddress;
  struct {
    ULONG                    Flags;
    L2CAP_CONFIG_VALUE_RANGE Mtu;
    L2CAP_CONFIG_VALUE_RANGE FlushTO;
    L2CAP_FLOWSPEC           Flow;
    USHORT                   LinkTO;
    ULONG                    NumExtraOptions;
    PL2CAP_CONFIG_OPTION     ExtraOptions;
    struct {
      UCHAR ServiceType;
      ULONG Latency;
    } LocalQos;
    struct {
      ULONG                                 Flags;
      L2CAP_RETRANSMISSION_AND_FLOW_CONTROL RetransmissionAndFlow;
    } ModeConfig;
    USHORT                   Fcs;
    L2CAP_EXTENDED_FLOW_SPEC ExtendedFlowSpec;
    USHORT                   ExtendedWindowSize;
  } ConfigOut;
  struct {
    ULONG                    Flags;
    L2CAP_CONFIG_VALUE_RANGE Mtu;
    L2CAP_CONFIG_RANGE       FlushTO;
  } ConfigIn;
  ULONG                                   CallbackFlags;
  PFNBTHPORT_INDICATION_CALLBACK_ENHANCED Callback;
  PVOID                                   CallbackContext;
  PVOID                                   ReferenceObject;
  CHANNEL_CONFIG_RESULTS_ENHANCED         OutResults;
  CHANNEL_CONFIG_RESULTS_ENHANCED         InResults;
  UCHAR                                   IncomingQueueDepth;
  PVOID                                   Reserved;
} BRB_L2CA_OPEN_ENHANCED_CHANNEL, *PBRB_L2CA_OPEN_ENHANCED_CHANNEL;

Members

Hdr

A BRB_HEADER structure that contains information about the current BRB.

ChannelHandle
For a BRB_L2CA_OPEN_ENHANCED_CHANNEL request, this member will contain a handle to identify the enhanced L2CAP channel, if the open channel request completes successfully.
For a BRB_L2CA_OPEN_ENHANCED_CHANNEL_RESPONSE request, the profile driver (acting as a server) provides this member's value prior to sending the BRB down the driver stack. This member's value should be set to the INDICATION_PARAMETERS structure's ConnectionHandle member value if the INDICATION_CODE enumeration's IndicationRemoteConnect value is specified. These values are passed as the Parameters and Indication arguments of the profile driver's L2CAP Callback Function that was registered as the IndicationCallback member when the profile driver built and sent a BRB_L2CA_REGISTER_SERVER request.
( unnamed struct )

A BRB_HEADER structure that contains information about the current BRB.

Response

This member is used as an input parameter for a BRB_L2CA_OPEN_ENHANCED_CHANNEL request and an output parameter for the BRB_L2CA_OPEN_ENHANCED_CHANNEL_RESPONSE request.

For a BRB_L2CA_OPEN_ENHANCED_CHANNEL_RESPONSE request, this member holds a flag that indicates the profile driver's response to the remote device. Valid flag values are contained in the following table.

FlagDescription

CONNECT_RSP_RESULT_NO_RESOURCES

The profile driver refused the connection due to a lack of resources.

CONNECT_RSP_RESULT_PENDING

The profile driver is currently busy and cannot accept the connection. Try again later.

CONNECT_RSP_RESULT_PSM_NEG

The profile driver refused the connection because the PSM is not supported.

CONNECT_RSP_RESULT_SECURITY_BLOCK

The profile driver refused the connection for security reasons.

CONNECT_RSP_RESULT_SUCCESS

The profile driver accepted the connection.

 

For the BRB_L2CA_OPEN_ENHANCED_CHANNEL BRB, this member contains the response from the remote device to which the profile driver attempted to connect. Valid flag values are contained in the following table.

FlagDescription

CONNECT_RSP_RESULT_NO_RESOURCES

The remote device refused the connection due to a lack of resources.

CONNECT_RSP_RESULT_PSM_NEG

The remote device refused the connection.

CONNECT_RSP_RESULT_SECURITY_BLOCK

The remote device refused the connection for security reasons.

CONNECT_RSP_RESULT_SUCCESS

The remote device accepted the connection.

 

ResponseStatus
If during a call to the BRB_L2CA_OPEN_ENHANCED_CHANNEL_RESPONSE BRB the Response member is set to CONNECT_RSP_RESULT_PENDING, this member is valid and contains one of the following values:
CONNECT_RSP_STATUS_AUTHENTICATION_PENDING
CONNECT_RSP_STATUS_AUTHORIZATION_PENDING
CONNECT_RSP_STATUS_NO_INFORMATION
Psm

The Protocol/Service Multiplexer (PSM) that the channel uses to connect to the remote device. When used with a BRB_L2CA_OPEN_ENHANCED_CHANNEL request, this member is set as an input field. When used with a BRB_L2CA_OPEN_ENHANCED_CHANNEL_RESPONSE request, this member is used as an output field.

ChannelFlags

Flags that specify the requirements for the channel to be opened. Valid flag values are listed in the following table:

Flag

Description

CF_LINK_AUTHENTICATED

The link must be authenticated.

CF_LINK_ENCRYPTED

The link must be encrypted. Setting this flag also sets the CF_LINK_AUTHENTICATED flag.

CF_LINK_SUPPRESS_PIN

The profile driver indicates its preference that users not be prompted for a PIN.

 

BtAddress

The Bluetooth address of the device for which the connection is intended.

ConfigOut

The substructure that contains parameter settings for a BRB_L2CA_OPEN_ENHANCED_CHANNEL BRB sent to a remote device.

Flags

Flags that specify the requirements for the channel to be opened. Valid flag values are listed in the following table:

Flag

Description

CF_LINK_AUTHENTICATED

The link must be authenticated.

CF_LINK_ENCRYPTED

The link must be encrypted. Setting this flag also sets the CF_LINK_AUTHENTICATED flag.

CF_LINK_SUPPRESS_PIN

The profile driver indicates its preference that users not be prompted for a PIN.

CFG_ENHANCED

Specifies that the ModeConfig structure is valid.

CFG_FCS

Specifies that the Fcs value is valid.

 

Mtu

The range of message transfer units (MTUs) that is used to negotiate the size of the outbound half of channel.

FlushTO

The range of possible values to be used for the flush timeout for the outbound half of the channel.

Flow

Reserved for future use. Do not use.

LinkTO

The Link Manager link timeout.

NumExtraOptions

The number of array items that are contained in the ExtraOptions member. This value should be zero for most clients.

ExtraOptions

Extra options. This value should be zero for most clients.

LocalQos

Reserved for future use. Do not use.

ServiceType

Reserved for future use. Do not use.

Latency

Reserved for future use. Do not use.

ModeConfig

Specifies the type of L2CAP channel being opened. This structure is valid only if CFG_ENHANCED flag is specified.

Flags

Specifies the type of L2CAP channel mode requested.

Flag

Description

CM_BASIC

Open a basic mode channel.

CM_RETRANSMISSION_AND_FLOW

Open an enhanced retransmission mode channel.

CM_STREAMING

Open a streaming mode channel.

 

RetransmissionAndFlow

Specifies the options for CM_RETRANSMISSION_AND_FLOW and CM_STREAMING modes. This structure must be zero if only CM_BASIC is specified in the Flags member.

The Mode submember of RetransmissionAndFlow should be set to 0. Use the ModeConfig submember of RetransmissionAndFlow to specify the type of channel to open.

Fcs

Specifies whether FCS should be used for the enhanced L2CAP channel. This value is valid only if CM_RETRANSMISSION_AND_FLOW or CM_STREAMING flag is specified in the Flags member.

ExtendedFlowSpec

Not supported.

ExtendedWindowSize

Not supported.

ConfigIn

The substructure that contains parameter settings to validate incoming BRB_L2CA_OPEN_ENHANCED_CHANNEL_RESPONSE BRBs that are sent from a remote device.

Flags

Flags that specify the requirements for the channel to be opened. Valid flag values are listed in the following table:

Flag

Description

CF_LINK_AUTHENTICATED

The link must be authenticated.

CF_LINK_ENCRYPTED

The link must be encrypted. Setting this flag also sets the CF_LINK_AUTHENTICATED flag.

CF_LINK_SUPPRESS_PIN

The profile driver indicates its preference that users not be prompted for a PIN.

 

Mtu

The range of message transfer units (MTUs) that is used to negotiate the size of the inbound half of channel.

FlushTO

The range of possible values to be used for the flush timeout for the inbound half of the channel.

CallbackFlags

A flag that specifies which events should generate a callback routine to notify the profile driver that the event has occurred. Valid flag values are contained in the following table.

FlagDescription

CALLBACK_CONFIG_EXTRA_IN

If set, the callback routine will be called when the configuration request for the remote device contains extra options. If not set, the extra configuration options will be rejected as unknown options. This flag is used with BRB_L2CA_OPEN_ENHANCED_CHANNEL_RESPONSE BRBs.

CALLBACK_CONFIG_EXTRA_OUT

If set, the callback routine will be called when the remote device rejects an extra configuration option from a BRB_L2CA_OPEN_ENHANCED_CHANNEL request. If not set and the remote device rejects the configuration request due to an extra option, the connection will be closed.

CALLBACK_CONFIG_QOS

If set, the callback routine will be called when a remote device sends a configuration request that contains a QOS value. If this flag is not set and the remote device either sends QOS parameters in a configuration request or rejects the profile driver's requested QOS parameters, the connection is disconnected.

CALLBACK_DISCONNECT

If set, the callback routine will be called when a remote device disconnects from the enhanced L2CAP channel.

CALLBACK_RECV_PACKET

If set, the callback routine will be called when the profile driver receives an incoming enhanced L2CAP packet.

 

Callback

The Enhanced L2CAP Callback Function implemented by the profile driver, that the Bluetooth driver stack should call to notify the profile driver about any changes to the enhanced L2CAP connection.

CallbackContext

The context to pass to the callback function specified in the Callback member. The profile driver defines this value.

ReferenceObject

A pointer to an object to pass to ObReferenceObject and ObDereferenceObject for which to maintain a reference count of.

OutResults

A CHANNEL_CONFIG_RESULTS_ENHANCED structure that contains configuration parameters negotiated for the outbound request.

InResults

A CHANNEL_CONFIG_RESULTS_ENHANCED structure that contains configuration parameters negotiated for the inbound request.

IncomingQueueDepth

Specifies the incoming queue length in message transfer units (MTUs).

Reserved

Reserved member. Do not use.

Remarks

Profile drivers can use CM_BASIC | CM_RETRANSMISSION_AND_FLOW, or CM_BASIC | CM_STREAMING modes for the Flags member. This indicates to open an enhanced retransmission mode, or streaming mode channel if possible, and if not fall back to basic mode channel. A value of CM_RETRANSMISSION_AND_FLOW | CM_STREAMING is not supported.

Requirements

Version

Versions: Supported in Windows 8 and later versions of Windows

Header

Bthddi.h (include Bthddi.h)

 

 

Send comments about this topic to Microsoft

Show:
© 2015 Microsoft