public inbox for linux-bluetooth@vger.kernel.org
 help / color / mirror / Atom feed
From: Marco Pracucci <development@pracucci.com>
To: BlueZ development <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] ioctl: setting link mode and link policy
Date: Thu, 31 Aug 2006 15:15:22 +0000	[thread overview]
Message-ID: <44F6FD0A.1090900@pracucci.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0608311415010.8795@redbean.intranet.gw-instruments.de>

Hi Peter,

I would like to set a "global" link mode and link policy that will be
the default for every connection. Something similar to hcid.

Marco

> Hi Marco, 
>
> depending on which level you want to set the linkmode use setsockopt() 
> for your connection. E.g. for rfcomm use something like : 
>
> // set security options for this service
> if(authenticate) {
> 	linkmode |= RFCOMM_LM_AUTH ;
> 	if(encrypted) linkmode |= RFCOMM_LM_ENCRYPT ;
> }
>
> if (linkmode && setsockopt(sfd, SOL_RFCOMM, RFCOMM_LM, &linkmode, sizeof(linkmode)) < 0) {
> 	close(sfd); sfd = 0 ; 
> 	return -1;
> }
>
> Ciao, 
>
> Peter 
>   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2006-08-31 15:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-31 13:59 [Bluez-devel] ioctl: setting link mode and link policy Marco Pracucci
2006-08-31 12:18 ` Peter Wippich
2006-08-31 15:15   ` Marco Pracucci [this message]
2006-08-31 16:29     ` Marcel Holtmann
2006-08-31 16:42       ` Marco Pracucci
2006-08-31 19:23         ` Marcel Holtmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44F6FD0A.1090900@pracucci.com \
    --to=development@pracucci.com \
    --cc=bluez-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox