Article 68285 of comp.os.vms:
Path: nntpd.lkg.dec.com!news.crl.dec.com!deccrl!caen!sdd.hp.com!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!emory!ogicse!psgrain!ee.und.ac.za!ucthpx!sunvax!nico
From: nico@sunvax.sun.ac.za
Newsgroups: comp.os.vms
Subject: ethernet monitor
Message-ID: <1993Feb25.124126.5701@sunvax.sun.ac.za>
Date: 25 Feb 93 14:41:26 GMT
Article-I.D.: sunvax.1993Feb25.124126.5701
Organization: University of Stellenbosch
Lines: 143

Hi

My problem: Ethernet driver promiscuous mode anomaly.

Environment:  VAX 3100 Model 10  VMS V5.5
              VAX 3100 Model 10  VMS V5.5-1
              VAX 3400           VMS V5.5-2

Help?:  Yes, please!

I'm using my VAX 3100 Model 10's ethernet adapter in promiscuous mode.

I capture all packets perfectly on the two 3100s, including the 80-38
(DIGITAL Bridge) protocol type packets, e.g.

Destination:    09-00-2B-01-00-01
Source:         00-00-A9-03-3D-15
Protocol type:  80-38
Rest of header: 00-00-00-00-00-00

Packet:  E1190100 000A0800 7C004ACF 000A0080 0000A903 38F80601 
         010F1E51 00000000 00000000 C0023958 C0019C00 C003

However, using the exact** same code on the 3400, I get:

Destination:    09-00-2B-01-00-01
Source:         08-00-7C-00-4A-CF
Protocol type:  E1-19
Rest of header: 01-00-00-00-00-00

Packet:  E1190100 000A0800 7C004ACF 0000000A 08007C00 4ACF0300
         010F1E20 C0120401 00050000 10100000 10001010 0000

Notice how the source and protocol type in the second instance is
incorrect, in fact, the data contained in the source and protocol
type fields are extracted from the packet itself, i.e. the packet's
E1190100 becomes the protocol type and the first two bytes of the
Rest of header.

The amazing thing is that all the other protocol types, e.g. 60-03
(DECnet) and 60-04 (LAT) seems correct on both the 3100s and the 3400.

** By exact same code I mean:
    $copy code.mar vx3400"user pass"::
    $macro code
    $link code

I have also unsuccessfully run the code on a VAX 6000 Model 510,
also getting the wrong packet header information for 80-38.

Code extracts:

    c_PortReceiveBuffers = 10            ;Number of buffers maintained by port
    s_PacketBuffer       = 1500          ;Size of packet buffer used by port
    s_HeaderBuffer       = 20            ;Size of header buffer used by port

    Channel::                    .long   0

    HeaderBuffer:                .blkb   s_HeaderBuffer
    PacketBuffer:                .blkb   s_PacketBuffer

    IOSB::
    IOSB_CompletionStatus:       .word   0
    IOSB_TransferSize:           .word   0
                                 .byte   0
    IOSB_Status:                 .byte   0
    IOSB_ErrorSummary:           .byte   0
                                 .byte   0

    StartParameterList:          .word   nma$c_pcli_bfn
                                 .long   c_PortReceiveBuffers
                                 .word   nma$c_pcli_bus
                                 .long   s_PacketBuffer
                                 .word   nma$c_pcli_pad
                                 .long   nma$c_state_off
                                 .word   nma$c_pcli_prm
                                 .long   nma$c_state_on
    s_StartParameterList = .-StartParameterList
    StartParameters:             .long           s_StartParameterList
                                 .address        StartParameterList

    EF_c_IOcompletion       = 2

    ; ----------------------
    ;  Ethernet device name.
    ; ----------------------

    EC_Descriptor:
    EC_Descriptor_Length:   .long   8
    EC_Descriptor_Address:  .address        EC_Name
    EC_Name:                .blkb   8


    ; ---------------------------------------------------
    ;  Start promiscuous port on the ethernet controller.
    ; ---------------------------------------------------

            $qiow_s chan=g^Channel, -
                    func=#io$_setmode!io$m_startup!io$m_ctrl, -
                    iosb=g^IOSB, -
                    p2=#StartParameters
            checkstat
            movzwl  IOSB_CompletionStatus, r0
            checkstat

            $qio_s  efn=#EF_c_IOcompletion, -
                    chan=g^Channel, -
                    func=#io$_readvblk, -
                    iosb=g^IOSB, -
                    p1=PacketBuffer, -
                    p2=#s_PacketBuffer, -
                    p5=#HeaderBuffer

            cmpl    r0, #ss$_endoffile
            beql    10$
            checkstat
            movzwl  IOSB_CompletionStatus, r0
            checkstat
    10$:    ...

I have also (unsuccessfully) run the code using a $qiow without an event
flag, i.e.

            $qiow_s chan=g^Channel, -
    ;               efn=#EF_c_IOcompletion, -
                    func=#io$_readvblk, -
                    iosb=g^IOSB, -
                    p1=PacketBuffer, -
                    p2=#s_PacketBuffer, -
                    p5=#HeaderBuffer

            cmpl    r0, #ss$_endoffile
            beql    10$
            checkstat
            movzwl  IOSB_CompletionStatus, r0
            checkstat
    10$:    ...

I'd appreciate any information.


Regards
J.A.Nel


a                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  