DCE needs permission to create socket

45 views
Skip to first unread message

Paulo Alexandre Regis

unread,
Apr 23, 2018, 9:23:23 PM4/23/18
to ns-3-users
Trying to use DCE to run an iperf in emulation mode. Compiles ok, but looks like it needs sudo to open a raw socket to the interface.

I know ns-3 has the --enable-sudo flag, which is used in my case, but I couldn't find something similar for DCE.


Error from console:
```
Waf: Leaving directory `/home/pi/dce/ns-3-dce-1.10/build'
Build commands will be stored in build/compile_commands.json
'build' finished successfully (1m32.229s)
../src/fd-net-device/helper/raw-sock-creator.cc: fatal error at line 86: main(): CreateSocket(): Unable to open raw socket
    errno = 1 (Operation not permitted)
msg="EmuFdNetDeviceHelper::CreateFileDescriptor(): socket creator exited normally with status 255", file=../src/fd-net-device/helper/emu-fd-net-device-helper.cc, line=310
terminate called without an active exception
Command ['/home/pi/dce/ns-3-dce-1.10/build/bin/iperf-server'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
```

My simulation file is attached (and it is in myscripts folder inside DCE folder).

Any insights? I want to use ns3 stack, not linux.
iperf-client.cc
iperf-server.cc
Reply all
Reply to author
Forward
0 new messages