… | |
… | |
30 | |
30 | |
31 | #include "slog.h" |
31 | #include "slog.h" |
32 | #include "ev_cpp.h" |
32 | #include "ev_cpp.h" |
33 | #include "callback.h" |
33 | #include "callback.h" |
34 | |
34 | |
35 | typedef ev::ev_tstamp tstamp; |
35 | typedef ev_tstamp tstamp; |
36 | |
36 | |
37 | /* |
37 | /* |
38 | * check for an existing gvpe for this net, and write pid to pidfile |
38 | * check for an existing gvpe for this net, and write pid to pidfile |
39 | */ |
39 | */ |
40 | extern int write_pidfile (void); |
40 | extern int write_pidfile (void); |
… | |
… | |
60 | |
60 | |
61 | extern void id2mac (unsigned int id, void *m); |
61 | extern void id2mac (unsigned int id, void *m); |
62 | |
62 | |
63 | #define mac2id(p) ((p)[0] & 0x01 ? 0 : ((p)[4] << 8) | (p)[5]) |
63 | #define mac2id(p) ((p)[0] & 0x01 ? 0 : ((p)[4] << 8) | (p)[5]) |
64 | |
64 | |
65 | struct sliding_window { |
65 | struct sliding_window |
|
|
66 | { |
66 | u32 v[(WINDOWSIZE + 31) / 32]; |
67 | u32 v[(WINDOWSIZE + 31) / 32]; |
67 | u32 seq; |
68 | u32 seq; |
68 | |
69 | |
69 | void reset (u32 seqno) |
70 | void reset (u32 seqno) |
70 | { |
71 | { |