fhandler_socket_inet::fhandler_socket_inet () :
fhandler_socket_wsock (),
- oobinline (false)
+ oobinline (false),
+ tcp_fastopen (false)
{
}
ignore = true;
break;
+ case TCP_FASTOPEN:
+ /* Fake FastOpen on older systems. */
+ if (!wincap.has_tcp_fastopen ())
+ {
+ if (type != SOCK_STREAM)
+ {
+ set_errno (EOPNOTSUPP);
+ return -1;
+ }
+ ignore = true;
+ tcp_fastopen = *(int *) optval ? true : false;
+ }
+ break;
+
default:
break;
}
optname = convert_ws1_ip_optname (optname);
break;
+ case IPPROTO_TCP:
+ switch (optname)
+ {
+ case TCP_FASTOPEN:
+ /* Fake FastOpen on older systems */
+ if (!wincap.has_tcp_fastopen ())
+ {
+ if (type != SOCK_STREAM)
+ {
+ set_errno (EOPNOTSUPP);
+ return -1;
+ }
+ *(int *) optval = tcp_fastopen ? 1 : 0;
+ *optlen = sizeof (int);
+ return 0;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
default:
break;
}
onebyte = true;
break;
+ case TCP_FASTOPEN:
+ onebyte = true;
+ break;
+
default:
break;
}
/* Regression in Vista and later: instead of a 4 byte BOOL value, a
1 byte BOOLEAN value is returned, in contrast to older systems and
the documentation. Since an int type is expected by the calling
- application, we convert the result here. For some reason only three
- BSD-compatible socket options seem to be affected. */
+ application, we convert the result here. */
BOOLEAN *in = (BOOLEAN *) optval;
int *out = (int *) optval;
*out = *in;
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:false,
+ has_tcp_fastopen:false,
},
};
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:false,
+ has_tcp_fastopen:false,
},
};
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:false,
+ has_tcp_fastopen:false,
},
};
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:false,
+ has_tcp_fastopen:false,
},
};
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:false,
+ has_tcp_fastopen:false,
+ },
+};
+
+wincaps wincap_10_1607 __attribute__((section (".cygwin_dll_common"), shared)) = {
+ def_guard_pages:2,
+ mmap_storage_high:0x700000000000LL,
+ {
+ is_server:false,
+ needs_count_in_si_lpres2:false,
+ needs_query_information:false,
+ has_gaa_largeaddress_bug:false,
+ has_broken_alloc_console:true,
+ has_console_logon_sid:true,
+ has_precise_system_time:true,
+ has_microsoft_accounts:true,
+ has_processor_groups:true,
+ has_broken_prefetchvm:true,
+ has_new_pebteb_region:false,
+ has_broken_whoami:false,
+ has_unprivileged_createsymlink:false,
+ has_unbiased_interrupt_time:true,
+ has_precise_interrupt_time:true,
+ has_posix_unlink_semantics:false,
+ has_case_sensitive_dirs:false,
+ has_posix_rename_semantics:false,
+ no_msv1_0_s4u_logon_in_wow64:false,
+ has_con_24bit_colors:false,
+ has_con_broken_csi3j:false,
+ has_con_broken_il_dl:false,
+ has_con_esc_rep:false,
+ has_extended_mem_api:false,
+ has_tcp_fastopen:true,
},
};
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:false,
+ has_tcp_fastopen:true,
},
};
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:false,
+ has_tcp_fastopen:true,
},
};
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:true,
+ has_tcp_fastopen:true,
},
};
has_con_broken_il_dl:false,
has_con_esc_rep:false,
has_extended_mem_api:true,
+ has_tcp_fastopen:true,
},
};
has_con_broken_il_dl:true,
has_con_esc_rep:true,
has_extended_mem_api:true,
+ has_tcp_fastopen:true,
},
};
caps = &wincap_10_1709;
else if (version.dwBuildNumber >= 15063)
caps = &wincap_10_1703;
+ else if (version.dwBuildNumber >= 14393)
+ caps = &wincap_10_1607;
else
caps = & wincap_10_1507;
}