Looking for a guide to extend|adapting the socket framework for NFCIP-1

Bruce M. Simpson bms at FreeBSD.org
Sun Mar 2 15:47:09 PST 2008


Hi,

I had to use a search engine to figure out what the acronym NFC was, and 
I assume you mean this:
    http://en.wikipedia.org/wiki/Near_Field_Communication

It helps if you give more background information when asking a more 
general audience for feedback.

zDen wrote:
> 1) As the NFC device is attached to the USB or UART port, how and where in
> the source code can I change the output of the byte-stream packet to the
> proper physical port? i.e where is the part of the source code that is
> physical device dependent when doing the I/O calls?
>   
You really need to roll your own driver framework for this.

Whilst the Bluetooth support sounds like it's the right place to start 
to look for ideas, you're going to have to write your own layering.

I know off the top of my head that the Bluetooth support is able to add 
its own TTY disciplines to serial devices but I couldn't tell you 
specifics, as it's not something I meddle with unless I need to.

> 2) As the protocol family (PF_xx) and address family (AF_xx) of NFC is not
> define in the socket library, how can I define them and let the default
> socket() call return a socket with the customized structure? I can see that
> I may need to use SOCK_RAW as the basic socket framework or any others
> recommendation?
>   

To learn about adding a new socket family to the system, you really need 
to pick up a copy of TCP/IP Illustrated Volume 2 and read Chapter 15 
onwards.

It sounds like you have a fairly involved and challenging software 
project on your hands.

I hope you're being funded by someone to do it, it doesn't sound like 
something a hobbyist would pick up just for the hell of it if it's going 
to be done properly, i.e. beyond a quick hack for demonstration purposes.

cheers
BMS


More information about the freebsd-net mailing list