DocBook police: open and close tags for <screen> should cuddle up to

the contents within.
This commit is contained in:
Dima Dorfman 2001-07-06 13:03:06 +00:00
parent f7eeb4d33c
commit 4a5e851cb2
Notes: svn2git 2020-12-08 03:00:23 +00:00
svn path=/head/; revision=9803
25 changed files with 257 additions and 520 deletions

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/articles/dialup-firewall/article.sgml,v 1.8 2001/06/24 21:01:53 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/articles/dialup-firewall/article.sgml,v 1.9 2001/07/06 12:50:08 dd Exp $
--> -->
<!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ <!DOCTYPE article PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
@ -24,7 +24,7 @@
</author> </author>
</authorgroup> </authorgroup>
<pubdate>$Date: 2001-07-06 12:50:08 $</pubdate> <pubdate>$Date: 2001-07-06 13:02:48 $</pubdate>
<abstract> <abstract>
<para>This article documents how to setup a firewall using a PPP <para>This article documents how to setup a firewall using a PPP
@ -319,8 +319,7 @@ $fwcmd add 65435 deny log ip from any to any</programlisting>
below. The original ruleset is backed up as below. The original ruleset is backed up as
<filename>fwrules_tun0</filename>.</para> <filename>fwrules_tun0</filename>.</para>
<screen> <screen> &prompt.user; <userinput>cd /etc/firewall</userinput>
&prompt.user; <userinput>cd /etc/firewall</userinput>
/etc/firewall&prompt.user; <userinput>su</userinput> /etc/firewall&prompt.user; <userinput>su</userinput>
<prompt>Password:</prompt> <prompt>Password:</prompt>
/etc/firewall&prompt.root; <userinput>mv fwrules fwrules_tun0</userinput> /etc/firewall&prompt.root; <userinput>mv fwrules fwrules_tun0</userinput>
@ -332,8 +331,7 @@ $fwcmd add 65435 deny log ip from any to any</programlisting>
connection is up. E.g., for a connection made with &man.pppd.8; you connection is up. E.g., for a connection made with &man.pppd.8; you
would see something like this (showing only the relevant lines):</para> would see something like this (showing only the relevant lines):</para>
<screen> <screen> &prompt.user; <userinput>ifconfig</userinput>
&prompt.user; <userinput>ifconfig</userinput>
<emphasis>(skipped...)</emphasis> <emphasis>(skipped...)</emphasis>
ppp0: flags=<replaceable>8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 1524</replaceable> ppp0: flags=<replaceable>8051&lt;UP,POINTOPOINT,RUNNING,MULTICAST&gt; mtu 1524</replaceable>
inet <replaceable>xxx.xxx.xxx.xxx</replaceable> --&gt; <replaceable>xxx.xxx.xxx.xxx</replaceable> netmask <replaceable>0xff000000</replaceable> inet <replaceable>xxx.xxx.xxx.xxx</replaceable> --&gt; <replaceable>xxx.xxx.xxx.xxx</replaceable> netmask <replaceable>0xff000000</replaceable>
@ -344,8 +342,7 @@ $fwcmd add 65435 deny log ip from any to any</programlisting>
(<emphasis>user-ppp</emphasis>) you should see something similar to (<emphasis>user-ppp</emphasis>) you should see something similar to
this:</para> this:</para>
<screen> <screen> &prompt.user; <userinput>ifconfig</userinput>
&prompt.user; <userinput>ifconfig</userinput>
<emphasis>(skipped...)</emphasis> <emphasis>(skipped...)</emphasis>
ppp0: flags=<replaceable>8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500</replaceable> ppp0: flags=<replaceable>8010&lt;POINTOPOINT,MULTICAST&gt; mtu 1500</replaceable>
<emphasis>(skipped...)</emphasis> <emphasis>(skipped...)</emphasis>
@ -353,8 +350,7 @@ $fwcmd add 65435 deny log ip from any to any</programlisting>
<emphasis>(IPv6 stuff skipped...)</emphasis> <emphasis>(IPv6 stuff skipped...)</emphasis>
inet <replaceable>xxx.xxx.xxx.xxx</replaceable> --&gt; <replaceable>xxx.xxx.xxx.xxx</replaceable> netmask <replaceable>0xffffff00</replaceable> inet <replaceable>xxx.xxx.xxx.xxx</replaceable> --&gt; <replaceable>xxx.xxx.xxx.xxx</replaceable> netmask <replaceable>0xffffff00</replaceable>
Opened by PID <replaceable>xxxxx</replaceable> Opened by PID <replaceable>xxxxx</replaceable>
<emphasis>(skipped...)</emphasis> <emphasis>(skipped...)</emphasis></screen>
</screen>
</answer> </answer>
</qandaentry> </qandaentry>
</qandaset> </qandaset>

View file

@ -1,4 +1,4 @@
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/fonts/article.sgml,v 1.14 2001/04/17 15:53:37 nik Exp $ --> <!-- $FreeBSD: doc/en_US.ISO8859-1/articles/fonts/article.sgml,v 1.15 2001/05/04 23:20:42 dd Exp $ -->
<!-- The FreeBSD Documentation Project --> <!-- The FreeBSD Documentation Project -->
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [ <!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
<!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN"> <!ENTITY % man PUBLIC "-//FreeBSD//ENTITIES DocBook Manual Page Entities//EN">
@ -237,8 +237,7 @@
&man.vidcontrol.1;:</para> &man.vidcontrol.1;:</para>
<informalexample> <informalexample>
<screen>&prompt.user; <userinput>vidcontrol VGA_80x60</userinput> <screen>&prompt.user; <userinput>vidcontrol VGA_80x60</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>Various screen orientated programs, such as &man.vi.1;, must <para>Various screen orientated programs, such as &man.vi.1;, must
@ -290,8 +289,7 @@
&prompt.user; <userinput>cp /cdrom/fonts/atm/showboat/showboat.afm .</userinput> &prompt.user; <userinput>cp /cdrom/fonts/atm/showboat/showboat.afm .</userinput>
<lineannotation>Maintain an index to cross reference the fonts</lineannotation> <lineannotation>Maintain an index to cross reference the fonts</lineannotation>
&prompt.user; <userinput>echo showboat - InfoMagic CICA, Dec 1994, /fonts/atm/showboat &gt;&gt;INDEX</userinput> &prompt.user; <userinput>echo showboat - InfoMagic CICA, Dec 1994, /fonts/atm/showboat &gt;&gt;INDEX</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>Now, to use a new font with X11, one must make the font file <para>Now, to use a new font with X11, one must make the font file
@ -309,8 +307,7 @@
| | | \ \ \ \ +- points | | | \ \ \ \ +- points
| | | \ \ \ +- pixels | | | \ \ \ +- pixels
| | | \ \ \ | | | \ \ \
foundry family weight slant width additional style foundry family weight slant width additional style</screen>
</screen>
</informalexample> </informalexample>
<para>A new name needs to be created for each new font. If you <para>A new name needs to be created for each new font. If you
@ -344,15 +341,13 @@ FontDirectory/Showboat known{/Showboat findfont dup/UniqueID known{dup
1991 by David Rakowski. Alle Rechte Vorbehalten.) readonly def 1991 by David Rakowski. Alle Rechte Vorbehalten.) readonly def
end readonly def end readonly def
/FontName /Showboat def /FontName /Showboat def
--stdin-- --stdin--</screen>
</screen>
</informalexample> </informalexample>
<para>Using this information, a possible name might be:</para> <para>Using this information, a possible name might be:</para>
<informalexample> <informalexample>
<screen>-type1-Showboat-medium-r-normal-decorative-0-0-0-0-p-0-iso8859-1 <screen>-type1-Showboat-medium-r-normal-decorative-0-0-0-0-p-0-iso8859-1</screen>
</screen>
</informalexample> </informalexample>
<para>The components of our name are:</para> <para>The components of our name are:</para>
@ -471,8 +466,7 @@ showboat.pfb -type1-showboat-medium-r-normal-decorative-0-0-0-0-p-0-iso8859-1
&prompt.user; <userinput>xset fp rehash</userinput> &prompt.user; <userinput>xset fp rehash</userinput>
<lineannotation>Examine the new font</lineannotation> <lineannotation>Examine the new font</lineannotation>
&prompt.user; <userinput>xfontsel -pattern -type1-*</userinput> &prompt.user; <userinput>xfontsel -pattern -type1-*</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>References: &man.xfontsel.1;, &man.xset.1;, <citetitle>The X <para>References: &man.xfontsel.1;, &man.xset.1;, <citetitle>The X
@ -518,8 +512,7 @@ Loading Showboat font from /usr/local/share/ghostscript/fonts/showboat.pfb...
&gt;&gt;showpage, press &lt;return&gt; to continue&lt;&lt; &gt;&gt;showpage, press &lt;return&gt; to continue&lt;&lt;
&gt;&gt;showpage, press &lt;return&gt; to continue&lt;&lt; &gt;&gt;showpage, press &lt;return&gt; to continue&lt;&lt;
&gt;&gt;showpage, press &lt;return&gt; to continue&lt;&lt; &gt;&gt;showpage, press &lt;return&gt; to continue&lt;&lt;
GS&gt;<userinput>quit</userinput> GS&gt;<userinput>quit</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>References: <filename>fonts.txt</filename> in the <para>References: <filename>fonts.txt</filename> in the
@ -551,8 +544,7 @@ GS&gt;<userinput>quit</userinput>
:1c :1c
#!/usr/bin/perl -P- #!/usr/bin/perl -P-
. .
:wq</userinput> :wq</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>This tool will create the groff font file from the metrics <para>This tool will create the groff font file from the metrics
@ -568,8 +560,7 @@ We need to convert them to unix style ^J delimited lines</lineannotation>
<lineannotation>Now create the groff font file</lineannotation> <lineannotation>Now create the groff font file</lineannotation>
&prompt.user; <userinput>cd /usr/share/groff_font/devps</userinput> &prompt.user; <userinput>cd /usr/share/groff_font/devps</userinput>
&prompt.user; <userinput>/tmp/afmtodit.pl -d DESC -e text.enc /tmp/showboat.afm generate/textmap SHOWBOAT</userinput> &prompt.user; <userinput>/tmp/afmtodit.pl -d DESC -e text.enc /tmp/showboat.afm generate/textmap SHOWBOAT</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>The font can now be referenced with the name <para>The font can now be referenced with the name
@ -590,8 +581,7 @@ We need to convert them to unix style ^J delimited lines</lineannotation>
<informalexample> <informalexample>
<screen><lineannotation>Create the <filename>.pfa</filename> font file</lineannotation> <screen><lineannotation>Create the <filename>.pfa</filename> font file</lineannotation>
&prompt.user; <userinput>pfbtops /usr/local/share/fonts/type1/showboat.pfb &gt;showboat.pfa</userinput> &prompt.user; <userinput>pfbtops /usr/local/share/fonts/type1/showboat.pfb &gt;showboat.pfa</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>Of course, if the <filename>.pfa</filename> file is already <para>Of course, if the <filename>.pfa</filename> file is already
@ -607,8 +597,7 @@ internalname Showboat
:$a :$a
Showboat showboat.pfa Showboat showboat.pfa
. .
:wq</userinput> :wq</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>To test the font:</para> <para>To test the font:</para>
@ -647,8 +636,7 @@ EOF</userinput>
&prompt.user; <userinput>ghostview example.ps</userinput> &prompt.user; <userinput>ghostview example.ps</userinput>
<lineannotation>To print it</lineannotation> <lineannotation>To print it</lineannotation>
&prompt.user; <userinput>lpr -Ppostscript example.ps</userinput> &prompt.user; <userinput>lpr -Ppostscript example.ps</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>References: <para>References:

View file

@ -1,4 +1,4 @@
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/multi-os/article.sgml,v 1.13 2000/07/26 18:24:49 jim Exp $ --> <!-- $FreeBSD: doc/en_US.ISO8859-1/articles/multi-os/article.sgml,v 1.14 2001/04/17 15:53:39 nik Exp $ -->
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN"> <!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN">
<article> <article>
<articleinfo> <articleinfo>
@ -202,8 +202,7 @@
<para>When viewed with the Windows 95 <command>fdisk</command> <para>When viewed with the Windows 95 <command>fdisk</command>
utility, my hard drives should now look something like this: utility, my hard drives should now look something like this:
<screen> <screen>---------------------------------------------------------------------
---------------------------------------------------------------------
Display Partition Information Display Partition Information

View file

@ -1,4 +1,4 @@
<!-- $FreeBSD: doc/en_US.ISO8859-1/articles/new-users/article.sgml,v 1.18 2001/04/17 15:53:39 nik Exp $ --> <!-- $FreeBSD: doc/en_US.ISO8859-1/articles/new-users/article.sgml,v 1.19 2001/06/23 06:56:59 dd Exp $ -->
<!-- The FreeBSD Documentation Project --> <!-- The FreeBSD Documentation Project -->
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN"> <!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN">
@ -47,8 +47,7 @@
>login:</prompt> prompt) type</para> >login:</prompt> prompt) type</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>exit</userinput> <screen>&prompt.root; <userinput>exit</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>as often as necessary. Yes, press <keysym>enter</keysym> <para>as often as necessary. Yes, press <keysym>enter</keysym>
@ -59,22 +58,19 @@
<para>To shut down the machine type</para> <para>To shut down the machine type</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>/sbin/shutdown -h now</userinput> <screen>&prompt.root; <userinput>/sbin/shutdown -h now</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>Or to reboot type</para> <para>Or to reboot type</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>/sbin/shutdown -r now</userinput> <screen>&prompt.root; <userinput>/sbin/shutdown -r now</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>or</para> <para>or</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>/sbin/reboot</userinput> <screen>&prompt.root; <userinput>/sbin/reboot</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>You can also reboot with <para>You can also reboot with
@ -93,8 +89,7 @@
user now with</para> user now with</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>adduser</userinput> <screen>&prompt.root; <userinput>adduser</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>The first time you use adduser, it might ask for some <para>The first time you use adduser, it might ask for some
@ -110,8 +105,7 @@
jack into other groups, type <userinput>wheel</userinput></para> jack into other groups, type <userinput>wheel</userinput></para>
<informalexample> <informalexample>
<screen>Login group is ``jack''. Invite jack into other groups: <userinput>wheel</userinput> <screen>Login group is ``jack''. Invite jack into other groups: <userinput>wheel</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>This will make it possible to log in as <para>This will make it possible to log in as
@ -379,8 +373,7 @@
&prompt.root; <userinput>periodic weekly</userinput> &prompt.root; <userinput>periodic weekly</userinput>
<lineannotation>output omitted</lineannotation> <lineannotation>output omitted</lineannotation>
&prompt.root; <userinput>periodic monthly</userinput> &prompt.root; <userinput>periodic monthly</userinput>
<lineannotation>output omitted</lineannotation> <lineannotation>output omitted</lineannotation></screen>
</screen>
</informalexample> </informalexample>
<para>If you get tired of waiting, press <para>If you get tired of waiting, press
@ -430,8 +423,7 @@
<filename>/etc</filename> directory and do:</para> <filename>/etc</filename> directory and do:</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>cp rc.conf rc.conf.orig</userinput> <screen>&prompt.root; <userinput>cp rc.conf rc.conf.orig</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>This would copy <filename>rc.conf</filename> to <para>This would copy <filename>rc.conf</filename> to
@ -442,8 +434,7 @@
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>mv rc.conf rc.conf.orig</userinput> <screen>&prompt.root; <userinput>mv rc.conf rc.conf.orig</userinput>
&prompt.root; <userinput>cp rc.conf.orig rc.conf</userinput> &prompt.root; <userinput>cp rc.conf.orig rc.conf</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>because the <command>mv</command> command preserves the <para>because the <command>mv</command> command preserves the
@ -462,8 +453,7 @@
<para>To edit a file, type</para> <para>To edit a file, type</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>vi <replaceable>filename</replaceable></userinput> <screen>&prompt.root; <userinput>vi <replaceable>filename</replaceable></userinput></screen>
</screen>
</informalexample> </informalexample>
<para>Move through the text with the arrow keys. <para>Move through the text with the arrow keys.
@ -618,8 +608,7 @@
The command</para> The command</para>
<informalexample> <informalexample>
<screen>&prompt.user; <userinput>man chmod | col -b &gt; chmod.txt</> <screen>&prompt.user; <userinput>man chmod | col -b &gt; chmod.txt</></screen>
</screen>
</informalexample> </informalexample>
<para>will remove formatting codes and send the man page to the <para>will remove formatting codes and send the man page to the
@ -628,8 +617,7 @@
drive a, <command>su</command> to root, and type</para> drive a, <command>su</command> to root, and type</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>/sbin/mount -t msdos /dev/fd0 /mnt</> <screen>&prompt.root; <userinput>/sbin/mount -t msdos /dev/fd0 /mnt</></screen>
</screen>
</informalexample> </informalexample>
<para>to mount the floppy drive on <para>to mount the floppy drive on
@ -641,8 +629,7 @@
the floppy with:</para> the floppy with:</para>
<informalexample> <informalexample>
<screen>&prompt.user; <userinput>cp chmod.txt /mnt</> <screen>&prompt.user; <userinput>cp chmod.txt /mnt</></screen>
</screen>
</informalexample> </informalexample>
<para>and use <command>ls /mnt</command> to get a directory <para>and use <command>ls /mnt</command> to get a directory
@ -653,8 +640,7 @@
<filename>/sbin/dmesg</filename> by typing</para> <filename>/sbin/dmesg</filename> by typing</para>
<informalexample> <informalexample>
<screen>&prompt.user; <userinput>/sbin/dmesg &gt; dmesg.txt</> <screen>&prompt.user; <userinput>/sbin/dmesg &gt; dmesg.txt</></screen>
</screen>
</informalexample> </informalexample>
<para>and copying <filename>dmesg.txt</filename> to the floppy. <para>and copying <filename>dmesg.txt</filename> to the floppy.
@ -670,8 +656,7 @@
disk out with</para> disk out with</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>/sbin/umount /mnt</> <screen>&prompt.root; <userinput>/sbin/umount /mnt</></screen>
</screen>
</informalexample> </informalexample>
<para>and reboot to go to DOS. Copy these files to a DOS <para>and reboot to go to DOS. Copy these files to a DOS
@ -771,8 +756,7 @@
with</para> with</para>
<informalexample> <informalexample>
<screen>&prompt.user; <userinput>find /usr -name "<replaceable>filename</>"</> <screen>&prompt.user; <userinput>find /usr -name "<replaceable>filename</>"</></screen>
</screen>
</informalexample> </informalexample>
<para>You can use <literal>*</literal> as a wildcard in <para>You can use <literal>*</literal> as a wildcard in
@ -821,8 +805,7 @@
add that should be available to all users) with:</para> add that should be available to all users) with:</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>cp -R /cdrom/ports/comm/kermit /usr/local</> <screen>&prompt.root; <userinput>cp -R /cdrom/ports/comm/kermit /usr/local</></screen>
</screen>
</informalexample> </informalexample>
<para>This should result in a <para>This should result in a
@ -844,8 +827,7 @@
<filename>Makefile</filename>. Type</para> <filename>Makefile</filename>. Type</para>
<informalexample> <informalexample>
<screen>&prompt.root; <userinput>make all install</> <screen>&prompt.root; <userinput>make all install</></screen>
</screen>
</informalexample> </informalexample>
<para>During this process the port will ftp to get any compressed <para>During this process the port will ftp to get any compressed

View file

@ -1,4 +1,4 @@
<!-- $FreeBSD: doc/en_US.ISO_8859-1/articles/programming-tools/article.sgml,v 1.14 2001/04/09 00:33:41 dd Exp $ --> <!-- $FreeBSD: doc/en_US.ISO8859-1/articles/programming-tools/article.sgml,v 1.15 2001/04/17 15:53:39 nik Exp $ -->
<!-- The FreeBSD Documentation Project --> <!-- The FreeBSD Documentation Project -->
<!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN"> <!DOCTYPE ARTICLE PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN">
@ -126,8 +126,7 @@
<para>To get one of these packages, all you need to do is to <para>To get one of these packages, all you need to do is to
click on the hotlink for the package, then run</para> click on the hotlink for the package, then run</para>
<screen>&prompt.root; <userinput>pkg_add <replaceable>package name</></userinput> <screen>&prompt.root; <userinput>pkg_add <replaceable>package name</></userinput></screen>
</screen>
<para>as root. Obviously, you will need to have a fully <para>as root. Obviously, you will need to have a fully
functional FreeBSD 2.1.0 or later system for the package to functional FreeBSD 2.1.0 or later system for the package to
@ -371,15 +370,13 @@
<command>cc</command> is a front end that manages calling all these <command>cc</command> is a front end that manages calling all these
programs with the right arguments for you; simply typing</para> programs with the right arguments for you; simply typing</para>
<screen>&prompt.user; <userinput>cc foobar.c</> <screen>&prompt.user; <userinput>cc foobar.c</></screen>
</screen>
<para>will cause <filename>foobar.c</filename> to be compiled by all the <para>will cause <filename>foobar.c</filename> to be compiled by all the
steps above. If you have more than one file to compile, just do steps above. If you have more than one file to compile, just do
something like</para> something like</para>
<screen>&prompt.user; <userinput>cc foo.c bar.c</> <screen>&prompt.user; <userinput>cc foo.c bar.c</></screen>
</screen>
<para>Note that the syntax checking is just that&mdash;checking <para>Note that the syntax checking is just that&mdash;checking
the syntax. It will not check for any logical mistakes you may the syntax. It will not check for any logical mistakes you may
@ -557,8 +554,7 @@
knows what you may be using in a few years time?</para> knows what you may be using in a few years time?</para>
<informalexample> <informalexample>
<screen>&prompt.user; <userinput>cc -Wall -ansi -pedantic -o foobar foobar.c</userinput> <screen>&prompt.user; <userinput>cc -Wall -ansi -pedantic -o foobar foobar.c</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>This will produce an executable <filename>foobar</filename> <para>This will produce an executable <filename>foobar</filename>
@ -1002,8 +998,7 @@ free(foo);
<para>When you're working on a simple program with only one or <para>When you're working on a simple program with only one or
two source files, typing in</para> two source files, typing in</para>
<screen>&prompt.user; <userinput>cc file1.c file2.c</userinput> <screen>&prompt.user; <userinput>cc file1.c file2.c</userinput></screen>
</screen>
<para>is not too bad, but it quickly becomes very tedious when <para>is not too bad, but it quickly becomes very tedious when
there are several files&mdash;and it can take a while to there are several files&mdash;and it can take a while to
@ -1013,8 +1008,7 @@ free(foo);
recompile the source file if the source code has changed. So recompile the source file if the source code has changed. So
we could have something like:</para> we could have something like:</para>
<screen>&prompt.user; <userinput>cc file1.o file2.o</userinput> &hellip; <userinput>file37.c</userinput> &hellip <screen>&prompt.user; <userinput>cc file1.o file2.o</userinput> &hellip; <userinput>file37.c</userinput> &hellip</screen>
</screen>
<para>if we'd changed <filename>file37.c</filename>, but not any <para>if we'd changed <filename>file37.c</filename>, but not any
of the others, since the last time we compiled. This may of the others, since the last time we compiled. This may
@ -1118,8 +1112,7 @@ install:
<para>We can tell make which target we want to make by <para>We can tell make which target we want to make by
typing:</para> typing:</para>
<screen>&prompt.user; <userinput>make <replaceable>target</replaceable></userinput> <screen>&prompt.user; <userinput>make <replaceable>target</replaceable></userinput></screen>
</screen>
<para><command>make</command> will then only look at that target <para><command>make</command> will then only look at that target
and ignore any others. For example, if we type and ignore any others. For example, if we type
@ -1262,8 +1255,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
for it in <filename>/usr/share/doc/psd/12.make</filename>. To for it in <filename>/usr/share/doc/psd/12.make</filename>. To
view it, do</para> view it, do</para>
<screen>&prompt.user; <userinput>zmore paper.ascii.gz</userinput> <screen>&prompt.user; <userinput>zmore paper.ascii.gz</userinput></screen>
</screen>
<para>in that directory.</para> <para>in that directory.</para>
@ -1300,14 +1292,12 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
<command>gdb</command> (<application>GNU <command>gdb</command> (<application>GNU
debugger</application>). You start it up by typing</para> debugger</application>). You start it up by typing</para>
<screen>&prompt.user; <userinput>gdb <replaceable>progname</replaceable></userinput> <screen>&prompt.user; <userinput>gdb <replaceable>progname</replaceable></userinput></screen>
</screen>
<para>although most people prefer to run it inside <para>although most people prefer to run it inside
<application>Emacs</application>. You can do this by:</para> <application>Emacs</application>. You can do this by:</para>
<screen><userinput>M-x gdb RET <replaceable>progname</replaceable> RET</userinput> <screen><userinput>M-x gdb RET <replaceable>progname</replaceable> RET</userinput></screen>
</screen>
<para>Using a debugger allows you to run the program under more <para>Using a debugger allows you to run the program under more
controlled circumstances. Typically, you can step through the controlled circumstances. Typically, you can step through the
@ -1342,8 +1332,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
see the name of the function you're in, instead of the source see the name of the function you're in, instead of the source
code. If you see a line like:</para> code. If you see a line like:</para>
<screen>&hellip; (no debugging symbols found) &hellip; <screen>&hellip; (no debugging symbols found) &hellip;</screen>
</screen>
<para>when <command>gdb</command> starts up, you'll know that <para>when <command>gdb</command> starts up, you'll know that
the program wasn't compiled with the <option>-g</option> the program wasn't compiled with the <option>-g</option>
@ -1398,8 +1387,7 @@ int bazz(int anint) {
<screen>&prompt.user; <userinput>cc -g -o temp temp.c</userinput> <screen>&prompt.user; <userinput>cc -g -o temp temp.c</userinput>
&prompt.user; <userinput>./temp</userinput> &prompt.user; <userinput>./temp</userinput>
This is my program This is my program
anint = 4231 anint = 4231</screen>
</screen>
<para>That wasn't what we expected! Time to see what's going <para>That wasn't what we expected! Time to see what's going
on!</para> on!</para>
@ -1419,8 +1407,7 @@ Breakpoint 1, main () at temp.c:9 <lineannotation><command>gdb</command> stops
This is my program <lineannotation>Program prints out</> This is my program <lineannotation>Program prints out</>
(gdb) <userinput>s</> <lineannotation>step into <function>bazz()</></> (gdb) <userinput>s</> <lineannotation>step into <function>bazz()</></>
bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays stack frame</> bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays stack frame</>
(gdb) (gdb)</screen>
</screen>
<para>Hang on a minute! How did <symbol>anint</symbol> get to be <para>Hang on a minute! How did <symbol>anint</symbol> get to be
<literal>4231</literal>? Didn't we set it to be <literal>4231</literal>? Didn't we set it to be
@ -1430,8 +1417,7 @@ bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays
<screen>(gdb) <userinput>up</> <lineannotation>Move up call stack</> <screen>(gdb) <userinput>up</> <lineannotation>Move up call stack</>
#1 0x1625 in main () at temp.c:11 <lineannotation><command>gdb</command> displays stack frame</> #1 0x1625 in main () at temp.c:11 <lineannotation><command>gdb</command> displays stack frame</>
(gdb) <userinput>p i</> <lineannotation>Show us the value of <symbol>i</></> (gdb) <userinput>p i</> <lineannotation>Show us the value of <symbol>i</></>
$1 = 4231 <lineannotation><command>gdb</command> displays <literal>4231</></> $1 = 4231 <lineannotation><command>gdb</command> displays <literal>4231</></></screen>
</screen>
<para>Oh dear! Looking at the code, we forgot to initialise <para>Oh dear! Looking at the code, we forgot to initialise
<symbol>i</symbol>. We meant to put</para> <symbol>i</symbol>. We meant to put</para>
@ -1480,8 +1466,7 @@ main() {
the usual way. Instead of typing <command>break</command> or the usual way. Instead of typing <command>break</command> or
<command>run</command>, type</para> <command>run</command>, type</para>
<screen>(gdb) <userinput>core <replaceable>progname</replaceable>.core</userinput> <screen>(gdb) <userinput>core <replaceable>progname</replaceable>.core</userinput></screen>
</screen>
<para>If you're not in the same directory as the core file, <para>If you're not in the same directory as the core file,
you'll have to do <userinput>dir you'll have to do <userinput>dir
@ -1499,8 +1484,7 @@ Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault. Program terminated with signal 11, Segmentation fault.
Cannot access memory at address 0x7020796d. Cannot access memory at address 0x7020796d.
#0 0x164a in bazz (anint=0x5) at temp.c:17 #0 0x164a in bazz (anint=0x5) at temp.c:17
(gdb) (gdb)</screen>
</screen>
<para>In this case, the program was called <para>In this case, the program was called
<filename>a.out</filename>, so the core file is called <filename>a.out</filename>, so the core file is called
@ -1519,8 +1503,7 @@ Cannot access memory at address 0x7020796d.
#0 0x164a in bazz (anint=0x5) at temp.c:17 #0 0x164a in bazz (anint=0x5) at temp.c:17
#1 0xefbfd888 in end () #1 0xefbfd888 in end ()
#2 0x162c in main () at temp.c:11 #2 0x162c in main () at temp.c:11
(gdb) (gdb)</screen>
</screen>
<para>The <function>end()</function> function is called when a <para>The <function>end()</function> function is called when a
program crashes; in this case, the <function>bazz()</function> program crashes; in this case, the <function>bazz()</function>
@ -1541,8 +1524,7 @@ Cannot access memory at address 0x7020796d.
use <command>ps</command> to find the process ID for the use <command>ps</command> to find the process ID for the
child, and do</para> child, and do</para>
<screen>(gdb) <userinput>attach <replaceable>pid</replaceable></userinput> <screen>(gdb) <userinput>attach <replaceable>pid</replaceable></userinput></screen>
</screen>
<para>in <command>gdb</command>, and then debug as usual.</para> <para>in <command>gdb</command>, and then debug as usual.</para>
@ -1562,8 +1544,7 @@ else if (pid == 0) { /* child */
sleep(10); /* Wait until someone attaches to us */ sleep(10); /* Wait until someone attaches to us */
<lineannotation>&hellip</lineannotation> <lineannotation>&hellip</lineannotation>
} else { /* parent */ } else { /* parent */
<lineannotation>&hellip</lineannotation> <lineannotation>&hellip</lineannotation></screen>
</screen>
<para>Now all you have to do is attach to the child, set <para>Now all you have to do is attach to the child, set
<symbol>PauseMode</symbol> to <literal>0</literal>, and wait <symbol>PauseMode</symbol> to <literal>0</literal>, and wait
@ -2131,8 +2112,7 @@ in font-lock-auto-mode-list"
Lisp</quote>. For example, if whizbang is a FreeBSD port, we Lisp</quote>. For example, if whizbang is a FreeBSD port, we
can locate these files by doing</para> can locate these files by doing</para>
<screen>&prompt.user; <userinput>find /usr/ports/lang/whizbang -name "*.el" -print</userinput> <screen>&prompt.user; <userinput>find /usr/ports/lang/whizbang -name "*.el" -print</userinput></screen>
</screen>
<para>and install them by copying them into the Emacs site Lisp <para>and install them by copying them into the Emacs site Lisp
directory. On FreeBSD 2.1.0-RELEASE, this is directory. On FreeBSD 2.1.0-RELEASE, this is
@ -2141,13 +2121,11 @@ in font-lock-auto-mode-list"
<para>So for example, if the output from the find command <para>So for example, if the output from the find command
was</para> was</para>
<screen>/usr/ports/lang/whizbang/work/misc/whizbang.el <screen>/usr/ports/lang/whizbang/work/misc/whizbang.el</screen>
</screen>
<para>we would do</para> <para>we would do</para>
<screen>&prompt.root; <userinput>cp /usr/ports/lang/whizbang/work/misc/whizbang.el /usr/local/share/emacs/site-lisp</userinput> <screen>&prompt.root; <userinput>cp /usr/ports/lang/whizbang/work/misc/whizbang.el /usr/local/share/emacs/site-lisp</userinput></screen>
</screen>
<para>Next, we need to decide what extension whizbang source <para>Next, we need to decide what extension whizbang source
files have. Let's say for the sake of argument that they all files have. Let's say for the sake of argument that they all

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.5 2001/04/09 08:42:04 murray Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.6 2001/05/14 03:15:18 murray Exp $
--> -->
<chapter id="driverbasics"> <chapter id="driverbasics">
@ -118,8 +118,7 @@ KMOD=skeleton
will create a file <filename>skeleton.ko</filename> that can will create a file <filename>skeleton.ko</filename> that can
be loaded into your system by typing : be loaded into your system by typing :
<screen> &prompt.root <screen> &prompt.root
kldload -v ./skeleton.ko kldload -v ./skeleton.ko</screen>
</screen>
</para> </para>
</sect2> </sect2>
</sect1> </sect1>
@ -332,18 +331,14 @@ DEV_MODULE(echo,echo_loader,NULL);</programlisting>
<para>To install this driver you will first need to make a node on <para>To install this driver you will first need to make a node on
your filesystem with a command such as : </para> your filesystem with a command such as : </para>
<screen> <screen> &prompt.root mknod /dev/echo c 33 0</screen>
&prompt.root mknod /dev/echo c 33 0
</screen>
<para>With this driver loaded you should now be able to type <para>With this driver loaded you should now be able to type
something like :</para> something like :</para>
<screen> <screen>&prompt.root echo -n "Test Data" > /dev/echo
&prompt.root echo -n "Test Data" > /dev/echo
&prompt.root cat /dev/echo &prompt.root cat /dev/echo
Test Data Test Data</screen>
</screen>
<para>Real hardware devices in the next chapter..</para> <para>Real hardware devices in the next chapter..</para>

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.5 2001/04/09 08:42:04 murray Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/developers-handbook/driverbasics/chapter.sgml,v 1.6 2001/05/14 03:15:18 murray Exp $
--> -->
<chapter id="driverbasics"> <chapter id="driverbasics">
@ -118,8 +118,7 @@ KMOD=skeleton
will create a file <filename>skeleton.ko</filename> that can will create a file <filename>skeleton.ko</filename> that can
be loaded into your system by typing : be loaded into your system by typing :
<screen> &prompt.root <screen> &prompt.root
kldload -v ./skeleton.ko kldload -v ./skeleton.ko</screen>
</screen>
</para> </para>
</sect2> </sect2>
</sect1> </sect1>
@ -332,18 +331,14 @@ DEV_MODULE(echo,echo_loader,NULL);</programlisting>
<para>To install this driver you will first need to make a node on <para>To install this driver you will first need to make a node on
your filesystem with a command such as : </para> your filesystem with a command such as : </para>
<screen> <screen> &prompt.root mknod /dev/echo c 33 0</screen>
&prompt.root mknod /dev/echo c 33 0
</screen>
<para>With this driver loaded you should now be able to type <para>With this driver loaded you should now be able to type
something like :</para> something like :</para>
<screen> <screen>&prompt.root echo -n "Test Data" > /dev/echo
&prompt.root echo -n "Test Data" > /dev/echo
&prompt.root cat /dev/echo &prompt.root cat /dev/echo
Test Data Test Data</screen>
</screen>
<para>Real hardware devices in the next chapter..</para> <para>Real hardware devices in the next chapter..</para>

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD$ $FreeBSD: doc/en_US.ISO8859-1/books/developers-handbook/ipv6/chapter.sgml,v 1.1 2001/05/14 02:52:43 murray Exp $
--> -->
<chapter id="ipv6"> <chapter id="ipv6">
@ -380,8 +380,7 @@
example, you may see something like: example, you may see something like:
</para> </para>
<screen> <screen> fe80:1::200:f8ff:fe01:6317
fe80:1::200:f8ff:fe01:6317
</screen> </screen>
<para>in the routing table and interface address structure (struct <para>in the routing table and interface address structure (struct
@ -443,12 +442,10 @@
<para>Here is an output of netstat command:</para> <para>Here is an output of netstat command:</para>
<screen> <screen>Internet6:
Internet6:
Destination Gateway Flags Netif Expire Destination Gateway Flags Netif Expire
fe80:1::%ed0/64 link#1 UC ed0 fe80:1::%ed0/64 link#1 UC ed0
fe80:2::%ep0/64 link#2 UC ep0 fe80:2::%ep0/64 link#2 UC ep0</screen>
</screen>
<para>Interfaces that has no IEEE802 address (pseudo interfaces <para>Interfaces that has no IEEE802 address (pseudo interfaces
like tunnel interfaces, or ppp interfaces) will borrow IEEE802 like tunnel interfaces, or ppp interfaces) will borrow IEEE802
@ -518,8 +515,7 @@ fe80:2::%ep0/64 link#2 UC ep0
<para>To summarize the sysctl knob:</para> <para>To summarize the sysctl knob:</para>
<screen> <screen> accept_rtadv forwarding role of the node
accept_rtadv forwarding role of the node
--- --- --- --- --- ---
0 0 host (to be manually configured) 0 0 host (to be manually configured)
0 1 router 0 1 router
@ -529,8 +525,7 @@ fe80:2::%ep0/64 link#2 UC ep0
with multiple interface is with multiple interface is
out-of-scope) out-of-scope)
1 1 invalid, or experimental 1 1 invalid, or experimental
(out-of-scope of spec) (out-of-scope of spec)</screen>
</screen>
<para>RFC2462 has validation rule against incoming RA prefix <para>RFC2462 has validation rule against incoming RA prefix
information option, in 5.5.3 (e). This is to protect hosts from information option, in 5.5.3 (e). This is to protect hosts from
@ -702,12 +697,10 @@ fe80:2::%ep0/64 link#2 UC ep0
statistics are incremented. You can see the statistics as output of statistics are incremented. You can see the statistics as output of
&man.netstat.8; command with `-s -p ip6' option:</para> &man.netstat.8; command with `-s -p ip6' option:</para>
<screen> <screen> &prompt.user; <command>netstat -s -p ip6</command>
&prompt.user; <command>netstat -s -p ip6</command>
ip6: ip6:
(snip) (snip)
1 with data size < data length 1 with data size < data length</screen>
</screen>
<para>So, kernel does not send an ICMPv6 error unless the erroneous <para>So, kernel does not send an ICMPv6 error unless the erroneous
packet is an actual Jumbo Payload, that is, its packet size is more packet is an actual Jumbo Payload, that is, its packet size is more
@ -834,8 +827,7 @@ fe80:2::%ep0/64 link#2 UC ep0
"cce0" violates the requirement. (For more information, refer to "cce0" violates the requirement. (For more information, refer to
Section 2.)</para> Section 2.)</para>
<screen> <screen>Mbuf statistics:
Mbuf statistics:
317 one mbuf 317 one mbuf
two or more mbuf:: two or more mbuf::
lo0 = 8 lo0 = 8
@ -880,8 +872,7 @@ fe80:2::%ep0/64 link#2 UC ep0
<para>The following table show the behavior of FreeBSD 4.x.</para> <para>The following table show the behavior of FreeBSD 4.x.</para>
<screen> <screen>listening side initiating side
listening side initiating side
(AF_INET6 wildcard (connection to ::ffff:10.1.1.1) (AF_INET6 wildcard (connection to ::ffff:10.1.1.1)
socket gets IPv4 conn.) socket gets IPv4 conn.)
--- --- --- ---
@ -932,8 +923,7 @@ FreeBSD 4.x configurable supported
<para>To resolve this issue more easily, there is system dependent <para>To resolve this issue more easily, there is system dependent
&man.setsockopt.2; option, IPV6_BINDV6ONLY, used like below.</para> &man.setsockopt.2; option, IPV6_BINDV6ONLY, used like below.</para>
<screen> <screen> int on;
int on;
setsockopt(s, IPPROTO_IPV6, IPV6_BINDV6ONLY, setsockopt(s, IPPROTO_IPV6, IPV6_BINDV6ONLY,
(char *)&amp;on, sizeof (on)) < 0)); (char *)&amp;on, sizeof (on)) < 0));
@ -1027,8 +1017,7 @@ FreeBSD 4.x configurable supported
wildcard bind (enabled by default). You can disable it on wildcard bind (enabled by default). You can disable it on
each socket basis with &man.setsockopt.2; like below.</para> each socket basis with &man.setsockopt.2; like below.</para>
<screen> <screen> int on;
int on;
setsockopt(s, IPPROTO_IPV6, IPV6_BINDV6ONLY, setsockopt(s, IPPROTO_IPV6, IPV6_BINDV6ONLY,
(char *)&amp;on, sizeof (on)) < 0)); (char *)&amp;on, sizeof (on)) < 0));
@ -1075,8 +1064,7 @@ FreeBSD 4.x configurable supported
<para>As a result, RFC2553 defines struct sockaddr_storage as <para>As a result, RFC2553 defines struct sockaddr_storage as
follows:</para> follows:</para>
<screen> <screen> struct sockaddr_storage {
struct sockaddr_storage {
u_char __ss_len; /* address length */ u_char __ss_len; /* address length */
u_char __ss_family; /* address family */ u_char __ss_family; /* address family */
/* and bunch of padding */ /* and bunch of padding */
@ -1085,8 +1073,7 @@ FreeBSD 4.x configurable supported
<para>On the contrary, XNET draft defines as follows:</para> <para>On the contrary, XNET draft defines as follows:</para>
<screen> <screen> struct sockaddr_storage {
struct sockaddr_storage {
u_char ss_len; /* address length */ u_char ss_len; /* address length */
u_char ss_family; /* address family */ u_char ss_family; /* address family */
/* and bunch of padding */ /* and bunch of padding */
@ -1118,8 +1105,7 @@ FreeBSD 4.x configurable supported
<para>never touch __ss_family. cast to sockaddr * and use sa_family <para>never touch __ss_family. cast to sockaddr * and use sa_family
like:</para> like:</para>
<screen> <screen> struct sockaddr_storage ss;
struct sockaddr_storage ss;
family = ((struct sockaddr *)&amp;ss)->sa_family family = ((struct sockaddr *)&amp;ss)->sa_family
</screen> </screen>
@ -1207,8 +1193,7 @@ FreeBSD 4.x configurable supported
is 3ffe:0501:0200:ffff::163.221.202.12, the connection will be is 3ffe:0501:0200:ffff::163.221.202.12, the connection will be
relayed toward IPv4 destination 163.221.202.12.</para> relayed toward IPv4 destination 163.221.202.12.</para>
<screen> <screen> destination IPv4 node (163.221.202.12)
destination IPv4 node (163.221.202.12)
^ ^
| IPv4 tcp toward 163.221.202.12 | IPv4 tcp toward 163.221.202.12
FAITH-relay dual stack node FAITH-relay dual stack node
@ -1526,7 +1511,6 @@ FreeBSD 4.x configurable supported
more detail):</para> more detail):</para>
<screen> <screen>
encapsulate decapsulate encapsulate decapsulate
--- --- --- ---
RFC2401 copy all TOS bits drop TOS bits on outer RFC2401 copy all TOS bits drop TOS bits on outer

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.31 2001/04/17 01:37:31 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.32 2001/06/17 12:29:19 schweikh Exp $
--> -->
<chapter id="kerneldebug"> <chapter id="kerneldebug">
@ -576,8 +576,7 @@ Id Refs Address Size Name
1 4 0xc0100000 1c1678 kernel 1 4 0xc0100000 1c1678 kernel
2 1 0xc0a9e000 6000 linprocfs.ko 2 1 0xc0a9e000 6000 linprocfs.ko
3 1 0xc0ad7000 2000 warp_saver.ko 3 1 0xc0ad7000 2000 warp_saver.ko
4 1 0xc0adc000 11000 linux.ko 4 1 0xc0adc000 11000 linux.ko</screen>
</screen>
<para>If you are debugging a crash dump, you'll need to walk the <para>If you are debugging a crash dump, you'll need to walk the
<literal>linker_files</literal> list, starting at <literal>linker_files</literal> list, starting at

View file

@ -987,13 +987,11 @@ int main() {
<filename>daytime.c</filename>, then compile and run <filename>daytime.c</filename>, then compile and run
it:</para> it:</para>
<screen> <screen>&prompt.user; <userinput>cc -O3 -o daytime daytime.c</userinput>
&prompt.user; <userinput>cc -O3 -o daytime daytime.c</userinput>
&prompt.user; <userinput>./daytime</userinput> &prompt.user; <userinput>./daytime</userinput>
52079 01-06-19 02:29:25 50 0 1 543.9 UTC(NIST) * 52079 01-06-19 02:29:25 50 0 1 543.9 UTC(NIST) *
&prompt.user; &prompt.user;</screen>
</screen>
<para>In this case, the date was June 19, 2001, the time was <para>In this case, the date was June 19, 2001, the time was
02:29:25 <acronym>UTC</acronym>. Naturally, your results 02:29:25 <acronym>UTC</acronym>. Naturally, your results
@ -1401,11 +1399,9 @@ int main() {
<constant>d</constant>). After you have compiled it, try <constant>d</constant>). After you have compiled it, try
running it:</para> running it:</para>
<screen> <screen>&prompt.user; <userinput>./daytimed</userinput>
&prompt.user; <userinput>./daytimed</userinput>
bind: Permission denied bind: Permission denied
&prompt.user; &prompt.user;</screen>
</screen>
<para>What happened here? As you will recall, the <para>What happened here? As you will recall, the
<emphasis>daytime</emphasis> protocol uses port 13. But <emphasis>daytime</emphasis> protocol uses port 13. But
@ -1416,19 +1412,15 @@ bind: Permission denied
<para>Try again, this time as the superuser:</para> <para>Try again, this time as the superuser:</para>
<screen> <screen>&prompt.root; <userinput>./daytimed</userinput>
&prompt.root; <userinput>./daytimed</userinput> &prompt.root;</screen>
&prompt.root;
</screen>
<para>What... Nothing? Let us try again:</para> <para>What... Nothing? Let us try again:</para>
<screen> <screen>&prompt.root; <userinput>./daytimed</userinput>
&prompt.root; <userinput>./daytimed</userinput>
bind: Address already in use bind: Address already in use
&prompt.root; &prompt.root;</screen>
</screen>
<para>Every port can only be bound by one program at a <para>Every port can only be bound by one program at a
time. Our first attempt was indeed successful: It started time. Our first attempt was indeed successful: It started
@ -1440,8 +1432,7 @@ bind: Address already in use
it working? How do we know it is a proper it working? How do we know it is a proper
<emphasis>daytime</emphasis> server? Simple:</para> <emphasis>daytime</emphasis> server? Simple:</para>
<screen> <screen>&prompt.user; <userinput>telnet localhost 13</userinput>
&prompt.user; <userinput>telnet localhost 13</userinput>
Trying ::1... Trying ::1...
telnet: connect to address ::1: Connection refused telnet: connect to address ::1: Connection refused
@ -1450,8 +1441,7 @@ Connected to localhost.
Escape character is '^]'. Escape character is '^]'.
2001-06-19T21:04:42Z 2001-06-19T21:04:42Z
Connection closed by foreign host. Connection closed by foreign host.
&prompt.user; &prompt.user;</screen>
</screen>
<para><application>telnet</application> tried the new <para><application>telnet</application> tried the new
<acronym>IP</acronym>v6, and failed. It retried with <acronym>IP</acronym>v6, and failed. It retried with
@ -1464,8 +1454,7 @@ Connection closed by foreign host.
static <acronym>IP</acronym> address, so this is what I static <acronym>IP</acronym> address, so this is what I
did:</para> did:</para>
<screen> <screen>&prompt.user; <userinput>who</userinput>
&prompt.user; <userinput>who</userinput>
whizkid ttyp0 Jun 19 16:59 (216.127.220.143) whizkid ttyp0 Jun 19 16:59 (216.127.220.143)
xxx ttyp1 Jun 19 16:06 (xx.xx.xx.xx) xxx ttyp1 Jun 19 16:06 (xx.xx.xx.xx)
@ -1476,22 +1465,19 @@ Connected to r47.bfm.org.
Escape character is '^]'. Escape character is '^]'.
2001-06-19T21:31:11Z 2001-06-19T21:31:11Z
Connection closed by foreign host. Connection closed by foreign host.
&prompt.user; &prompt.user;</screen>
</screen>
<para>Again, it worked. Will it work using the domain name? <para>Again, it worked. Will it work using the domain name?
</para> </para>
<screen> <screen>&prompt.user; <userinput>telnet r47.bfm.org 13</userinput>
&prompt.user; <userinput>telnet r47.bfm.org 13</userinput>
Trying 216.127.220.143... Trying 216.127.220.143...
Connected to r47.bfm.org. Connected to r47.bfm.org.
Escape character is '^]'. Escape character is '^]'.
2001-06-19T21:31:40Z 2001-06-19T21:31:40Z
Connection closed by foreign host. Connection closed by foreign host.
&prompt.user; &prompt.user;</screen>
</screen>
<para>By the way, <application>telnet</application> prints <para>By the way, <application>telnet</application> prints
the <emphasis>Connection closed by foreign host</emphasis> the <emphasis>Connection closed by foreign host</emphasis>
@ -1617,14 +1603,12 @@ int main(int argc, char *argv[]) {
your own system. You can then compare the results and see how your own system. You can then compare the results and see how
exact your system clock is:</para> exact your system clock is:</para>
<screen> <screen>&prompt.user; <userinput>daytime ; daytime localhost</userinput>
&prompt.user; <userinput>daytime ; daytime localhost</userinput>
52080 01-06-20 04:02:33 50 0 0 390.2 UTC(NIST) * 52080 01-06-20 04:02:33 50 0 0 390.2 UTC(NIST) *
2001-06-20T04:02:35Z 2001-06-20T04:02:35Z
&prompt.user; &prompt.user;</screen>
</screen>
<para>As you can see, my system was two seconds ahead of the <para>As you can see, my system was two seconds ahead of the
<acronym>NIST</acronym> time.</para> <acronym>NIST</acronym> time.</para>

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/developers-handbook/tools/chapter.sgml,v 1.5 2001/05/13 16:34:42 nik Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/developers-handbook/tools/chapter.sgml,v 1.6 2001/05/14 03:15:19 murray Exp $
--> -->
<chapter id="tools"> <chapter id="tools">
@ -113,8 +113,7 @@
<para>To get one of these packages, all you need to do is to <para>To get one of these packages, all you need to do is to
click on the hotlink for the package, then run</para> click on the hotlink for the package, then run</para>
<screen>&prompt.root; <userinput>pkg_add <replaceable>package name</></userinput> <screen>&prompt.root; <userinput>pkg_add <replaceable>package name</></userinput></screen>
</screen>
<para>as root. Obviously, you will need to have a fully <para>as root. Obviously, you will need to have a fully
functional FreeBSD 2.1.0 or later system for the package to functional FreeBSD 2.1.0 or later system for the package to
@ -362,15 +361,13 @@
<command>cc</command> is a front end that manages calling all these <command>cc</command> is a front end that manages calling all these
programs with the right arguments for you; simply typing</para> programs with the right arguments for you; simply typing</para>
<screen>&prompt.user; <userinput>cc foobar.c</> <screen>&prompt.user; <userinput>cc foobar.c</></screen>
</screen>
<para>will cause <filename>foobar.c</filename> to be compiled by all the <para>will cause <filename>foobar.c</filename> to be compiled by all the
steps above. If you have more than one file to compile, just do steps above. If you have more than one file to compile, just do
something like</para> something like</para>
<screen>&prompt.user; <userinput>cc foo.c bar.c</> <screen>&prompt.user; <userinput>cc foo.c bar.c</></screen>
</screen>
<para>Note that the syntax checking is just that&mdash;checking <para>Note that the syntax checking is just that&mdash;checking
the syntax. It will not check for any logical mistakes you may the syntax. It will not check for any logical mistakes you may
@ -548,8 +545,7 @@
knows what you may be using in a few years time?</para> knows what you may be using in a few years time?</para>
<informalexample> <informalexample>
<screen>&prompt.user; <userinput>cc -Wall -ansi -pedantic -o foobar foobar.c</userinput> <screen>&prompt.user; <userinput>cc -Wall -ansi -pedantic -o foobar foobar.c</userinput></screen>
</screen>
</informalexample> </informalexample>
<para>This will produce an executable <filename>foobar</filename> <para>This will produce an executable <filename>foobar</filename>
@ -1004,8 +1000,7 @@ free(foo);
<para>When you're working on a simple program with only one or <para>When you're working on a simple program with only one or
two source files, typing in</para> two source files, typing in</para>
<screen>&prompt.user; <userinput>cc file1.c file2.c</userinput> <screen>&prompt.user; <userinput>cc file1.c file2.c</userinput></screen>
</screen>
<para>is not too bad, but it quickly becomes very tedious when <para>is not too bad, but it quickly becomes very tedious when
there are several files&mdash;and it can take a while to there are several files&mdash;and it can take a while to
@ -1015,8 +1010,7 @@ free(foo);
recompile the source file if the source code has changed. So recompile the source file if the source code has changed. So
we could have something like:</para> we could have something like:</para>
<screen>&prompt.user; <userinput>cc file1.o file2.o</userinput> &hellip; <userinput>file37.c</userinput> &hellip <screen>&prompt.user; <userinput>cc file1.o file2.o</userinput> &hellip; <userinput>file37.c</userinput> &hellip</screen>
</screen>
<para>if we'd changed <filename>file37.c</filename>, but not any <para>if we'd changed <filename>file37.c</filename>, but not any
of the others, since the last time we compiled. This may of the others, since the last time we compiled. This may
@ -1120,8 +1114,7 @@ install:
<para>We can tell make which target we want to make by <para>We can tell make which target we want to make by
typing:</para> typing:</para>
<screen>&prompt.user; <userinput>make <replaceable>target</replaceable></userinput> <screen>&prompt.user; <userinput>make <replaceable>target</replaceable></userinput></screen>
</screen>
<para><command>make</command> will then only look at that target <para><command>make</command> will then only look at that target
and ignore any others. For example, if we type and ignore any others. For example, if we type
@ -1313,8 +1306,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
for it in <filename>/usr/share/doc/psd/12.make</filename>. To for it in <filename>/usr/share/doc/psd/12.make</filename>. To
view it, do</para> view it, do</para>
<screen>&prompt.user; <userinput>zmore paper.ascii.gz</userinput> <screen>&prompt.user; <userinput>zmore paper.ascii.gz</userinput></screen>
</screen>
<para>in that directory.</para> <para>in that directory.</para>
@ -1351,14 +1343,12 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
<command>gdb</command> (<application>GNU <command>gdb</command> (<application>GNU
debugger</application>). You start it up by typing</para> debugger</application>). You start it up by typing</para>
<screen>&prompt.user; <userinput>gdb <replaceable>progname</replaceable></userinput> <screen>&prompt.user; <userinput>gdb <replaceable>progname</replaceable></userinput></screen>
</screen>
<para>although most people prefer to run it inside <para>although most people prefer to run it inside
<application>Emacs</application>. You can do this by:</para> <application>Emacs</application>. You can do this by:</para>
<screen><userinput>M-x gdb RET <replaceable>progname</replaceable> RET</userinput> <screen><userinput>M-x gdb RET <replaceable>progname</replaceable> RET</userinput></screen>
</screen>
<para>Using a debugger allows you to run the program under more <para>Using a debugger allows you to run the program under more
controlled circumstances. Typically, you can step through the controlled circumstances. Typically, you can step through the
@ -1393,8 +1383,7 @@ DISTFILES= scheme-microcode+dist-7.3-freebsd.tgz
see the name of the function you're in, instead of the source see the name of the function you're in, instead of the source
code. If you see a line like:</para> code. If you see a line like:</para>
<screen>&hellip; (no debugging symbols found) &hellip; <screen>&hellip; (no debugging symbols found) &hellip;</screen>
</screen>
<para>when <command>gdb</command> starts up, you'll know that <para>when <command>gdb</command> starts up, you'll know that
the program wasn't compiled with the <option>-g</option> the program wasn't compiled with the <option>-g</option>
@ -1449,8 +1438,7 @@ int bazz(int anint) {
<screen>&prompt.user; <userinput>cc -g -o temp temp.c</userinput> <screen>&prompt.user; <userinput>cc -g -o temp temp.c</userinput>
&prompt.user; <userinput>./temp</userinput> &prompt.user; <userinput>./temp</userinput>
This is my program This is my program
anint = 4231 anint = 4231</screen>
</screen>
<para>That wasn't what we expected! Time to see what's going <para>That wasn't what we expected! Time to see what's going
on!</para> on!</para>
@ -1470,8 +1458,7 @@ Breakpoint 1, main () at temp.c:9 <lineannotation><command>gdb</command> stops
This is my program <lineannotation>Program prints out</> This is my program <lineannotation>Program prints out</>
(gdb) <userinput>s</> <lineannotation>step into <function>bazz()</></> (gdb) <userinput>s</> <lineannotation>step into <function>bazz()</></>
bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays stack frame</> bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays stack frame</>
(gdb) (gdb)</screen>
</screen>
<para>Hang on a minute! How did <symbol>anint</symbol> get to be <para>Hang on a minute! How did <symbol>anint</symbol> get to be
<literal>4231</literal>? Didn't we set it to be <literal>4231</literal>? Didn't we set it to be
@ -1481,8 +1468,7 @@ bazz (anint=4231) at temp.c:17 <lineannotation><command>gdb</command> displays
<screen>(gdb) <userinput>up</> <lineannotation>Move up call stack</> <screen>(gdb) <userinput>up</> <lineannotation>Move up call stack</>
#1 0x1625 in main () at temp.c:11 <lineannotation><command>gdb</command> displays stack frame</> #1 0x1625 in main () at temp.c:11 <lineannotation><command>gdb</command> displays stack frame</>
(gdb) <userinput>p i</> <lineannotation>Show us the value of <symbol>i</></> (gdb) <userinput>p i</> <lineannotation>Show us the value of <symbol>i</></>
$1 = 4231 <lineannotation><command>gdb</command> displays <literal>4231</></> $1 = 4231 <lineannotation><command>gdb</command> displays <literal>4231</></></screen>
</screen>
<para>Oh dear! Looking at the code, we forgot to initialise <para>Oh dear! Looking at the code, we forgot to initialise
<symbol>i</symbol>. We meant to put</para> <symbol>i</symbol>. We meant to put</para>
@ -1531,8 +1517,7 @@ main() {
the usual way. Instead of typing <command>break</command> or the usual way. Instead of typing <command>break</command> or
<command>run</command>, type</para> <command>run</command>, type</para>
<screen>(gdb) <userinput>core <replaceable>progname</replaceable>.core</userinput> <screen>(gdb) <userinput>core <replaceable>progname</replaceable>.core</userinput></screen>
</screen>
<para>If you're not in the same directory as the core file, <para>If you're not in the same directory as the core file,
you'll have to do <userinput>dir you'll have to do <userinput>dir
@ -1550,8 +1535,7 @@ Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault. Program terminated with signal 11, Segmentation fault.
Cannot access memory at address 0x7020796d. Cannot access memory at address 0x7020796d.
#0 0x164a in bazz (anint=0x5) at temp.c:17 #0 0x164a in bazz (anint=0x5) at temp.c:17
(gdb) (gdb)</screen>
</screen>
<para>In this case, the program was called <para>In this case, the program was called
<filename>a.out</filename>, so the core file is called <filename>a.out</filename>, so the core file is called
@ -1570,8 +1554,7 @@ Cannot access memory at address 0x7020796d.
#0 0x164a in bazz (anint=0x5) at temp.c:17 #0 0x164a in bazz (anint=0x5) at temp.c:17
#1 0xefbfd888 in end () #1 0xefbfd888 in end ()
#2 0x162c in main () at temp.c:11 #2 0x162c in main () at temp.c:11
(gdb) (gdb)</screen>
</screen>
<para>The <function>end()</function> function is called when a <para>The <function>end()</function> function is called when a
program crashes; in this case, the <function>bazz()</function> program crashes; in this case, the <function>bazz()</function>
@ -1592,8 +1575,7 @@ Cannot access memory at address 0x7020796d.
use <command>ps</command> to find the process ID for the use <command>ps</command> to find the process ID for the
child, and do</para> child, and do</para>
<screen>(gdb) <userinput>attach <replaceable>pid</replaceable></userinput> <screen>(gdb) <userinput>attach <replaceable>pid</replaceable></userinput></screen>
</screen>
<para>in <command>gdb</command>, and then debug as usual.</para> <para>in <command>gdb</command>, and then debug as usual.</para>
@ -1613,8 +1595,7 @@ else if (pid == 0) { /* child */
sleep(10); /* Wait until someone attaches to us */ sleep(10); /* Wait until someone attaches to us */
<lineannotation>&hellip</lineannotation> <lineannotation>&hellip</lineannotation>
} else { /* parent */ } else { /* parent */
<lineannotation>&hellip</lineannotation> <lineannotation>&hellip</lineannotation></screen>
</screen>
<para>Now all you have to do is attach to the child, set <para>Now all you have to do is attach to the child, set
<symbol>PauseMode</symbol> to <literal>0</literal>, and wait <symbol>PauseMode</symbol> to <literal>0</literal>, and wait
@ -2183,8 +2164,7 @@ in font-lock-auto-mode-list"
Lisp</quote>. For example, if whizbang is a FreeBSD port, we Lisp</quote>. For example, if whizbang is a FreeBSD port, we
can locate these files by doing</para> can locate these files by doing</para>
<screen>&prompt.user; <userinput>find /usr/ports/lang/whizbang -name "*.el" -print</userinput> <screen>&prompt.user; <userinput>find /usr/ports/lang/whizbang -name "*.el" -print</userinput></screen>
</screen>
<para>and install them by copying them into the Emacs site Lisp <para>and install them by copying them into the Emacs site Lisp
directory. On FreeBSD 2.1.0-RELEASE, this is directory. On FreeBSD 2.1.0-RELEASE, this is
@ -2193,13 +2173,11 @@ in font-lock-auto-mode-list"
<para>So for example, if the output from the find command <para>So for example, if the output from the find command
was</para> was</para>
<screen>/usr/ports/lang/whizbang/work/misc/whizbang.el <screen>/usr/ports/lang/whizbang/work/misc/whizbang.el</screen>
</screen>
<para>we would do</para> <para>we would do</para>
<screen>&prompt.root; <userinput>cp /usr/ports/lang/whizbang/work/misc/whizbang.el /usr/local/share/emacs/site-lisp</userinput> <screen>&prompt.root; <userinput>cp /usr/ports/lang/whizbang/work/misc/whizbang.el /usr/local/share/emacs/site-lisp</userinput></screen>
</screen>
<para>Next, we need to decide what extension whizbang source <para>Next, we need to decide what extension whizbang source
files have. Let's say for the sake of argument that they all files have. Let's say for the sake of argument that they all

View file

@ -15,7 +15,7 @@
author to assign us the copyright. For now, it is valuable author to assign us the copyright. For now, it is valuable
content so it should stay. content so it should stay.
$FreeBSD: doc/en_US.ISO8859-1/books/developers-handbook/x86/chapter.sgml,v 1.3 2001/06/16 22:04:58 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/developers-handbook/x86/chapter.sgml,v 1.4 2001/06/23 06:56:59 dd Exp $
--> -->
<chapter id="x86"> <chapter id="x86">
@ -250,9 +250,7 @@ the system know about it. After your program is assembled and
linked, you need to brand the executable: linked, you need to brand the executable:
</para> </para>
<screen> <screen>&prompt.user; <userinput>brandelf -f Linux <replaceable>filename</replaceable></userinput></screen>
&prompt.user; <userinput>brandelf -f Linux <replaceable>filename</replaceable></userinput>
</screen>
</sect2> </sect2>
@ -872,14 +870,12 @@ it in a file named <filename>hello.asm</filename>. You need
If you do not have <application>nasm</application>, type: If you do not have <application>nasm</application>, type:
</para> </para>
<screen> <screen>&prompt.user; <userinput>su</userinput>
&prompt.user; <userinput>su</userinput>
Password:<userinput><replaceable>your root password</replaceable></userinput> Password:<userinput><replaceable>your root password</replaceable></userinput>
&prompt.root; <userinput>cd /usr/ports/devel/nasm</userinput> &prompt.root; <userinput>cd /usr/ports/devel/nasm</userinput>
&prompt.root; <userinput>make install</userinput> &prompt.root; <userinput>make install</userinput>
&prompt.root; <userinput>exit</userinput> &prompt.root; <userinput>exit</userinput>
&prompt.user; &prompt.user;</screen>
</screen>
<para> <para>
You may type <userinput>make install clean</userinput> instead of just You may type <userinput>make install clean</userinput> instead of just
@ -906,13 +902,11 @@ page</ulink>. You can still use it to assemble FreeBSD code.
Now you can assemble, link, and run the code: Now you can assemble, link, and run the code:
</para> </para>
<screen> <screen>&prompt.user; <userinput>nasm -f elf hello.asm</userinput>
&prompt.user; <userinput>nasm -f elf hello.asm</userinput>
&prompt.user; <userinput>ld -s -o hello hello.o</userinput> &prompt.user; <userinput>ld -s -o hello hello.o</userinput>
&prompt.user; <userinput>./hello</userinput> &prompt.user; <userinput>./hello</userinput>
Hello, World! Hello, World!
&prompt.user; &prompt.user;</screen>
</screen>
</sect3> </sect3>
@ -1046,14 +1040,12 @@ control key and type <userinput>D</userinput> while holding the
control key down): control key down):
</para> </para>
<screen> <screen>&prompt.user; <userinput>nasm -f elf hex.asm</userinput>
&prompt.user; <userinput>nasm -f elf hex.asm</userinput>
&prompt.user; <userinput>ld -s -o hex hex.o</userinput> &prompt.user; <userinput>ld -s -o hex hex.o</userinput>
&prompt.user; <userinput>./hex</userinput> &prompt.user; <userinput>./hex</userinput>
<userinput>Hello, World!</userinput> <userinput>Hello, World!</userinput>
48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A <userinput>Here I come!</userinput> 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A <userinput>Here I come!</userinput>
48 65 72 65 20 49 20 63 6F 6D 65 21 0A <userinput>^D</userinput> &prompt.user; 48 65 72 65 20 49 20 63 6F 6D 65 21 0A <userinput>^D</userinput> &prompt.user;</screen>
</screen>
<note> <note>
<para> <para>
@ -1142,16 +1134,14 @@ Once you have changed <filename>hex.asm</filename> to reflect
these changes, type: these changes, type:
</para> </para>
<screen> <screen>&prompt.user; <userinput>nasm -f elf hex.asm</userinput>
&prompt.user; <userinput>nasm -f elf hex.asm</userinput>
&prompt.user; <userinput>ld -s -o hex hex.o</userinput> &prompt.user; <userinput>ld -s -o hex hex.o</userinput>
&prompt.user; <userinput>./hex</userinput> &prompt.user; <userinput>./hex</userinput>
<userinput>Hello, World!</userinput> <userinput>Hello, World!</userinput>
48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A
<userinput>Here I come!</userinput> <userinput>Here I come!</userinput>
48 65 72 65 20 49 20 63 6F 6D 65 21 0A 48 65 72 65 20 49 20 63 6F 6D 65 21 0A
<userinput>^D</userinput> &prompt.user; <userinput>^D</userinput> &prompt.user;</screen>
</screen>
<para> <para>
That looks better. But this code is quite inefficient! We That looks better. But this code is quite inefficient! We
@ -1311,16 +1301,14 @@ input from, the system.
Let us see how it works now: Let us see how it works now:
</para> </para>
<screen> <screen>&prompt.user; <userinput>nasm -f elf hex.asm</userinput>
&prompt.user; <userinput>nasm -f elf hex.asm</userinput>
&prompt.user; <userinput>ld -s -o hex hex.o</userinput> &prompt.user; <userinput>ld -s -o hex hex.o</userinput>
&prompt.user; <userinput>./hex</userinput> &prompt.user; <userinput>./hex</userinput>
<userinput>Hello, World!</userinput> <userinput>Hello, World!</userinput>
<userinput>Here I come!</userinput> <userinput>Here I come!</userinput>
48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A
48 65 72 65 20 49 20 63 6F 6D 65 21 0A 48 65 72 65 20 49 20 63 6F 6D 65 21 0A
<userinput>^D</userinput> &prompt.user; <userinput>^D</userinput> &prompt.user;</screen>
</screen>
<para> <para>
Not what you expected? The program did not print the output Not what you expected? The program did not print the output
@ -1434,16 +1422,14 @@ write:
Now, let us see how it works: Now, let us see how it works:
</para> </para>
<screen> <screen>&prompt.user; <userinput>nasm -f elf hex.asm</userinput>
&prompt.user; <userinput>nasm -f elf hex.asm</userinput>
&prompt.user; <userinput>ld -s -o hex hex.o</userinput> &prompt.user; <userinput>ld -s -o hex hex.o</userinput>
&prompt.user; <userinput>./hex</userinput> &prompt.user; <userinput>./hex</userinput>
<userinput>Hello, World!</userinput> <userinput>Hello, World!</userinput>
48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A 48 65 6C 6C 6F 2C 20 57 6F 72 6C 64 21 0A
<userinput>Here I come!</userinput> <userinput>Here I come!</userinput>
48 65 72 65 20 49 20 63 6F 6D 65 21 0A 48 65 72 65 20 49 20 63 6F 6D 65 21 0A
<userinput>^D</userinput> &prompt.user; <userinput>^D</userinput> &prompt.user;</screen>
</screen>
<para> <para>
Not bad for a 644-byte executable, is it! Not bad for a 644-byte executable, is it!
@ -2264,8 +2250,7 @@ Assemble and link it as usual:
</para> </para>
<screen>&prompt.user; <userinput>nasm -f elf webvars.asm</userinput> <screen>&prompt.user; <userinput>nasm -f elf webvars.asm</userinput>
&prompt.user; <userinput>ld -s -o webvars webvars.o</userinput> &prompt.user; <userinput>ld -s -o webvars webvars.o</userinput></screen>
</screen>
<para> <para>
To use it, you need to upload <filename>webvars</filename> to your To use it, you need to upload <filename>webvars</filename> to your
@ -2329,19 +2314,15 @@ to send the output to a different file. Most of the time,
I end up using it like this: I end up using it like this:
</para> </para>
<screen> <screen>&prompt.user; <userinput>tuc <replaceable>myfile tempfile</replaceable></userinput>
&prompt.user; <userinput>tuc <replaceable>myfile tempfile</replaceable></userinput> &prompt.user; <userinput>mv <replaceable>tempfile myfile</replaceable></userinput></screen>
&prompt.user; <userinput>mv <replaceable>tempfile myfile</replaceable></userinput>
</screen>
<para> <para>
It would be nice to have a <application>ftuc</application>, It would be nice to have a <application>ftuc</application>,
i.e., <emphasis>fast tuc</emphasis>, and use it like this: i.e., <emphasis>fast tuc</emphasis>, and use it like this:
</para> </para>
<screen> <screen>&prompt.user; <userinput>ftuc <replaceable>myfile</replaceable></userinput></screen>
&prompt.user; <userinput>ftuc <replaceable>myfile</replaceable></userinput>
</screen>
<para> <para>
In this chapter, then, we will write In this chapter, then, we will write
@ -3316,9 +3297,7 @@ It produces meaningful error messages.
Here is its usage message: Here is its usage message:
</para> </para>
<screen> <screen>Usage: csv [-t&lt;delim&gt;] [-c&lt;comma&gt;] [-p] [-o &lt;outfile&gt;] [-i &lt;infile&gt;]</screen>
Usage: csv [-t&lt;delim&gt;] [-c&lt;comma&gt;] [-p] [-o &lt;outfile&gt;] [-i &lt;infile&gt;]
</screen>
<para> <para>
All parameters are optional, and can appear in any order. All parameters are optional, and can appear in any order.
@ -3365,9 +3344,7 @@ specified.
To get the 11th field of each record, I can now do: To get the 11th field of each record, I can now do:
</para> </para>
<screen> <screen>&prompt.user; <userinput>csv '-t;' <replaceable>data.csv</replaceable> | awk '-F;' '{print $11}'</userinput></screen>
&prompt.user; <userinput>csv '-t;' <replaceable>data.csv</replaceable> | awk '-F;' '{print $11}'</userinput>
</screen>
<para> <para>
The code stores the options (except for the file descriptors) The code stores the options (except for the file descriptors)
@ -4262,9 +4239,7 @@ later) at the focal lengths of <constant>100 mm</constant>,
<constant>150 mm</constant>, and <constant>210 mm</constant>, we may want <constant>150 mm</constant>, and <constant>210 mm</constant>, we may want
to enter something like this:</para> to enter something like this:</para>
<screen> <screen><userinput>100, 150, 210</userinput></screen>
<userinput>100, 150, 210</userinput>
</screen>
<para> <para>
Our program needs to consider more than a single byte of Our program needs to consider more than a single byte of
input at a time. When it sees the first <constant>1</constant>, input at a time. When it sees the first <constant>1</constant>,
@ -4303,19 +4278,16 @@ Plus, it allows me to break up the monotony of computing
and type in a query instead of just a number: and type in a query instead of just a number:
</para> </para>
<screen><userinput>What is the best pinhole diameter for the focal length of 150?</userinput> <screen><userinput>What is the best pinhole diameter for the focal length of 150?</userinput></screen>
</screen>
<para> <para>
There is no reason for the computer to spit out There is no reason for the computer to spit out
a number of complaints: a number of complaints:
</para> </para>
<screen> <screen>Syntax error: What
Syntax error: What
Syntax error: is Syntax error: is
Syntax error: the Syntax error: the
Syntax error: best Syntax error: best</screen>
</screen>
<para> <para>
Et cetera, et cetera, et cetera.</para> Et cetera, et cetera, et cetera.</para>
@ -4597,9 +4569,7 @@ the focal length as entered by the user.
No, wait! Not as entered by the user. What if the user No, wait! Not as entered by the user. What if the user
types in something like this:</para> types in something like this:</para>
<screen> <screen><userinput>00000000150</userinput></screen>
<userinput>00000000150</userinput>
</screen>
<para> <para>
Clearly, we need to strip those leading zeros.</para> Clearly, we need to strip those leading zeros.</para>
@ -4616,9 +4586,7 @@ But...</para>
What if the user types something like this: What if the user types something like this:
</para> </para>
<screen> <screen><userinput>17459765723452353453534535353530530534563507309676764423</userinput></screen>
<userinput>17459765723452353453534535353530530534563507309676764423</userinput>
</screen>
<para> <para>
Ha! The packed decimal <acronym>FPU</acronym> format Ha! The packed decimal <acronym>FPU</acronym> format
lets us input 18&ndash;digit numbers. But the lets us input 18&ndash;digit numbers. But the
@ -4655,9 +4623,7 @@ What will we do?</para>
<para> <para>
We will slap him in the face, in a manner of speaking:</para> We will slap him in the face, in a manner of speaking:</para>
<screen> <screen>17459765723452353453534535353530530534563507309676764423 ??? ??? ??? ??? ???</screen>
17459765723452353453534535353530530534563507309676764423 ??? ??? ??? ??? ???
</screen>
<para> <para>
To achieve that, we will simply ignore any leading zeros. To achieve that, we will simply ignore any leading zeros.
Once we find a non&ndash;zero digit, we will initialize a Once we find a non&ndash;zero digit, we will initialize a
@ -4730,9 +4696,7 @@ to the output, and perform another
"slap in the face": "slap in the face":
</para> </para>
<screen> <screen>0 ??? ??? ??? ??? ???</screen>
0 ??? ??? ??? ??? ???
</screen>
<para> <para>
Once we have displayed the focal Once we have displayed the focal
length and determined it is valid length and determined it is valid
@ -6177,8 +6141,7 @@ we want to <emphasis>ask</emphasis> a couple of questions.
<para> <para>
Our session might look like this:</para> Our session might look like this:</para>
<screen> <screen>&prompt.user; <userinput>pinhole
&prompt.user; <userinput>pinhole
Computer, Computer,
@ -6193,8 +6156,7 @@ What size pinhole do I need for the focal length of 150?</userinput>
<userinput>156?</userinput> <userinput>156?</userinput>
156 500 312 362 3047 12 156 500 312 362 3047 12
<userinput>That's it! Perfect! Thank you very much! <userinput>That's it! Perfect! Thank you very much!
^D</userinput> ^D</userinput></screen>
</screen>
<para> <para>
We have found that while for the focal length We have found that while for the focal length
of 150, our pinhole diameter should be 490 of 150, our pinhole diameter should be 490
@ -6274,22 +6236,17 @@ We can set its permissions to execute,
and run it as if it were a program: and run it as if it were a program:
</para> </para>
<screen> <screen>&prompt.user; <userinput>chmod 755 medium</userinput>
&prompt.user; <userinput>chmod 755 medium</userinput> &prompt.user; <userinput>./medium</userinput></screen>
&prompt.user; <userinput>./medium</userinput>
</screen>
<para> <para>
Unix will interpret that last command as:</para> Unix will interpret that last command as:</para>
<screen> <screen>&prompt.user; <userinput>/usr/local/bin/pinhole -b -i ./medium</userinput></screen>
&prompt.user; <userinput>/usr/local/bin/pinhole -b -i ./medium</userinput>
</screen>
<para> <para>
It will run that command and display: It will run that command and display:
</para> </para>
<screen> <screen>80 358 224 256 1562 11
80 358 224 256 1562 11
30 219 137 128 586 9 30 219 137 128 586 9
40 253 158 181 781 10 40 253 158 181 781 10
50 283 177 181 977 10 50 283 177 181 977 10
@ -6297,20 +6254,16 @@ It will run that command and display:
70 335 209 181 1367 10 70 335 209 181 1367 10
100 400 250 256 1953 11 100 400 250 256 1953 11
120 438 274 256 2344 11 120 438 274 256 2344 11
140 473 296 256 2734 11 140 473 296 256 2734 11</screen>
</screen>
<para> <para>
Now, let us enter:</para> Now, let us enter:</para>
<screen>&prompt.user; <userinput>./medium -c</userinput> <screen>&prompt.user; <userinput>./medium -c</userinput></screen>
</screen>
<para> <para>
Unix will treat that as:</para> Unix will treat that as:</para>
<screen> <screen>&prompt.user; <userinput>/usr/local/bin/pinhole -b -i ./medium -c</userinput></screen>
&prompt.user; <userinput>/usr/local/bin/pinhole -b -i ./medium -c</userinput>
</screen>
<para> <para>
That gives it two conflicting options: That gives it two conflicting options:
<parameter>-b</parameter> and <parameter>-c</parameter> <parameter>-b</parameter> and <parameter>-c</parameter>
@ -6321,8 +6274,7 @@ program will calculate everything
using Connors' constant: using Connors' constant:
</para> </para>
<screen> <screen>80 331 242 256 1826 11
80 331 242 256 1826 11
30 203 148 128 685 9 30 203 148 128 685 9
40 234 171 181 913 10 40 234 171 181 913 10
50 262 191 181 1141 10 50 262 191 181 1141 10
@ -6330,8 +6282,7 @@ using Connors' constant:
70 310 226 256 1598 11 70 310 226 256 1598 11
100 370 270 256 2283 11 100 370 270 256 2283 11
120 405 296 256 2739 11 120 405 296 256 2739 11
140 438 320 362 3196 12 140 438 320 362 3196 12</screen>
</screen>
<para> <para>
We decide we want to go with Bender's We decide we want to go with Bender's
constant after all. We want to save its constant after all. We want to save its
@ -6350,8 +6301,7 @@ focal length in millimeters,pinhole diameter in microns,F-number,normalized F-nu
100,400,250,256,1953,11 100,400,250,256,1953,11
120,438,274,256,2344,11 120,438,274,256,2344,11
140,473,296,256,2734,11 140,473,296,256,2734,11
&prompt.user; &prompt.user;</screen>
</screen>
</sect2> </sect2>
</sect1> </sect1>
@ -6429,8 +6379,7 @@ This is NEVER guaranteed under Unix. It is quite common
for a Unix user to pipe and redirect program input and output: for a Unix user to pipe and redirect program input and output:
</para> </para>
<screen>&prompt.user; <userinput>program1 | program2 | program3 > file1</userinput> <screen>&prompt.user; <userinput>program1 | program2 | program3 > file1</userinput></screen>
</screen>
<para> <para>
If you have written <application>program2</application>, your input If you have written <application>program2</application>, your input

View file

@ -17,7 +17,7 @@
<corpauthor>The FreeBSD Documentation Project</corpauthor> <corpauthor>The FreeBSD Documentation Project</corpauthor>
<pubdate>$FreeBSD: doc/en_US.ISO8859-1/books/faq/book.sgml,v 1.241 2001/06/29 02:30:44 chris Exp $</pubdate> <pubdate>$FreeBSD: doc/en_US.ISO8859-1/books/faq/book.sgml,v 1.242 2001/06/29 03:51:48 chris Exp $</pubdate>
<copyright> <copyright>
<year>1995</year> <year>1995</year>
@ -4116,8 +4116,7 @@ TAG Start DF
<para>[more TAG lines elided]</para> <para>[more TAG lines elided]</para>
<screen> <screen>TAG End DF
TAG End DF
End Tag End Tag
Successfully got 31 resources, 1 logical fdevs Successfully got 31 resources, 1 logical fdevs
@ -4278,8 +4277,7 @@ IO range check 0x00 activate 0x01</screen>
currently set to by: currently set to by:
</para> </para>
<screen>&prompt.root; <userinput>sysctl kern.maxfiles</userinput> <screen>&prompt.root; <userinput>sysctl kern.maxfiles</userinput>
kern.maxfiles: 1064 kern.maxfiles: 1064</screen>
</screen>
</answer> </answer>
</qandaentry> </qandaentry>
@ -6278,8 +6276,7 @@ options SYSVMSG # enable for messaging</programlisting>
convert it into a valid <filename>sendmail.cf</filename> convert it into a valid <filename>sendmail.cf</filename>
is:</para> is:</para>
<screen> <screen>&prompt.root; <userinput>cd /usr/src/usr.sbin/sendmail/cf/cf</userinput>
&prompt.root; <userinput>cd /usr/src/usr.sbin/sendmail/cf/cf</userinput>
&prompt.root; <userinput>make foo.cf</userinput> &prompt.root; <userinput>make foo.cf</userinput>
&prompt.root; <userinput>cp foo.cf /etc/sendmail.cf</userinput></screen> &prompt.root; <userinput>cp foo.cf /etc/sendmail.cf</userinput></screen>
@ -11583,8 +11580,7 @@ doc-all</programlisting>
&prompt.root; <userinput>cd /usr/src</userinput> &prompt.root; <userinput>cd /usr/src</userinput>
&prompt.root; <userinput>make buildworld</userinput> &prompt.root; <userinput>make buildworld</userinput>
&prompt.root; <userinput>cd /usr/src/release</userinput> &prompt.root; <userinput>cd /usr/src/release</userinput>
&prompt.root; <userinput>make release BUILDNAME=3.0-MY-SNAP CHROOTDIR=/some/big/filesystem/release</userinput> &prompt.root; <userinput>make release BUILDNAME=3.0-MY-SNAP CHROOTDIR=/some/big/filesystem/release</userinput></screen>
</screen>
<note> <note>
<para>Please note that you <emphasis>do not</emphasis> <para>Please note that you <emphasis>do not</emphasis>

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.49 2001/06/26 00:09:52 murray Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.50 2001/06/26 20:10:25 murray Exp $
--> -->
<chapter id="advanced-networking"> <chapter id="advanced-networking">
@ -1784,11 +1784,9 @@ ISDN BRI line</literallayout>
all the servers in the NIS domain. Therefore, before we all the servers in the NIS domain. Therefore, before we
initialize the NIS maps, you should:</para> initialize the NIS maps, you should:</para>
<screen> <screen>&prompt.root; <userinput>cp /etc/master.passwd /var/yp/master.passwd</userinput>
&prompt.root; <userinput>cp /etc/master.passwd /var/yp/master.passwd</userinput>
&prompt.root; <userinput>cd /var/yp</userinput> &prompt.root; <userinput>cd /var/yp</userinput>
&prompt.root; <userinput>vi master.passwd</userinput> &prompt.root; <userinput>vi master.passwd</userinput></screen>
</screen>
<para>You should remove all entries regarding system accounts <para>You should remove all entries regarding system accounts
(bin, tty, kmem, games, etc), as well as any accounts that you (bin, tty, kmem, games, etc), as well as any accounts that you
@ -1814,8 +1812,7 @@ ISDN BRI line</literallayout>
To generate the NIS maps, assuming you already performed To generate the NIS maps, assuming you already performed
the steps above, run:</para> the steps above, run:</para>
<screen> <screen>ellington&prompt.root; <userinput>ypinit -m test-domain</userinput>
ellington&prompt.root; <userinput>ypinit -m test-domain</userinput>
Server Type: MASTER Domain: test-domain Server Type: MASTER Domain: test-domain
Creating an YP server will require that you answer a few questions. Creating an YP server will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure. Questions will all be asked at the beginning of the procedure.
@ -1837,8 +1834,7 @@ Is this correct? [y/n: y] <userinput>y</userinput>
[..output from map generation..] [..output from map generation..]
NIS Map update completed. NIS Map update completed.
ellington has been setup as an YP master server without any errors. ellington has been setup as an YP master server without any errors.</screen>
</screen>
<para><command>ypinit</command> should have created <para><command>ypinit</command> should have created
<filename>/var/yp/Makefile</filename> from <filename>/var/yp/Makefile</filename> from
@ -1849,9 +1845,7 @@ ellington has been setup as an YP master server without any errors.
a slave server as well, you must edit a slave server as well, you must edit
<filename>/var/yp/Makefile</filename>:</para> <filename>/var/yp/Makefile</filename>:</para>
<screen> <screen>ellington&prompt.root; <userinput>vi /var/yp/Makefile</userinput></screen>
ellington&prompt.root; <userinput>vi /var/yp/Makefile</userinput>
</screen>
<para>You should comment out the line that says `NOPUSH = <para>You should comment out the line that says `NOPUSH =
"True"' (if it is not commented out already).</para> "True"' (if it is not commented out already).</para>
@ -1872,8 +1866,7 @@ ellington&prompt.root; <userinput>vi /var/yp/Makefile</userinput>
master be passed to it as well, so our command line looks master be passed to it as well, so our command line looks
like:</para> like:</para>
<screen> <screen>coltrane&prompt.root; <userinput>ypinit -s ellington test-domain</userinput>
coltrane&prompt.root; <userinput>ypinit -s ellington test-domain</userinput>
Server Type: SLAVE Domain: test-domain Master: ellington Server Type: SLAVE Domain: test-domain Master: ellington
@ -2135,8 +2128,7 @@ nis_client_enable="YES"</programlisting>
<emphasis>bill</emphasis> from logging on to <hostid>basie</hostid> <emphasis>bill</emphasis> from logging on to <hostid>basie</hostid>
we would:</para> we would:</para>
<screen> <screen>basie&prompt.root; <userinput>vipw</userinput>
basie&prompt.root; <userinput>vipw</userinput>
<userinput>[add -bill to the end, exit]</userinput> <userinput>[add -bill to the end, exit]</userinput>
vipw: rebuilding the database... vipw: rebuilding the database...
vipw: done vipw: done
@ -2303,9 +2295,7 @@ basie&prompt.root;</screen>
default, but its NIS implementation will support it once it has default, but its NIS implementation will support it once it has
been created. To create an empty map, simply type</para> been created. To create an empty map, simply type</para>
<screen> <screen>ellington&prompt.root; <userinput>vi /var/yp/netgroup</userinput></screen>
ellington&prompt.root; <userinput>vi /var/yp/netgroup</userinput>
</screen>
<para>and start adding content. For our example, we need at <para>and start adding content. For our example, we need at
least four netgroups: IT employees, IT apprentices, normal least four netgroups: IT employees, IT apprentices, normal
@ -2375,10 +2365,8 @@ BIGGROUP BIGGRP1 BIGGRP2 BIGGRP3</programlisting>
<para>Activating and distributing your new NIS map is <para>Activating and distributing your new NIS map is
easy:</para> easy:</para>
<screen> <screen>ellington&prompt.root; <userinput>cd /var/yp</userinput>
ellington&prompt.root; <userinput>cd /var/yp</userinput> ellington&prompt.root; <userinput>make</userinput></screen>
ellington&prompt.root; <userinput>make</userinput>
</screen>
<para>This will generate the three NIS maps <para>This will generate the three NIS maps
<filename>netgroup</filename>, <filename>netgroup</filename>,
@ -2386,11 +2374,9 @@ ellington&prompt.root; <userinput>make</userinput>
<filename>netgroup.byuser</filename>. Use &man.ypcat.1; to <filename>netgroup.byuser</filename>. Use &man.ypcat.1; to
check if your new NIS maps are available:</para> check if your new NIS maps are available:</para>
<screen> <screen>ellington&prompt.user; <userinput>ypcat -k netgroup</userinput>
ellington&prompt.user; <userinput>ypcat -k netgroup</userinput>
ellington&prompt.user; <userinput>ypcat -k netgroup.byhost</userinput> ellington&prompt.user; <userinput>ypcat -k netgroup.byhost</userinput>
ellington&prompt.user; <userinput>ypcat -k netgroup.byuser</userinput> ellington&prompt.user; <userinput>ypcat -k netgroup.byuser</userinput></screen>
</screen>
<para>The output of the first command should resemble the <para>The output of the first command should resemble the
contents of <filename>/var/yp/netgroup</filename>. The second contents of <filename>/var/yp/netgroup</filename>. The second
@ -2578,8 +2564,7 @@ TWO (,hotel,test-domain)
For example, if we needed to add a new user For example, if we needed to add a new user
&ldquo;jsmith&rdquo; to the lab, we would:</para> &ldquo;jsmith&rdquo; to the lab, we would:</para>
<screen> <screen>&prompt.root; <userinput>pw useradd jsmith</userinput>
&prompt.root; <userinput>pw useradd jsmith</userinput>
&prompt.root; <userinput>cd /var/yp</userinput> &prompt.root; <userinput>cd /var/yp</userinput>
&prompt.root; <userinput>make test-domain</userinput></screen> &prompt.root; <userinput>make test-domain</userinput></screen>
@ -2659,8 +2644,7 @@ TWO (,hotel,test-domain)
<filename>/usr/lib</filename>. If the machine is configured to <filename>/usr/lib</filename>. If the machine is configured to
use the DES libraries, it will look something like this:</para> use the DES libraries, it will look something like this:</para>
<screen> <screen>&prompt.user; <userinput>ls -l /usr/lib/*crypt*</userinput>
&prompt.user; <userinput>ls -l /usr/lib/*crypt*</userinput>
lrwxrwxrwx 1 root wheel 13 Jul 15 08:55 /usr/lib/libcrypt.a@ -> libdescrypt.a lrwxrwxrwx 1 root wheel 13 Jul 15 08:55 /usr/lib/libcrypt.a@ -> libdescrypt.a
lrwxrwxrwx 1 root wheel 14 Jul 15 08:55 /usr/lib/libcrypt.so@ -> libdescrypt.so lrwxrwxrwx 1 root wheel 14 Jul 15 08:55 /usr/lib/libcrypt.so@ -> libdescrypt.so
lrwxrwxrwx 1 root wheel 16 Jul 15 08:55 /usr/lib/libcrypt.so.2@ -> libdescrypt.so.2 lrwxrwxrwx 1 root wheel 16 Jul 15 08:55 /usr/lib/libcrypt.so.2@ -> libdescrypt.so.2
@ -2673,8 +2657,7 @@ lrwxr-xr-x 1 root wheel 16 Nov 8 14:27 /usr/lib/libdescrypt.so@ -> libdes
<para>If the machine is configured to use the standard FreeBSD MD5 <para>If the machine is configured to use the standard FreeBSD MD5
crypt libraries they will look something like this:</para> crypt libraries they will look something like this:</para>
<screen> <screen>&prompt.user; <userinput>ls -l /usr/lib/*crypt*</userinput>
&prompt.user; <userinput>ls -l /usr/lib/*crypt*</userinput>
lrwxrwxrwx 1 root wheel 13 Jul 15 08:55 /usr/lib/libcrypt.a@ -> libscrypt.a lrwxrwxrwx 1 root wheel 13 Jul 15 08:55 /usr/lib/libcrypt.a@ -> libscrypt.a
lrwxrwxrwx 1 root wheel 14 Jul 15 08:55 /usr/lib/libcrypt.so@ -> libscrypt.so lrwxrwxrwx 1 root wheel 14 Jul 15 08:55 /usr/lib/libcrypt.so@ -> libscrypt.so
lrwxrwxrwx 1 root wheel 16 Jul 15 08:55 /usr/lib/libcrypt.so.2@ -> libscrypt.so.2 lrwxrwxrwx 1 root wheel 16 Jul 15 08:55 /usr/lib/libcrypt.so.2@ -> libscrypt.so.2
@ -3102,8 +3085,7 @@ dhcp_flags=""</programlisting>
<para>Be sure to <para>Be sure to
</para> </para>
<screen>&prompt.root; <userinput>cd /etc/namedb</userinput> <screen>&prompt.root; <userinput>cd /etc/namedb</userinput>
&prompt.root; <userinput>sh make-localhost</userinput> &prompt.root; <userinput>sh make-localhost</userinput></screen>
</screen>
<para>to properly create your local reverse dns zone file in <para>to properly create your local reverse dns zone file in
<filename>/etc/namedb/localhost.rev</filename>. <filename>/etc/namedb/localhost.rev</filename>.
</para> </para>
@ -3112,7 +3094,7 @@ dhcp_flags=""</programlisting>
<sect3> <sect3>
<title><filename>/etc/namedb/named.conf</filename></title> <title><filename>/etc/namedb/named.conf</filename></title>
<programlisting>// $FreeBSD: doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.49 2001/06/26 00:09:52 murray Exp $ <programlisting>// $FreeBSD: doc/en_US.ISO8859-1/books/handbook/advanced-networking/chapter.sgml,v 1.50 2001/06/26 20:10:25 murray Exp $
// //
// Refer to the named(8) man page for details. If you are ever going // Refer to the named(8) man page for details. If you are ever going
// to setup a primary server, make sure you've understood the hairy // to setup a primary server, make sure you've understood the hairy
@ -3485,8 +3467,7 @@ www IN CNAME @
the <filename>/etc/namedb/sandbox</filename> directory the command the <filename>/etc/namedb/sandbox</filename> directory the command
line for named would look like this: line for named would look like this:
</para> </para>
<screen> &prompt.root; <userinput>/usr/sbin/named -u bind -g bind -t /etc/namedb/sandbox &lt;path_to_named.conf> </userinput> <screen> &prompt.root; <userinput>/usr/sbin/named -u bind -g bind -t /etc/namedb/sandbox &lt;path_to_named.conf> </userinput></screen>
</screen>
<para>The following steps should be taken in order to <para>The following steps should be taken in order to
successfully run named in a sandbox. Throughout the following successfully run named in a sandbox. Throughout the following

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/boot/chapter.sgml,v 1.11 2001/06/23 06:57:01 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/boot/chapter.sgml,v 1.12 2001/06/29 18:31:16 murray Exp $
--> -->
<chapter id="boot"> <chapter id="boot">
@ -82,8 +82,7 @@
<example id="boot-boot0-example"> <example id="boot-boot0-example">
<title>boot0 screenshot</title> <title>boot0 screenshot</title>
<screen> <screen>F1 DOS
F1 DOS
F2 FreeBSD F2 FreeBSD
F3 Linux F3 Linux
F4 ?? F4 ??

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml,v 1.33 2001/06/26 20:10:24 murray Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/disks/chapter.sgml,v 1.34 2001/06/28 16:42:01 nik Exp $
--> -->
<chapter id="disks"> <chapter id="disks">
@ -1105,8 +1105,7 @@ scsibus1:
1,4,0 104) * 1,4,0 104) *
1,5,0 105) 'YAMAHA ' 'CRW4260 ' '1.0q' Removable CD-ROM 1,5,0 105) 'YAMAHA ' 'CRW4260 ' '1.0q' Removable CD-ROM
1,6,0 106) 'ARTEC ' 'AM12S ' '1.06' Scanner 1,6,0 106) 'ARTEC ' 'AM12S ' '1.06' Scanner
1,7,0 107) * 1,7,0 107) *</screen>
</screen>
<para>This lists the appropriate <option>dev</option> value for the <para>This lists the appropriate <option>dev</option> value for the
devices on the list. Locate your CD burner, and use the three devices on the list. Locate your CD burner, and use the three

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.31 2001/04/17 01:37:31 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/kerneldebug/chapter.sgml,v 1.32 2001/06/17 12:29:19 schweikh Exp $
--> -->
<chapter id="kerneldebug"> <chapter id="kerneldebug">
@ -576,8 +576,7 @@ Id Refs Address Size Name
1 4 0xc0100000 1c1678 kernel 1 4 0xc0100000 1c1678 kernel
2 1 0xc0a9e000 6000 linprocfs.ko 2 1 0xc0a9e000 6000 linprocfs.ko
3 1 0xc0ad7000 2000 warp_saver.ko 3 1 0xc0ad7000 2000 warp_saver.ko
4 1 0xc0adc000 11000 linux.ko 4 1 0xc0adc000 11000 linux.ko</screen>
</screen>
<para>If you are debugging a crash dump, you'll need to walk the <para>If you are debugging a crash dump, you'll need to walk the
<literal>linker_files</literal> list, starting at <literal>linker_files</literal> list, starting at

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO_8859-1/books/handbook/kernelopts/chapter.sgml,v 1.16 2000/06/14 00:47:36 jim Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/kernelopts/chapter.sgml,v 1.17 2001/04/09 00:33:52 dd Exp $
--> -->
<chapter id="kernelopts"> <chapter id="kernelopts">
@ -127,9 +127,7 @@
<para>Finally, find out which kernel files depend on the new option. <para>Finally, find out which kernel files depend on the new option.
Unless you have just invented your option, and it does not exist Unless you have just invented your option, and it does not exist
anywhere yet, <screen> anywhere yet, <screen>&prompt.user; <userinput>find /usr/src/sys -type f | xargs fgrep NEW_OPTION</userinput></screen>
&prompt.user; <userinput>find /usr/src/sys -type f | xargs fgrep NEW_OPTION</userinput>
</screen>
is your friend in finding them. Go and edit all those files, and add is your friend in finding them. Go and edit all those files, and add
<programlisting>#include "opt_foo.h"</programlisting> <emphasis>on <programlisting>#include "opt_foo.h"</programlisting> <emphasis>on
top</emphasis> before all the <literal>#include &lt;xxx.h&gt;</literal> stuff. top</emphasis> before all the <literal>#include &lt;xxx.h&gt;</literal> stuff.

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml,v 1.39 2001/06/26 15:40:22 phantom Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/linuxemu/chapter.sgml,v 1.40 2001/06/29 18:35:30 murray Exp $
--> -->
<chapter id="linuxemu"> <chapter id="linuxemu">
@ -345,8 +345,7 @@ multi on</programlisting>
<para>Alternatively, you can simply set the default ELF brand <para>Alternatively, you can simply set the default ELF brand
to Linux for all unbranded binaries with the command:</para> to Linux for all unbranded binaries with the command:</para>
<screen>&prompt.root; <userinput>sysctl -w kern.fallback_elf_brand=3</userinput> <screen>&prompt.root; <userinput>sysctl -w kern.fallback_elf_brand=3</userinput></screen>
</screen>
<para>This will make FreeBSD assume that unbranded ELF binaries <para>This will make FreeBSD assume that unbranded ELF binaries
use the Linux ABI and so you should be able to run the use the Linux ABI and so you should be able to run the
installer straight from the CDROM.</para> installer straight from the CDROM.</para>

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/mirrors/chapter.sgml,v 1.129 2001/06/29 03:41:44 jdp Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/mirrors/chapter.sgml,v 1.130 2001/07/04 18:22:36 jdp Exp $
--> -->
<appendix id="mirrors"> <appendix id="mirrors">
@ -1248,8 +1248,7 @@
<title>Checking out something from -CURRENT (&man.ls.1;) and <title>Checking out something from -CURRENT (&man.ls.1;) and
deleting it again:</title> deleting it again:</title>
<screen> <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput> &prompt.user; <userinput>cvs login</userinput>
<emphasis>At the prompt, enter the password</emphasis> <quote>anoncvs</quote>. <emphasis>At the prompt, enter the password</emphasis> <quote>anoncvs</quote>.
&prompt.user; <userinput>cvs co ls</userinput> &prompt.user; <userinput>cvs co ls</userinput>
@ -1262,8 +1261,7 @@
<title>Checking out the version of &man.ls.1; in the 3.X-STABLE <title>Checking out the version of &man.ls.1; in the 3.X-STABLE
branch:</title> branch:</title>
<screen> <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput> &prompt.user; <userinput>cvs login</userinput>
<emphasis>At the prompt, enter the password</emphasis> <quote>anoncvs</quote>. <emphasis>At the prompt, enter the password</emphasis> <quote>anoncvs</quote>.
&prompt.user; <userinput>cvs co -rRELENG_3 ls</userinput> &prompt.user; <userinput>cvs co -rRELENG_3 ls</userinput>
@ -1275,8 +1273,7 @@
<example> <example>
<title>Creating a list of changes (as unified diffs) to &man.ls.1;</title> <title>Creating a list of changes (as unified diffs) to &man.ls.1;</title>
<screen> <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput> &prompt.user; <userinput>cvs login</userinput>
<emphasis>At the prompt, enter the password</emphasis> <quote>anoncvs</quote>. <emphasis>At the prompt, enter the password</emphasis> <quote>anoncvs</quote>.
&prompt.user; <userinput>cvs rdiff -u -rRELENG_3_0_0_RELEASE -rRELENG_3_4_0_RELEASE ls</userinput> &prompt.user; <userinput>cvs rdiff -u -rRELENG_3_0_0_RELEASE -rRELENG_3_4_0_RELEASE ls</userinput>
@ -1287,8 +1284,7 @@
<example> <example>
<title>Finding out what other module names can be used:</title> <title>Finding out what other module names can be used:</title>
<screen> <screen>&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>setenv CVSROOT :pserver:anoncvs@anoncvs.FreeBSD.org:/home/ncvs</userinput>
&prompt.user; <userinput>cvs login</userinput> &prompt.user; <userinput>cvs login</userinput>
<emphasis>At the prompt, enter the password</emphasis> <quote>anoncvs</quote>. <emphasis>At the prompt, enter the password</emphasis> <quote>anoncvs</quote>.
&prompt.user; <userinput>cvs co modules</userinput> &prompt.user; <userinput>cvs co modules</userinput>
@ -2272,8 +2268,7 @@ src-all</programlisting>
the German applications, you can put the following in your the German applications, you can put the following in your
<emphasis>refuse file</emphasis>:</para> <emphasis>refuse file</emphasis>:</para>
<screen> <screen>ports/chinese
ports/chinese
ports/german ports/german
ports/japanese ports/japanese
ports/korean ports/korean

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/sound/chapter.sgml,v 1.5 2001/04/09 00:33:57 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/sound/chapter.sgml,v 1.6 2001/06/25 22:06:44 murray Exp $
--> -->
<chapter id="sound"> <chapter id="sound">
@ -204,16 +204,14 @@ pcm0: &lt;Aureal Vortex 8830&gt; at memory 0xfeb40000 irq 5 (4p/1r +channels dup
<devicename>pcm0</devicename>, <command>su</command> to <devicename>pcm0</devicename>, <command>su</command> to
<username>root</username> and do the following:</para> <username>root</username> and do the following:</para>
<screen> <screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>sh MAKEDEV snd0</userinput></screen> &prompt.root; <userinput>sh MAKEDEV snd0</userinput></screen>
<para>If it reported no errors and returned <para>If it reported no errors and returned
<devicename>pcm1</devicename>, <command>su</command> to <devicename>pcm1</devicename>, <command>su</command> to
<username>root</username> and do the following:</para> <username>root</username> and do the following:</para>
<screen> <screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>sh MAKEDEV snd1</userinput></screen> &prompt.root; <userinput>sh MAKEDEV snd1</userinput></screen>
<para>Please note that either of the above commands will <para>Please note that either of the above commands will

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/ports/chapter.sgml,v 1.117 2001/06/23 06:57:03 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/ports/chapter.sgml,v 1.118 2001/06/28 12:58:25 tom Exp $
--> -->
<chapter id="ports"> <chapter id="ports">
@ -255,8 +255,7 @@ local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz
471488 bytes received in 5.37 seconds (85.70 KB/s) 471488 bytes received in 5.37 seconds (85.70 KB/s)
ftp> <userinput>exit</userinput> ftp> <userinput>exit</userinput>
&prompt.root; <userinput>pkg_add <replaceable>xchat-1.7.1.tgz</replaceable></userinput> &prompt.root; <userinput>pkg_add <replaceable>xchat-1.7.1.tgz</replaceable></userinput>
&prompt.root; &prompt.root;</screen>
</screen>
</example> </example>
<para>If you don't have a source of local packages (such as a <para>If you don't have a source of local packages (such as a
@ -266,8 +265,7 @@ ftp> <userinput>exit</userinput>
and then to fetch and install the package from an FTP site. and then to fetch and install the package from an FTP site.
</para> </para>
<screen>&prompt.root; <userinput>pkg_add -r <replaceable>xchat-1.7.1</replaceable></userinput> <screen>&prompt.root; <userinput>pkg_add -r <replaceable>xchat-1.7.1</replaceable></userinput></screen>
</screen>
<para>This would download the correct package and add it without <para>This would download the correct package and add it without
any further user intervention.</para> any further user intervention.</para>
@ -294,8 +292,7 @@ ftp> <userinput>exit</userinput>
<sect2> <sect2>
<title>Deleting a Package</title> <title>Deleting a Package</title>
<screen>&prompt.root <userinput>pkg_delete <replaceable>xchat-1.7.1</replaceable></userinput> <screen>&prompt.root <userinput>pkg_delete <replaceable>xchat-1.7.1</replaceable></userinput>
&prompt.root &prompt.root</screen>
</screen>
<para>&man.pkg.delete.1; is the utility for removing <para>&man.pkg.delete.1; is the utility for removing
previously installed software package distributions. previously installed software package distributions.
</para> </para>
@ -311,8 +308,7 @@ ftp> <userinput>exit</userinput>
<screen>&prompt.root <userinput>pkg_info</userinput> <screen>&prompt.root <userinput>pkg_info</userinput>
cvsup-bin-16.1 A general network file distribution system optimized for CV cvsup-bin-16.1 A general network file distribution system optimized for CV
docbook-1.2 Meta-port for the different versions of the DocBook DTD docbook-1.2 Meta-port for the different versions of the DocBook DTD
... ...</screen>
</screen>
<para>&man.pkg.version.1; a utility that summarizes the <para>&man.pkg.version.1; a utility that summarizes the
versions of all installed packages. It compares the package versions of all installed packages. It compares the package
version to the current version found in the ports tree. version to the current version found in the ports tree.
@ -320,8 +316,7 @@ docbook-1.2 Meta-port for the different versions of the DocBook DTD
<screen>&prompt.root <userinput>pkg_version</userinput> <screen>&prompt.root <userinput>pkg_version</userinput>
cvsup-bin = cvsup-bin =
docbook = docbook =
... ...</screen>
</screen>
<para>The symbols in the second column indicate the relative age <para>The symbols in the second column indicate the relative age
of the installed version and the version available in the local of the installed version and the version available in the local

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/security/chapter.sgml,v 1.53 2001/06/29 13:34:34 tom Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/security/chapter.sgml,v 1.54 2001/06/30 14:31:14 murray Exp $
--> -->
<chapter id="security"> <chapter id="security">
@ -2509,7 +2509,6 @@ options IPSEC_ESP #IP security (crypto; define w/IPSEC)</progr
</para> </para>
<screen> <screen>
(1) (1)
HOST A ------> HOST B HOST A ------> HOST B
@ -2535,27 +2534,23 @@ options IPSEC_ESP #IP security (crypto; define w/IPSEC)</progr
IV length = 8 IV length = 8
KEY=PASSWORD KEY=PASSWORD
SPI=3000 SPI=3000
</screen>
</screen>
<para>Now, let's setup security association. Execute &man.setkey.8; <para>Now, let's setup security association. Execute &man.setkey.8;
on both HOST A and B:</para> on both HOST A and B:</para>
<screen> <screen>
&prompt.root; <command>setkey -c</command> &prompt.root; <command>setkey -c</command>
add 10.2.3.4 10.6.7.8 ah-old 1000 -m transport -A keyed-md5 "MYSECRETMYSECRET" ; add 10.2.3.4 10.6.7.8 ah-old 1000 -m transport -A keyed-md5 "MYSECRETMYSECRET" ;
add 10.6.7.8 10.2.3.4 ah 2000 -m transport -A hmac-sha1 "KAMEKAMEKAMEKAMEKAME" ; add 10.6.7.8 10.2.3.4 ah 2000 -m transport -A hmac-sha1 "KAMEKAMEKAMEKAMEKAME" ;
add 10.6.7.8 10.2.3.4 esp 3000 -m transport -E des-cbc "PASSWORD" ; add 10.6.7.8 10.2.3.4 esp 3000 -m transport -E des-cbc "PASSWORD" ;
^D ^D
</screen>
</screen>
<para>Actually, IPsec communication doesn't process until security policy <para>Actually, IPsec communication doesn't process until security policy
entries will be defined. In this case, you must setup each host.</para> entries will be defined. In this case, you must setup each host.</para>
<screen> <screen>
At A: At A:
&prompt.root; <command>setkey -c</command> &prompt.root; <command>setkey -c</command>
@ -2580,8 +2575,7 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
<========= new AH hmac-sha1 =========== <========= new AH hmac-sha1 ===========
<========= new ESP des-cbc ============ <========= new ESP des-cbc ============
</screen>
</screen>
</sect2> </sect2>
<sect2> <sect2>
@ -2593,20 +2587,17 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
Host-A and Host-B.</para> Host-A and Host-B.</para>
<screen> <screen>
============ ESP ============ ============ ESP ============
| | | |
Host-A Host-B Host-A Host-B
fec0::10 -------------------- fec0::11 fec0::10 -------------------- fec0::11
</screen>
</screen>
<para>Encryption algorithm is blowfish-cbc whose key is "kamekame", and <para>Encryption algorithm is blowfish-cbc whose key is "kamekame", and
authentication algorithm is hmac-sha1 whose key is "this is the test authentication algorithm is hmac-sha1 whose key is "this is the test
key". Configuration at Host-A:</para> key". Configuration at Host-A:</para>
<screen> <screen>
&prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename> &prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename>
spdadd fec0::10[any] fec0::11[110] tcp -P out ipsec spdadd fec0::10[any] fec0::11[110] tcp -P out ipsec
esp/transport/fec0::10-fec0::11/use ; esp/transport/fec0::10-fec0::11/use ;
@ -2621,13 +2612,11 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
-E blowfish-cbc "kamekame" -E blowfish-cbc "kamekame"
-A hmac-sha1 "this is the test key" ; -A hmac-sha1 "this is the test key" ;
EOF EOF
</screen>
</screen>
<para>and at Host-B:</para> <para>and at Host-B:</para>
<screen> <screen>&prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename>
&prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename>
spdadd fec0::11[110] fec0::10[any] tcp -P out ipsec spdadd fec0::11[110] fec0::10[any] tcp -P out ipsec
esp/transport/fec0::11-fec0::10/use ; esp/transport/fec0::11-fec0::10/use ;
spdadd fec0::10[any] fec0::11[110] tcp -P in ipsec spdadd fec0::10[any] fec0::11[110] tcp -P in ipsec
@ -2639,8 +2628,7 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
-E blowfish-cbc "kamekame" -E blowfish-cbc "kamekame"
-A hmac-sha1 "this is the test key" ; -A hmac-sha1 "this is the test key" ;
EOF EOF
</screen>
</screen>
<para>Note the direction of SP.</para> <para>Note the direction of SP.</para>
</sect2> </sect2>
@ -2655,18 +2643,15 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
authentication algorithm.</para> authentication algorithm.</para>
<screen> <screen>
======= AH ======= ======= AH =======
| | | |
Network-A Gateway-A Gateway-B Network-B Network-A Gateway-A Gateway-B Network-B
10.0.1.0/24 ---- 172.16.0.1 ----- 172.16.0.2 ---- 10.0.2.0/24 10.0.1.0/24 ---- 172.16.0.1 ----- 172.16.0.2 ---- 10.0.2.0/24
</screen>
</screen>
<para>Configuration at Gateway-A:</para> <para>Configuration at Gateway-A:</para>
<screen> <screen>
&prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename> &prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename>
spdadd 10.0.1.0/24 10.0.2.0/24 any -P out ipsec spdadd 10.0.1.0/24 10.0.2.0/24 any -P out ipsec
ah/tunnel/172.16.0.1-172.16.0.2/require ; ah/tunnel/172.16.0.1-172.16.0.2/require ;
@ -2678,8 +2663,7 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
-A keyed-md5 "this is the test" ; -A keyed-md5 "this is the test" ;
EOF EOF
</screen>
</screen>
<para>If port number field is omitted such above then "[any]" is <para>If port number field is omitted such above then "[any]" is
employed. `-m' specifies the mode of SA to be used. "-m any" means employed. `-m' specifies the mode of SA to be used. "-m any" means
@ -2689,7 +2673,6 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
<para>and at Gateway-B:</para> <para>and at Gateway-B:</para>
<screen> <screen>
&prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename> &prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename>
spdadd 10.0.2.0/24 10.0.1.0/24 any -P out ipsec spdadd 10.0.2.0/24 10.0.1.0/24 any -P out ipsec
ah/tunnel/172.16.0.2-172.16.0.1/require ; ah/tunnel/172.16.0.2-172.16.0.1/require ;
@ -2701,8 +2684,7 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
-A keyed-md5 "this is the test" ; -A keyed-md5 "this is the test" ;
EOF EOF
</screen>
</screen>
<para>Making SA bundle between two security gateways</para> <para>Making SA bundle between two security gateways</para>
@ -2711,14 +2693,12 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
and AH transport mode is next.</para> and AH transport mode is next.</para>
<screen> <screen>
========== AH ========= ========== AH =========
| ======= ESP ===== | | ======= ESP ===== |
| | | | | | | |
Network-A Gateway-A Gateway-B Network-B Network-A Gateway-A Gateway-B Network-B
fec0:0:0:1::/64 --- fec0:0:0:1::1 ---- fec0:0:0:2::1 --- fec0:0:0:2::/64 fec0:0:0:1::/64 --- fec0:0:0:1::1 ---- fec0:0:0:2::1 --- fec0:0:0:2::/64
</screen>
</screen>
</sect2> </sect2>
<sect2> <sect2>
@ -2729,7 +2709,6 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
Configuration at Gateway-A:</para> Configuration at Gateway-A:</para>
<screen> <screen>
&prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename> &prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename>
spdadd fec0:0:0:1::/64 fec0:0:0:2::/64 any -P out ipsec spdadd fec0:0:0:1::/64 fec0:0:0:2::/64 any -P out ipsec
esp/tunnel/fec0:0:0:1::1-fec0:0:0:2::1/require esp/tunnel/fec0:0:0:1::1-fec0:0:0:2::1/require
@ -2749,8 +2728,7 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
-A hmac-md5 "this is the test" ; -A hmac-md5 "this is the test" ;
EOF EOF
</screen>
</screen>
<para>Making SAs with the different end</para> <para>Making SAs with the different end</para>
@ -2761,19 +2739,16 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
hmac-md5.</para> hmac-md5.</para>
<screen> <screen>
================== ESP ================= ================== ESP =================
| ======= ESP ======= | | ======= ESP ======= |
| | | | | | | |
Host-A Gateway-A Host-B Host-A Gateway-A Host-B
fec0:0:0:1::1 ---- fec0:0:0:2::1 ---- fec0:0:0:2::2 fec0:0:0:1::1 ---- fec0:0:0:2::1 ---- fec0:0:0:2::2
</screen>
</screen>
<para>Configuration at Host-A:</para> <para>Configuration at Host-A:</para>
<screen> <screen>
&prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename> &prompt.root; <command>setkey -c</command> &lt;&lt;<filename>EOF</filename>
spdadd fec0:0:0:1::1[any] fec0:0:0:2::2[80] tcp -P out ipsec spdadd fec0:0:0:1::1[any] fec0:0:0:2::2[80] tcp -P out ipsec
esp/transport/fec0:0:0:1::1-fec0:0:0:2::2/use esp/transport/fec0:0:0:1::1-fec0:0:0:2::2/use
@ -2797,8 +2772,7 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
-A hmac-md5 "this is the test" ; -A hmac-md5 "this is the test" ;
EOF EOF
</screen>
</screen>
</sect2> </sect2>
</sect1> </sect1>
@ -2870,8 +2844,7 @@ spdadd 10.6.7.8 10.2.3.4 any -P out ipsec
Host key not found from the list of known hosts. Host key not found from the list of known hosts.
Are you sure you want to continue connecting (yes/no)? <userinput>yes</userinput> Are you sure you want to continue connecting (yes/no)? <userinput>yes</userinput>
Host 'foobardomain.com' added to the list of known hosts. Host 'foobardomain.com' added to the list of known hosts.
user@foobardomain.com's password: <userinput>*******</userinput> user@foobardomain.com's password: <userinput>*******</userinput></screen>
</screen>
<para>The login will continue just as it would have if a session was <para>The login will continue just as it would have if a session was
created using rlogin or telnet. SSH utilizes a key fingerprint created using rlogin or telnet. SSH utilizes a key fingerprint
@ -2901,8 +2874,7 @@ user@foobardomain.com's password: <userinput>*******</userinput>
user@foobardomain.com's password: user@foobardomain.com's password:
COPYRIGHT 100% |*****************************| 4735 COPYRIGHT 100% |*****************************| 4735
00:00 00:00
&prompt.root &prompt.root</screen>
</screen>
<para>Since the fingerprint was already saved for this host in the <para>Since the fingerprint was already saved for this host in the
previous example, it is verified when using <command>scp</command> previous example, it is verified when using <command>scp</command>
here. here.
@ -2943,8 +2915,7 @@ Enter file in which to save the key (/home/user/.ssh/identity):
Enter passphrase: Enter passphrase:
Enter the same passphrase again: Enter the same passphrase again:
Your identification has been saved in /home/user/.ssh/identity. Your identification has been saved in /home/user/.ssh/identity.
... ...</screen>
</screen>
<para>&man.ssh-keygen.1; will create a public and private <para>&man.ssh-keygen.1; will create a public and private
key pair for use in authentication. The private key is stored in key pair for use in authentication. The private key is stored in
@ -2979,8 +2950,7 @@ Your identification has been saved in /home/user/.ssh/identity.
for telnet.</para> for telnet.</para>
<screen>&prompt.user; <userinput>ssh -2 -N -f -L <replaceable>5023:localhost:23 user@foo.bar.com</replaceable></userinput> <screen>&prompt.user; <userinput>ssh -2 -N -f -L <replaceable>5023:localhost:23 user@foo.bar.com</replaceable></userinput>
&prompt.user; &prompt.user;</screen>
</screen>
<itemizedlist> <itemizedlist>
<listitem> <listitem>
@ -3030,8 +3000,7 @@ user@mailserver.foobar.com's password: <userinput>*****</userinput>
Trying 127.0.0.1... Trying 127.0.0.1...
Connected to localhost. Connected to localhost.
Escape character is '^]'. Escape character is '^]'.
220 mailserver.foobar.com ESMTP 220 mailserver.foobar.com ESMTP</screen>
</screen>
<para>This can be used in conjunction with an &man.ssh-keygen.1; <para>This can be used in conjunction with an &man.ssh-keygen.1;
and additional user accounts to create a more seamless/hassle-free and additional user accounts to create a more seamless/hassle-free

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/sound/chapter.sgml,v 1.5 2001/04/09 00:33:57 dd Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/sound/chapter.sgml,v 1.6 2001/06/25 22:06:44 murray Exp $
--> -->
<chapter id="sound"> <chapter id="sound">
@ -204,16 +204,14 @@ pcm0: &lt;Aureal Vortex 8830&gt; at memory 0xfeb40000 irq 5 (4p/1r +channels dup
<devicename>pcm0</devicename>, <command>su</command> to <devicename>pcm0</devicename>, <command>su</command> to
<username>root</username> and do the following:</para> <username>root</username> and do the following:</para>
<screen> <screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>sh MAKEDEV snd0</userinput></screen> &prompt.root; <userinput>sh MAKEDEV snd0</userinput></screen>
<para>If it reported no errors and returned <para>If it reported no errors and returned
<devicename>pcm1</devicename>, <command>su</command> to <devicename>pcm1</devicename>, <command>su</command> to
<username>root</username> and do the following:</para> <username>root</username> and do the following:</para>
<screen> <screen>&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>cd /dev</userinput>
&prompt.root; <userinput>sh MAKEDEV snd1</userinput></screen> &prompt.root; <userinput>sh MAKEDEV snd1</userinput></screen>
<para>Please note that either of the above commands will <para>Please note that either of the above commands will

View file

@ -1,7 +1,7 @@
<!-- <!--
The FreeBSD Documentation Project The FreeBSD Documentation Project
$FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.21 2001/06/24 04:25:29 murray Exp $ $FreeBSD: doc/en_US.ISO8859-1/books/handbook/x11/chapter.sgml,v 1.22 2001/06/28 21:17:14 tom Exp $
--> -->
<chapter id="x11"> <chapter id="x11">
@ -1337,9 +1337,7 @@ For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.</scree
rendering backends. To enable the freetype module just add the rendering backends. To enable the freetype module just add the
following line to the module section of your following line to the module section of your
<filename>/etc/X11/XF86Config</filename> file. <filename>/etc/X11/XF86Config</filename> file.
<screen> <screen>Load "freetype"</screen>
Load "freetype"
</screen>
</para> </para>
<para>For <application>XFree86</application> 3.3.X you will need <para>For <application>XFree86</application> 3.3.X you will need
@ -1361,18 +1359,14 @@ For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.</scree
knows that you've installed these new files. There is a FreeBSD knows that you've installed these new files. There is a FreeBSD
port for <application>ttmkfdir</application> in port for <application>ttmkfdir</application> in
<filename>/usr/ports/x11-fonts/ttmkfdir</filename>.</para> <filename>/usr/ports/x11-fonts/ttmkfdir</filename>.</para>
<screen> <screen>&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts/TrueType</userinput>
&prompt.root; <userinput>cd /usr/X11R6/lib/X11/fonts/TrueType</userinput> &prompt.root; <userinput>ttmkfdir > fonts.dir</userinput></screen>
&prompt.root; <userinput>ttmkfdir > fonts.dir</userinput>
</screen>
<para>Now you need to add your TrueType directory to your fonts <para>Now you need to add your TrueType directory to your fonts
path. The easiest way to do this is to add the following entries path. The easiest way to do this is to add the following entries
into your <filename>~/.xinitrc</filename> file.</para> into your <filename>~/.xinitrc</filename> file.</para>
<screen> <screen>&prompt.user; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/TrueType</userinput>
&prompt.user; <userinput>xset fp+ /usr/X11R6/lib/X11/fonts/TrueType</userinput> &prompt.user; <userinput>xset fp rehash</userinput></screen>
&prompt.user; <userinput>xset fp rehash</userinput>
</screen>
<para>That's it. Now Netscape, Gimp, StarOffice, and all of your <para>That's it. Now Netscape, Gimp, StarOffice, and all of your
other X applications should now recognize your installed other X applications should now recognize your installed
@ -1431,9 +1425,7 @@ For further configuration, refer to /usr/X11R6/lib/X11/doc/README.Config.</scree
default <filename>/etc/ttys</filename> file for running the xdm default <filename>/etc/ttys</filename> file for running the xdm
daemon on a virtual terminal: daemon on a virtual terminal:
<screen> <screen>ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure</screen>
ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
</screen>
By default this entry is disabled, and in order to enable it you By default this entry is disabled, and in order to enable it you
will need to change field 5 from <literal>off</literal> to will need to change field 5 from <literal>off</literal> to
@ -1589,11 +1581,9 @@ ttyv8 "/usr/X11R6/bin/xdm -nodaemon" xterm off secure
get XDM to listen for connections first comment out a line in get XDM to listen for connections first comment out a line in
the <filename>xdm-config</filename> file: the <filename>xdm-config</filename> file:
<screen> <screen>! SECURITY: do not listen for XDMCP or Chooser requests
! SECURITY: do not listen for XDMCP or Chooser requests
! Comment out this line if you want to manage X terminals with xdm ! Comment out this line if you want to manage X terminals with xdm
DisplayManager.requestPort: 0 DisplayManager.requestPort: 0</screen>
</screen>
and then restart XDM. Remember that comments in app-defaults and then restart XDM. Remember that comments in app-defaults
files begin with a <quote>!</quote> character, not a files begin with a <quote>!</quote> character, not a
@ -1801,21 +1791,18 @@ DisplayManager.requestPort: 0
<filename>/usr/X11R6/lib/X11/xdm/Xsession</filename>. You <filename>/usr/X11R6/lib/X11/xdm/Xsession</filename>. You
will come across a section in the middle looking like this will come across a section in the middle looking like this
(by default):</para> (by default):</para>
<screen> <screen>case $# in
case $# in
1) 1)
case $1 in case $1 in
failsafe) failsafe)
exec xterm -geometry 80x24-0-0 exec xterm -geometry 80x24-0-0
;; ;;
esac esac
esac esac</screen>
</screen>
<para>You will need to add a few lines to this section. <para>You will need to add a few lines to this section.
Assuming the labels you gave earlier were KDE2 and GNOME, Assuming the labels you gave earlier were KDE2 and GNOME,
the following will do:</para> the following will do:</para>
<screen> <screen>case $# in
case $# in
1) 1)
case $1 in case $1 in
KDE2) KDE2)
@ -1828,16 +1815,13 @@ case $# in
exec xterm -geometry 80x24-0-0 exec xterm -geometry 80x24-0-0
;; ;;
esac esac
esac esac</screen>
</screen>
<para>To make sure your KDE choice of a login-time desktop <para>To make sure your KDE choice of a login-time desktop
background is also honored, you will need to add the background is also honored, you will need to add the
following line to following line to
<filename>/usr/X11R6/lib/X11/xdm/Xsetup_0</filename>:</para> <filename>/usr/X11R6/lib/X11/xdm/Xsetup_0</filename>:</para>
<screen> <screen>/usr/X11R6/bin/kdmdesktop</screen>
/usr/X11R6/bin/kdmdesktop
</screen>
<para>Now, you need only to make sure kdm is started at the <para>Now, you need only to make sure kdm is started at the
next bootup. To learn how to do this, read the section on next bootup. To learn how to do this, read the section on