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

            久久精品国产99国产精品亚洲| 97久久精品无码一区二区天美| 99久久国产热无码精品免费| 久久亚洲精品成人AV| 99久久99久久| 欧美激情精品久久久久久久九九九| 日本精品久久久久影院日本| 久久不见久久见免费视频7| 99久久精品费精品国产| 亚洲精品国产美女久久久| 久久久久亚洲爆乳少妇无| 精品伊人久久久| 久久青青草原亚洲av无码| 伊人久久大香线蕉av不卡| 久久99精品国产麻豆不卡| 午夜欧美精品久久久久久久| 欧美亚洲国产精品久久蜜芽| 久久久久亚洲av无码专区导航| 久久久精品日本一区二区三区| yellow中文字幕久久网| 久久免费线看线看| 777午夜精品久久av蜜臀| 久久99精品久久久久久不卡| 久久精品国产亚洲AV大全| 国产亚洲精久久久久久无码77777| 国产日韩久久久精品影院首页| 久久婷婷五月综合97色一本一本| 亚洲国产综合久久天堂| 久久国产精品无| 久久这里都是精品| 精品久久久久久99人妻| 69久久精品无码一区二区| 日韩人妻无码精品久久久不卡| 久久久久久曰本AV免费免费| 久久精品女人天堂AV麻| 日本免费一区二区久久人人澡 | 无码国内精品久久人妻麻豆按摩| 色综合久久88色综合天天| 91精品国产综合久久婷婷| 国产亚洲欧美成人久久片 | 久久精品成人国产午夜|