nic.h revision 1
0N/A /*
0N/A * This program is free software; you can redistribute it and/or
0N/A * modify it under the terms of the GNU General Public License as
0N/A * published by the Free Software Foundation; either version 2, or (at
0N/A * your option) any later version.
0N/A */
0N/A
0N/A#ifndef NIC_H
0N/A#define NIC_H
0N/A
0N/A#include "dev.h"
0N/A
0N/Atypedef enum {
0N/A DISABLE = 0,
0N/A ENABLE,
0N/A FORCE
0N/A} irq_action_t;
0N/A
0N/A/*
0N/A * Structure returned from eth_probe and passed to other driver
0N/A * functions.
0N/A */
0N/Astruct nic
0N/A{
0N/A struct dev dev; /* This must come first */
0N/A int (*poll)P((struct nic *, int retrieve));
0N/A void (*transmit)P((struct nic *, const char *d,
0N/A unsigned int t, unsigned int s, const char *p));
0N/A void (*irq)P((struct nic *, irq_action_t));
0N/A int flags; /* driver specific flags */
0N/A struct rom_info *rom_info; /* -> rom_info from main */
0N/A unsigned char *node_addr;
0N/A unsigned char *packet;
0N/A unsigned int packetlen;
0N/A unsigned int ioaddr;
0N/A unsigned char irqno;
0N/A void *priv_data; /* driver can hang private data here */
0N/A};
0N/A
0N/Aextern int eth_probe(struct dev *dev);
0N/Aextern int eth_poll(int retrieve);
0N/Aextern void eth_transmit(const char *d, unsigned int t, unsigned int s, const void *p);
0N/Aextern void eth_disable(void);
0N/Aextern void eth_irq(irq_action_t action);
0N/A#endif /* NIC_H */
0N/A