Skip to content
/ mptcp Public
forked from doru91/mptcp

MPTCP-Capable Linux Kernel with subflow events for poll

License

Notifications You must be signed in to change notification settings

scrye/mptcp

 
 

Repository files navigation

Fork of the MPTCP-capable Linux kernel with subflow events for poll.

Example

Demo code using this kernel: https://github.com/scrye/smc.

API Description

Applications can set a threshold number of subflows, and block in poll while waiting for those subflows to be fully established.

Set the threshold for number of established subflows:

int threshold = 2;
setsockopt(sockfd, IPPROTO_TCP, MPTCP_SET_SUB_EST_THRESHOLD, &threshold, size);

Get the threshold for number of established subflows:

int threshold;
getsockopt(sockfd, IPPROTO_TCP, MPTCP_GET_SUB_EST_THRESHOLD, &threshold, &size);

Get the number of established subflows:

int established;
getsockopt(sockfd, IPPROTO_TCP, MPTCP_GET_SUB_EST_COUNT, &established, &size);

After setting a threshold, poll can also wait until the threshold number of subflows is established:

struct pollfd fds[1];
memset(fds, 0, sizeof(struct pollfd));
fds[0].fd = sockfd;
fds[0].events |= POLLCONN;
poll(fds, 1, -1);

About

MPTCP-Capable Linux Kernel with subflow events for poll

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 95.7%
  • Assembly 2.0%
  • C++ 1.3%
  • Objective-C 0.4%
  • Makefile 0.3%
  • Perl 0.1%
  • Other 0.2%