• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            不會飛的鳥

            2010年12月10日 ... 不鳥他們!!! 我要用自己開發的分布式文件系統、分布式調度系統、分布式檢索系統, 做自己的搜索引擎!!!大魚有大志!!! ---楊書童

            struct ethhdr、ether_header、iphdr、tcphdr、udphdr 結構

            ************************eth的結構**************************************

            struct ethhdr {
            unsigned char h_dest[ETH_ALEN];
            unsigned char h_source[ETH_ALEN];
            __be16 h_proto;
            } __attribute__((packed));

            struct ether_header
            {
            u_int8_t ether_dhost[ETH_ALEN];      // destination eth addr
            u_int8_t ether_shost[ETH_ALEN];      // source ether addr   
            u_int16_t ether_type;                 // packet type ID field
            } __attribute__ ((__packed__));

            ***********************IP的結構***********************************
            struct iphdr
            {
            #if __BYTE_ORDER == __LITTLE_ENDIAN
                unsigned int ihl:4;
                unsigned int version:4;
            #elif __BYTE_ORDER == __BIG_ENDIAN
                unsigned int version:4;
                unsigned int ihl:4;
            #else
            # error "Please fix <bits/endian.h>"
            #endif
                u_int8_t tos;
                u_int16_t tot_len;
                u_int16_t id;
                u_int16_t frag_off;
                u_int8_t ttl;
                u_int8_t protocol;
                u_int16_t check;
                u_int32_t saddr;
                u_int32_t daddr;
            };

            ***********************TCP的結構****************************
            struct tcphdr
            {
                u_int16_t source;
                u_int16_t dest;
                u_int32_t seq;
                u_int32_t ack_seq;
            # if __BYTE_ORDER == __LITTLE_ENDIAN
                u_int16_t res1:4;
                u_int16_t doff:4;
                u_int16_t fin:1;
                u_int16_t syn:1;
                u_int16_t rst:1;
                u_int16_t psh:1;
                u_int16_t ack:1;
                u_int16_t urg:1;
                u_int16_t res2:2;
            # elif __BYTE_ORDER == __BIG_ENDIAN
                u_int16_t doff:4;
                u_int16_t res1:4;
                u_int16_t res2:2;
                u_int16_t urg:1;
                u_int16_t ack:1;
                u_int16_t psh:1;
                u_int16_t rst:1;
                u_int16_t syn:1;
                u_int16_t fin:1;
            # else
            #   error "Adjust your <bits/endian.h> defines"
            # endif
                u_int16_t window;
                u_int16_t check;
                u_int16_t urg_ptr;
            };
            ***********************UDP的結構*****************************
            struct udphdr
            {
            u_int16_t source;
            u_int16_t dest;
            u_int16_t len;
            u_int16_t check;
            };

            posted on 2011-06-27 09:15 不會飛的鳥 閱讀(6712) 評論(0)  編輯 收藏 引用

            久久乐国产综合亚洲精品| 久久91综合国产91久久精品| 亚洲人成电影网站久久| 亚洲国产精品高清久久久| 99久久中文字幕| 亚洲国产成人久久综合区| 久久久久亚洲AV无码麻豆| 国内精品伊人久久久久影院对白| 久久精品亚洲精品国产欧美| 亚洲午夜久久久影院伊人| 国产精品成人99久久久久 | 久久精品一区二区三区不卡| 久久免费香蕉视频| 99久久免费国产特黄| 久久久亚洲AV波多野结衣| 一本伊大人香蕉久久网手机| 精品国产乱码久久久久软件| 91久久精品视频| 精品熟女少妇av免费久久| 婷婷久久精品国产| 亚洲国产精品婷婷久久| 久久久久亚洲AV成人片| 久久91精品国产91| 久久久久无码精品国产app| 青青草原综合久久| 久久国产亚洲高清观看| 7777久久久国产精品消防器材| 久久久久国产一级毛片高清板| 久久水蜜桃亚洲av无码精品麻豆| 国产精品久久久久蜜芽| 开心久久婷婷综合中文字幕| 久久精品国产72国产精福利| 久久午夜电影网| 99久久精品国产高清一区二区 | 99久久精品国产综合一区| 99久久婷婷免费国产综合精品| 精品国产一区二区三区久久久狼| 亚洲人成网亚洲欧洲无码久久| 久久久久久久精品成人热色戒| 久久久无码精品午夜| 久久人人爽人人爽人人片AV东京热|