Spirent / openperf

Infrastructure and application test and analysis framework
Apache License 2.0
18 stars 15 forks source link

Add support for more socket options #111

Open azaifman opened 5 years ago

azaifman commented 5 years ago

Following setsockopt calls are invoked by the standard ping command but are currently not supported by lwip/inception (ping succeeds however):

SOL_RAW, ICMP_FILTER SOL_IP, IP_RECVERR SOL_SOCKET, SO_RCVBUF SOL_SOCKET, SO_SNDBUF SOL_SOCKET, SO_TIMESTAMP SOL_SOCKET, SO_SNDTIMEO SOL_SOCKET, SO_RCVTIMEO

root@ubuntu:~/inception-core# LD_PRELOAD=build/libicp-shim-linux-x86_64-testing/lib/libicp-shim.so ICP_TRACE=1 ICP_BINDTODEVICE="e1142fe0-c586-4d2c-40fb-ba2a64eabd5d" ping 10.10.0.20 -c 1 socket(2,2,1,) = -1 socket(2,3,1,) = 4 setsockopt(4,1,25,e1142fe0-c586-4d2c-40fb-ba2a64eabd5d,36,) = 0 socket(10,2,58,) = -1 socket(10,3,58,) = 6 setsockopt(6,1,25,e1142fe0-c586-4d2c-40fb-ba2a64eabd5d,36,) = 0 socket(2,2,0,) = 8 setsockopt(8,1,25,e1142fe0-c586-4d2c-40fb-ba2a64eabd5d,36,) = 0 connect(8,0x7ffee7c93ae0,16,) = 0 getsockname(8,0x55c01cb21070,0x7ffee7c93ac4,) = 0 close(8,) = 0 setsockopt(4,255,1,0x7ffee7c93ac8,4,) = -1 WARNING: setsockopt(ICMP_FILTER): Protocol not available setsockopt(4,0,11,0x7ffee7c93ac4,4,) = -1 WARNING: your kernel is veeery old. No problems. setsockopt(4,1,7,0x55c01cb256a8,4,) = -1 setsockopt(4,1,8,0x7ffee7c93a70,4,) = -1 getsockopt(4,1,8,0x7ffee7c93a70,0x7ffee7c93a74,) = 0 PING 10.10.0.20 (10.10.0.20) 56(84) bytes of data. setsockopt(4,1,29,0x7ffee7c939b0,4,) = -1 Warning: no SO_TIMESTAMP support, falling back to SIOCGSTAMP setsockopt(4,1,21,0x7ffee7c939a0,16,) = -1 setsockopt(4,1,20,0x7ffee7c939a0,16,) = -1 sendto(4,0x55c01cb256c0,64,0,0x55c01cb22500,16,) = 64 recvmsg(4,0x7ffee7c92990,64,) = 84 64 bytes from 10.10.0.20: icmp_seq=1 ttl=255 time=0.397 ms

--- 10.10.0.20 ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.397/0.397/0.397/0.000 ms

DerangedMonkeyNinja commented 5 years ago

Quick triage:

So, socket options to implement:

Socket options to skip (for now):