I'm trying to implement a UDP traceroute solution in Python 2.6, but I'm having trouble understanding why I need root privileges to perform the same-ish action as the traceroute utility that comes with my operating system.
The environment that this code will run in will very doubtfully have root privileges, so is it more likely that I will have to forego a python implementation and write something to parse the output of the OS traceroute in UDP mode? Or is there something I'm missing about opening a socket configured like self.rx = socket.socket(socket.AF_INET, socket.SOCK_RAW, socket.IPPROTO_UDP)
. It seems that socket.SOCK_RAW
is inaccessible without root privileges which is effectively preventing me from consuming the data I need to implement this in python.