Wu.Country@侠缘

勤学似春起之苗,不见其增,日有所长; 辍学如磨刀之石,不见其损,日所有亏!

导航

翻译:Understanding Linux Network Internals [Preface 前言]

目录:http://www.cnblogs.com/WuCountry/archive/2008/11/15/1333960.html

Preface 前言

Today more than ever before, networking is a hot topic. Any electronic gadget in its latest generation embeds some kind of networking capability. The Internet continues to broaden in its population and opportunities. It should not come as a surprise that a robust, freely available, and feature-rich operating system like Linux is well accepted by many producers of embedded devices. Its networking capabilities make it an optimal operating system for networking devices of any kind. The features it already has are well implemented, and new ones can be added easily. If you are a developer for embedded devices or a student who would like to experiment with Linux, this book will provide you with good fodder.

现在,网络这个主题比以往任何时候都要热门。任何一个小的电子设备,到了它的最后一代,都会提供一些联网的功能。而互联网也是在它的机遇和领域上不断的增长。当Linux做一为个可以免费取得,功能丰富的操作系统, 而被许多它的嵌入式设备厂商所采用时,不要为此感到惊奇。它的网络能力让它成为许多网络设备的最佳操系统。一些特性已经实现,而新的特性也可以很容易的添加进来。如果你是一个嵌入式设备的开发人员,或者是一位想在Linux下做一些实验的学生,这本书将是一份不错的资料。

The performance of a pure software-based product that uses Linux cannot compete with commercial products that can count on the help of specialized hardware. This of course is not a criticism of software; it is a simple recognition of the consequence of the speed difference between dedicated hardware and general-purpose CPUs. However, Linux can definitely compete with low-end commercial products that are entirely software-based. Of course, simple extensions to the Linux kernel allow vendors to use Linux on hybrid systems as well (software and hardware); it is only a matter of writing the necessary device drivers.

一个完全基于软件(来改善性能)的产品的性能,无法与一些依靠特殊硬件(来改善性能)的商业产品。因为它不是一个挑剔的软件,它可以简单的识别特殊的硬件和一些多用途的CPU(译注:本句确实不好理解,第二次也就译成为样)。然而,Linux还是完全可以满足那些基于软件的低端商业产品的要求。当然,简单的扩展一下Linux内核,就可以让一些供应商在软件和硬件混合的系统中很好的使用Linux,而这只要写一些必须的设备驱动。

Linux is also often used as the operating system of choice for the implementation of university projects and theses. Not all of them make it to the official kernel (not right away, at least). A few do, and others are simply made available online as patches to the official kernel. Isn't it a great satisfaction and reward to see your contribution to the Linux kernel being used by potentially millions of users? There is only one drawback: if your contribution is really appreciated, you may not be able to cope with the numerous emails of thanks or requests for help.

Linux做为一个操作系统,也经常被一些大学选为科研项目和论文主题。并不是所有的这些都是想把研究加入到官方的内核中去(不完全对,但至少是)。更少的,一些人简单的在网上提供一些官方内核的补丁供别人使用。当你看到你对Linux的贡献被潜在的成千上万个用户在使用时,是不是感觉得到极大的满足和欣慰呢?但这一个不好的地方:就是一但你的贡献真的被大家所认可,你就会难于应付大量的感谢信和求助信。(译注:当然,你是用电子邮件和大家联系。)

The momentum for Linux has been growing continually over the past years, and apparently it can only keep growing.

支持Linux发展的动力在过去几年里不断的增长,显然还会继续。

I first encountered Linux at the University of Bologna, where I was a grad student in computer science around 10 years ago. What a wonderful piece of software! I could work on my image processing projects at home on an i286/486 computer without having to compete with other students for access to the few Sun stations available at the university labs.

我第一次接触到Linux是在Bologna大学,十年前,我在那里毕业于计算机。它确实是一个令人惊奇的的软件! 我可以在家里的i386/486上运行我的图形处理工程,而不用在大学的实验室里和同学争用少数的几台Sun工作站。

Since then, my marriage to Linux has never seen a gray day. It has even started to displace my fond memories of the glorious C64 generation, when I was first introduced to programming with Assembly language and the various dialects of BASIC. Yes, I belong to the C64 generation, and to some extent I can compare the joy of my first programming experiences with the C64 to my first journeys into the Linux kernel.

从那以后,我就和Linux结下了不解之缘。当我第一次了解到汇编语言和多种版本的BASIC语言的程序设计时,它甚至取代了我的美好回忆--光荣的C64一代。确实,我属于C64一代,在一定程度上,我可以把两者的喜悦相提并论:第一次在C64上编程的经历和进入Linux内核的历程。(译注:不知道C64一代的背景,不好理解。)

When I was first introduced to the beautiful world of networking, I started playing with the tools available on Linux. I also had the fortune to work for a UNESCO center in Italy where I helped develop their networking courses, based entirely on Linux boxes. That gave me access to a good lab equipped with all sorts of network devices and documentation, plus plenty of Linux enthusiasts to learn from and to collaborate with.

当我第一次接触到网络这个美丽的世界时,我开始玩弄一些Linux下的工具。而且我很幸运能为意大利的UNESCO中心工作。当时我帮助他们开发一些完全基于Linux机器的网络课程。这给我提供了一个很好的实验室,里面有各种不同的网络设备和资料,而且有很多Linux狂热者,可以向他们学习和他们一起合作。

Unfortunately for my own peace of mind (but fortunately, I hope, for the reader of this book who benefits from the results), I am the kind of person that likes to understand everything and takes very little for granted. So at UNESCO, I started looking into the kernel code. This not only proved to be a good way to burn in my knowledge, but it also gave me more confidence in making use of user-space configuration tools: whenever a configuration tool did not provide a specific option, I usually knew whether it would be possible to add it or whether it would have required significant changes to the kernel. This kind of study turns into a path without an end: you always want more.

不幸的是因为我自己安稳的想法(也是幸运,我希望是,做为本书的读者可以从中受益),我就是那种什么都想知道,却对本质了解很少的那种人。所以,在UNESCO, 我开始了解内核代码。这不仅提供了一个好的方法让知识在我的大脑里留下深刻的印象,同时在用户空间的工具配置上,也给了我不少的信心:不管一个工具的配置是否提供了特殊的选项,我通常会知道它是否会有可能添加到内核,或者是否会对内核的修改有特殊的要求。这种学习方式转向了一条不归路:你总想知道更多。

After developing a few tools as extensions to the Linux kernel (some revision of versions 2.0 and 2.2), my love for operating systems and networking led me to the Silicon Valley (Cisco Systems). When you learn a language, be it a human language or a computer programming language, a rule emerges: the more languages you know, the easier it becomes to learn new ones. You can identify each one's strengths and weaknesses, see the reasons behind design compromises, etc. The same applies to operating systems.

在我为Linux内核开发了一些工具以后(有一些在2.0版本和2.2版本中有保留),我对操作系统和网络的热爱让我到了硅谷(思科)。当你学习一种语言时,是计算机语言或者是人类语言,展现一个规则:你了解的语言越多,你学习一个新的语言时就更容易。你可以区别每一种语言的的优势和不足,了解设计折衷背后的原因,等等。这同样也适用于操作系统。

When I noticed the lack of good documentation about the networking code of the Linux kernel and the availability of good books for other parts of the kernel, I decided to try filling in the gapor at least part of it. I hope this book will give you the starting documentation that I would have loved to have had years ago.

当我注意到,关于Linux内核网络代码的好资料非常缺泛时,还有内核其它部份的好书也缺少时,我决心试着填补这一空白,至少是其中的一部份。我希望这本书会给你启蒙的资料,就像是我多年前想要的那样。


I believe that this book, together with O'Reilly's other two kernel books (Understanding the Linux Kernel and Linux Device Drivers), represents a good starting point for anyone willing to learn more about the Linux kernel internals. They complement each other and, when they do not address a given feature, point the reader to external documentation sources (when available).

我相信,这本书和O'Reilly的其它两本内核的书(Understanding the Linux Kernel and Linux Device Drivers),为任何一个想学习更多Linux内核的人,展示一个好的起点。它们相互补充,当他们不涉及到指定的特性时,就是告诉读者,有必要时自己找一些其它的资料。

However, I still suggest you make some coffee, turn on the music, and spend some time on the source code trying to understand how a given feature is implemented. I believe the knowledge you build in this way lasts longer than that built in any other way. Shortcuts are good, but sometimes the long way has its advantages, too.
然而,我还是建议你弄点Coffee,打开音乐,然后花点时间在源代码上,试着搞明白一个给定的特性是如何实现的。我相信,你通过这种方法建立的知识体系,比其它任何一种方法都好。有捷径是好,但有时候长远的路也有它的优势。

 

翻译体会:很不幸,今天机器突然Down掉,原来翻译了60%的内容全部没了。(我是一个习惯于Ctrl+s的人,可今天却也有个意外),还好,正好书中所言,走长一点的路有时候也有好处。有几处的翻译觉得不好,也没理解,就先放在那里了。还好有源文,就不太担心误人子弟了。有几处觉得很有收获的:
The performance of a pure software-based product that uses Linux cannot compete with commercial products that can count on the help of specialized hardware.
足足花了我近10分钟,仔细分析,才明白要比较的是两种产品的性能,一种是基于软件优化的,一种是基于硬件的。

Yes, I belong to the C64 generation, and to some extent I can compare the joy of my first programming experiences with the C64 to my first journeys into the Linux kernel.
这一句也是让我想了半天,也是仔细想想才明白,比较的都是喜悦,一个是第一次编程的经历,另一个是进入Linux内核的历程。

posted on 2008-11-15 22:57  Wu.Country@侠缘  阅读(751)  评论(2编辑  收藏  举报