Rev 1257 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1257 | Rev 1473 | ||
---|---|---|---|
Line 15... | Line 15... | ||
15 | ;; Version 2, June 1991 ;; |
15 | ;; Version 2, June 1991 ;; |
16 | ;; ;; |
16 | ;; ;; |
17 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
17 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
Line 18... | Line 18... | ||
18 | 18 | ||
Line 19... | Line 19... | ||
19 | 19 | ||
Line 20... | Line 20... | ||
20 | $Revision: 1257 $ |
20 | $Revision: 1473 $ |
Line 144... | Line 144... | ||
144 | ; |
144 | ; |
145 | ;----------------------------------------------------------------- |
145 | ;----------------------------------------------------------------- |
146 | align 4 |
146 | align 4 |
147 | ICMP_handler: ;TODO: works only on pure ethernet right now ! |
147 | ICMP_handler: ;TODO: works only on pure ethernet right now ! |
Line 148... | Line 148... | ||
148 | 148 | ||
149 | DEBUGF 1,"ICMP_Handler - start\n" |
149 | DEBUGF 1,"ICMP_Handler - buf:%x size:%x dev:%x, size:%x, buf:%x\n", [esp], [esp+4], ebx, ecx, edx |
150 | cmp byte [edx + ICMP_Packet.Type], ICMP_ECHO ; Is this an echo request? |
150 | cmp byte [edx + ICMP_Packet.Type], ICMP_ECHO ; Is this an echo request? |
Line -... | Line 151... | ||
- | 151 | jne .check_sockets |
|
- | 152 | ||
- | 153 | ;;; TODO: check checksum! |
|
- | 154 | ||
151 | jne .check_sockets |
155 | DEBUGF 1,"ICMP_Handler - is echo request, through device:%x\n", ebx |
152 | 156 | ||
Line 153... | Line 157... | ||
153 | mov byte [edx + ICMP_Packet.Type], ICMP_ECHOREPLY ; Change Packet type to reply |
157 | mov byte [edx + ICMP_Packet.Type], ICMP_ECHOREPLY ; Change Packet type to reply |
154 | mov word [edx + ICMP_Packet.Checksum], 0 ; Set checksum to 0, needed to calculate new checksum |
158 | mov word [edx + ICMP_Packet.Checksum], 0 ; Set checksum to 0, needed to calculate new checksum |