… | |
… | |
109 | |
109 | |
110 | pkt_queue (); |
110 | pkt_queue (); |
111 | ~pkt_queue (); |
111 | ~pkt_queue (); |
112 | }; |
112 | }; |
113 | |
113 | |
|
|
114 | enum |
|
|
115 | { |
|
|
116 | FEATURE_COMPRESSION = 0x01, |
|
|
117 | FEATURE_ROHC = 0x02, |
|
|
118 | }; |
|
|
119 | |
114 | struct connection |
120 | struct connection |
115 | { |
121 | { |
116 | conf_node *conf; |
122 | conf_node *conf; |
117 | struct vpn *vpn; |
123 | struct vpn *vpn; |
118 | |
124 | |
… | |
… | |
123 | |
129 | |
124 | u32 oseqno; |
130 | u32 oseqno; |
125 | sliding_window iseqno; |
131 | sliding_window iseqno; |
126 | |
132 | |
127 | u8 protocol; |
133 | u8 protocol; |
|
|
134 | u8 features; |
128 | |
135 | |
129 | pkt_queue data_queue, vpn_queue; |
136 | pkt_queue data_queue, vpn_queue; |
130 | |
137 | |
131 | crypto_ctx *octx, *ictx; |
138 | crypto_ctx *octx, *ictx; |
|
|
139 | |
|
|
140 | #if ENABLE_DNS |
|
|
141 | sockinfo dns_si; // forwarder |
|
|
142 | |
|
|
143 | vector<struct dns_rcv *> dns_rcvpq; int dns_rcvseq; // received packets |
|
|
144 | |
|
|
145 | struct byte_stream *dns_rcvdq; |
|
|
146 | struct byte_stream *dns_snddq; int dns_sndseq; //D |
|
|
147 | |
|
|
148 | void dnsv4_cb (time_watcher &w); time_watcher dnsv4_tw; |
|
|
149 | bool send_dnsv4_packet (vpn_packet *pkt, const sockinfo &si, int tos); |
|
|
150 | void dnsv4_receive_rep (struct dns_rcv *r); |
|
|
151 | #endif |
132 | |
152 | |
133 | enum conf_node::connectmode connectmode; |
153 | enum conf_node::connectmode connectmode; |
134 | u8 prot_minor; // minor number of other side |
154 | u8 prot_minor; // minor number of other side |
135 | |
155 | |
136 | void reset_si (); |
156 | void reset_si (); |
… | |
… | |
162 | const char *script_node_up (); |
182 | const char *script_node_up (); |
163 | const char *script_node_down (); |
183 | const char *script_node_down (); |
164 | |
184 | |
165 | void dump_status (); |
185 | void dump_status (); |
166 | |
186 | |
167 | connection(struct vpn *vpn_); |
187 | connection (struct vpn *vpn, conf_node *conf); |
168 | ~connection (); |
188 | ~connection (); |
169 | }; |
189 | }; |
170 | |
190 | |
171 | #endif |
191 | #endif |
172 | |
192 | |