ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/gvpe/src/util.h
(Generate patch)

Comparing gvpe/src/util.h (file contents):
Revision 1.20 by pcg, Sat Nov 10 05:14:22 2007 UTC vs.
Revision 1.23 by pcg, Sun Dec 2 00:54:52 2007 UTC

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
35typedef ev::ev_tstamp tstamp; 35typedef 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 */
40extern int write_pidfile (void); 40extern int write_pidfile (void);
60 60
61extern void id2mac (unsigned int id, void *m); 61extern 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
65struct sliding_window { 65struct 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 {
109 110
110 return false; 111 return false;
111 } 112 }
112}; 113};
113 114
114typedef callback0<const char *> run_script_cb; 115typedef callback<const char * ()> run_script_cb;
115 116
116// run a shell script (or actually an external program). 117// run a shell script (or actually an external program).
117bool run_script (const run_script_cb &cb, bool wait); 118bool run_script (const run_script_cb &cb, bool wait);
118 119
119#if ENABLE_HTTP_PROXY 120#if ENABLE_HTTP_PROXY

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines