Rev 1254 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1254 | Rev 1257 | ||
---|---|---|---|
Line 14... | Line 14... | ||
14 | ;; GNU GENERAL PUBLIC LICENSE ;; |
14 | ;; GNU GENERAL PUBLIC LICENSE ;; |
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 | $Revision: 1254 $ |
19 | $Revision: 1257 $ |
Line 20... | Line 20... | ||
20 | 20 | ||
Line 77... | Line 77... | ||
77 | ; |
77 | ; |
78 | ; IN: / |
78 | ; IN: / |
79 | ; OUT: / |
79 | ; OUT: / |
80 | ; |
80 | ; |
81 | ;----------------------------------------------------------------- |
81 | ;----------------------------------------------------------------- |
82 | - | ||
83 | align 4 |
82 | align 4 |
84 | IPv4_init: |
83 | IPv4_init: |
Line 85... | Line 84... | ||
85 | 84 | ||
86 | or eax, -1 |
85 | or eax, -1 |
Line 111... | Line 110... | ||
111 | ; pointer to device struct in ebx |
110 | ; pointer to device struct in ebx |
112 | ; pointer to IP Packet data in edx |
111 | ; pointer to IP Packet data in edx |
113 | ; OUT: / |
112 | ; OUT: / |
114 | ; |
113 | ; |
115 | ;----------------------------------------------------------------- |
114 | ;----------------------------------------------------------------- |
116 | - | ||
117 | align 4 |
115 | align 4 |
118 | IPv4_handler: |
116 | IPv4_handler: ; TODO: clean up this mess |
- | 117 | ; for instance, there should be only one piece of code wich make the jump to an underlying protocol, and not two.. |
|
- | 118 | ; TODO2: add code for IPv4 sockets (raw sockets) |
|
Line 119... | Line 119... | ||
119 | 119 | ||
Line 120... | Line 120... | ||
120 | DEBUGF 1,"IP_Handler - start\n" |
120 | DEBUGF 1,"IP_Handler - start\n" |
Line 473... | Line 473... | ||
473 | ; |
473 | ; |
474 | ; IN: / |
474 | ; IN: / |
475 | ; OUT: / |
475 | ; OUT: / |
476 | ; |
476 | ; |
477 | ;----------------------------------------------------------------- |
477 | ;----------------------------------------------------------------- |
478 | - | ||
479 | align 4 |
478 | align 4 |
480 | IPv4_decrease_fragment_ttls: |
479 | IPv4_decrease_fragment_ttls: |
Line 481... | Line 480... | ||
481 | 480 | ||
482 | mov esi, FRAGMENT_LIST |
481 | mov esi, FRAGMENT_LIST |
Line 512... | Line 511... | ||
512 | ; ecx = unchanged (packet size of embedded data) |
511 | ; ecx = unchanged (packet size of embedded data) |
513 | ; edx = size of complete buffer |
512 | ; edx = size of complete buffer |
514 | ; esi = pointer to sending procedure |
513 | ; esi = pointer to sending procedure |
515 | ; edi = pointer to start of data (-1 on error) |
514 | ; edi = pointer to start of data (-1 on error) |
516 | ; |
515 | ; |
517 | ;----------------------------------------------------------------- |
516 | ;----------------------------------------------------------------- ;;; TODO: create fragmented packets |
518 | - | ||
519 | ;;; TODO: create fragmented packets |
- | |
520 | - | ||
521 | align 4 |
517 | align 4 |
522 | IPv4_create_packet: |
518 | IPv4_create_packet: |
Line 523... | Line 519... | ||
523 | 519 | ||
Line 620... | Line 616... | ||
620 | ; |
616 | ; |
621 | ; IN: Destination IP in eax |
617 | ; IN: Destination IP in eax |
622 | ; OUT: device id in edi |
618 | ; OUT: device id in edi |
623 | ; |
619 | ; |
624 | ;--------------------------------------------------------------------------- |
620 | ;--------------------------------------------------------------------------- |
625 | - | ||
626 | align 4 |
621 | align 4 |
627 | IPv4_dest_to_dev: |
622 | IPv4_dest_to_dev: |
Line 628... | Line 623... | ||
628 | 623 | ||
Line 661... | Line 656... | ||
661 | ; |
656 | ; |
662 | ; IN: / |
657 | ; IN: / |
663 | ; OUT: fragment number in ax |
658 | ; OUT: fragment number in ax |
664 | ; |
659 | ; |
665 | ;--------------------------------------------------------------------------- |
660 | ;--------------------------------------------------------------------------- |
666 | - | ||
667 | align 4 |
661 | align 4 |
668 | IPv4_get_frgmnt_num: |
662 | IPv4_get_frgmnt_num: |
669 | xor ax, ax ;;; TODO: replace this with real code |
663 | xor ax, ax ;;; TODO: replace this with real code |
Line 670... | Line 664... | ||
670 | 664 | ||
Line 682... | Line 676... | ||
682 | ; ecx, edx, .. depends on subfunction |
676 | ; ecx, edx, .. depends on subfunction |
683 | ; |
677 | ; |
684 | ; OUT: |
678 | ; OUT: |
685 | ; |
679 | ; |
686 | ;--------------------------------------------------------------------------- |
680 | ;--------------------------------------------------------------------------- |
687 | - | ||
688 | align 4 |
681 | align 4 |
689 | IPv4_API: |
682 | IPv4_API: |
Line 690... | Line 683... | ||
690 | 683 | ||
691 | movzx eax, bh |
684 | movzx eax, bh |