Lines 39-46
Link Here
|
39 |
|
39 |
|
40 |
#include "preprocessors/spp_frag3.h" |
40 |
#include "preprocessors/spp_frag3.h" |
41 |
|
41 |
|
42 |
#ifdef ACTIVE_RESPONSE |
|
|
43 |
#include "encode.h" |
42 |
#include "encode.h" |
|
|
43 |
|
44 |
#ifdef ACTIVE_RESPONSE |
44 |
#include "sfdaq.h" |
45 |
#include "sfdaq.h" |
45 |
#endif |
46 |
#endif |
46 |
|
47 |
|
Lines 196-204
int Active_Term (void)
Link Here
|
196 |
} |
197 |
} |
197 |
|
198 |
|
198 |
int Active_IsEnabled (void) { return s_enabled; } |
199 |
int Active_IsEnabled (void) { return s_enabled; } |
|
|
200 |
#endif // ACTIVE_RESPONSE |
199 |
|
201 |
|
|
|
202 |
#ifdef ACTIVE_RESPONSE |
200 |
void Active_SetEnabled (int on_off) { s_enabled = on_off; } |
203 |
void Active_SetEnabled (int on_off) { s_enabled = on_off; } |
|
|
204 |
#else |
205 |
void Active_SetEnabled (int on_off) { } |
206 |
#endif // ACTIVE_RESPONSE |
201 |
|
207 |
|
|
|
208 |
#ifdef ACTIVE_RESPONSE |
202 |
static inline uint32_t GetFlags (void) |
209 |
static inline uint32_t GetFlags (void) |
203 |
{ |
210 |
{ |
204 |
uint32_t flags = ENC_FLAG_ID; |
211 |
uint32_t flags = ENC_FLAG_ID; |
Lines 244-253
void Active_SendUnreach(Packet* p, Encod
Link Here
|
244 |
|
251 |
|
245 |
s_send(p->pkth, 1, rej, len); |
252 |
s_send(p->pkth, 1, rej, len); |
246 |
} |
253 |
} |
|
|
254 |
#endif // ACTIVE_RESPONSE |
247 |
|
255 |
|
248 |
void Active_SendData ( |
256 |
void Active_SendData ( |
249 |
Packet* p, EncodeFlags flags, const uint8_t* buf, uint32_t blen) |
257 |
Packet* p, EncodeFlags flags, const uint8_t* buf, uint32_t blen) |
250 |
{ |
258 |
{ |
|
|
259 |
#ifdef ACTIVE_RESPONSE |
251 |
int i; |
260 |
int i; |
252 |
flags |= GetFlags(); |
261 |
flags |= GetFlags(); |
253 |
|
262 |
|
Lines 264-271
void Active_SendData (
Link Here
|
264 |
if ( !seg ) return; |
273 |
if ( !seg ) return; |
265 |
s_send(p->pkth, !(flags & ENC_FLAG_FWD), seg, plen); |
274 |
s_send(p->pkth, !(flags & ENC_FLAG_FWD), seg, plen); |
266 |
} |
275 |
} |
|
|
276 |
#endif // ACTIVE_RESPONSE |
267 |
} |
277 |
} |
268 |
|
278 |
|
|
|
279 |
#ifdef ACTIVE_RESPONSE |
269 |
//-------------------------------------------------------------------- |
280 |
//-------------------------------------------------------------------- |
270 |
|
281 |
|
271 |
int Active_IsRSTCandidate(const Packet* p) |
282 |
int Active_IsRSTCandidate(const Packet* p) |