blob: e0dceaef32daccb589de70e62a35dea8a43b216a (
plain) (
blame)
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
|
#include "background.h"
static struct background backgrounds[0]
__table_start ( struct background, background );
static struct background backgrounds_end[0]
__table_end ( struct background, background );
/** @file */
/**
* Call send method of all background protocols
*
* @v timestamp Current time
* @ret None -
* @err None -
*
* This calls each background protocol's background::send() method.
*/
void background_send ( unsigned long timestamp ) {
struct background *background;
for ( background = backgrounds ; background < backgrounds_end ;
background++ ) {
if ( background->send )
background->send ( timestamp );
}
}
/**
* Call process method of all background protocols
*
* @v timestamp Current time
* @v ptype Packet type
* @v ip IP header, if present
* @ret None -
* @err None -
*
* This calls each background protocol's background::process() method.
*/
void background_process ( unsigned long timestamp, unsigned short ptype,
struct iphdr *ip ) {
struct background *background;
for ( background = backgrounds ; background < backgrounds_end ;
background++ ) {
if ( background->process )
background->process ( timestamp, ptype, ip );
}
}
|