|
UbixOS
2.0
|
#include <isa/ne2k.h>#include <net/netif.h>#include <isa/8259.h>#include <sys/device.old.h>#include <sys/io.h>#include <sys/idt.h>#include <lib/kmalloc.h>#include <lib/kprintf.h>#include <string.h>#include <ubixos/kpanic.h>#include <ubixos/vitals.h>#include <ubixos/spinlock.h>#include <assert.h>
Go to the source code of this file.
Functions | |
| asm (".globl ne2kISR \n" "ne2kISR: \n" " pusha \n" " call ne2kHandler \n" " popa \n" " iret \n") | |
| int | ne2k_init () |
| struct nicBuffer * | ne2kAllocBuffer (int length) |
| void | ne2kFreeBuffer (struct nicBuffer *buf) |
| struct nicBuffer * | ne2kGetBuffer () |
| void | ne2kHandler () |
| int | NICtoPC (struct device *dev, void *packet, int length, int nic_addr) |
| int | PCtoNIC (struct device *dev, void *packet, int length) |
| asm | ( | ".globl ne2kISR \n" "ne2kISR: \n" " pusha \n" " call ne2kHandler \n" " popa \n" " iret \n" | ) |
| struct nicBuffer* ne2kAllocBuffer | ( | int | length | ) |
Definition at line 312 of file ne2k.c.
References spinLock(), and tmpBuf.

| void ne2kFreeBuffer | ( | struct nicBuffer * | buf | ) |
| int NICtoPC | ( | struct device * | dev, |
| void * | packet, | ||
| int | length, | ||
| int | nic_addr | ||
| ) |
Definition at line 162 of file ne2k.c.
References assert, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, inportWord(), device::ioAddr, NE_DATAPORT, and outportByte().

| int PCtoNIC | ( | struct device * | dev, |
| void * | packet, | ||
| int | length | ||
| ) |
Definition at line 113 of file ne2k.c.
References assert, E8390_RWRITE, E8390_START, EN0_ISR, EN0_RCNTHI, EN0_RCNTLO, EN0_RSARHI, EN0_RSARLO, EN0_TPSR, inportByte(), device::ioAddr, kpanic(), NE_DATAPORT, outportByte(), outportByteP(), and outportWord().
