I'm developing a small tool to record some sensors in GNU/Linux. Some of the sensors transmit their data over UDP, so I'm using libtins to capture it.
I would like to control the sensors start/stop from a webapp, but listening to a network interface requires root privileges. I don't like the idea of hard-coding a sudo-password to run the sniffer every time a button is clicked and I would rather avoid running all my processes as root, but surely must be a proper way to give interface access permissions to a process so the sniffing can be started from, let's say, a python or bash script.
Can someone give me any hint?