[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: config files



Iain Hibbert wrote:
On Tue, 14 Mar 2006, Maksim Yevmenkin wrote:


	sa.l2cap_psm = htole16(NG_L2CAP_PSM_SDP);

which seems wrong? (will work ok on little endian machine)

actually, no. i think the problem is with bthidd(8) (and others, i.e. sdpd(8)). bluetooth byte order is le16. so, l2cap_psm field in sockaddr_l2cap should always be in le16 byte order.

thanks for catching this!

Yes, in the packet, psm is le16 but in the sockaddr it should be host order, surely? It makes no sense to preserve byte ordering in a channel number..

well, not in freebsd. just like in sockaddr_in port/ip have to passed (to kernel) in network byte order, psm in sockaddr_l2cap has to be passed (to kernel) in le16 byte order.


+ sas.sa_handler = sighup;

this is obviously a typo. it should be "sa.sa_handler = sighup;". otherwise it wont compile. did you sent the patch before you have actually tried it?

Whoops, the version I have consists of a some other changes not relevant to FreeBSD (wscons stuff) and so to make that patch, I had to do a bit of cut and paste (and, I can't compile the unchanged version).. but it is working for me with no strange effects that I can detect.

i see.

thanks,
max
_______________________________________________
freebsd-bluetooth_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-bluetooth
To unsubscribe, send any mail to "freebsd-bluetooth-unsubscribe_(_at_)_freebsd_(_dot_)_org"


Visit your host, monkey.org