-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgetaddr.h
65 lines (49 loc) · 1.22 KB
/
getaddr.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
* file: getaddr.h
* from Peter Desnoyers, Northeastern University, 2012
*/
struct getaddr;
/*address generator*/
struct getaddr {
int (*getaddr)(void *self);
void (*del)(void *self);
void *private_data;
};
struct seq {
struct getaddr handle;
int next;
};
struct seq *seq_new();
struct uniform {
struct getaddr handle;
int max;
};
struct uniform *uniform_new(int max);
struct mixed {
struct getaddr handle;
struct mixed_private *private_data;
};
struct mixed *mixed_new(void);
void mixed_do_add(struct mixed *self, struct getaddr *g, double p, int base);
void mixed_del(struct mixed *self);
struct trace {
struct getaddr handle;
int eof, single;
struct trace_private *private_data;
};
struct trace *trace_new(char *file);
void trace_del(struct trace *t);
struct log {
struct getaddr handle;
struct log_private *private_data;
};
struct log *log_new(struct getaddr *src, char *file);
void log_close(struct log *l);
struct scramble {
struct getaddr handle;
int eof;
struct scramble_private *private_data;
};
struct scramble *scramble_new(struct getaddr *src, int max);
void scramble_del(struct scramble *self);
int next(struct getaddr *);