Hi,
this is sort of off toptic, sorry for the noise.
I am running ubuntu 10.0.4 with kernel 3.6.0 with tfo client support,
then I have simple client code that i want to use to test tcp fast
open, here is part of the code:
int sent = 0;
while(sent < strlen(get))
{
tmpres = sendto(sock, get+sent, strlen(get)-sent, MSG_FASTOPEN,
(struct sockaddr *)remote, sizeof(struct sockaddr));
if(tmpres == -1){
perror("Can't send query");
exit(1);
}
sent += tmpres;
}
when i compile it, as gcc -o htmlgettfo htmlgettfo.c, I got:
htmlgettfo.c: In function 'get_page_thread':
htmlgettfo.c:109: error: 'MSG_FASTOPEN' undeclared (first use in this function)
htmlgettfo.c:109: error: (Each undeclared identifier is reported only once
htmlgettfo.c:109: error: for each function it appears in.)
I have the 3.6.0 kernel header file package installed
/usr/src/linux-headers-3.6.0-custom, the user space include file
/usr/include/linux is original one coming with 10.0.4 distro kernel
I am suspecting I don't have proper linux header file that has
MSG_FASTOPEN declared in user space. can anyone shed a light on how to
get MSG_FASTOPEN supported and compiled in client code properly?
I am attempting to use the test client code to test one of our load
balancer and see how it responds.
I attached my test code
Thanks
Vincent