From: johnm@vaxc.cc.monash.edu.au Newsgroups: alt.sources Subject: [pcip] Re: 802.3 Novell and TCP/IP on top of Packet Driver Message-ID: <12139@stag.math.lsa.umich.edu> Date: 21 May 90 04:47:30 GMT Archive-name: novell-packet-ipx/18-May-90 Original-posting-by: johnm@vaxc.cc.monash.edu.au Original-subject: Re: 802.3 Novell and TCP/IP on top of Packet Driver Reposted-by: emv@math.lsa.umich.edu (Edward Vielmetti) [This is an experimental alt.sources re-posting from the newsgroup(s) comp.protocols.tcp-ip.ibmpc. Comments on this service to emv@math.lsa.umich.edu (Edward Vielmetti).] In article <399@van-bc.UUCP>, skl@van-bc.UUCP (Samuel Lam) writes: > By now, thanks to Kelly MacDonald at BYU, we all know how to do > Ethernet II (Blue Book) Novell over a packet driver and make it > co-exist with a TCP/IP stack on top of the same packet driver... > > The question of the day now is: Does anyone have any insight > in doing the same with the ordinary 802.3 Novell, so that one > would not have to involve the Novell servers and other Novell > nodes on the network just to get TCP/IP and Novell to co-exist > on one Ethernet interface on a single PC? I've done it. I modified HEAD.ASM and TAIL.ASM from version 5 of the packet drivers and use an IPX linked against PDSHELL.OBJ. I also modified things so that the packet driver doesn't initialize the Ethernet card until you actually use the packet driver. This works well with the WD8003E driver, but with the NE1000/Tiara driver it doesn't show you the Ethernet address until you actually start using the packet driver. :-( We had to continue using 802.3 Novell because we needed student PCs to remote boot (from the Novell fileserver). In the AUTOEXEC.BAT just load the appropriate packet driver, IPX linked against PDSHELL, NET3, and do the rest of the things you normally do. No need to have a RAM disk taking up memory. In our AUTOEXEC.BAT we also have a program that looks at the signature in the Ethernet Boot ROM and decides which packet driver to load (with which IRQ etc.). This means we can have *one* boot image on the server for all types of cards, and we don't have classrooms full of PCs each reading BOOTCONF.SYS two bytes at a time ... but that's a different story. Please use this code, improve it (it's my only bit of 8*86 coding -- done without a manual), and share it around. John Here are my the differences to the version 5 files. ------------------ HEAD.DIF ------------------------------ *** VC$1:[COS142D.KA9Q.DRIVERS5]HEAD.ASM;1 --- head.asm ************** *** 42,47 is_at db 0 ; =1 if we're on an AT. sys_features db 0 ; 2h = MC 40h = 2nd 8259 functions label word dw f_driver_info ;function 1 dw f_access_type --- 42,51 ----- is_at db 0 ; =1 if we're on an AT. sys_features db 0 ; 2h = MC 40h = 2nd 8259 + ; call etopen the first time the packet driver is called + called_etopen db 0 ; have called etopen + extrn etopen: near + functions label word dw f_driver_info ;function 1 dw f_access_type ************** *** 197,202 jz our_isr_ei ;no. ; sti ;yes - re-enable them. our_isr_ei: mov dh,BAD_COMMAND ;in case we find a bad number. mov bl,ah ;jump to the correct function. mov bh,0 --- 201,235 ----- jz our_isr_ei ;no. ; sti ;yes - re-enable them. our_isr_ei: + + cmp called_etopen,1 ; have we initialized the card? + je our_isr_cont ; yes + + push ax ; save lots of registers + push bx + push cx + push dx + push si + push di + push bp + push ds + push es + + call etopen ; init the card + mov called_etopen,1 ; remember this fact + + pop es ; restore lots of registers + pop ds + pop bp + pop di + pop si + pop dx + pop cx + pop bx + pop ax + + our_isr_cont: + mov dh,BAD_COMMAND ;in case we find a bad number. mov bl,ah ;jump to the correct function. mov bh,0 ************** *** 464,469 ; mov si,_SI[bp] ; mov cx,_CX[bp] ; count of bytes call send_pkt pop ds ret --- 497,518 ----- ; mov si,_SI[bp] ; mov cx,_CX[bp] ; count of bytes + ; Take Ethernet encapsulated Novell IPX packets (from BYU's PDSHELL) and + ; change them to be IEEE 802.3 encapsulated. + EPROT_OFF equ EADDR_LEN*2 + + cmp ds:[si].EPROT_OFF,3781h ; if not Novell (prot 8137) + jne f_send_pkt_1 ; don't tread on it + push ax ; get scratch reg + mov ah,[si].EPROT_OFF+4 ; get len + mov al,[si].EPROT_OFF+5 + inc ax ; make even (rounding up) + and ax,0fffeh + mov ds:[si].EPROT_OFF,ah ; save in prot field + mov ds:[si].EPROT_OFF+1,al + pop ax ; restore old contents + f_send_pkt_1: + call send_pkt pop ds ret ************** *** 752,757 ;enter with cx = packet length, es:di -> packet type. assume ds:code, es:nothing push cx mov bx,offset handles recv_find_1: --- 801,819 ----- ;enter with cx = packet length, es:di -> packet type. assume ds:code, es:nothing push cx + + ; Take IEEE 802.3 encapsulated packets that could be Novell IPX and + ; make them Ethernet encapsulated Novell IPX packets (for PDSHELL). + push ax ; get scratch reg + mov ah,es:[di] ; get length word + mov al,es:[di]+1 + cmp ax,GIANT ; if > GIANT + ja recv_find_0 ; then it is a protocol + cmp es:2[di],0ffffh ; if next word not ffff + jne recv_find_0 ; then not Novell + mov es:[di],3781h ; make Novell protocol (8137) + recv_find_0: + pop ax ; restore old contents mov bx,offset handles recv_find_1: ------------------ HEAD.DIF ------------------------------ ------------------ TAIL.DIF ------------------------------ *** VC$1:[COS142D.KA9Q.DRIVERS5]TAIL.ASM;1 --- tail.asm ************** *** 36,41 db "Packet driver skeleton copyright 1988-89, Russell Nelson.",CR,LF db "This program is free software; see the file COPYING for details.",CR,LF db "NO WARRANTY; see the file COPYING for details.",CR,LF crlf_msg db CR,LF,'$' ;parse_args should parse the arguments. --- 36,42 ----- db "Packet driver skeleton copyright 1988-89, Russell Nelson.",CR,LF db "This program is free software; see the file COPYING for details.",CR,LF db "NO WARRANTY; see the file COPYING for details.",CR,LF + db "Delayed etopen and IEEE 802.3 mods by John Mann.",CR,LF crlf_msg db CR,LF,'$' ;parse_args should parse the arguments. ************** *** 177,185 jmp error int_ok: ! call etopen ;init the driver. If any errors, ! ;this routine returns cy. ! jc no_resident push dx ;remember where they want to end. --- 178,192 ----- jmp error int_ok: ! ; Don't call etopen when we are loaded, but when we are called ! ; for the first time ! ; ! ; call etopen ;init the driver. If any errors, ! ; ;this routine returns cy. ! ; jc no_resident ! ; ! ; Save all of driver in case needed by delayed etopen ! mov dx,offset end_tail ; save whole of driver push dx ;remember where they want to end. ************** *** 523,528 loope memory_test_1 ;keep going if the store worked. pop ds ret code ends --- 530,537 ----- loope memory_test_1 ;keep going if the store worked. pop ds ret + + end_tail label byte ; end of the driver code ends ------------------ TAIL.DIF ------------------------------ -- John Mann, Computer Centre, Monash University, Clayton VIC 3168, Australia Net: johnm@vaxc.cc.monash.edu.au Ph: +61 3 565 4774 FAX: +61 3 565 4746