# lnc.h File Reference

`#include <ubixos/types.h>`

Go to the source code of this file.

## Data Structures
struct | arpcom
struct | hostRingEntry
struct | initBlock
struct | lncInfo
struct | mds
struct | nicInfo
## Defines
#define | NDESC(len2) (1 << len2)
#define | NORMAL 0
#define | MEM_SLEW 8
#define | TRANSBUFSIZE 1518
#define | RECVBUFSIZE 1518
#define | NRDRE 3
#define | NTDRE 3
#define | ETHER_ADDR_LEN 6
#define | NE2100_IOSIZE 24
#define | PCNET_RDP 0x10
#define | PCNET_RAP 0x12
#define | PCNET_RESET 0x14
#define | PCNET_BDP 0x16
#define | PCNET_VSW 0x18
#define | NE2100 2
#define | DMA_FIXED 1
#define | DMA_MBUF 2
#define | SHMEM 4
#define | UNKNOWN 0
#define | LANCE 1
#define | C_LANCE 2
#define | PCnet_ISA 3
#define | PCnet_ISAplus 4
#define | PCnet_ISA_II 5
#define | PCnet_32 6
#define | PCnet_PCI 7
#define | PCnet_PCI_II 8
#define | PCnet_FAST 9
#define | PCnet_FASTplus 10
#define | PCnet_Home 11
#define | CSR0 0x0000
#define | CSR1 1
#define | CSR2 2
#define | CSR3 3
#define | CSR88 88
#define | CSR89 89
#define | ERR 0x8000
#define | BABL 0x4000
#define | CERR 0x2000
#define | MISS 0x1000
#define | MERR 0x0800
#define | RINT 0x0400
#define | TINT 0x0200
#define | IDON 0x0100
#define | INTR 0x0080
#define | INEA 0x0040
#define | RXON 0x0020
#define | TXON 0x0010
#define | TDMD 0x0008
#define | STOP 0x0004
#define | STRT 0x0002
#define | INIT 0x0001
#define | AMD_MASK 0x003
#define | PART_MASK 0xffff
#define | Am79C960 0x0003
#define | Am79C961 0x2260
#define | Am79C961A 0x2261
#define | Am79C965 0x2430
#define | Am79C970 0x0242
#define | Am79C970A 0x2621
#define | Am79C971 0x2623
#define | Am79C972 0x2624
#define | Am79C973 0x2625
#define | Am79C978 0x2626
## Functions
void | writeCsr (struct lncInfo *lnc, uInt16 port, uInt16 val)
uInt16 | readCsr (struct lncInfo *lnc, uInt16 port)
void | writeBcr (struct lncInfo *lnc, uInt16 port, uInt16 val)
uInt16 | readBcr (struct lncInfo *lnc, uInt16 port)
void | initLNC ()
int | probe (struct lncInfo *lnc)
int | lanceProbe (struct lncInfo *lnc)
int | lncAttach (struct lncInfo *lnc, int unit)
void | lncInt ()
void | _lncInt ()
## Variables
lncInfo * | lnc

## Define Documentation

#define Am79C960 0x0003

#define Am79C961 0x2260

#define Am79C961A 0x2261

#define Am79C965 0x2430

#define Am79C970 0x0242

#define Am79C970A 0x2621

#define Am79C971 0x2623

#define Am79C972 0x2624

#define Am79C973 0x2625

#define Am79C978 0x2626

#define AMD_MASK 0x003

#define BABL 0x4000

#define C_LANCE 2

#define CERR 0x2000

#define CSR0 0x0000

#define CSR1 1

#define CSR2 2

#define CSR3 3

#define CSR88 88

#define CSR89 89

#define DMA_FIXED 1

#define DMA_MBUF 2

#define ERR 0x8000

#define ETHER_ADDR_LEN 6

#define IDON 0x0100

#define INEA 0x0040

#define INIT 0x0001

#define INTR 0x0080

#define LANCE 1

#define MEM_SLEW 8

#define MERR 0x0800

#define MISS 0x1000

#define NDESC | ( | len2 |  | ) | (1 << len2)

#define NE2100 2

#define NE2100_IOSIZE 24

#define NORMAL 0

#define NRDRE 3

#define NTDRE 3

#define PART_MASK 0xffff

#define PCnet_32 6

#define PCNET_BDP 0x16

#define PCnet_FAST 9

#define PCnet_FASTplus 10

#define PCnet_Home 11

#define PCnet_ISA 3

#define PCnet_ISA_II 5

#define PCnet_ISAplus 4

#define PCnet_PCI 7

#define PCnet_PCI_II 8

#define PCNET_RAP 0x12

#define PCNET_RDP 0x10

#define PCNET_RESET 0x14

#define PCNET_VSW 0x18

#define RECVBUFSIZE 1518

#define RINT 0x0400

#define RXON 0x0020

#define SHMEM 4

#define STOP 0x0004

#define STRT 0x0002

#define TDMD 0x0008

#define TINT 0x0200

#define TRANSBUFSIZE 1518

#define TXON 0x0010

#define UNKNOWN 0

## Function Documentation

void _lncInt | ( |  | ) |

void initLNC | ( |  | ) |

int lanceProbe | ( | struct lncInfo * | lnc | ) |

int lncAttach | ( | struct lncInfo * | lnc,
|  | int | unit
| ) |

void lncInt | ( |  | ) |

int probe | ( | struct lncInfo * | lnc | ) |

uInt16 readBcr | ( | struct lncInfo * | lnc,
|  | uInt16 | port
| ) |

uInt16 readCsr | ( | struct lncInfo * | lnc,
|  | uInt16 | port
| ) |

void writeBcr | ( | struct lncInfo * | lnc,
|  | uInt16 | port,
|  | uInt16 | val
| ) |

void writeCsr | ( | struct lncInfo * | lnc,
|  | uInt16 | port,
|  | uInt16 | val
| ) |

## Variable Documentation

struct lncInfo* lnc