1 #include "background.h"
3 static struct background backgrounds
[0]
4 __table_start ( struct background
, background
);
5 static struct background backgrounds_end
[0]
6 __table_end ( struct background
, background
);
11 * Call send method of all background protocols
13 * @v timestamp Current time
17 * This calls each background protocol's background::send() method.
19 void background_send ( unsigned long timestamp
) {
20 struct background
*background
;
22 for ( background
= backgrounds
; background
< backgrounds_end
;
24 if ( background
->send
)
25 background
->send ( timestamp
);
30 * Call process method of all background protocols
32 * @v timestamp Current time
33 * @v ptype Packet type
34 * @v ip IP header, if present
38 * This calls each background protocol's background::process() method.
40 void background_process ( unsigned long timestamp
, unsigned short ptype
,
42 struct background
*background
;
44 for ( background
= backgrounds
; background
< backgrounds_end
;
46 if ( background
->process
)
47 background
->process ( timestamp
, ptype
, ip
);