home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / dcom / lans / 1983 < prev    next >
Encoding:
Internet Message Format  |  1992-11-18  |  4.7 KB

  1. Xref: sparky comp.dcom.lans:1983 comp.protocols.tcp-ip:5217 comp.protocols.tcp-ip.ibmpc:6406 comp.sys.novell:9614
  2. Newsgroups: comp.dcom.lans,comp.protocols.tcp-ip,comp.protocols.tcp-ip.ibmpc,comp.sys.novell
  3. Path: sparky!uunet!kithrup!stanford.edu!ames!haven.umd.edu!darwin.sura.net!convex!constellation!osuunx.ucc.okstate.edu!datacomm.ucc.okstate.edu!ben
  4. From: ben@datacomm.ucc.okstate.edu (Ben James)
  5. Subject: Oditrpkt ( One last Problem! )
  6. Message-ID: <1992Nov18.041141.28571@osuunx.ucc.okstate.edu>
  7. Sender: news@osuunx.ucc.okstate.edu (USENET News System)
  8. Nntp-Posting-Host: datacomm.ucc.okstate.edu
  9. Organization: Oklahoma State University, Stillwater, OK
  10. Date: Wed, 18 Nov 1992 04:11:41 GMT
  11. Lines: 123
  12.  
  13.  
  14. I am still haveing problems with oditrpkt.com.  At the moment I have almost
  15.  
  16. everything working.  My current problem is that my driver or ODI is changeing
  17.  
  18. my offset in TCP this is this field which tells where exactly the data 
  19.  
  20. starts.  For some reason every time I send a TCP packet out threw my driver and 
  21.  
  22. odi this offset is set to 5.  Unfortunitally the first packet has an options 
  23.  
  24. field giving the maximum segment size so this field should be 6.  I have been 
  25.  
  26. able to get a telnet session open too our 3Com Token-Ring Bridge's.  Also once 
  27.  
  28. by some glitch it worked ok.  I do know that this field is correct when it goes
  29.  
  30. into my driver so somehow it is getting changed.  It appears to me that this 
  31.  
  32. is being changed by the LSL or MLID but is always eaiser to place the blame 
  33.  
  34. somewhere else.  Everything else is working perfectly I even have route.com 
  35.  
  36. doing the source routing for me.  
  37.  
  38.  
  39. A brief description of what I do
  40.  
  41. First I get the type field and move it to the Stack ID and also the ProtocolID
  42.  
  43. fields in the ECB then I move the dest address to the immediate address of the
  44.  
  45. ECB if its arp I change the hardware field and also reduce size.  Then I move
  46.  
  47. the pointer to where the data begins.
  48.  
  49. Below is a copy of the send routine sECB is a pointer to the beginning of
  50. the Event Control Block.  I have also marked the portion which differs from 
  51. odipkt.com which consists of code to alter the mac header.  
  52.  
  53. This code is copyrighted by Daniel D. Lanciani and the complete copyright
  54. message is given in the odipkt.asm source file.  That message also applies
  55. to here.  ( Just to be safe )
  56.  
  57.     ;    This part is done at initialization.  
  58.  ;     Initialization for sECB is the same as for odipkt execpt no raw send
  59.     mov     word ptr sECB + 10, offset transcom    ; Call Transcom 
  60.     mov     word ptr sECB + 12, cs                 ; Also ptr to transcom
  61.     ;    mov     word ptr sECB + 14, -1                 ; stack ID
  62.     mov     ax, board                              ; Board #
  63.     mov     word ptr sECB + 22, ax                 ; Board # 
  64.     mov     word ptr sECB + 44, 1                  ; Fragment0Count
  65.  
  66. send_pkt:sti
  67.     push    ds
  68.     mov     bx, ds
  69.     mov     dx, cs
  70.     mov     ds, dx
  71. send_pkt1:
  72.     cmp   word ptr 8 + sECB, 0        ; status clear ?
  73.     jg      send_pkt1          ; If not wait until it is.
  74.  
  75.     add     stab + 4, 1               ; Stistics for Pktdrvr
  76.     adc     stab + 6, 0
  77.     add     stab + 12, cx
  78.     adc     stab + 14, 0          ; End stats
  79.  
  80.     mov     word ptr sECB + 48, bx          ; Fragment0address LW
  81.     
  82. ;*********Here is where my code and odipkt differ.*********
  83.     ; They would be the same if you took out this.
  84.  
  85.     push    cx
  86.     mov     es, bx
  87.     ; Move type into ECB fields
  88.     mov     cx, word ptr es:12[si]        ; Get type field from packet.
  89.     mov     word ptr sECB + 14, cx          ; StackID        
  90.     mov     word ptr sECB + 20, cx          ; ProtocolID
  91.     
  92.     mov     cx, word ptr es:0[si]
  93.     mov     word ptr sECB + 24, cx          ; Immediate address
  94.     mov     cx, word ptr es:2[si]
  95.     mov     word ptr sECB + 26, cx
  96.     mov     cx, word ptr es:4[si]
  97.     mov     word ptr sECB + 28, cx          ; *****************
  98.     pop     cx
  99.     cmp     word ptr es:12[si], 0608h       
  100.     jnz     not_arp_send                    ; if not arp then jump
  101.     mov     byte ptr es:15[si], 06h         ; is arp
  102.     sub     cx, 18                          ; Reduce size for arp
  103.  
  104. not_arp_send:        
  105.  
  106.     add     si, 14         Offset stack pointer by 
  107.                 send and recieve address + AC + FC
  108.     sub     cx, 14        Offset size by the same.
  109.  
  110. ;*********From here on it is the same as odipkt.********
  111.  
  112. send_pkt4:
  113.     mov     word ptr sECB + 42, cx           ; Data Length
  114.     mov     word ptr sECB + 46, si           ; Fragment0Address
  115.     mov     word ptr sECB + 50, cx           ; Fragment0Legnth
  116.     mov     si, offset sECB
  117.     mov     es, dx
  118.     mov     bx, 12                           ; Send Packet
  119.     call    psup
  120.     sti
  121.  
  122. send_pkt2:
  123.     cmp   word ptr 8 + sECB, 0              ; Status 
  124.     jg      send_pkt2            ; loop until clear or fail
  125.     jnz     send_pkt3
  126.     pop     ds
  127.     jmp     good
  128.  
  129. send_pkt3:
  130.     add   stab + 20, 1                     ; Stats
  131.     adc     stab + 22, 0
  132.     pop     ds
  133.     mov     dh, 12
  134.     jmp     bad
  135.  
  136.