On 7/14/22 17:40, Paul Gofman wrote:
+static BOOL is_icmp_over_dgram( int fd ) +{
- socklen_t len;
- int val;
- len = sizeof(val);
- if (getsockopt( fd, SOL_SOCKET, SO_PROTOCOL, (char *)&val, &len ) || val != IPPROTO_ICMP)
return FALSE;
SO_PROTOCOL is nonstandard (I believe Mac specifically doesn't have it). You may want to guard out this whole function with "#ifdef linux".
- len = sizeof(val);
- return !getsockopt( fd, SOL_SOCKET, SO_TYPE, (char *)&val, &len ) && val == SOCK_DGRAM;
+}