plc4x-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Łukasz Dywicki <>
Subject [DISCUSS] Ethernet based protocols
Date Mon, 11 May 2020 12:01:47 GMT
Based on observations I gathered while writing LLDP and Profinet DCP
mspec file I found there are some elements which are repeating between
These are basic structures: mac address, ip address and ethernet frame
with different payloads based on ethernet type field. The same
structures must be added to LLDP, Profinet DCP and eventually any other
raw ethernet protocol.
Since I do see a risk of getting growing amount of code duplicated
across a project I wanted to discuss possible approaches to that. I do
not see a big trouble around mspec, cause above structures are all
together 15-20 lines long, but around processing of ethernet frame itself.
Because same interface can host multiple protocols I am not quite sure
how to proceed with this one. So far we have only SingleStack configurer.
I been thinking about basic unification and re-use of Ethernet frame
across low level protocols. Maybe it would allow us to provide a
multistack configurer implementation.
I am aware that the same interface can be opened by pcap library
multiple times, however I do see an overhead there. Multiple handles
will keep processing same packets with no real need for that.

Please take this as a starting point for a discussion as I do not have
any idea yet, how to handle this. If you do - then please throw it here. :)


View raw message