OSDev.org https://forum.osdev.org/ |
|
Extra bytes in my packets!! https://forum.osdev.org/viewtopic.php?f=1&t=43563 |
Page 1 of 1 |
Author: | 0b1 [ Tue May 11, 2021 10:27 am ] |
Post subject: | Extra bytes in my packets!! |
Anyone been through the pain of developing a network driver on Bochs? I have extra bytes in my received packets, from ... I don't know where! Attachment: If you look at the green "wut?" label you can see four extra bytes at the START of my ARP response. I know the sender isn't generating them - the number of bytes sent and buffer contents tally. It seems as though Bochs is adding them, or the ne2k module. There is nothing in the logs, except two entries that don't say much: Code: 00519512000d[NE2K ] eth_socket: got packet: 64 bytes, dst=b0:c5:aa:bb:cc:2, src=de:de:de:1:2:3 00519512000d[NE2K ] rx_frame with length 64 This might be TMI, but my NIC configuration looks like this: Code: ne2k = { CR = { stop = false start = true tx_packet = false rdma_cmd = 4 pgsel = 0 } ISR = { pkt_rx = true pkt_tx = true rx_err = false tx_err = false overwrite = false cnt_oflow = false rdma_done = true reset = false } IMR = { rx_inte = false tx_inte = false rxerr_inte = false txerr_inte = false overw_inte = false cofl_inte = false rdma_inte = false } DCR = { wdsize = true endian = false longaddr = false loop = false auto_rx = false fifo_size = 0 } TCR = { crc_disable = false loop_cntl = 0 ext_stoptx = false coll_prio = false } TSR = { tx_ok = true collided = false aborted = false no_carrier = false fifo_ur = false cd_hbeat = false ow_coll = false } RCR = { errors_ok = false runts_ok = false broadcast = true multicast = false promisc = false monitor = false } RSR = { rx_ok = true bad_crc = false bad_falign = false fifo_or = false rx_missed = false rx_mbit = false rx_disabled = false deferred = false } local_dma = 0x0000 page_start = 0x46 page_stop = 0x80 bound_ptr = 0x46 tx_page_start = 0x40 num_coll = 0x00 tx_bytes = 0x0040 fifo = 0x00 remote_dma = 0x4040 remote_start = 0x4000 remote_bytes = 0x0000 tallycnt_0 = 0x00 tallycnt_1 = 0x00 tallycnt_2 = 0x00 physaddr = [ 0xb0, 0xc5, 0xaa, 0xbb, 0xcc, 0x02 ] curr_page = 0x47 mchash = [ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 ] rempkt_ptr = 0x00 localpkt_ptr = 0x00 address_cnt = 0x0000 mem = ne2k.mem tx_timer_active = false pci_conf = [ [I deleted this for brevity] ] } After spending about 2 weeks on this, I am completely flummoxed. I can't find anything about a 4 byte header, preamble, etc. If you have any ideas, even wacky ones, I am open to them. Thanks! |
Author: | Gigasoft [ Tue May 11, 2021 11:25 am ] |
Post subject: | Re: Extra bytes in my packets!! |
It's on page 11 in the DP8390 datasheet. |
Page 1 of 1 | All times are UTC - 6 hours |
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group http://www.phpbb.com/ |