Changeset 640 for Whitix/branches
- Timestamp:
- 06/24/08 14:02:57 (5 months ago)
- Files:
-
- 1 modified
-
Whitix/branches/network/include/net/network.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Whitix/branches/network/include/net/network.h
r288 r640 47 47 }; 48 48 49 #define NET_DEVICE_UP 0x01 50 #define NET_DEVICE_QUEUE_RUNNING 0x02 51 49 52 struct NetDevice 50 53 { 51 54 char name[12]; 52 55 int type; /* Ethernet, wireless etc. */ 53 struct PciDevice* pciDev; 56 struct PciDevice* pciDev; /* More general? */ 57 int state; 58 struct ListHead sendList; 54 59 struct NetDevOps* ops; 55 60 struct NetProtoOps* protoOps; … … 60 65 extern struct NetDevice* currDevice; 61 66 67 /* Net device API */ 62 68 struct NetDevice* NetDeviceAlloc(); 63 69 int NetDeviceRegister(struct NetDevice* device); 64 70 71 static inline int NetDeviceQueueRunning(struct NetDevice* device) 72 { 73 return (device->state & NET_DEVICE_QUEUE_RUNNING); 74 } 75 76 static inline void NetDeviceStartQueue(struct NetDevice* device) 77 { 78 device->state |= NET_DEVICE_QUEUE_RUNNING; 79 } 80 81 static inline void NetDeviceStopQueue(struct NetDevice* device) 82 { 83 device->state &= ~NET_DEVICE_QUEUE_RUNNING; 84 } 85 86 int NetDeviceSend(struct NetDevice* device, struct SocketBuffer* buffer); 87 88 65 89 #endif