1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 2<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> 3<title>uIP 1.0: apps/telnetd/shell.h File Reference</title> 4<link href="doxygen.css" rel="stylesheet" type="text/css"> 5<link href="tabs.css" rel="stylesheet" type="text/css"> 6</head><body> 7<!-- Generated by Doxygen 1.4.6 --> 8<div class="tabs"> 9 <ul> 10 <li><a href="main.html"><span>Main Page</span></a></li> 11 <li><a href="modules.html"><span>Modules</span></a></li> 12 <li><a href="classes.html"><span>Data Structures</span></a></li> 13 <li id="current"><a href="files.html"><span>Files</span></a></li> 14 <li><a href="examples.html"><span>Examples</span></a></li> 15 </ul></div> 16<div class="tabs"> 17 <ul> 18 <li><a href="files.html"><span>File List</span></a></li> 19 <li><a href="globals.html"><span>Globals</span></a></li> 20 </ul></div> 21<h1>apps/telnetd/shell.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2> 22Interface for the Contiki shell. 23<p> 24<dl compact><dt><b>Author:</b></dt><dd>Adam Dunkels <<a href="mailto:[email protected]">[email protected]</a>></dd></dl> 25Some of the functions declared in this file must be implemented as a shell back-end in the architecture specific files of a Contiki port. 26<p> 27Definition in file <a class="el" href="a00177.html">shell.h</a>. 28<p> 29 30<p> 31<a href="a00177.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0"> 32<tr><td></td></tr> 33<tr><td colspan="2"><br><h2>Functions</h2></td></tr> 34<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#69b075ef7e4d7bcf5a903d3d75baac02">shell_init</a> (void)</td></tr> 35 36<tr><td class="mdescLeft"> </td><td class="mdescRight">Initialize the shell. <a href="#69b075ef7e4d7bcf5a903d3d75baac02"></a><br></td></tr> 37<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#d1f18f739da7703628c3663209463a0d">shell_start</a> (void)</td></tr> 38 39<tr><td class="mdescLeft"> </td><td class="mdescRight">Start the shell back-end. <a href="#d1f18f739da7703628c3663209463a0d"></a><br></td></tr> 40<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#86beee1f69d05b16022dfb430470e9ce">shell_input</a> (char *command)</td></tr> 41 42<tr><td class="mdescLeft"> </td><td class="mdescRight">Process a shell command. <a href="#86beee1f69d05b16022dfb430470e9ce"></a><br></td></tr> 43<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="984c4a8b65a3cb35460b073a40568c25"></a><!-- doxytag: member="shell.h::shell_quit" ref="984c4a8b65a3cb35460b073a40568c25" args="(char *)" --> 44void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#984c4a8b65a3cb35460b073a40568c25">shell_quit</a> (char *)</td></tr> 45 46<tr><td class="mdescLeft"> </td><td class="mdescRight">Quit the shell. <br></td></tr> 47<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#f11c966b0e4f4ecaa73deb14bfb6830f">shell_output</a> (char *str1, char *str2)</td></tr> 48 49<tr><td class="mdescLeft"> </td><td class="mdescRight">Print a string to the shell window. <a href="#f11c966b0e4f4ecaa73deb14bfb6830f"></a><br></td></tr> 50<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="a00107.html#123c95a7bb55143cabba92446ce8f513">shell_prompt</a> (char *prompt)</td></tr> 51 52<tr><td class="mdescLeft"> </td><td class="mdescRight">Print a prompt to the shell window. <a href="#123c95a7bb55143cabba92446ce8f513"></a><br></td></tr> 53</table> 54<hr><h2>Function Documentation</h2> 55<a class="anchor" name="69b075ef7e4d7bcf5a903d3d75baac02"></a><!-- doxytag: member="shell.h::shell_init" ref="69b075ef7e4d7bcf5a903d3d75baac02" args="(void)" --><p> 56<table class="mdTable" cellpadding="2" cellspacing="0"> 57 <tr> 58 <td class="mdRow"> 59 <table cellpadding="0" cellspacing="0" border="0"> 60 <tr> 61 <td class="md" nowrap valign="top">void shell_init </td> 62 <td class="md" valign="top">( </td> 63 <td class="md" nowrap valign="top">void </td> 64 <td class="mdname1" valign="top" nowrap> </td> 65 <td class="md" valign="top"> ) </td> 66 <td class="md" nowrap></td> 67 </tr> 68 </table> 69 </td> 70 </tr> 71</table> 72<table cellspacing="5" cellpadding="0" border="0"> 73 <tr> 74 <td> 75 76 </td> 77 <td> 78 79<p> 80Initialize the shell. 81<p> 82Called when the shell front-end process starts. This function may be used to start listening for signals. <dl compact><dt><b>Examples: </b></dt><dd> 83<a class="el" href="a00044.html#a221">telnetd.c</a>.</dl> 84<p> 85Definition at line <a class="el" href="a00176.html#l00105">105</a> of file <a class="el" href="a00176.html">shell.c</a>. 86<p> 87References <a class="el" href="a00176.html#l00105">shell_init()</a>. 88<p> 89Referenced by <a class="el" href="a00176.html#l00105">shell_init()</a>. </td> 90 </tr> 91</table> 92<a class="anchor" name="86beee1f69d05b16022dfb430470e9ce"></a><!-- doxytag: member="shell.h::shell_input" ref="86beee1f69d05b16022dfb430470e9ce" args="(char *command)" --><p> 93<table class="mdTable" cellpadding="2" cellspacing="0"> 94 <tr> 95 <td class="mdRow"> 96 <table cellpadding="0" cellspacing="0" border="0"> 97 <tr> 98 <td class="md" nowrap valign="top">void shell_input </td> 99 <td class="md" valign="top">( </td> 100 <td class="md" nowrap valign="top">char * </td> 101 <td class="mdname1" valign="top" nowrap> <em>command</em> </td> 102 <td class="md" valign="top"> ) </td> 103 <td class="md" nowrap></td> 104 </tr> 105 </table> 106 </td> 107 </tr> 108</table> 109<table cellspacing="5" cellpadding="0" border="0"> 110 <tr> 111 <td> 112 113 </td> 114 <td> 115 116<p> 117Process a shell command. 118<p> 119This function will be called by the shell GUI / telnet server whan a command has been entered that should be processed by the shell back-end.<p> 120<dl compact><dt><b>Parameters:</b></dt><dd> 121 <table border="0" cellspacing="2" cellpadding="0"> 122 <tr><td valign="top"></td><td valign="top"><em>command</em> </td><td>The command to be processed. </td></tr> 123 </table> 124</dl> 125<dl compact><dt><b>Examples: </b></dt><dd> 126<a class="el" href="a00044.html#a229">telnetd.c</a>.</dl> 127<p> 128Definition at line <a class="el" href="a00176.html#l00118">118</a> of file <a class="el" href="a00176.html">shell.c</a>. 129<p> 130References <a class="el" href="a00176.html#l00118">shell_input()</a>. 131<p> 132Referenced by <a class="el" href="a00176.html#l00118">shell_input()</a>. </td> 133 </tr> 134</table> 135<a class="anchor" name="f11c966b0e4f4ecaa73deb14bfb6830f"></a><!-- doxytag: member="shell.h::shell_output" ref="f11c966b0e4f4ecaa73deb14bfb6830f" args="(char *str1, char *str2)" --><p> 136<table class="mdTable" cellpadding="2" cellspacing="0"> 137 <tr> 138 <td class="mdRow"> 139 <table cellpadding="0" cellspacing="0" border="0"> 140 <tr> 141 <td class="md" nowrap valign="top">void shell_output </td> 142 <td class="md" valign="top">( </td> 143 <td class="md" nowrap valign="top">char * </td> 144 <td class="mdname" nowrap> <em>str1</em>, </td> 145 </tr> 146 <tr> 147 <td class="md" nowrap align="right"></td> 148 <td class="md"></td> 149 <td class="md" nowrap>char * </td> 150 <td class="mdname" nowrap> <em>str2</em></td> 151 </tr> 152 <tr> 153 <td class="md"></td> 154 <td class="md">) </td> 155 <td class="md" colspan="2"></td> 156 </tr> 157 </table> 158 </td> 159 </tr> 160</table> 161<table cellspacing="5" cellpadding="0" border="0"> 162 <tr> 163 <td> 164 165 </td> 166 <td> 167 168<p> 169Print a string to the shell window. 170<p> 171This function is implemented by the shell GUI / telnet server and can be called by the shell back-end to output a string in the shell window. The string is automatically appended with a linebreak.<p> 172<dl compact><dt><b>Parameters:</b></dt><dd> 173 <table border="0" cellspacing="2" cellpadding="0"> 174 <tr><td valign="top"></td><td valign="top"><em>str1</em> </td><td>The first half of the string to be output. </td></tr> 175 <tr><td valign="top"></td><td valign="top"><em>str2</em> </td><td>The second half of the string to be output. </td></tr> 176 </table> 177</dl> 178<dl compact><dt><b>Examples: </b></dt><dd> 179<a class="el" href="a00044.html#a215">telnetd.c</a>.</dl> 180<p> 181Definition at line <a class="el" href="a00178.html#l00113">113</a> of file <a class="el" href="a00178.html">telnetd.c</a>. 182<p> 183References <a class="el" href="a00174.html#l00071">ISO_cr</a>, <a class="el" href="a00174.html#l00070">ISO_nl</a>, and <a class="el" href="a00172.html#l00069">NULL</a>. </td> 184 </tr> 185</table> 186<a class="anchor" name="123c95a7bb55143cabba92446ce8f513"></a><!-- doxytag: member="shell.h::shell_prompt" ref="123c95a7bb55143cabba92446ce8f513" args="(char *prompt)" --><p> 187<table class="mdTable" cellpadding="2" cellspacing="0"> 188 <tr> 189 <td class="mdRow"> 190 <table cellpadding="0" cellspacing="0" border="0"> 191 <tr> 192 <td class="md" nowrap valign="top">void shell_prompt </td> 193 <td class="md" valign="top">( </td> 194 <td class="md" nowrap valign="top">char * </td> 195 <td class="mdname1" valign="top" nowrap> <em>prompt</em> </td> 196 <td class="md" valign="top"> ) </td> 197 <td class="md" nowrap></td> 198 </tr> 199 </table> 200 </td> 201 </tr> 202</table> 203<table cellspacing="5" cellpadding="0" border="0"> 204 <tr> 205 <td> 206 207 </td> 208 <td> 209 210<p> 211Print a prompt to the shell window. 212<p> 213This function can be used by the shell back-end to print out a prompt to the shell window.<p> 214<dl compact><dt><b>Parameters:</b></dt><dd> 215 <table border="0" cellspacing="2" cellpadding="0"> 216 <tr><td valign="top"></td><td valign="top"><em>prompt</em> </td><td>The prompt to be printed. </td></tr> 217 </table> 218</dl> 219<dl compact><dt><b>Examples: </b></dt><dd> 220<a class="el" href="a00044.html#a214">telnetd.c</a>.</dl> 221<p> 222Definition at line <a class="el" href="a00178.html#l00101">101</a> of file <a class="el" href="a00178.html">telnetd.c</a>. 223<p> 224References <a class="el" href="a00172.html#l00069">NULL</a>. </td> 225 </tr> 226</table> 227<a class="anchor" name="d1f18f739da7703628c3663209463a0d"></a><!-- doxytag: member="shell.h::shell_start" ref="d1f18f739da7703628c3663209463a0d" args="(void)" --><p> 228<table class="mdTable" cellpadding="2" cellspacing="0"> 229 <tr> 230 <td class="mdRow"> 231 <table cellpadding="0" cellspacing="0" border="0"> 232 <tr> 233 <td class="md" nowrap valign="top">void shell_start </td> 234 <td class="md" valign="top">( </td> 235 <td class="md" nowrap valign="top">void </td> 236 <td class="mdname1" valign="top" nowrap> </td> 237 <td class="md" valign="top"> ) </td> 238 <td class="md" nowrap></td> 239 </tr> 240 </table> 241 </td> 242 </tr> 243</table> 244<table cellspacing="5" cellpadding="0" border="0"> 245 <tr> 246 <td> 247 248 </td> 249 <td> 250 251<p> 252Start the shell back-end. 253<p> 254Called by the front-end when a new shell is started. <dl compact><dt><b>Examples: </b></dt><dd> 255<a class="el" href="a00044.html#a233">telnetd.c</a>.</dl> 256<p> 257Definition at line <a class="el" href="a00176.html#l00110">110</a> of file <a class="el" href="a00176.html">shell.c</a>. 258<p> 259References <a class="el" href="a00176.html#l00110">shell_start()</a>. 260<p> 261Referenced by <a class="el" href="a00176.html#l00110">shell_start()</a>. </td> 262 </tr> 263</table> 264<hr size="1"><address style="align: right;"><small>Generated on Mon Jun 12 10:23:01 2006 for uIP 1.0 by 265<a href="http://www.doxygen.org/index.html"> 266<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.6 </small></address> 267</body> 268</html> 269