Whos listening - PowerPoint PPT Presentation

About This Presentation
Title:

Whos listening

Description:

Interrupt-hander reflects' each received packet back to the station it came from ... Then let's transmit a broadcast' packet from a different anchor station, while ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 8
Provided by: CRU7
Learn more at: https://www.cs.usfca.edu
Category:

less

Transcript and Presenter's Notes

Title: Whos listening


1
Whos listening?
  • Some experiments with an echo service on our
    anchor-clusters local network of 82573L nics

2
nicecho.c
  • Module uses a set of eight packet-buffers
  • Same buffer is used for both RX and TX
  • The NIC operates in promiscuous mode
  • Interrupt-hander reflects each received packet
    back to the station it came from
  • Pseudo-file shows both descriptor-queues

3
Memory-layout
define KMEM_SIZE (4ltlt12) // 16KB kernel
memory allocation
12KB
4KB
rxring txring
kmem
Each of the 8 packet-buffers has size 1536 bytes
(0x600) Each of descriptor-table occupies 8(16
bytes) 128 bytes
4
Sharing of packet-buffers
Tx-descriptors
Rx-descriptors
5
Interrupt-processing
irqreturn_t my_isr(int irq, void dev_id )
int intr_cause ioread32( io E1000_ICR
) if ( intr_cause 0 ) return IRQ_NONE if
( intr_cause (1ltlt7) ) // receiver timeout a
new packet arrived int index ioread32( io
E1000_TDT ) unsigned long where txring
index .base_address unsigned char cp
phys_to_virt( where ) memcpy( cp0, cp6, 6
) // source becomes destination memcpy( cp6,
mac, 6 ) // our station becomes source txring
index .desc_status 0 txring index
.packet_length rxring index
.packet_length index (1 index) 8 //
ring-buffer index advances iowrite32( io
E1000_TDT ) // start sending packet
back iowrite32( intr_cause, io E1000_ICR
) // clear the interrupts return IRQ_HANDLED
6
Packet-processing
then our station becomes source
source becomes destination
mac6
destn-address
source-address
TYPE/ LENGTH
-- data --
-- data --
-- data
-- data --
-- data --
-- data --
7
In-class experiments
  • Lets compile and install our nicecho.c module
    on one (or more) anchor stations
  • Then lets transmit a broadcast packet from a
    different anchor station, while we simultaneously
    listen for any replies
  • Then lets see what happens if we omit our
    processing of the station-addresses
Write a Comment
User Comments (0)
About PowerShow.com