• <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 不會飛的鳥 閱讀(6697) 評論(0)  編輯 收藏 引用

            久久高清一级毛片| 中文字幕无码免费久久| 香港aa三级久久三级| 精品无码久久久久久国产| 色8激情欧美成人久久综合电| 99精品国产免费久久久久久下载| 久久精品国产AV一区二区三区| 国产精品久久久福利| 久久久久无码中| 99国产欧美久久久精品蜜芽| 尹人香蕉久久99天天拍| 91精品国产高清久久久久久91| 尹人香蕉久久99天天拍| 国产三级精品久久| 久久久女人与动物群交毛片 | 久久久久亚洲AV无码专区桃色| 久久人人爽人人爽人人片AV东京热| 亚洲国产精品无码久久久不卡| 久久久久久噜噜精品免费直播| 嫩草伊人久久精品少妇AV| 久久亚洲国产精品五月天婷| 99久久精品国产高清一区二区| 久久久精品久久久久影院| 久久久久国产亚洲AV麻豆| 久久久久国产一级毛片高清版| 国产麻豆精品久久一二三| 色狠狠久久AV五月综合| 久久免费视频1| 中文字幕精品久久| 久久午夜综合久久| 性做久久久久久免费观看| 欧美久久亚洲精品| 久久久久人妻精品一区三寸蜜桃| 久久久久国产一级毛片高清版| 伊人色综合久久| 久久综合中文字幕| 久久久精品免费国产四虎| 色综合合久久天天综合绕视看 | 天天影视色香欲综合久久| 久久伊人精品青青草原日本| 国产成人AV综合久久|