[翻譯]Understanding Linux Network Internals–Chapter 2. Critical Data Structures

來源:互聯網
上載者:User

目錄: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。

翻譯說明:
實在不想翻譯前面的前言和一些規範。所以決定從後面正式的內容翻譯。但我還是會把其它的補上。在翻譯完正式內容,有空的時候,或者做為調整翻譯時補上。

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.