Hi Xavier,
> > > 2/ and/or make a filter to allow l2cap incoming connections requests
> > > only from devices that have a specific class of device .
> >
> > I don't have any real thought about this. Any comments from other
> > people?
>
> This can be achieved at hci level by sending a Set_Event_Filter command (OGF
> =
> 3, OCF =5) with filter type set to 2, Filter_condition_type to 1 and the
> condition, composed of the CoD that interrests you followed by a mask
> indicating the bits of interrest in the preceding CoD.
>
> The problem is i'm sure you need to be root to do that and it forbids hci
> connections ...
you will need to be root for that and it will block all HCI connections
without the correct CoD. This is only usable for device where you have a
limited or known number of supported profiles. We should build this at
L2CAP level and use the same filter structure like the spec. uses for
Set_Event_Filter.
One reason for me in which case this makes sense is for the HID server
process on the host, because the connections from non-HID devices on the
L2CAP PSM's can be dropped at L2CAP level and the HID server don't have
to care about it. This means that no unneeded SDP connections are made.
Regards
Marcel
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
|