Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TCP_* sockopts in ws2ipdef.h (#856) #1007

Open
wants to merge 2 commits into
base: 0.3
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions src/shared/ws2ipdef.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,20 @@ pub const IP_UNBLOCK_SOURCE: c_int = 18;
pub const IP_PKTINFO: c_int = 19;
pub const IP_RECEIVE_BROADCAST: c_int = 22;
pub const IP_RECVDSTADDR: c_int = 25;
pub const IP_IFLIST: c_int = 28;
pub const IP_ADD_IFLIST: c_int = 29;
pub const IP_DEL_IFLIST: c_int = 30;
pub const IP_UNICAST_IF: c_int = 31;
pub const IP_RTHDR: c_int = 32;
pub const IP_GET_IFLIST: c_int = 33;
pub const IP_RECVRTHDR: c_int = 38;
pub const IP_TCLASS: c_int = 39;
pub const IP_RECVTCLASS: c_int = 40;
pub const IP_ORIGINAL_ARRIVAL_IF: c_int = 47;
pub const IP_ECN: c_int = 50;
pub const IP_PKTINFO_EX: c_int = 51;
pub const IP_WFP_REDIRECT_RECORDS: c_int = 60;
pub const IP_WFP_REDIRECT_CONTEXT: c_int = 70;
UNION!{union SOCKADDR_IN6_LH_u {
[u32; 1],
sin6_scope_id sin6_scope_id_mut: ULONG,
Expand Down Expand Up @@ -110,3 +124,17 @@ STRUCT!{struct IN6_PKTINFO {
ipi6_ifindex: ULONG,
}}
pub type PIN6_PKTINFO = *mut IN6_PKTINFO;
pub const TCP_EXPEDITED_1122: c_int = 0x0002;
pub const TCP_KEEPALIVE: c_int = 3;
pub const TCP_MAXSEG: c_int = 4;
pub const TCP_MAXRT: c_int = 5;
pub const TCP_STDURG: c_int = 6;
pub const TCP_NOURG: c_int = 7;
pub const TCP_ATMARK: c_int = 8;
pub const TCP_NOSYNRETRIES: c_int = 9;
pub const TCP_TIMESTAMPS: c_int = 10;
pub const TCP_OFFLOAD_PREFERENCE: c_int = 11;
pub const TCP_CONGESTION_ALGORITHM: c_int = 12;
pub const TCP_DELAY_FIN_ACK: c_int = 13;
pub const TCP_MAXRTMS: c_int = 14;
pub const TCP_FASTOPEN: c_int = 15;