Wu.Country@侠缘

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

导航

[翻译]Understanding Linux Network Internals--Chapter 2. Critical Data Structures

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

Chapter 2. Critical Data Structures 重要的数据结构

A few key data structures are referenced throughout the Linux networking code. Both when reading this book and when studying the source code directly, you'll need to understand the fields in these data structures. To be sure, going over data structures field by field is less fun than unraveling functions, but it's an important foundation to have. "Show me your data," said the legendary software engineer, Frederick P. Brooks.

只有少量的关键数据结构在Linux网络代码中使用。不管是阅读本书,还是直接学习源代码,你都有必要理解这些结构里的字段。固然,仔细查看数据结构里的字段比展开函数要无聊的多,但这是重要的且必须了解的基础知识。传奇的软件工程师Frederick P. Brooks就说过:“Show me the data,”(译注:让我想起show me the money. 呵呵)

This chapter introduces the following data structures, and mentions some of the functions and macros that manipulate them:

本章介绍下面的这些数据结构,以及操作它们的一些函数和宏。

struct sk_buff

This is where a packet is stored. The structure is used by all the network layers to store their headers, information about the user data (the payload), and other information needed internally for coordinating their work.
这是一个数据包存储的结构。这个结构用于所有的网络层,用于存储它们的包结构头,其中包含了用户数据的信息(有效负载),以及它们要动作的其它的内部信息。

struct net_device

Each network device is represented in the Linux kernel by this data structure, which contains information about both its hardware and its software configuration. See Chapter 8 for details on when and how net_device data structures are allocated.
每一个在Linux中的网络设备都是通过这个数据结构来呈现的,它同时包含了一些关于软件和软件配置的信息。关于net_device数据结构是在何时,并如何分配的详细说明,参考第8章。

Another critical data structure for Linux networking is struct sock, which stores the networking information for sockets. Because this book does not cover sockets, I have not included sock in this chapter.
另一个Linux中的核结构就是sock,它存储了套接字接口的网络信息。因为本书不覆盖套接字,所以我不本章不涉及sock。

翻译说明:
实在不想翻译前面的前言和一些规范。所以决定从后面正式的内容翻译。但我还是会把其它的补上。在翻译完正式内容,有空的时候,或者做为调整翻译时补上。

================================
  /\_/\                        
 (=^o^=)  Wu.Country@侠缘      
 (~)@(~)  一辈子,用心做一件事!
--------------------------------
  学而不思则罔,思而不学则怠!  
================================

posted on 2008-11-15 23:39  Wu.Country@侠缘  阅读(844)  评论(0编辑  收藏  举报