Date: Mon, 6 Jul 1998 14:27:00 -0400 (EDT) From: "Matthew N. Dodd" <winter@jurai.net> To: "Larry S. Lile" <lile@stdio.com> Cc: tokenring@FreeBSD.ORG Subject: Re: Un-rolling token-ring packets? Need a little help. (fwd) Message-ID: <Pine.BSF.3.96.980706142156.10970Q-100000@sasami.jurai.net> In-Reply-To: <Pine.SUN.3.91.980705153838.27270C-100000@heathers2.stdio.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Check out http://www.jurai.net/~winter/tr/src/iso88025subr.[ch[ I think its a good starting place. I went through and created it using the ether/fddi equivelent files and the ISO/IEC 88025 standard book. Personally, I'd get BPF working and do packet dumps and display them on a machine capabal of intrepreting token ring frames. If you'd like I can try examining captured data with the Solaris 'snoop' command which may do what you need. On Sun, 5 Jul 1998, Larry S. Lile wrote: > > Progress report and request for help. > > ---------- Forwarded message ---------- > Date: Sun, 5 Jul 1998 15:38:16 -0400 (EDT) > From: Larry S. Lile <lile@heathers2.stdio.com> > To: hackers@freebsd.org > Subject: Un-rolling token-ring packets? Need a little help. > > > I am near having a working token-ring driver (IBM Shared ram only) > but I am having trouble figuring out how to unroll the packets and > pass them up the layers of network code. > > I am at the stage where I need to put the packets into mbufs and pass > them off the an iso88025_input routine. I can already pull the packets > out of the adapter's shared ram. I need help with the headers mostly > and the iso88025_input routine. Any takers? > > Here is some sample output from the driver (I only dumped the beggining > of the packets): > > Jul 5 14:47:50 anarchy /kernel: tok0: Packet received data: > Jul 5 14:47:50 anarchy /kernel: cmd[81] station_id[100] > Jul 5 14:47:50 anarchy /kernel: bptr[a3e] lhdr[e] dhdr[3] len[32] > ncb[6] > Jul 5 14:47:50 anarchy /kernel: tok0:Packet data: > Jul 5 14:47:50 anarchy /kernel: 18 40 ff ff ff ff ff ff 0 0 83 2d 9f 35 > aa aa 3 0 0 0 8 6 0 6 8 0 6 4 0 1 0 0 83 2d 9f 35 a > > what I know (or at least what I think) > ---- Token ring mac header ----- > 18 40 - Access control/Frame control (don't care - at least for now) > ff ff ff ff ff ff - (Destination address to me - no previous arp) > 00 00 83 2d 9f 35 - (Source address my olicom card in another machine) > ---- Token ring llc header ----- > aa aa - dest sap / source sap (both ip) > 03 - control field, no clue? (Only one byte because dlc_hdr_len = 3?) > after that I am lost. > > Jul 5 14:47:50 anarchy /kernel: tok0: ack'ing packet to adapter (rc=0). > Jul 5 14:47:50 anarchy /kernel: tok: isrp e[2] o[8] isra e[3] o[10] > (tok_rx_intr 2). > Jul 5 14:47:50 anarchy /kernel: tok0: asb->bptr [a3e] arb->bptr [a3e]. > Jul 5 14:47:51 anarchy /kernel: tok0: Interrupt received. > Jul 5 14:47:51 anarchy /kernel: tok: isrp e[42] o[8] isra e[3] o[0] > (tok_intr 1a). > Jul 5 14:47:51 anarchy /kernel: tok: isrp e[2] o[8] isra e[3] o[0] > (tok_intr 1b). > Jul 5 14:47:51 anarchy /kernel: tok0: interrupt received (isrp_o = 8). > Jul 5 14:47:51 anarchy /kernel: tok0: Receive interrupt called. > Jul 5 14:47:51 anarchy /kernel: tok: isrp e[2] o[8] isra e[7] o[0] > (tok_rx_intr 1). > Jul 5 14:47:51 anarchy /kernel: tok0: Packet received data: > Jul 5 14:47:51 anarchy /kernel: cmd[81] station_id[100] > Jul 5 14:47:51 anarchy /kernel: bptr[aae] lhdr[10] dhdr[3] > len[34] ncb[6] > Jul 5 14:47:51 anarchy /kernel: tok0:Packet data: > Jul 5 14:47:51 anarchy /kernel: 18 40 ff ff ff ff ff ff 80 0 83 2d 9f 35 > 82 70 aa aa 3 0 0 0 8 6 0 6 8 0 6 4 0 1 0 0 83 2d 9f 35 a > > what I know (or at least what I think) > ----- Token ring mac header ----- > 18 40 - Access control/Frame control (don't care - at least for now) > ff ff ff ff ff ff - (Destination address to me - no previous arp) > 80 00 83 2d 9f 35 - (Source address my olicom card in another machine, > but with source routing) > 82 70 - RCF (no RIF) > RCF 100 - All routes broadcast > 00000 - Length of RIF (0 bytes) > 0 - direction (forward) > 000 - largest frame (516 bytes) > 0010 - reserved (no touch!) > ----- Token ring llc header ------ > aa aa - dest sap / source sap (both ip) > 03 - control field, no clue? (Only one byte because dlc_hdr_len = 3?) > after that I am lost. > > Jul 5 14:47:51 anarchy /kernel: tok0: ack'ing packet to adapter (rc=0). > Jul 5 14:47:51 anarchy /kernel: tok: isrp e[2] o[8] isra e[7] o[10] > (tok_rx_intr 2). > Jul 5 14:47:51 anarchy /kernel: tok0: asb->bptr [aae] arb->bptr [aae]. > > I am getting very very close, I would hate to see this be for nothing > because I don't understand mbufs and the lower level protocols. Also > where is the ethertype field, in the SNAP? Where's the SNAP header? > Arrgh, I'm in over my head, ye` old gods of networking help me please. > > All the code and a longer copy of the dmesg are at http://anarchy.stdio.com > > Thanks in advance, > Larry Lile > lile@stdio.com > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-tokenring" in the body of the message > /* Matthew N. Dodd | A memory retaining a love you had for life winter@jurai.net | As cruel as it seems nothing ever seems to http://www.jurai.net/~winter | go right - FLA M 3.1:53 */ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-tokenring" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980706142156.10970Q-100000>