Linux bluetooth development
 help / color / mirror / Atom feed
From: "Andrea Carlevato" <andrea.carlevatoml@gmail.com>
To: "BlueZ development" <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] How extract client address on server ??
Date: Wed, 11 Oct 2006 16:02:59 +0200	[thread overview]
Message-ID: <becc9d2c0610110702g5fe862ccu69321bd4ebc650c4@mail.gmail.com> (raw)
In-Reply-To: <Pine.LNX.4.63.0610111549460.644@redbean.intranet.gw-instruments.de>


[-- Attachment #1.1: Type: text/plain, Size: 3578 bytes --]

including obex_main.h conflicts with the necessary inclusion in my code of
<openobex/obex.h>...
Moreover obex_main.h require all other header file of openobex libs to
compile...

is there any way to get out of all this ?


grazie
andrea








On 10/11/06, Peter Wippich <pewi@gw-instruments.de> wrote:
>
>
> Hi,
>
>
> On Wed, 11 Oct 2006, Andrea Carlevato wrote:
>
> > ok,
> > i get that stratcure as "handle" with this call:
> >
> > obex_t *handle = NULL;
> > handle = OBEX_Init(OBEX_TRANS_BLUETOOTH, obex_event, 0);
> > ....
> > btobex_accept(handle);
> >
> > OK, but if i add this code:
> >
> > getpeername(handle->fd, &addr, &addr_len);
> >
> > my compiler gives me this error:
> >
> > > > > request for member 'fd' in something not a structure or union
> >
> >
> > Do you wonder why ?
> > thanks a lot
> No ;-)
>
> You have to do something like this:
>
> #include "(path to file)/obex_main.h"
>
> .....
>
> getpeername( (struct obex *)handle->fd, ....)
>
> Ciao,
>
> Peter
>
>
> >
> >
> >
> >
> >
> > On 10/11/06, Peter Wippich <pewi@gw-instruments.de> wrote:
> > >
> > >
> > > Hi Andrea,
> > >
> > > On Wed, 11 Oct 2006, Andrea Carlevato wrote:
> > >
> > > > what do you mean with "obex structure" ? which structure are you
> > > referring ?
> > > >
> > > > andrea
> > >
> > > The structure defined in lib/obex_main.h It is not exported directly
> by
> > > the api, as far as I can see. The OBEX_Init() shall return a pointer
> to
> > > such a structure (defined as a void * for the API). It is not realy
> good
> > > style to access internal structure of the library, but I can see no
> > > "official" way to get the bd_addr of a remote client (but may be I
> missed
> > > something).
> > >
> > > Ciao,
> > >
> > > Peter
> > >
> > >
> > >
> > > |       Peter Wippich                   Voice: +49 30
> 46776411          |
> > > |       G&W Instruments GmbH            fax:   +49 30
> 46776419          |
> > > |       Gustav-Meyer-Allee 25, Geb. 12  Email: pewi@gw-instruments.de
> |
> > > |       D-13355 Berlin  /
> Germany                                       |
> > >
> > >
> > >
> -------------------------------------------------------------------------
> > > 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
> > >
> >
> >
>
>
> |       Peter Wippich                   Voice: +49 30 46776411          |
> |       G&W Instruments GmbH            fax:   +49 30 46776419          |
> |       Gustav-Meyer-Allee 25, Geb. 12  Email: pewi@gw-instruments.de   |
> |       D-13355 Berlin  / Germany                                       |
>
>
> -------------------------------------------------------------------------
> 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
>

[-- Attachment #1.2: Type: text/html, Size: 6238 bytes --]

[-- Attachment #2: Type: text/plain, Size: 373 bytes --]

-------------------------------------------------------------------------
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

[-- Attachment #3: Type: text/plain, Size: 164 bytes --]

_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel

  reply	other threads:[~2006-10-11 14:02 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-11 11:01 [Bluez-devel] How extract client address on server ?? Andrea Carlevato
2006-10-11 11:08 ` Peter Wippich
2006-10-11 12:15   ` Andrea Carlevato
2006-10-11 12:34     ` Peter Wippich
2006-10-11 12:35       ` Andrea Carlevato
2006-10-11 12:56         ` Peter Wippich
2006-10-11 13:08           ` Andrea Carlevato
2006-10-11 13:54             ` Peter Wippich
2006-10-11 14:02               ` Andrea Carlevato [this message]
2006-10-11 14:33                 ` Peter Wippich

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=becc9d2c0610110702g5fe862ccu69321bd4ebc650c4@mail.gmail.com \
    --to=andrea.carlevatoml@gmail.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