Date: Sun, 5 Jul 1998 15:38:16 -0400 (EDT) From: "Larry S. Lile" <lile@stdio.com> To: hackers@FreeBSD.ORG Subject: Un-rolling token-ring packets? Need a little help. Message-ID: <Pine.SUN.3.91.980705150646.27270B-100000@heathers2.stdio.com>
next in thread | raw e-mail | index | archive | 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-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.980705150646.27270B-100000>
