[SqNOS] SqueakNOS-gera.33: Realtek8139Device should be able to transmit packets

Gerardo Richarte gera at corest.com
Sun Jul 23 06:11:54 UTC 2006


Name: SqueakNOS-gera.33
Author: gera
Time: 23 July 2006, 3:08:10 am
UUID: b2c87195-3e39-42b0-ac6d-1af7d53d0cf7
Ancestors: SqueakNOS-gera.32

Now the internal address of an ExternalIOPort is (realPortNumber - 1) so
there's not so much stupid +/- 1. (remeber the overhead from previous
commits? this is a small improvement)

Realtek8139Device should be able to transmit packets now, although I
have not tested it. I'll do it tomorrow, I'm going to sleep now. If you
want to test it you can do the following (which will also work for a
Lance device). If the destination IP address exists, you should see the
answer in the Transcript. (this code has a fix from that in the
Monticello commit)

Realtek8139Device installOn: Computer current. "not needed for Lance"

"easy accesors"
netdev := Computer current defaultNetworkInterface.

"Build EthernetPacket"
eth := EthernetPacket new: 1000.
eth source:  netdev macAddress.
eth destination: EthernetAddress broadcast.

"Build ARPPacket (ARP Request)"
arp := ARPPacket on: eth.
eth type: arp class etherType.

arp opcodeName: #Request.
arp senderHardwareAddress: eth source.
arp senderProtocolAddress: (InternetAddress fromString: '192.168.247.128').
arp targetProtocolAddress: (InternetAddress fromString: '192.168.247.1').

"send"
netdev cheapSend: eth


    gera


More information about the SqueakNOS mailing list