In message <[EMAIL PROTECTED]>, Maksim Yevmenk
in writes:

>I'm sorry people :) I should have been more specific. Here is
>what i meant. I'm working on Bluetooth stack for FreeBSD. Everything
>is implemented in Netgraph. The real device driver nodes are connected
>to HCI layer. You can talk to any Bluetooth device via HCI layer. It
>does not really matter what kind of device you have, PC-CARD, serial
>or USB dongle. They all MUST talk via HCI. So HCI is not really a
device driver, and, IMO, it is not a pseudo device driver. It sort
>of looks like /dev/tcp :)

That's called a "protocol family" in BSD and you access it using

Based on what little I know about "Blåtand" it will be much easier
to work with as a socket than as a /dev/bla entry.

>Currently there is a single "control" hook for every HCI node. Control
>application connects to the hook and sends HCI commands and receives
>HCI events. It does work, but once the hook is connected, nobody else
>can connect to the same hook. That is a limitation, IMO. It would 
>really be nice to have several control applications. For example,

This is exactly the kind of semantics sockets offer you.

>2) Raw HCI sockets
>   The problem here is how to identify device, i.e. what to put
>   into sockaddr? Netgraph node name? May be not a good choice,
>   because it can be changed at any time. Device BD_ADDR? Does not
>   work also, because in order to get BD_ADDR you must send HCI
>   command to the device.

Well, many TCP clients don't care about the name, so they ask
for INADDR_ANY and get whatever the kernel feels like giving them,
you could do the same and have the kernel hand out random numbers.

In fact, you don't actually have to call bind(2) at all, you can
just call socket(2) and run with the result...

Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
[EMAIL PROTECTED]         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to