Bare IP (OSI Network Layer) based communication with Qt
-
wrote on 29 Mar 2021, 06:23 last edited by MuratUrsavas
Hi,
I have to deal with a different protocol which uses IP protocol for OSI Network Layer but neither TCP nor UDP for OSI Transport layer. So I have to implement my own Transport Protocol for this project.
What I don't know is how to deal with bare IP communication with Qt. I've done plenty of QTcpSocket/Server and QUdpSocket implementations but not a single bare IP based one.
How can we do it?
P.S: I have a hunch that maybe we can use UDP for this type of communication if we can get full UDP header serialized for each IP Packet.
Edit Note: Looks like QAbstractSocket is the way to go, but I'd like to listen everyone who knows better than me.
Regards,
-
Hi,
Both QTcpSocket and QUdpSocket are built on top of QAbstractSocket so I'd start there.
Which protocol are you implementing ?
-
wrote on 30 Mar 2021, 05:11 last edited by
I don't have the exact details but it's called Philips Clinical Network (or sometimes IntelliVue Network) which is used by the patient monitoring devices and servers. I've seen some reverse engineering attempts with .net and they were using IP sockets to get the messages.
For me, QAbstractSocket is the best way to process further, too. But something is a little bit confusing. I don't expect a connection based communication like TCP/IP but I haven't seen methods for connectionless protocols like UDP/IP. For example writeDatagram method is implemented on top of QAbstractSocket in the QUdpSocket. If I got the things correctly from the reference document, I should connect to the counter party with connect method. But then, how can I implement connectionless or multicast protocols?
-
Did you already saw this thread ?
-
wrote on 31 Mar 2021, 07:28 last edited by
Yep, it's in my bookmarks :) Maybe the only helpful discussion about this protocol.
There is an open source implementation, which tries to encode/decode but written with .Net. Further features can be observed from that project but first, I need to be able to communicate over IP layer. This will be a new Transport Layer protocol hence not implemented in Qt. Still struggling to find a way in the QUdpSocket implementation in qtcore source package.
My next shot will be system socket libraries or boost::asio.
5/5