Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - QNET information: (3 Items)
   
QNET information  
Hi!

We trying to switch from homemade protocol to QNET and we need some information about this protocol.

So some questions:
1. Is io-pkt's  version of QNET compatible with io-net's implementation of this protocol? It looks like YES.

2. For remote debugging of communication between devices/nodes we probably (I would say "more likely") will create own 
network sniffer (on computer/PC) with ability to parse communication between our devices. So we need to know packet 
structure of L3, L4 of QNET protocol to make this. Is it available any documentation about QNET anatomy?
I found no header with QNET structure definitions. May be I miss them somehow... :-)
Can you point to good source of information about QNET?

3. Using simple sniffing of Ethernet I found that data is send over the line in open form is it a way to make safe 
communication (by encryption for example) between our devices/nodes without changing of message passing principals we 
have.
So, ideally encryption/decryption should happens inside of QNET stack transparently for IPC. In io-net it can be done by
 implementing specific filter module but is it possible in io-pkt?

Thanks!
--
AG
Re: QNET information  
> 1. Is io-pkt's  version of QNET compatible with 
> io-net's implementation of  this protocol? 

Absolutely!  What goes out on the wire is the
same in both cases.  io-net and io-pkt are just
different drivers, from qnet's hardware-independent
perspective.
 
> 2. ... I  will create own network sniffer ... we 
> need to know packet structure of L3, L4 of 
> QNET protocol to make this. 

No problem!  All of the header files are included
with the source - have you downloaded it yet?
It's in the sys/lsm/qnet directory.  Everything
you should need is there - header files with
packet header definitions, resolver packets,
connection establishment, data transfer and
re-assembly, etc.
 
> 3. Using simple sniffing of Ethernet I found 
> that data is send over the line in open form 
> is it a way to make safe communication (by 
> encryption for example) between our devices/nodes 
> without changing of message passing principals we 
> have. So, ideally encryption/decryption should 
> happens inside of QNET stack transparently for 
> IPC. In io-net it can be done by implementing specific 
> filter module but is it possible in io-pkt?

Hm.  One very simple way to do this (no source
mods) it to use bind=ip and ipsec.  

If you don't like that (eg performance) then another 
easy way is to do it in your driver, so your driver takes
the unencrypted data from qnet, encrypts it,
transmits it over the wife, and on the other
end your driver receives the encrypted data,
decrypts it, and passes it up to qnet.

Of course, since you have the source to qnet,
you could add an encryption layer to it, so that
it passed the encrypted data to the stock
driver.

There are a LOT of ways to solve this.  I've
probably missed some  :-)
Re: QNET information  
Thanks for your answer, Andrew.

> No problem!  All of the header files are included
> with the source - have you downloaded it yet?
> It's in the sys/lsm/qnet directory.  Everything
> you should need is there - header files with
> packet header definitions, resolver packets,
> connection establishment, data transfer and
> re-assembly, etc.

It was easy to find this source code by reading Source_Guide pag in wiki.
I found 2 interesting headers:
1. sys/lsm/qnet/nr_msg.h

It looks like QNX native resolver packets structures. Here it's more or less clear.

2. sys/lsm/qnet/kif/kif_nto.h

This file probably defines L4 structures of QNET protocol (IPC itself). But I still have no clue how this packets are 
packed in L3 in both transport methods: IP and enX.

Let's see what network sniffing will show...

I still have to ask: Do you have any internal documentation about QNET to make it public? Source code itself doesn't 
explain logic of protocol.

> Hm.  One very simple way to do this (no source
> mods) it to use bind=ip and ipsec.  

It's could be one of ways to solve this problem.

> If you don't like that (eg performance) then another 
> easy way is to do it in your driver, so your driver takes
> the unencrypted data from qnet, encrypts it,
> transmits it over the wife, and on the other
> end your driver receives the encrypted data,
> decrypts it, and passes it up to qnet.

It think we will go this way at least for one of networks we use.

Thanks!
--
AG