OSDN Git Service

Initial revision
[pf3gnuchains/pf3gnuchains3x.git] / gdb / rdi-share / ethernet.h
1 /* 
2  * Copyright (C) 1995 Advanced RISC Machines Limited. All rights reserved.
3  * 
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
6  * software.
7  */
8
9 /* -*-C-*-
10  *
11  * $Revision: 1.2 $
12  *     $Date: 1998/01/08 11:12:08 $
13  *
14  *
15  * ethernet.h:  Angel drivers for Ethernet using Fusion UDP/IP stack
16  */
17 #ifndef angel_ethernet_h
18 #define angel_ethernet_h
19
20 /*
21  * the UDP ports that Angel Ethernet uses
22  */
23 #define CTRL_PORT       1913
24
25 /*
26  * the size of the largest packet accepted on the control socket
27  */
28 #define CTRL_MAXPACKET  6
29
30 /*
31  * This is the "magic number" sent to the control port to
32  * request that the channel port numbers are returned
33  */
34 #define CTRL_MAGIC      "Angel"
35
36 /*
37  * Array used for responding to a request on the control port
38  */
39 typedef unsigned char CtrlResponse[10];
40 #define RESP_MAGIC 0
41 #define RESP_DBUG  6
42 #define RESP_APPL  8
43
44 /*
45  * indices for accessing the array of port numbers sent
46  * over the control socket
47  */
48 #define DBUG_INDEX      0
49 #define APPL_INDEX      1
50
51 #ifdef TARGET
52
53 # include "devdriv.h"
54
55 extern const struct angel_DeviceEntry angel_EthernetDevice;
56
57 /*
58  *  Function: angel_EthernetPoll
59  *   Purpose: Poll Fusion for newly arrived packets
60  *
61  *  Pre-conditions: Called in SVC mode with the lock
62  *
63  *    Params:
64  *       Input: data    IGNORE'd
65  *
66  *   Returns: Nothing
67  *
68  * Post-conditions: Will have passed any packets received along to
69  *                      higher levels
70  */
71 void angel_EthernetPoll(unsigned int data);
72
73 void angel_EthernetNOP(unsigned int data);
74
75
76 /*
77  *  Function: angel_FindEthernetConfigBlock
78  *   Purpose: Search the Flash for an ethernet config block and return
79  *            it if found.
80  *
81  *    Params: None
82  *
83  *   Returns: NULL if no config block found, the address if one is found.
84  *
85  */
86 extern angel_EthernetConfigBlock *angel_FindEthernetConfigBlock(void);
87
88 #else /* def TARGET */
89
90 # ifndef COMPILING_ON_WINDOWS
91 #  define ioctlsocket(x, y, z)  ioctl((x), (y), (z))
92 #  define closesocket(x)        close(x)
93 # endif
94
95 #endif /* def TARGET */
96
97 #endif /* ndef angel_ethernet_h */
98
99 /* EOF ethernet.h */