亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專(zhuān)輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? ethernet.inc

?? MenuetOS是一個(gè)用匯編開(kāi)發(fā)的32/64位PC操作系統(tǒng)
?? INC
?? 第 1 頁(yè) / 共 4 頁(yè)
字號(hào):
    jne     etx_002

    pop     eax
    call    freeBuff
    jmp     etx_exit

etx_002:
    ; There is no entry. Re queue the request, and ask ARP to send a request

    ; IP address is in edx
    push    edx
    call    arp_request
    pop     ebx

    ; Add an entry in the ARP table, awaiting response

    cmp     byte [NumARP], ARP_TABLE_SIZE
    je      etx_003            ; We cannot add a new entry in the table

    inc     byte [NumARP]

    movzx   eax, byte [NumARP]
    mov     ecx, ARP_ENTRY_SIZE
    mul     ecx
    sub     eax, ARP_ENTRY_SIZE

    mov     [eax + ARPTable], ebx
    xor     ebx, ebx
    mov     [eax + ARPTable + 4], ebx
    mov     [eax + ARPTable + 8], bx

    ; set the status field up - awaiting response
    mov     cl, 0x00
    mov     [eax + ARPTable + 10], cl
    mov     cl, 0x02
    mov     [eax + ARPTable + 11], cl

    ; Initialise the time to live field - 10s
    mov     cx, 0x000A
    mov     [eax + ARPTable + 12], cx

etx_003:
    pop     ebx                        ; Get the buffer back
    mov     eax, NET1OUT_QUEUE
    call    queue
    jmp     etx_exit

etx_send:
    xor     ecx, ecx
    mov     ch, [ebx+2]
    mov     cl, [ebx+3]          ; ; Size of IP packet to send

    mov     esi, ebx

    mov     edi, MACAddress

if DEBUGGING_STATE = DEBUGGING_ENABLED
    pusha
    mov     cx, 42
    mov     eax, 1                    ; Indicate that this is a tx packet
    call    eth_dump
    popa
end if

    mov     bx, ETHER_IP
    call    dword [drvr_transmit]       ; Call the drivers transmit function

    ; OK, we have sent a packet, so increment the count
    inc     dword [ip_tx_count]

    ; And finally, return the buffer to the free queue
    pop     eax
    call    freeBuff

etx_exit:
    ret

;***************************************************************************
;   Function
;      ether_IP_handler
;
;   Description
;      Called when an IP ethernet packet is received on the ethernet
;      Header + Data is in Ether_buffer[]
;      We just need to get a buffer from the 'free' queue, and
;      store the packet in it, then insert the packet number into the
;      IPRX queue.
;      If no queue entry is available, the packet is silently discarded
;      All registers may be destroyed
;
;***************************************************************************
ether_IP_handler:
    mov     eax, EMPTY_QUEUE
    call    dequeue
    cmp     ax, NO_BUFFER
    je      eiph00x

    ; convert buffer pointer eax to the absolute address
    push    eax
    mov     ecx, IPBUFFSIZE
    mul     ecx
    add     eax, IPbuffs

    mov     edi, eax

    ; get a pointer to the start of the DATA
    mov     esi, Ether_buffer + 14

    ; Now store it all away
    mov     ecx, IPBUFFSIZE / 4     ; Copy all of the available
                              ; data across - worse case
    cld
    rep     movsd

    ; And finally, place the buffer in the IPRX queue
    pop     ebx
    mov     eax, IPIN_QUEUE
    call    queue

eiph00x:
    ret

;***************************************************************************
;
;  ARP CODE FOLLOWS
;
;  The ARP code is used by ethernet drivers to translate an destination
;  IP address into an ethernet hardware address. Functions to broadcast
;  requests and handle response are (or will be) here.
;  The IP layer has no knowledge of ARP, as this is a network interface
;  issue
;
;***************************************************************************

;***************************************************************************
;   Function
;      arp_timer
;
;   Description
;      Called every 1s
;      It is responsible for removing expired routes
;      All registers may be destroyed
;
;***************************************************************************
arp_timer:
    ; loop through all the ARP entries, decrementing each one
    ; that doesn't have a TTL of 0xFFFF
    movzx   eax, byte [NumARP]

arp_001:
    cmp     eax, 0
    je      arp_003

    push    eax
    dec     eax
    mov     ecx, ARP_ENTRY_SIZE
    mul     ecx
    cmp     word [ eax + ARPTable + 12], 0xFFFF
    je      arp_002

    cmp     word [ eax + ARPTable + 12], 0
    je      arp_002

    dec     word [eax + ARPTable + 12]

arp_002:
    pop     eax
    dec     eax
    jmp     arp_001

    ; Now, look for entries with a TTL of 0
    ; Valid entries and response timeout entries get removed
    ; awaiting response gets converted into a response timeout, with a
    ; short life time - this allows queued packets to be flushed
arp_003:
    movzx   edx, byte [NumARP]
    cmp     edx, 0
    je      arp_exit

    ; EDX holds the # of entries to search through
    mov     eax, 0

arp_005:
    cmp     word [ eax + ARPTable + 12], 0
    jne     arp_004

    ; If it's status code is 0001 or 0003, delete the entry
    cmp     word [eax + ARPTable + 10], 0x0100
    je      arp_007
    cmp     word [eax + ARPTable + 10], 0x0300
    je      arp_007

    ; The only other valid code is 0002 - indicating a
    ; timeout while waiting for a response. Change the
    ; entry to response timed out

    mov     [eax + ARPTable + 10], word 0x0300
    mov     [eax + ARPTable + 12], word 0x000A
    jmp     arp_004

arp_007:
    ; Delete this entry
    mov     edi, ARPTable
    add     edi, eax
    mov     esi, edi
    add     esi, ARP_ENTRY_SIZE

    mov     ecx, (ARP_TABLE_SIZE - 1) * ARP_ENTRY_SIZE
    sub     ecx, eax

    rep     movsb

    dec     byte [NumARP]
    jmp     arp_006

arp_004:
    add     eax, ARP_ENTRY_SIZE
arp_006:
    dec     edx
    cmp     edx, 0
    jne     arp_005

arp_exit:
    ret

;***************************************************************************
;   Function
;      arp_request
;
;   Description
;      Sends an ARP request on the ethernet
;        The requested IP address is in edx
;      All registers may be destroyed
;
;***************************************************************************
arp_request:
    mov     ebx, Ether_buffer
    mov     ax, 0x0100
    mov     [ebx], ax
    add     ebx, 2

    mov     ax, 0x0008
    mov     [ebx], ax
    add     ebx, 2

    mov     ax, 0x0406
    mov     [ebx], ax
    add     ebx, 2

    mov     ax, 0x0100
    mov     [ebx], ax
    add     ebx, 2

    mov     ecx, node_addr
    mov     eax, [ecx]
    mov     [ebx], eax
    add     ecx, 4
    add     ebx, 4
    mov     ax, [ecx]
    mov     [ebx], ax
    add     ebx, 2
    mov     eax, [stack_ip]
    mov     [ebx], eax
    add     ebx, 4

    xor     eax, eax
    mov     [ebx], eax
    add     ebx, 4
    mov     [ebx], ax

    add     ebx, 2
    mov     [ebx], edx

    ; Now, send it!

    ; Pointer to 48 bit destination address in edi
    ; Type of packet in bx
    ; size of packet in ecx
    ; pointer to packet data in esi
    mov      edi, broadcast_add

;if DEBUGGING_STATE = DEBUGGING_ENABLED
;    pusha
;    mov     eax, 1                    ; Indicate that this is a tx packet
;    mov     ecx, 28
;   mov      esi, Ether_buffer
;    call    eth_dump
;    popa
;end if

    mov     bx, ETHER_ARP
    mov     ecx, 28
    mov     esi, Ether_buffer
    call    dword [drvr_transmit]       ; Call the drivers transmit function
    ret

;***************************************************************************
;   Function
;      arp_handler
;
;   Description
;      Called when an ARP packet is received on the ethernet
;      Header + Data is in Ether_buffer[]
;       It looks to see if the packet is a request to resolve this Hosts
;       IP address. If it is, send the ARP reply packet.
;      This Hosts IP address is in dword [stack_ip]  ( in network format )
;       This Hosts MAC address is in node_addr[6]
;      All registers may be destroyed
;
;***************************************************************************
arp_handler:
    ; Is this a REQUEST?
    ; Is this a request for My Host IP
    ; Yes - So construct a response message.
    ; Send this message to the ethernet card for transmission

    mov     ebx, Ether_buffer

    mov     edx, ebx
    add     edx, 20
    mov     ax, [edx]
    cmp     ax, ARP_REQ_OPCODE      ; Is this a request packet?
    jne     arph_resp            ; No - so test for response

    mov     edx, ebx
    add     edx, 38
    mov     eax, [edx]

    cmp     eax, [stack_ip]         ; Is it looking for my IP address?
    jne     arph_exit            ; No - so quit now

    ; OK, it is a request for my MAC address. Build the frame and send it

    ; Save the important data from the original packet
    ; remote MAC address first
    mov     ecx, remote_hw_add
    mov     edx, ebx
    add     edx, 22               ; edx points to Source h/w address
    mov     eax, [edx]
    mov     [ecx], eax
    add     edx, 4
    add     ecx, 4
    mov     ax, [edx]
    mov     [ecx],ax

    ; and also the remote IP address
    add     edx, 2
    mov     eax,[edx]
    mov     [remote_ip_add], eax

    ; So now we can reuse the packet. ebx still holds the address of
    ; the header + packet
    ; We dont need the header ( first 14 bytes )

    mov     edx, ebx
    add     edx, 20
    mov     ax, ARP_REP_OPCODE
    mov     [edx], ax
    add     edx, 2

    mov     ecx, node_addr
    mov     eax, [ecx]
    mov     [edx], eax
    add     ecx, 4
    add     edx, 4
    mov     ax, [ecx]
    mov     [edx], ax
    add     edx, 2
    mov     eax, [stack_ip]
    mov     [edx], eax
    add     edx, 4
    mov     ecx, remote_hw_add
    mov     eax, [ecx]
    mov     [edx], eax
    add     ecx, 4
    add     edx, 4
    mov     ax, [ecx]
    mov     [edx], ax

    add     edx, 2
    mov     eax, [remote_ip_add]
    mov     [edx], eax

    ; Now, send it!

    ; Pointer to 48 bit destination address in edi
    ; Type of packet in bx
    ; size of packet in ecx
    ; pointer to packet data in esi
    mov     edi, remote_hw_add

;if DEBUGGING_STATE = DEBUGGING_ENABLED
;    pusha
;    mov     eax, 1                    ; Indicate that this is a tx packet
;    mov     ecx, 28
;   mov      esi, Ether_buffer + 14
 ;   call    eth_dump
;    popa
;end if

    mov     bx, ETHER_ARP
    mov     ecx, 28
    mov     esi, Ether_buffer + 14
    call    dword [drvr_transmit]       ; Call the drivers transmit function
    jmp     arph_exit

arph_resp:
    cmp     ax, ARP_REP_OPCODE      ; Is this a replypacket?
    jne     arph_resp            ; No - so quit

    ; This was a reply, probably directed at me.
    ; save the remotes MAC & IP
    mov     ecx, remote_hw_add
    mov     edx, ebx
    add     edx, 22               ; edx points to Source h/w address
    mov     eax, [edx]
    mov     [ecx], eax

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精品美女一区二区| 国产一区999| 亚洲精品国产一区二区三区四区在线| 久久奇米777| 国产欧美日韩综合| 国产色爱av资源综合区| 国产亚洲午夜高清国产拍精品| 国产亚洲欧洲997久久综合| 国产视频视频一区| 亚洲欧美综合另类在线卡通| 1000精品久久久久久久久| 1000部国产精品成人观看| 亚洲美腿欧美偷拍| 亚洲午夜在线视频| 日本午夜精品视频在线观看| 免费在线看一区| 国产综合成人久久大片91| 国产黄色精品视频| 99视频热这里只有精品免费| 在线日韩一区二区| 欧美日韩大陆在线| 欧美videossexotv100| 国产亚洲综合在线| 樱桃国产成人精品视频| 午夜精品福利视频网站| 日本女优在线视频一区二区 | 精品一区二区日韩| 国产精品一二三四| 色系网站成人免费| 欧美精品丝袜久久久中文字幕| 精品国产91久久久久久久妲己| 久久精品男人的天堂| 一区二区三区在线视频观看58| 日本伊人精品一区二区三区观看方式| 国产精品一区二区在线观看不卡| 99久久久国产精品| 制服丝袜一区二区三区| 久久无码av三级| 亚洲精品国产高清久久伦理二区| 日韩国产一二三区| 成人国产在线观看| 69堂精品视频| 国产精品午夜在线观看| 亚洲国产精品久久久久婷婷884 | 色婷婷综合在线| 欧美一区二区免费观在线| 国产喷白浆一区二区三区| 亚洲国产精品人人做人人爽| 国产在线乱码一区二区三区| 色94色欧美sute亚洲线路一ni| 日韩欧美在线不卡| 亚洲乱码一区二区三区在线观看| 日本午夜一本久久久综合| 9色porny自拍视频一区二区| 欧美一区中文字幕| 亚洲蜜臀av乱码久久精品蜜桃| 久久精品99国产精品| 色狠狠一区二区| 国产片一区二区三区| 日韩**一区毛片| 91免费国产视频网站| 精品国产a毛片| 亚洲一区二区三区四区的| 粉嫩久久99精品久久久久久夜| 日韩一区二区三区视频在线 | 一区二区视频在线| 国产精品一二三四| 欧美一级高清片在线观看| 亚洲免费观看高清在线观看| 国精产品一区一区三区mba视频 | 亚洲风情在线资源站| 成人黄色片在线观看| 欧美成人三级电影在线| 洋洋av久久久久久久一区| 成人午夜激情影院| 久久精品一区二区三区四区| 日韩成人精品在线观看| 91久久精品一区二区| 国产欧美视频一区二区| 精品一区免费av| 91精品国产综合久久福利软件| 亚洲美女在线一区| 9久草视频在线视频精品| 国产婷婷精品av在线| 国产一区二区在线观看视频| 91精品国产综合久久福利| 亚洲成人在线网站| 欧美在线看片a免费观看| 亚洲美腿欧美偷拍| 91久久免费观看| 亚洲天堂中文字幕| av网站一区二区三区| 欧美韩国日本综合| 国产suv精品一区二区883| 国产区在线观看成人精品| 国产成a人无v码亚洲福利| 久久婷婷久久一区二区三区| 国产曰批免费观看久久久| 亚洲精品一区二区三区福利 | 色av成人天堂桃色av| 亚洲色图丝袜美腿| 91在线观看视频| 一区二区三区蜜桃网| 欧美丝袜自拍制服另类| 亚洲国产一区二区a毛片| 欧美亚日韩国产aⅴ精品中极品| 夜夜精品视频一区二区| 欧美性猛片aaaaaaa做受| 亚洲一区二区av电影| 制服.丝袜.亚洲.另类.中文| 日韩激情一二三区| 欧美一二三四区在线| 国精产品一区一区三区mba视频| 精品99一区二区三区| 国产成a人亚洲| 亚洲色欲色欲www在线观看| 97超碰欧美中文字幕| 亚洲综合视频网| 91精品国产综合久久精品麻豆| 美女视频网站久久| 久久久精品蜜桃| 97精品久久久久中文字幕| 亚洲国产精品一区二区www| 91精品在线观看入口| 精品亚洲成a人| 国产精品久久久久一区二区三区 | 欧美专区日韩专区| 五月天丁香久久| 日韩一区二区在线播放| 国产精品一区二区三区乱码| 国产精品久线观看视频| 欧美亚洲动漫精品| 精品制服美女久久| 国产精品三级久久久久三级| 欧美中文字幕亚洲一区二区va在线| 天天综合色天天| 国产亚洲精品久| 欧美在线综合视频| 精品亚洲成a人| 亚洲欧美电影院| 日韩精品一区二区在线| 99久久99久久久精品齐齐| 五月天丁香久久| 国产精品女人毛片| 88在线观看91蜜桃国自产| 国产高清精品久久久久| 亚洲国产精品视频| 国产亚洲一区二区在线观看| 欧美在线观看禁18| 国产成人综合在线| 亚洲成av人影院在线观看网| 久久久久久一级片| 欧美色精品天天在线观看视频| 国精产品一区一区三区mba视频| 一区二区三区在线观看欧美| 精品成人私密视频| 欧美日韩一本到| 成人自拍视频在线观看| 日韩国产高清影视| 亚洲欧洲日本在线| 精品国产一区久久| 欧美日韩一区二区电影| 不卡一区二区中文字幕| 久久国产生活片100| 亚洲主播在线观看| 中日韩av电影| 久久综合狠狠综合久久综合88 | 欧美一级高清片在线观看| 99国产精品久久久| 精品一区二区在线免费观看| 亚洲精品成a人| 亚洲国产电影在线观看| 日韩精品最新网址| 欧美图片一区二区三区| 成人av动漫在线| 国产成人免费视| 美女网站色91| 天天综合网天天综合色 | 99国内精品久久| 国产在线一区二区| 蜜桃av一区二区三区电影| 亚洲国产中文字幕在线视频综合| 中文字幕av免费专区久久| 欧美大度的电影原声| 678五月天丁香亚洲综合网| 欧美性大战久久久久久久| 暴力调教一区二区三区| 国产伦理精品不卡| 看片的网站亚洲| 天天色综合成人网| 亚洲午夜国产一区99re久久| 亚洲靠逼com| 亚洲精品美腿丝袜| 亚洲九九爱视频| 综合久久国产九一剧情麻豆| 国产女主播视频一区二区| 久久蜜桃av一区精品变态类天堂 | 亚洲午夜成aⅴ人片| 亚洲久草在线视频| 玉米视频成人免费看|