ch06s05.html 3.0 KB

123456789101112131415161718
  1. <html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><title>Random Device Identity</title><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><meta name="keywords" content="Intellon, Atheros, Qualcomm, HomePlug, powerline, communications, INT6000, INT6300, INT6400, AR7400, AR7420"><link rel="home" href="index.html" title="Qualcomm Atheros Open Powerline Toolkit"><link rel="up" href="ch06.html" title="Chapter 6.  Scripting"><link rel="prev" href="ch06s04.html" title="Checking Device Connection"><link rel="next" href="ch06s06.html" title="Actual Device Identity"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">
  2. Random Device Identity
  3. </th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch06s04.html">Prev</a> </td><th width="60%" align="center">Chapter 6. 
  4. Scripting
  5. </th><td width="20%" align="right"> <a accesskey="n" href="ch06s06.html">Next</a></td></tr></table><hr></div><div class="section" title="Random Device Identity"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="scripting-random-identity"></a>
  6. Random Device Identity
  7. </h2></div></div></div><p>
  8. Some Atheros scripts need random <acronym class="acronym">MAC</acronym>, <acronym class="acronym">DAK</acronym> or <acronym class="acronym">NMK</acronym> strings as arguments to Toolkit programs. Program <a class="ulink" href="rkey.7.html" target="_top">rkey</a> can be used for this purpose. We demonstrate one way to define symbols here and demonstrate how to use symbols later on.
  9. </p><pre class="programlisting">
  10. DAK=$(rkey secret.key -D)
  11. NMK=$(rkey secret.key -M)
  12. </pre><p>
  13. The first statement, above, uses program <a class="ulink" href="rkey.7.html" target="_top">rkey</a> to read file <code class="filename">secret.key</code> and compute a random <acronym class="acronym">DAK</acronym> (<strong class="userinput"><code>-D</code></strong>). The ouput string is assigned to symbol <acronym class="acronym">DAK</acronym>. The second statement uses program <a class="ulink" href="rkey.7.html" target="_top">rkey</a> to read the file <code class="filename">secret.key</code> and compute a random <acronym class="acronym">NMK</acronym> (<strong class="userinput"><code>-M</code></strong>). The output is assigned to symbol <acronym class="acronym">NMK</acronym>.
  14. </p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch06s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch06.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch06s06.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">
  15. Checking Device Connection
  16.  </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 
  17. Actual Device Identity
  18. </td></tr></table></div></body></html>