I am attempting to include /usr/include/netinet/tcp_var.h. When compiling, there are errors thrown. The errors seem to indicate that there is an error with tcp_var.h
Since this file is a system file I am assuming that I am doing something wrong.
I am using gmake.
Attached is the last line which fails.
Does anyone have a hint what might be wrong?
Attached tcp_var.h to make it easier:
It looks as though it fails whenever a function is called. Is this the error? And how would I solve it?
Since this file is a system file I am assuming that I am doing something wrong.
I am using gmake.
Attached is the last line which fails.
Code:
libtool: compile: c++ -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I/usr/local -O2 -pipe \...
-fno-strict-aliasing -MT libboblight_la-tcpsocket.lo -MD -MP -MF .deps/libboblight_la-tcpsocket.Tpo -c util/tcpsocket.cpp -fPIC -DPIC -o .libs/libboblight_la-tcpsocket.o
In file included from util/tcpsocket.cpp:28:
/usr/include/netinet/tcp_var.h:51: error: expected ';' before 'tqe_q'
/usr/include/netinet/tcp_var.h:56: error: expected constructor, destructor, or type conversion before '(' token
/usr/include/netinet/tcp_var.h:67: error: expected ';' before 'scblink'
/usr/include/netinet/tcp_var.h:102: error: field 't_segq' has incomplete type
/usr/include/netinet/tcp_var.h:184: error: 'sackhole_head' has not been declared
/usr/include/netinet/tcp_var.h:184: error: expected ';' before 'snd_holes'
/usr/include/netinet/tcp_var.h:318: error: expected ';' before 'tw_2msl'
Does anyone have a hint what might be wrong?
Attached tcp_var.h to make it easier:
Code:
49 /* TCP segment queue entry */
50 struct tseg_qent {
51 LIST_ENTRY(tseg_qent) tqe_q;
52 int tqe_len; /* TCP segment data length */
53 struct tcphdr *tqe_th; /* a pointer to tcp header */
54 struct mbuf *tqe_m; /* mbuf contains packet */
55 };
56 LIST_HEAD(tsegqe_head, tseg_qent);
57
...
67 TAILQ_ENTRY(sackhole) scblink; /* scoreboard linkage */
...
101 struct tcpcb {
102 struct tsegqe_head t_segq; /* segment reassembly queue */
103 void *t_pspare[2]; /* new reassembly queue */
104 int t_segqlen; /* segment reassembly queue length */
105 int t_dupacks; /* consecutive dup acks recd */
106
...
182 /* SACK related state */
183 int snd_numholes; /* number of holes seen by sender */
184 TAILQ_HEAD(sackhole_head, sackhole) snd_holes;
185 /* SACK scoreboard (sorted) */
...
318 TAILQ_ENTRY(tcptw) tw_2msl;
It looks as though it fails whenever a function is called. Is this the error? And how would I solve it?