⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 [转载] linux的tcp-ip协议栈阅读笔记(7) - china linux forum.htm

📁 linux下的tcp/ip协议实现的确部分阅读笔记
💻 HTM
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- saved from url=(0110)http://www.linuxforum.net/forum/showflat.php?Cat=&Board=linuxK&Number=67730&page=192&view=collapsed&sb=5&o=all -->
<HTML><HEAD><TITLE>[转载] Linux的TCP/IP协议栈阅读笔记(7) - China Linux Forum</TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<META content="MSHTML 5.00.2920.0" name=GENERATOR></HEAD>
<BODY>
<CENTER><FONT color=red>著名软件中国镜像:</FONT> <A 
href="http://apache.linuxforum.net/"><FONT color=red>Apache|</FONT></A> <A 
href="http://php.linuxforum.net/"><FONT color=red>Php|</FONT></A> <A 
href="http://debian.linuxforum.net/"><FONT color=red>Debian|</FONT></A> <A 
href="http://mysql.linuxforum.net/"><FONT color=red>Mysql|</FONT></A> <A 
href="http://proftpd.linuxforum.net/"><FONT color=red>Proftp|</FONT></A> <A 
href="http://qmail.linuxforum.net/top.html"><FONT color=red>Qmail|</FONT></A> <A 
href="http://samba.linuxforum.net/samba.html"><FONT color=red>Samba|</FONT></A> 
<A href="http://www1.cn.squid-cache.org/"><FONT color=red>Squid|</FONT></A> <A 
href="http://xfree86.linuxforum.net/"><FONT color=red>Xfree86|</FONT></A> <A 
href="http://cpan.linuxforum.net/"><FONT color=red>CPAN|</FONT></A> <A 
href="http://ldp.linuxforum.net/"><FONT color=red>LDP|</FONT></A> <A 
href="http://gnu.linuxforum.net/"><FONT 
color=red>GNU|</FONT></A></CENTER><BR><LINK 
href="[转载] Linux的TCP-IP协议栈阅读笔记(7) - China Linux Forum.files/stylesheet2.css" 
rel=stylesheet type=text/css><SPAN class=onbody>
<TABLE align=center border=0 cellPadding=3 cellSpacing=0 class=p9 width="95%">
  <TBODY>
  <TR align=right bgColor=#0099cc vAlign=center>
    <TD align=left width="20%"><A 
      href="http://www.linuxforum.net/index.php"><FONT 
      color=#ffffff>中国Linux论坛首页</FONT></A></TD>
    <TD width="80%"><A 
      href="http://www.linuxforum.net/forum/ubbthreads.php"><FONT 
      color=#ffffff>技术论坛|</FONT></A><FON color="#FFFFFF" t> <A 
      href="http://www.linuxforum.net/docnew/index.php"><FONT 
      color=#ffffff>文章荟萃</FONT></A><FONT color=#ffffff>| <A 
      href="http://www.linuxforum.net/books/index.php"><FONT 
      color=#ffffff>藏经阁</FONT></A>| <A href="http://mail.linuxforum.net/"><FONT 
      color=#ffffff>会员信箱</FONT></A>| <A href="http://sf.linuxforum.net/"><FONT 
      color=#ffffff>项目计划</FONT></A>| <A 
      href="http://www.linuxforum.net/poll2/index.php"><FONT 
      color=#ffffff>在线调查</FONT></A>| <A href="ftp://ftp.linuxforum.net/"><FONT 
      color=#ffffff>软件仓库</FONT></A>| <A 
      href="http://www.linuxforum.net/about.php"><FONT 
      color=#ffffff>关于本站</FONT></A>| </FONT></TD></TR></TBODY></TABLE><BR></SPAN>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="95%">
  <TBODY>
  <TR>
    <TD class=tableborders>
      <TABLE border=0 cellPadding=3 cellSpacing=1 width="100%">
        <TBODY>
        <TR>
          <TD align=right class=menubar><A 
            href="http://www.linuxforum.net/forum/ubbthreads.php?Cat=">讨论区列表</A> 
            | <A href="http://www.linuxforum.net/forum/search.php?Cat=">搜寻文章</A> 
            | <A 
            href="http://www.linuxforum.net/forum/newuser.php?Cat=">新用户注册</A> | 
            <A href="http://www.linuxforum.net/forum/login.php?Cat=">登入论坛</A> | 
            <A href="http://www.linuxforum.net/forum/online.php?Cat=">在线用户</A> | 
            <A 
            href="http://www.linuxforum.net/forum/faq_chinese.php?Cat=">常见问题</A> 
          </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<P>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="95%">
  <TBODY>
  <TR>
    <TD class=tableborders>
      <TABLE border=0 cellPadding=3 cellSpacing=1 width="100%">
        <TBODY>
        <TR class=darktable>
          <TD>
            <TABLE cellPadding=0 cellSpacing=0 width="100%">
              <TBODY>
              <TR class=darktable>
                <TD align=left width="33%"><SPAN class=catandforum><A 
                  href="http://www.linuxforum.net/forum/ubbthreads.php?Cat=&amp;C=4">Linux 
                  高级应用</A> <BR>&nbsp;&nbsp;&nbsp;&gt;&gt; <A 
                  href="http://www.linuxforum.net/forum/postlist.php?Cat=&amp;Board=linuxK&amp;page=192&amp;view=collapsed&amp;sb=5&amp;o=all">Linux内核技术</A> 
                  </SPAN></TD>
                <TD align=middle width="33%">此话题阅读次数: 621 </TD>
                <TD align=right width="33%">
                  <TABLE border=0>
                    <TBODY>
                    <TR>
                      <TD class=navigation noWrap><IMG align=absMiddle alt=* 
                        src="[转载] Linux的TCP-IP协议栈阅读笔记(7) - China Linux Forum.files/greyflat.gif">平坦模式&nbsp; 
                      </TD>
                      <TD class=navigation noWrap><A 
                        href="http://www.linuxforum.net/forum/showthreaded.php?Cat=&amp;Board=linuxK&amp;Number=67730&amp;page=192&amp;view=collapsed&amp;sb=5&amp;o=all&amp;vc=1"><IMG 
                        align=absMiddle alt=树状模式,一封一封读 border=0 
                        src="[转载] Linux的TCP-IP协议栈阅读笔记(7) - China Linux Forum.files/threaded.gif">树状模式</A>&nbsp; 
                      </TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE align=center border=0 cellPadding=4 cellSpacing=0 width="95%">
  <TBODY>
  <TR>
    <TD align=left class=small>&nbsp; </TD>
    <TD align=right class=small><A 
      href="http://www.linuxforum.net/forum/printthread.php?Cat=&amp;Board=linuxK&amp;main=67730&amp;type=thread" 
      target=_blank><IMG align=top border=0 
      src="[转载] Linux的TCP-IP协议栈阅读笔记(7) - China Linux Forum.files/printthread.gif"> 
      打印</A> </TD></TR></TBODY></TABLE>
<TABLE align=center border=0 cellPadding=0 cellSpacing=0 width="95%">
  <TBODY>
  <TR>
    <TD class=tableborders>
      <TABLE border=0 cellPadding=3 cellSpacing=1 width="100%">
        <TBODY>
        <TR>
          <TD class=darktable rowSpan=2 vAlign=top width="17%"><A 
            name=Post67730></A><A 
            href="http://www.linuxforum.net/forum/showprofile.php?Cat=&amp;User=tommytang&amp;Number=67730&amp;Board=linuxK&amp;what=showflat&amp;page=192&amp;view=collapsed&amp;sb=5&amp;o=all&amp;fpart=1&amp;vc=1">tommytang</A><BR><SPAN 
            class=small>(newbie)<BR>01/03/01 21:59<BR></SPAN></TD>
          <TD class=subjecttable width="83%">
            <TABLE border=0 class=subjecttable width="100%">
              <TBODY>
              <TR>
                <TD align=left width="70%"><IMG height=15 
                  src="[转载] Linux的TCP-IP协议栈阅读笔记(7) - China Linux Forum.files/book.gif" 
                  width=15> <B>[转载] Linux的TCP/IP协议栈阅读笔记(7)</B> </TD>
                <TD align=right width="30%">&nbsp; </TD></TR></TBODY></TABLE></TD></TR>
        <TR>
          <TD class=lighttable width="83%"><BR>
            <P class=post>发信人: AngelFalls (TRY IT), 信区: SysInternals<BR>标 题: 
            [转载] Linux的TCP/IP协议栈阅读笔记(7)<BR>发信站: 武汉白云黄鹤站 (Wed Oct 4 01:37:24 
            2000), 转信<BR><BR>【 以下文字转载自 Security 讨论区 】<BR>【 原文由 AngelFalls 所发表 
            】<BR>看看在net/packet/af_packet.c里面的packet_create函数,这个就是通过<BR>packet_proto_init加入的回调函数,假设定义了CONFIG_SOCK_PACKET,代码<BR>整理如下,这个函数是在用户创建链路层socket的时候被调用的:<BR>static 
            int packet_create(struct socket *sock, int protocol)<BR>{<BR>struct 
            sock *sk;<BR>int err;<BR><BR>if (!capable(CAP_NET_RAW))<BR>return 
            -EPERM;<BR><BR>if (sock-&gt;type != SOCK_DGRAM &amp;&amp; 
            sock-&gt;type != SOCK_RAW<BR>&amp;&amp; sock-&gt;type != 
            SOCK_PACKET<BR>)<BR>return 
            -ESOCKTNOSUPPORT;<BR>//只有socket(AF_PACKET, [SOCK_DGRAM, SOCK_RAW], 
            <BR>//或者socket(AF_INET, SOCK_PACKET ,才能调用成功<BR><BR>sock-&gt;state = 

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -