I need to write a Linux application that needs to talk to a device with a custom Ethernet type. There are many solutions, even in SO, to write such an application. The disadvantage is that root access is required (AFAIK). Issuing root privileges later may be an option, but there is a problem that the program is developed in the IDE, which I do not like to run with root privileges. In my special case, the main application is written in Python, which would mean giving root access to the entire Python interpreter. I am considering possible alternatives. For instance.
Writing a tiny UDP / TCP server that redirects every raw packet through TCP / UDP. This can also be written in Python. Only this tiny application requires root privileges.
Using socat for redirection, unfortunately, I cannot find a way to take care of only one type of Ethernet, so as not to overflow with IP packets.
Any other ideas?
source share