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.21 by pcg, Sat Dec 1 23:35:31 2007 UTC vs.
Revision 1.24 by pcg, Tue Dec 4 14:55:59 2007 UTC

21 Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 21 Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22*/ 22*/
23 23
24#ifndef UTIL_H__ 24#ifndef UTIL_H__
25#define UTIL_H__ 25#define UTIL_H__
26
27#include <cstring>
26 28
27#include <openssl/rsa.h> 29#include <openssl/rsa.h>
28 30
29#include "gettext.h" 31#include "gettext.h"
30 32
60 62
61extern void id2mac (unsigned int id, void *m); 63extern void id2mac (unsigned int id, void *m);
62 64
63#define mac2id(p) ((p)[0] & 0x01 ? 0 : ((p)[4] << 8) | (p)[5]) 65#define mac2id(p) ((p)[0] & 0x01 ? 0 : ((p)[4] << 8) | (p)[5])
64 66
65struct sliding_window { 67struct sliding_window
68{
66 u32 v[(WINDOWSIZE + 31) / 32]; 69 u32 v[(WINDOWSIZE + 31) / 32];
67 u32 seq; 70 u32 seq;
68 71
69 void reset (u32 seqno) 72 void reset (u32 seqno)
70 { 73 {
109 112
110 return false; 113 return false;
111 } 114 }
112}; 115};
113 116
114typedef callback0<const char *> run_script_cb; 117typedef callback<const char * ()> run_script_cb;
115 118
116// run a shell script (or actually an external program). 119// run a shell script (or actually an external program).
117bool run_script (const run_script_cb &cb, bool wait); 120bool run_script (const run_script_cb &cb, bool wait);
118 121
119#if ENABLE_HTTP_PROXY 122#if ENABLE_HTTP_PROXY

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines