blob: ad9fd1fc4ea6ee3ba7bf46c91c29f8d515df8c7e (
plain)
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
|
#include "ppp.h"
static LIST_HEAD(notified_list);
void __export ppp_register_notified(struct ppp_notified_t *n)
{
list_add_tail(&n->entry, ¬ified_list);
}
void __export ppp_unregister_notified(struct ppp_notified_t *n)
{
list_del(&n->entry);
}
void ppp_notify_starting(struct ppp_t *ppp)
{
struct ppp_notified_t *n;
list_for_each_entry(n, ¬ified_list, entry) {
if (n->starting)
n->starting(n, ppp);
}
}
void ppp_notify_started(struct ppp_t *ppp)
{
struct ppp_notified_t *n;
list_for_each_entry(n, ¬ified_list, entry) {
if (n->started)
n->started(n, ppp);
}
}
void ppp_notify_finished(struct ppp_t *ppp)
{
struct ppp_notified_t *n;
list_for_each_entry(n, ¬ified_list, entry) {
if (n->finished)
n->finished(n, ppp);
}
}
void ppp_notify_finishing(struct ppp_t *ppp)
{
struct ppp_notified_t *n;
list_for_each_entry(n, ¬ified_list, entry) {
if (n->finishing)
n->finishing(n, ppp);
}
}
|