From: Marcel Holtmann <marcel@holtmann.org>
To: BlueZ Mailing List <bluez-devel@lists.sourceforge.net>
Subject: Re: [Bluez-devel] rfcomm socket and rfcomm tty
Date: Mon, 03 Jan 2005 20:52:13 +0100 [thread overview]
Message-ID: <1104781933.8894.64.camel@pegasus> (raw)
In-Reply-To: <I9R9DH$87B77B69F7EC05E925293D07675091B6@uol.com.br>
Hi,
> int main(void)
> {
> int sock, client, alen;
> struct sockaddr_rc addr;
>
> if (sock = socket(AF_BLUETOOTH,
> SOCK_STREAM, BTPROTO_RFCOMM) < 0) {
> perror("socket");
> exit(1);
> }
>
> addr.rc_family = AF_BLUETOOTH;
> bacpy(&addr.rc_bdaddr, BDADDR_ANY);
> addr.rc_channel = htobs(CHANNEL);
you don't need a byteswap here. The rc_channel is only uint8_t.
Regards
Marcel
-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
Bluez-devel mailing list
Bluez-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bluez-devel
next prev parent reply other threads:[~2005-01-03 19:52 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-01-03 19:12 [Bluez-devel] rfcomm socket and rfcomm tty omap
2005-01-03 19:52 ` Marcel Holtmann [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-01-03 18:49 omap
2005-01-03 18:54 ` Marcel Holtmann
2004-12-28 9:03 mike
2004-12-29 10:25 ` Marcel Holtmann
2004-12-30 1:55 ` mike
2005-01-01 18:42 ` Marcel Holtmann
2005-01-03 7:15 ` mike
2005-01-03 9:51 ` Marcel Holtmann
2005-01-04 7:32 ` mike
2005-01-04 11:51 ` Marcel Holtmann
2005-01-05 8:15 ` mike
2005-01-05 11:39 ` 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=1104781933.8894.64.camel@pegasus \
--to=marcel@holtmann.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.