zoukankan      html  css  js  c++  java
  • inetsw_array的定义中有四个元素IPPROTO_TCP,IPPROTO_UDP,IPPROTO_ICMP,IPPROTO_IP

    static struct inet_protosw inetsw_array[] =  
        {  
            {  
                .type =       SOCK_STREAM,  
                .protocol =   IPPROTO_TCP,  
                .prot =       &tcp_prot,  
                .ops =        &inet_stream_ops,  
                .no_check =   0,  
                .flags =      INET_PROTOSW_PERMANENT |  
                          INET_PROTOSW_ICSK,  
            },  
          
            {  
                .type =       SOCK_DGRAM,  
                .protocol =   IPPROTO_UDP,  
                .prot =       &udp_prot,  
                .ops =        &inet_dgram_ops,  
                .no_check =   UDP_CSUM_DEFAULT,  
                .flags =      INET_PROTOSW_PERMANENT,  
               },  
          
               {  
                .type =       SOCK_DGRAM,  
                .protocol =   IPPROTO_ICMP,  
                .prot =       &ping_prot,  
                .ops =        &inet_dgram_ops,  
                .no_check =   UDP_CSUM_DEFAULT,  
                .flags =      INET_PROTOSW_REUSE,  
               },  
          
               {  
                   .type =       SOCK_RAW,  
                   .protocol =   IPPROTO_IP,    /* wild card */  
                   .prot =       &raw_prot,  
                   .ops =        &inet_sockraw_ops,  
                   .no_check =   UDP_CSUM_DEFAULT,  
                   .flags =      INET_PROTOSW_REUSE,  
               }  
        };  
        

  • 相关阅读:
    luogu P3801 红色的幻想乡
    [USACO07OPEN]吃饭Dining
    [SCOI2007]蜥蜴
    [SDOI2011]染色
    [USACO07DEC]Sightseeing Cows
    [HNOI2007]紧急疏散EVACUATE
    [ZJOI2009]假期的宿舍
    [SDOI2013]费用流
    [CQOI2009]跳舞
    使用chrony安装chrony
  • 原文地址:https://www.cnblogs.com/mull/p/4477857.html
Copyright © 2011-2022 走看看