2 * Copyright (C) 1995 Advanced RISC Machines Limited. All rights reserved.
4 * This software may be freely used, copied, modified, and distributed
5 * provided that the above copyright notice is preserved in all copies of the
15 * ethernet.h: Angel drivers for Ethernet using Fusion UDP/IP stack
17 #ifndef angel_ethernet_h
18 #define angel_ethernet_h
21 * the UDP ports that Angel Ethernet uses
23 #define CTRL_PORT 1913
26 * the size of the largest packet accepted on the control socket
28 #define CTRL_MAXPACKET 6
31 * This is the "magic number" sent to the control port to
32 * request that the channel port numbers are returned
34 #define CTRL_MAGIC "Angel"
37 * Array used for responding to a request on the control port
39 typedef unsigned char CtrlResponse
[10];
45 * indices for accessing the array of port numbers sent
46 * over the control socket
55 extern const struct angel_DeviceEntry angel_EthernetDevice
;
58 * Function: angel_EthernetPoll
59 * Purpose: Poll Fusion for newly arrived packets
61 * Pre-conditions: Called in SVC mode with the lock
64 * Input: data IGNORE'd
68 * Post-conditions: Will have passed any packets received along to
71 void angel_EthernetPoll(unsigned int data
);
73 void angel_EthernetNOP(unsigned int data
);
77 * Function: angel_FindEthernetConfigBlock
78 * Purpose: Search the Flash for an ethernet config block and return
83 * Returns: NULL if no config block found, the address if one is found.
86 extern angel_EthernetConfigBlock
*angel_FindEthernetConfigBlock(void);
88 #else /* def TARGET */
90 # ifndef COMPILING_ON_WINDOWS
91 # define ioctlsocket(x, y, z) ioctl((x), (y), (z))
92 # define closesocket(x) close(x)
95 #endif /* def TARGET */
97 #endif /* ndef angel_ethernet_h */