lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Fri, 9 Nov 2012 10:05:43 -0800
From:	Vincent Li <vincent.mc.li@...il.com>
To:	netdev@...r.kernel.org
Subject: How to compile tcp fast open client app with kernel tfo client
 support ?

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

View attachment "htmlgettfo.c.txt" of type "text/plain" (4179 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ