00001 /* 00002 ** eth.h for in /home/anoman/work/lse/atomix/lseos-net/libinet/include 00003 ** 00004 ** Copyright (c)2004 Arthur Kopatsy 00005 ** Login <kopats_a@epita.fr> 00006 ** 00007 ** Started on Mon Sep 20 13:31:42 2004 Arthur Kopatsy 00008 ** Last update Thu Nov 25 12:06:44 2004 Vianney Rancurel 00009 */ 00010 00011 #ifndef LIBETHGATE_H_ 00012 #define LIBETHGATE_H_ 00013 00014 #include <libc.h> 00015 00016 #define SYSETHGATE_STATE 0 00017 #define SYSETHGATE_SEND 1 00018 00019 /* FIXME deprecated */ 00020 #define ETHGATE_DRV_ID 8139 00021 00022 /* Structure describing a transmit request in the queue */ 00023 00024 #define TX_QUEUE_SIZE 5 00025 #define TX_PGSIZE 1 00026 00027 #define TX_STATE_FREE 0 00028 #define TX_STATE_READY 1 00029 #define TX_STATE_SENT 2 00030 00031 struct s_tx { 00032 vaddr_t tx_buffer; 00033 size_t tx_size; 00034 int tx_state; 00035 }; 00036 00037 struct s_ethgate_info 00038 { 00039 int minor; /* ID for eth driver */ 00040 struct s_tx tx_queue[TX_QUEUE_SIZE]; /* Interface transmit queue */ 00041 }; 00042 00043 extern struct s_if_ops ethgate_ops; 00044 00045 #endif