]> git.sur5r.net Git - openldap/blob - libraries/macintosh/tcp/UDPPB.h
Initial revision
[openldap] / libraries / macintosh / tcp / UDPPB.h
1 /*
2         File:           UDPPB.h
3
4         Copyright:      © 1984-1993 by Apple Computer, Inc., all rights reserved.
5
6         WARNING
7         This file was auto generated by the interfacer tool. Modifications
8         must be made to the master file.
9
10 */
11
12 #ifndef __UDPPB__
13 #define __UDPPB__
14
15 #ifndef __MACTCPCOMMONTYPES__
16 #include <MacTCPCommonTypes.h>
17 #endif
18
19 #define UDPCreate               20
20 #define UDPRead                 21
21 #define UDPBfrReturn    22
22 #define UDPWrite                23
23 #define UDPRelease              24
24 #define UDPMaxMTUSize   25
25 #define UDPStatus               26
26 #define UDPMultiCreate  27
27 #define UDPMultiSend    28
28 #define UDPMultiRead    29
29 #define UDPCtlMax               29
30
31 enum UDPEventCode {
32         UDPDataArrival          = 1,
33         UDPICMPReceived,
34         lastUDPEvent            = 32767
35 };
36
37 typedef enum UDPEventCode UDPEventCode;
38
39 typedef pascal void (*UDPNotifyProcPtr)(StreamPtr udpStream, unsigned short eventCode, Ptr userDataPtr, struct ICMPReport *icmpMsg);
40
41 enum {
42         uppUDPNotifyProcInfo = kPascalStackBased
43                  | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(StreamPtr)))
44                  | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(unsigned short)))
45                  | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(Ptr)))
46                  | STACK_ROUTINE_PARAMETER(4, SIZE_CODE(sizeof(struct ICMPReport*)))
47 };
48
49 #if USESROUTINEDESCRIPTORS
50 typedef UniversalProcPtr UDPNotifyUPP;
51
52 #define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg)              \
53                 CallUniversalProc((UniversalProcPtr)userRoutine, uppUDPNotifyProcInfo, udpStream, eventCode, userDataPtr, icmpMsg)
54 #define NewUDPNotifyProc(userRoutine)           \
55                 (UDPNotifyUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppUDPNotifyProcInfo, GetCurrentISA())
56 #else
57 typedef UDPNotifyProcPtr UDPNotifyUPP;
58
59 #define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, icmpMsg)              \
60                 (*userRoutine)(udpStream, eventCode, userDataPtr, icmpMsg)
61 #define NewUDPNotifyProc(userRoutine)           \
62                 (UDPNotifyUPP)(userRoutine)
63 #endif
64
65 typedef UDPNotifyProcPtr UDPNotifyProc;
66
67 typedef void (*UDPIOCompletionProcPtr)(struct UDPiopb *iopb);
68
69 enum {
70         uppUDPIOCompletionProcInfo = kCStackBased
71                  | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(struct UDPiopb*)))
72 };
73
74 #if USESROUTINEDESCRIPTORS
75 typedef UniversalProcPtr UDPIOCompletionUPP;
76
77 #define CallUDPIOCompletionProc(userRoutine, iopb)              \
78                 CallUniversalProc((UniversalProcPtr)userRoutine, uppUDPIOCompletionProcInfo, iopb)
79 #define NewUDPIOCompletionProc(userRoutine)             \
80                 (UDPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)userRoutine, uppUDPIOCompletionProcInfo, GetCurrentISA())
81 #else
82 typedef UDPIOCompletionProcPtr UDPIOCompletionUPP;
83
84 #define CallUDPIOCompletionProc(userRoutine, iopb)              \
85                 (*userRoutine)(iopb)
86 #define NewUDPIOCompletionProc(userRoutine)             \
87                 (UDPIOCompletionUPP)(userRoutine)
88 #endif
89
90 typedef UDPIOCompletionProcPtr UDPIOCompletionProc;
91
92 typedef unsigned short udp_port;
93
94 #if defined(powerc) || defined (__powerc)
95 #pragma options align=mac68k
96 #endif
97 struct UDPCreatePB {            /* for create and release calls */
98         Ptr                                                     rcvBuff;
99         unsigned long                           rcvBuffLen;
100         UDPNotifyProc                           notifyProc;
101         unsigned short                          localPort;
102         Ptr                                                     userDataPtr;
103         udp_port                                        endingPort;
104 };
105 #if defined(powerc) || defined(__powerc)
106 #pragma options align=reset
107 #endif
108
109 typedef struct UDPCreatePB UDPCreatePB;
110
111 #if defined(powerc) || defined (__powerc)
112 #pragma options align=mac68k
113 #endif
114 struct UDPSendPB {
115         unsigned short                          reserved;
116         ip_addr                                         remoteHost;
117         udp_port                                        remotePort;
118         Ptr                                                     wdsPtr;
119         Boolean                                         checkSum;
120         unsigned short                          sendLength;
121         Ptr                                                     userDataPtr;
122         udp_port                                        localPort;
123 };
124 #if defined(powerc) || defined(__powerc)
125 #pragma options align=reset
126 #endif
127
128 typedef struct UDPSendPB UDPSendPB;
129
130 #if defined(powerc) || defined (__powerc)
131 #pragma options align=mac68k
132 #endif
133 struct UDPReceivePB {           /* for receive and buffer return calls */
134         unsigned short                          timeOut;
135         ip_addr                                         remoteHost;
136         udp_port                                        remotePort;
137         Ptr                                                     rcvBuff;
138         unsigned short                          rcvBuffLen;
139         unsigned short                          secondTimeStamp;
140         Ptr                                                     userDataPtr;
141         ip_addr                                         destHost;               /* only for use with multi rcv */
142         udp_port                                        destPort;               /* only for use with multi rcv */
143 };
144 #if defined(powerc) || defined(__powerc)
145 #pragma options align=reset
146 #endif
147
148 typedef struct UDPReceivePB UDPReceivePB;
149
150 #if defined(powerc) || defined (__powerc)
151 #pragma options align=mac68k
152 #endif
153 struct UDPMTUPB {
154         unsigned short                          mtuSize;
155         ip_addr                                         remoteHost;
156         Ptr                                                     userDataPtr;
157 };
158 #if defined(powerc) || defined(__powerc)
159 #pragma options align=reset
160 #endif
161
162 typedef struct UDPMTUPB UDPMTUPB;
163
164 #if defined(powerc) || defined (__powerc)
165 #pragma options align=mac68k
166 #endif
167 struct UDPiopb {
168         char                                            fill12[12];
169         UDPIOCompletionProc                     ioCompletion;
170         short                                           ioResult;
171         char                                            *ioNamePtr;
172         short                                           ioVRefNum;
173         short                                           ioCRefNum;
174         short                                           csCode;
175         StreamPtr                                       udpStream;
176         union {
177                 struct UDPCreatePB              create;
178                 struct UDPSendPB                send;
179                 struct UDPReceivePB             receive;
180                 struct UDPMTUPB                 mtu;
181         } csParam;
182 };
183 #if defined(powerc) || defined(__powerc)
184 #pragma options align=reset
185 #endif
186
187 typedef struct UDPiopb UDPiopb;
188
189 #endif
190