/[gentoo]/xml/htdocs/doc/en/handbook/hb-net-functions.xml
Gentoo

Diff of /xml/htdocs/doc/en/handbook/hb-net-functions.xml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.6 Revision 1.7
2<!DOCTYPE sections SYSTEM "/dtd/book.dtd"> 2<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
3 3
4<!-- The content of this document is licensed under the CC-BY-SA license --> 4<!-- The content of this document is licensed under the CC-BY-SA license -->
5<!-- See http://creativecommons.org/licenses/by-sa/2.5 --> 5<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
6 6
7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-functions.xml,v 1.6 2005/12/21 13:27:46 jkt Exp $ --> 7<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/hb-net-functions.xml,v 1.7 2005/12/22 19:55:49 jkt Exp $ -->
8 8
9<sections> 9<sections>
10 10
11<version>1.1</version> 11<version>1.2</version>
12<date>2005-06-14</date> 12<date>2005-12-22</date>
13 13
14<section> 14<section>
15<title>Standard function hooks</title> 15<title>Standard function hooks</title>
16<body> 16<body>
17 17
18<p> 18<p>
19Four functions can be defined which will be called surrounding the start/stop 19Four functions can be defined which will be called surrounding the
20operations. The functions are called with the interface name first so that one 20<c>start</c>/<c>stop</c> operations. The functions are called with the
21function can control multiple adapters. 21interface name first so that one function can control multiple adapters.
22</p> 22</p>
23 23
24<p> 24<p>
25The return values for the preup and predown functions should be 0 (success) to 25The return values for the <c>preup()</c> and <c>predown()</c> functions should
26indicate that configuration or deconfiguration of the interface can continue. 26be 0 (success) to indicate that configuration or deconfiguration of the
27If preup returns a non-zero value, then interface configuration will be aborted. 27interface can continue. If <c>preup()</c> returns a non-zero value, then
28If predown returns a non-zero value, then the interface will not be allowed to 28interface configuration will be aborted. If <c>predown()</c> returns a non-zero
29continue deconfiguration. 29value, then the interface will not be allowed to continue deconfiguration.
30</p> 30</p>
31 31
32<p> 32<p>
33The return values for the postup and postdown functions are ignored since 33The return values for the <c>postup()</c> and <c>postdown()</c> functions are
34there's nothing to do if they indicate failure. 34ignored since there's nothing to do if they indicate failure.
35</p> 35</p>
36 36
37<p> 37<p>
38<c>${IFACE}</c> is set to the interface being brought up/down. <c>${IFVAR}</c> 38<c>${IFACE}</c> is set to the interface being brought up/down. <c>${IFVAR}</c>
39is <c>${IFACE}</c> converted to variable name bash allows. 39is <c>${IFACE}</c> converted to variable name bash allows.
95<title>Wireless Tools function hooks</title> 95<title>Wireless Tools function hooks</title>
96<body> 96<body>
97 97
98<note> 98<note>
99This will not work with WPA Supplicant - but the <c>${ESSID}</c> and 99This will not work with WPA Supplicant - but the <c>${ESSID}</c> and
100<c>${ESSIDVAR}</c> variables are available in the postup() function. 100<c>${ESSIDVAR}</c> variables are available in the <c>postup()</c> function.
101</note> 101</note>
102 102
103<p> 103<p>
104Two functions can be defined which will be called surrounding the associate 104Two functions can be defined which will be called surrounding the associate
105function. The functions are called with the interface name first so that one 105function. The functions are called with the interface name first so that one
106function can control multiple adapters. 106function can control multiple adapters.
107</p> 107</p>
108 108
109<p> 109<p>
110The return values for the preassociate function should be 0 (success) to 110The return values for the <c>preassociate()</c> function should be 0 (success)
111indicate that configuration or deconfiguration of the interface can continue. 111to indicate that configuration or deconfiguration of the interface can continue.
112If preassociate returns a non-zero value, then interface configuration will be 112If <c>preassociate()</c> returns a non-zero value, then interface configuration
113aborted. 113will be aborted.
114</p> 114</p>
115 115
116<p> 116<p>
117The return value for the postassociate function is ignored since there's nothing 117The return value for the <c>postassociate()</c> function is ignored since
118to do if it indicates failure. 118there's nothing to do if it indicates failure.
119</p> 119</p>
120 120
121<p> 121<p>
122<c>${ESSID}</c> is set to the exact ESSID of the AP you're connecting to. 122<c>${ESSID}</c> is set to the exact ESSID of the AP you're connecting to.
123<c>${ESSIDVAR}</c> is <c>${ESSID}</c> converted to variable name bash allows. 123<c>${ESSIDVAR}</c> is <c>${ESSID}</c> converted to variable name bash allows.
155 return 0 155 return 0
156} 156}
157</pre> 157</pre>
158 158
159<note> 159<note>
160<c>${ESSID}</c> and <c>${ESSIDVAR}</c> are unavailable in predown() and 160<c>${ESSID}</c> and <c>${ESSIDVAR}</c> are unavailable in <c>predown()</c> and
161postdown() functions. 161<c>postdown()</c> functions.
162</note> 162</note>
163 163
164</body> 164</body>
165</section> 165</section>
166 166

Legend:
Removed from v.1.6  
changed lines
  Added in v.1.7

  ViewVC Help
Powered by ViewVC 1.1.20