[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Decoding DNA packets to symbolics

    Date: 13 Sep 87 13:48:00 EDT
    From: "ARTIC::AREAPU" <areapu%artic.decnet@ari-hq1.arpa>

    We have a problem where a VAX will be using a DNA protocol to speak to a
    Symbolics. We need to capture what comes over and dissect it at the bit level
    to decode bit fields that conform to a tightly specified format. Does anyone
    have experience doing this, who would be willing to send us over a few hints?
    For example, at what level does one attack the problem (server/protocol
    writing, versus using an existing protocol)? Are there utilities for picking
    out the bits from network packets? We are naive in this area and appreciate any
    help that can be given. Thank you.

    Paul Pangaro & Peter Paine
    (AREAPU@ari-hq1.arpa or pan@Athena.pangaro.dialnet.symbolics.com)

At what level are we talking about looking at bits?  If we're talking
about looking at the fields in the control portion of a packet or
message, for instance the NSP header, there's no real good way to do it,
you'd have to patch some of the NSP level code to let you watch the
packets as they fly by.  Same thing applies to the RL level.  A similar
thing applies to the Ethernet level (you don't have to patch, you could
just trace the receive-packet method of the DNA network, or invent some
other hook to get at packets from the interface to the network).  

However...  I rather doubt that any of those things is what you want.
You're probably just interested in dumping the data portion of the NSP
messages the percolate up from below, ie the data message that the VAX
program sent over the connection.  That's easy; one of his messages
shows up as a buffer in the connection stream, ie when he does a WRITE
to his channel, you see something come back from :READ-INPUT-BUFFER.  At
that point you've got an array of bytes that contains the bytes he sent.
If you've got (for instance) 16-bit words in mind, rather than bytes,
just make an indirect array into the buffer you got, to let you view it
in the manner you prefer.  If you've got some other structure in mind
(ie a pascal-ish structure or something), just make a defstruct that
describes the structure you're interested in, and use the accessors
generated by defstruct to look at the pieces of the buffer that comes

I hope the above info is helpful.  For what it's worth, when we (at
SCRC) need to look at the guts of DNA packets, we usually just set
breakpoints at various points in the internals, or, worst case, get out
a network analyzer to trap the packets flying by on the cable.  That
latter's pretty gross; and the former's all done ad hoc.  There isn't
anything like TCP::PRINT-RECENT-HEADERS for DNA.