Skip to contentSkip to conversation

specifying client-side link mode properties before connect()

DISCUSSION Stephen Crane 2 participants 2 messages Mar 31, 2004 Bluetooth drivers

lore
Share & tools
lore
#0 lore raw

Hi,
[I think I may have asked something along these lines before, but I can't remember what the outcome was...]

I have a server application which can specify the link mode requirements of incoming connections using setsockopt(sock, SOL_L2CAP, L2CAP_LM, opt, sizeof(opt)). This works fine, if a client can't meet the requirements, no connection is made and the server's accept() sees nothing.

However I'd now like to be able to specify these requirements to the connect() call on the client-side. That is, I'd like to call setsockopt specifying the client's requirements (master, auth, encrypt) before calling connect(). While I can /do/ this, the LM parameters seem to have no effect. For example, I can set the L2CAP_LM_MASTER flag on both sides, yet a connection is still established.

I suppose my question really is: are there any plans to implement this? Or is the usual answer (to send a patch) the correct one :-)?

Thanks,
Steve

Signature · 2 lines
Stephen Crane, Rococo Software Ltd. http://www.rococosoft.com
[email protected] +353-1-6601315 (ext 209)
maintainer
#1 lore raw

Hi Stephen,

Quoted 11 lines

I have a server application which can specify the link mode requirements of incoming connections using setsockopt(sock, SOL_L2CAP, L2CAP_LM, opt, sizeof(opt)). This works fine, if a client can't meet the requirements, no connection is made and the server's accept() sees nothing.

However I'd now like to be able to specify these requirements to the connect() call on the client-side. That is, I'd like to call setsockopt specifying the client's requirements (master, auth, encrypt) before calling connect(). While I can /do/ this, the LM parameters seem to have no effect. For example, I can set the L2CAP_LM_MASTER flag on both sides, yet a connection is still established.

you can set the link mode, but the connection establishment procedure dont't care about it.

Quoted 4 lines

I suppose my question really is: are there any plans to implement this? Or is the usual answer (to send a patch) the correct one :-)?

Quoted 1 line

From my side I have no plan to implement it, but if you will do the work

and the patch don't break any other behaviour, I am going to apply it.

Regards

Marcel

-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials Free Linux tutorial presented by Daniel Robbins, President and CEO of GenToo technologies. Learn everything from fundamentals to system administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Bluez-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bluez-devel