Skip to contentSkip to conversation

include netinet/tcp.h or linux/tcp.h in userspace applications?

DISCUSSION Giacomo 1 participant 1 message Jul 28, 2009 netfilter

lore
Share & tools
lore

Giacomo

author
#0 lore raw

Hi to all.

A simple question. Does anybody know what are linux/tcp.h (and friends
- udp.h... ) netinet/tcp.h ... specifically aimed at?
In particular, a userspace application which shares tcp/udp/icmp data structures with the kernel space, which include should include?

I used to include linux/ headers, but since kernel 2.6.30 and kernel-headers 2.6.30 g++ fails complaining

/usr/include/linux/tcp.h:72: error: '__u32 __fswab32(__u32)' cannot appear in a constant-expression /usr/include/linux/tcp.h:72: error: a function call cannot appear in a constant-expression
/usr/include/linux/tcp.h:73: error: '__u32 __fswab32(__u32)' cannot appear in a constant-expression /usr/include/linux/tcp.h:73: error: a function call cannot appear in a constant-expression
....

Thanks for any advice.

Giacomo

Signature · 21 lines
Giacomo S.
http://www.giacomos.it

- - - - - - - - - - - - - - - - - - - - - -

* Aprile 2008: iqfire-wall, un progetto
  open source che implementa un
  filtro di pacchetti di rete per Linux,
  e` disponibile per il download qui:
  http://sourceforge.net/projects/ipfire-wall

* Informazioni e pagina web ufficiale:
  http://www.giacomos.it/iqfire/index.html

- - - - - - - - - - - - - - - - - - - - - -

 . ''  `.
:   :'    :
 `.  ` '
    `- Debian GNU/Linux -- The power of freedom
        http://www.debian.org