/
ppp.xml
145 lines (129 loc) · 4.57 KB
/
ppp.xml
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!--
-- PPP Service definition
-->
<service name="ppp" interface="org.opensuse.Network.PPP" object-class="netif-ppp">
<!-- This is the linkinfo returned in interface reports -->
<define name="linkinfo" class="dict">
<!-- Maximum Receive Unit -->
<mru type="uint32"/>
<!-- user name and password. If the <auth> element is present, it must
-- have <user> and <password> children.
-- If these elements are absent, the wicked client will prompt for
-- them.
-- If you do not need to authenticate (eg when using a GSM usb stick)
-- omit the <auth> element completely.
-->
<auth class="dict">
<protocol type="uint32" constraint="enum">
<pap value="0"/>
<chap value="1"/>
<ms-chap value="2"/>
<ms-chapv2 value="3"/>
<eap value="4"/>
</protocol>
<hostname type="string"/>
<user type="string" constraint="required">
<meta:user-input type="user" prompt="Please enter ppp user name"/>
</user>
<password type="string" constraint="required">
<meta:user-input type="password" prompt="Please enter ppp password"/>
</password>
</auth>
<!-- The number to dial -->
<number type="string"/>
<!-- disconnect after n seconds of link idle -->
<idle-timeout type="uint32"/>
</define>
<!-- Override the linkUp method of the netif base interface.
-- This will start a ppp daemon process for this device.
--
-- For now, we ignore any and all of the usual link parameters,
-- and let the ppp daemon handle all that stuff.
-->
<method name="linkUp">
<arguments>
<request type="interface:link-request">
<meta:mapping document-node="/link" />
</request>
</arguments>
<return>
<interface:callback-info/>
</return>
</method>
<!-- Override the linkDown method of the netif base interface.
-- This will shut down the ppp daemon process and wait for
-- it to exit.
-->
<method name="linkDown">
<return>
<interface:callback-info/>
</return>
</method>
<method name="deleteDevice">
<!-- no arguments, no return code -->
</method>
</service>
<!--
Factory service for PPP over serial devices.
The link configuration is expected to be contained in the <ppp>
element. It inherits all properties from the base PPP linkinfo, and adds
a <device> element that references a modem device.
-->
<service name="ppp-serial-factory" interface="org.opensuse.Network.PPP.Factory" object-class="netif-list">
<define name="ppp-serial-linkinfo" class="dict" extends="ppp:linkinfo">
<!-- The modem device. We need to subclass for ppp over ethernet,
-- since this will reference an ethernet device instead of a modem.
-->
<device type="string" constraint="required">
<meta:modem-reference shared="false"/>
<meta:require check="netif-check-state" op="newDevice" min-state="device-up" />
<meta:require check="netif-check-state" op="linkUp" min-state="link-up"/>
</device>
</define>
<!-- "Create" ppp device.
-- This will create a pppX device and a ppp config file.
-- The config file isn't used until the client invokes the linkUp method.
-->
<method name="newDevice">
<arguments>
<name type="string"/>
<config type="ppp-serial-linkinfo">
<meta:mapping document-node="/ppp"/>
</config>
</arguments>
<return>
<string/> <!-- this is really an object handle -->
</return>
</method>
</service>
<!--
Define the PPP over Ethernet device
The link configuration is expected to be contained in the <pppoe>
element. It inherits all properties from the base PPP linkinfo, and adds
a <device> element that references an Ethernet device.
-->
<service name="pppoe-factory" interface="org.opensuse.Network.PPPoE.Factory" object-class="netif-list">
<define name="pppoe-linkinfo" class="dict" extends="ppp:linkinfo">
<device type="string">
<meta:netif-reference shared="true" object-class="netif-ethernet"/>
<meta:require check="netif-check-state" op="newDevice" min-state="device-up" />
<meta:require check="netif-check-state" op="login" min-state="link-authenticated" />
<meta:require check="netif-check-state" op="linkUp" min-state="link-up" />
</device>
</define>
<!-- "Create" ppp device.
-- This will create a pppX device and a ppp config file.
-- The config file isn't used until the client invokes the linkUp method.
-->
<method name="newDevice">
<arguments>
<name type="string"/>
<config type="pppoe-linkinfo">
<meta:mapping document-node="/pppoe"/>
</config>
</arguments>
<return>
<string/> <!-- this is really an object handle -->
</return>
</method>
</service>