Mac OS 9
MacTCP.h
Go to the documentation of this file.
1 
19 #ifndef __MACTCP__
20 #define __MACTCP__
21 
22 #ifndef __MACTYPES__
23 #include <MacTypes.h>
24 #endif
25 
26 #ifndef __MIXEDMODE__
27 #include <MixedMode.h>
28 #endif
29 
30 #ifndef __APPLETALK__
31 #include <AppleTalk.h>
32 #endif
33 
34 #if PRAGMA_ONCE
35 #pragma once
36 #endif
37 
38 #ifdef __cplusplus
39 extern "C"
40 {
41 #endif
42 
43 #if PRAGMA_IMPORT
44 #pragma import on
45 #endif
46 
47 #if PRAGMA_STRUCT_ALIGN
48 #pragma options align = mac68k
49 #elif PRAGMA_STRUCT_PACKPUSH
50 #pragma pack(push, 2)
51 #elif PRAGMA_STRUCT_PACK
52 #pragma pack(2)
53 #endif
54 
91  enum
92  {
93  inProgress = 1,
94  ipBadLapErr = -23000,
95  ipBadCnfgErr = -23001,
96  ipNoCnfgErr = -23002,
97  ipLoadErr = -23003,
98  ipBadAddr = -23004,
99  connectionClosing = -23005,
100  invalidLength = -23006,
101  connectionExists = -23007,
104  -23009,
106  streamAlreadyOpen = -23011,
107  connectionTerminated = -23012,
108  invalidBufPtr = -23013,
109  invalidRDS = -23014,
110  invalidWDS = -23014,
111  openFailed = -23015,
112  commandTimeout = -23016,
113  duplicateSocket = -23017
114  };
115 
117  enum
118  {
119  ipDontFragErr = -23032,
120  ipDestDeadErr = -23033,
122  ipNoFragMemErr = -23036,
123  ipRouteErr = -23037,
124  nameSyntaxErr = -23041,
125  cacheFault = -23042,
126  noResultProc = -23043,
127  noNameServer = -23044,
128  authNameErr = -23045,
129  noAnsErr = -23046,
130  dnrErr = -23047,
131  outOfMemory = -23048
132  };
133 
134  enum
135  {
136  BYTES_16WORD = 2,
138  BYTES_64WORD = 8
139  };
140 
142  typedef UInt8 b_8;
144  typedef UInt16 b_16;
146  typedef UInt32 b_32;
148  typedef b_32 ip_addr;
150  {
151  union
152  {
153  b_32 addr;
154  UInt8 byte[4];
155  } a;
156  };
157  typedef struct ip_addrbytes ip_addrbytes;
158  struct wdsEntry
159  {
160  unsigned short length;
161  Ptr ptr;
162  };
163  typedef struct wdsEntry wdsEntry;
164  struct rdsEntry
165  {
166  unsigned short length;
167  Ptr ptr;
168  };
169  typedef struct rdsEntry rdsEntry;
170 
171  typedef unsigned long BufferPtr;
172  typedef unsigned long StreamPtr;
173  enum
174  {
175  netUnreach = 0,
176  hostUnreach = 1,
177  protocolUnreach = 2,
178  portUnreach = 3,
179  fragReqd = 4,
180  sourceRouteFailed = 5,
181  timeExceeded = 6,
182  parmProblem = 7,
183  missingOption = 8,
184  lastICMPMsgType = 32767
185  };
186 
187  typedef unsigned short ICMPMsgType;
188  typedef b_16 ip_port;
189  struct ICMPReport
190  {
191  StreamPtr streamPtr;
192  ip_addr localHost;
193  ip_port localPort;
194  ip_addr remoteHost;
195  ip_port remotePort;
196  short reportType;
197  unsigned short optionalAddlInfo;
198  unsigned long optionalAddlInfoPtr;
199  };
200  typedef struct ICMPReport ICMPReport;
202  enum
203  {
204  ipctlGetAddr = 15
205  };
206 
207  typedef struct GetAddrParamBlock GetAddrParamBlock;
208  typedef CALLBACK_API_C(void, GetIPIOCompletionProcPtr)(GetAddrParamBlock *iopb);
209  typedef STACK_UPP_TYPE(GetIPIOCompletionProcPtr) GetIPIOCompletionUPP;
211  {
212  QElem *qLink;
213  short qType;
214  short ioTrap;
215  Ptr ioCmdAddr;
216  GetIPIOCompletionUPP ioCompletion;
217  OSErr ioResult;
218  StringPtr ioNamePtr;
219  short ioVRefNum;
220  short ioCRefNum;
221  short csCode;
222  ip_addr ourAddress;
223  long ourNetMask;
224  };
225 
227  enum
228  {
229  ipctlEchoICMP = 17,
230  ipctlLAPStats = 19
231  };
232 
233  typedef struct ICMPParamBlock ICMPParamBlock;
234  typedef CALLBACK_API_C(void, IPIOCompletionProcPtr)(ICMPParamBlock *iopb);
235  typedef STACK_UPP_TYPE(IPIOCompletionProcPtr) IPIOCompletionUPP;
237  {
238  QElem *qLink;
239  short qType;
240  short ioTrap;
241  Ptr ioCmdAddr;
242  IPIOCompletionUPP ioCompletion;
243  OSErr ioResult;
244  StringPtr ioNamePtr;
245  short ioVRefNum;
246  short ioCRefNum;
247  short csCode;
248  short params[11];
249  struct
250  {
251  unsigned long
252  echoRequestOut;
253  unsigned long
256  Ptr options;
257  unsigned long userDataPtr;
258  } icmpEchoInfo;
259  };
260 
261  typedef CALLBACK_API_C(void, ICMPEchoNotifyProcPtr)(ICMPParamBlock *iopb);
262  typedef STACK_UPP_TYPE(ICMPEchoNotifyProcPtr) ICMPEchoNotifyUPP;
263  typedef struct LAPStats LAPStats;
265  {
266  QElem *qLink;
267  short qType;
268  short ioTrap;
269  Ptr ioCmdAddr;
270  IPIOCompletionUPP ioCompletion;
271  OSErr ioResult;
272  StringPtr ioNamePtr;
273  short ioVRefNum;
274  short ioCRefNum;
275  short csCode;
276  union
277  {
278  struct
279  {
280  ip_addr dest;
282  short timeout;
283  Ptr options;
284  unsigned short optLength;
285  ICMPEchoNotifyUPP icmpCompletion;
286  unsigned long userDataPtr;
287  } IPEchoPB;
288  struct
289  {
290  LAPStats *lapStatsPtr;
291  } LAPStatsPB;
292  } csParam;
293  };
294  typedef struct IPParamBlock IPParamBlock;
295 
296  struct nbp_entry
297  {
298  ip_addr ip_address;
303  SInt8 afiller;
304  long age;
305  long access;
306  SInt8 filler[116];
307  };
308  typedef struct nbp_entry nbp_entry;
309  struct Enet_addr
310  {
311  b_16 en_hi;
312  b_32 en_lo;
313  };
314  typedef struct Enet_addr Enet_addr;
315  struct arp_entry
316  {
317  short age;
321  };
322  typedef struct arp_entry arp_entry;
324  {
325  arp_entry *arp_table;
326  nbp_entry *nbp_table;
327  };
329  struct LAPStats
330  {
331  short ifType;
332  char *ifString;
333  short ifMaxMTU;
334  long ifSpeed;
335  short ifPhyAddrLength;
336  char *ifPhysicalAddress;
337  LAPStatsAddrXlation AddrXlation;
338  short slotNumber;
339  };
340 
342  enum
343  {
344  ARP_TABLE_SIZE = 20
345  };
346 
347  enum
348  {
349  NBP_TABLE_SIZE = 20,
350  NBP_MAX_NAME_SIZE = 16 + 10 + 2
351  };
352 
354  enum
355  {
356  TCPCreate = 30,
357  TCPPassiveOpen = 31,
358  TCPActiveOpen = 32,
359  TCPSend = 34,
360  TCPNoCopyRcv = 35,
361  TCPRcvBfrReturn = 36,
362  TCPRcv = 37,
363  TCPClose = 38,
364  TCPAbort = 39,
365  TCPStatus = 40,
366  TCPExtendedStat = 41,
367  TCPRelease = 42,
368  TCPGlobalInfo = 43,
369  TCPCtlMax = 49
370  };
371 
372  enum
373  {
374  TCPClosing = 1,
375  TCPULPTimeout = 2,
376  TCPTerminate = 3,
377  TCPDataArrival = 4,
378  TCPUrgent = 5,
379  TCPICMPReceived = 6,
380  lastEvent = 32767
381  };
382 
383  typedef unsigned short TCPEventCode;
384  enum
385  {
386  TCPRemoteAbort = 2,
387  TCPNetworkFailure = 3,
388  TCPSecPrecMismatch = 4,
389  TCPULPTimeoutTerminate = 5,
390  TCPULPAbort = 6,
391  TCPULPClose = 7,
392  TCPServiceError = 8,
393  lastReason = 32767
394  };
395 
396  typedef unsigned short TCPTerminationReason;
397  typedef CALLBACK_API(void, TCPNotifyProcPtr)(StreamPtr tcpStream,
398  unsigned short eventCode,
399  Ptr userDataPtr,
400  unsigned short terminReason,
401  ICMPReport *icmpMsg);
402  typedef STACK_UPP_TYPE(TCPNotifyProcPtr) TCPNotifyUPP;
403  typedef unsigned short tcp_port;
405  enum
406  {
407  timeoutValue = 0x80,
408  timeoutAction = 0x40,
409  typeOfService = 0x20,
410  precedence = 0x10
411  };
412 
414  enum
415  {
416  lowDelay = 0x01,
417  throughPut = 0x02,
418  reliability = 0x04
419  };
420 
421  struct TCPCreatePB
422  {
423  Ptr rcvBuff;
424  unsigned long rcvBuffLen;
425  TCPNotifyUPP notifyProc;
426  Ptr userDataPtr;
427  };
428  typedef struct TCPCreatePB TCPCreatePB;
429  struct TCPOpenPB
430  {
431  SInt8 ulpTimeoutValue;
432  SInt8 ulpTimeoutAction;
433  SInt8 validityFlags;
434  SInt8 commandTimeoutValue;
435  ip_addr remoteHost;
436  tcp_port remotePort;
437  ip_addr localHost;
438  tcp_port localPort;
439  SInt8 tosFlags;
440  SInt8 precedence;
441  Boolean dontFrag;
442  SInt8 timeToLive;
443  SInt8 security;
444  SInt8 optionCnt;
445  SInt8 options[40];
446  Ptr userDataPtr;
447  };
448  typedef struct TCPOpenPB TCPOpenPB;
449 
450  struct TCPSendPB
451  {
452  SInt8 ulpTimeoutValue;
453  SInt8 ulpTimeoutAction;
454  SInt8 validityFlags;
455  Boolean pushFlag;
456  Boolean urgentFlag;
457  SInt8 filler;
458  Ptr wdsPtr;
459  unsigned long sendFree;
460  unsigned short sendLength;
461  Ptr userDataPtr;
462  };
463  typedef struct TCPSendPB TCPSendPB;
464 
470  {
471  SInt8 commandTimeoutValue;
472  Boolean markFlag;
473  Boolean urgentFlag;
474  SInt8 filler;
475  Ptr rcvBuff;
476  unsigned short rcvBuffLen;
477  Ptr rdsPtr;
478  unsigned short rdsLength;
479  unsigned short secondTimeStamp;
480  Ptr userDataPtr;
481  };
482  typedef struct TCPReceivePB TCPReceivePB;
483 
484  struct TCPClosePB
485  {
486  SInt8 ulpTimeoutValue;
487  SInt8 ulpTimeoutAction;
488  SInt8 validityFlags;
489  SInt8 filler;
491  };
492  typedef struct TCPClosePB TCPClosePB;
493  struct HistoBucket
494  {
495  unsigned short value;
496  unsigned long counter;
497  };
498  typedef struct HistoBucket HistoBucket;
499  enum
500  {
501  NumOfHistoBuckets = 7
502  };
503 
505  {
506  unsigned long dataPktsRcvd;
507  unsigned long dataPktsSent;
508  unsigned long dataPktsResent;
509  unsigned long bytesRcvd;
510  unsigned long bytesRcvdDup;
511  unsigned long bytesRcvdPastWindow;
512  unsigned long bytesSent;
513  unsigned long bytesResent;
514  unsigned short numHistoBuckets;
515  HistoBucket sentSizeHisto[7];
516  unsigned short lastRTT;
517  unsigned short tmrSRTT;
518  unsigned short rttVariance;
519  unsigned short tmrRTO;
520  SInt8 sendTries;
521  SInt8 sourchQuenchRcvd;
522  };
523  typedef struct TCPConnectionStats TCPConnectionStats;
524  struct TCPStatusPB
525  {
526  SInt8 ulpTimeoutValue;
527  SInt8 ulpTimeoutAction;
528  long unused;
529  ip_addr remoteHost;
530  tcp_port remotePort;
531  ip_addr localHost;
532  tcp_port localPort;
533  SInt8 tosFlags;
534  SInt8 precedence;
535  SInt8 connectionState;
536  SInt8 filler;
537  unsigned short sendWindow;
538  unsigned short rcvWindow;
539  unsigned short amtUnackedData;
540  unsigned short amtUnreadData;
541  Ptr securityLevelPtr;
542  unsigned long sendUnacked;
543  unsigned long sendNext;
544  unsigned long congestionWindow;
545  unsigned long rcvNext;
546  unsigned long srtt;
547  unsigned long lastRTT;
548  unsigned long sendMaxSegSize;
549  TCPConnectionStats *connStatPtr;
550  Ptr userDataPtr;
551  };
552  typedef struct TCPStatusPB TCPStatusPB;
553  struct TCPAbortPB
554  {
555  Ptr userDataPtr;
556  };
557  typedef struct TCPAbortPB TCPAbortPB;
558  struct TCPParam
559  {
560  unsigned long tcpRtoA;
561  unsigned long tcpRtoMin;
562  unsigned long tcpRtoMax;
563  unsigned long tcpMaxSegSize;
564  unsigned long tcpMaxConn;
565  unsigned long tcpMaxWindow;
566  };
567  typedef struct TCPParam TCPParam;
568  struct TCPStats
569  {
570  unsigned long tcpConnAttempts;
571  unsigned long tcpConnOpened;
572  unsigned long tcpConnAccepted;
573  unsigned long tcpConnClosed;
574  unsigned long tcpConnAborted;
575  unsigned long tcpOctetsIn;
576  unsigned long tcpOctetsOut;
577  unsigned long tcpOctetsInDup;
578  unsigned long tcpOctetsRetrans;
579  unsigned long tcpInputPkts;
580  unsigned long tcpOutputPkts;
581  unsigned long tcpDupPkts;
582  unsigned long tcpRetransPkts;
583  };
584  typedef struct TCPStats TCPStats;
585 
586  typedef StreamPtr *StreamPPtr;
588  {
589  TCPParam *tcpParamPtr;
590  TCPStats *tcpStatsPtr;
591  StreamPPtr tcpCDBTable[1];
592  Ptr userDataPtr;
593  unsigned short maxTCPConnections;
594  };
595  typedef struct TCPGlobalInfoPB TCPGlobalInfoPB;
596  typedef struct TCPiopb TCPiopb;
597  typedef CALLBACK_API_C(void, TCPIOCompletionProcPtr)(TCPiopb *iopb);
598  typedef STACK_UPP_TYPE(TCPIOCompletionProcPtr) TCPIOCompletionUPP;
599  struct TCPiopb
600  {
601  SInt8 fill12[12];
602  TCPIOCompletionUPP ioCompletion;
603  short ioResult;
604  Ptr ioNamePtr;
605  short ioVRefNum;
606  short ioCRefNum;
607  short csCode;
608  StreamPtr tcpStream;
609  union
610  {
611  TCPCreatePB create;
612  TCPOpenPB open;
613  TCPSendPB send;
614  TCPReceivePB receive;
615  TCPClosePB close;
616  TCPAbortPB abort;
617  TCPStatusPB status;
618  TCPGlobalInfoPB globalInfo;
619  } csParam;
620  };
621 
622  enum
623  {
624  UDPCreate = 20,
625  UDPRead = 21,
626  UDPBfrReturn = 22,
627  UDPWrite = 23,
628  UDPRelease = 24,
629  UDPMaxMTUSize = 25,
630  UDPStatus = 26,
631  UDPMultiCreate = 27,
632  UDPMultiSend = 28,
633  UDPMultiRead = 29,
634  UDPCtlMax = 29
635  };
636 
637  enum
638  {
639  UDPDataArrival = 1,
640  UDPICMPReceived = 2,
641  lastUDPEvent = 32767
642  };
643 
644  typedef unsigned short UDPEventCode;
645  typedef CALLBACK_API(void, UDPNotifyProcPtr)(StreamPtr udpStream,
646  unsigned short eventCode,
647  Ptr userDataPtr,
648  ICMPReport *icmpMsg);
649  typedef STACK_UPP_TYPE(UDPNotifyProcPtr) UDPNotifyUPP;
650  typedef unsigned short udp_port;
652  struct UDPCreatePB
653  {
654  Ptr rcvBuff;
655  unsigned long rcvBuffLen;
656  UDPNotifyUPP notifyProc;
657  unsigned short localPort;
658  Ptr userDataPtr;
659  udp_port endingPort;
660  };
661  typedef struct UDPCreatePB UDPCreatePB;
662  struct UDPSendPB
663  {
664  unsigned short reserved;
665  ip_addr remoteHost;
666  udp_port remotePort;
667  Ptr wdsPtr;
668  Boolean checkSum;
669  SInt8 filler;
670  unsigned short sendLength;
671  Ptr userDataPtr;
672  udp_port localPort;
673  };
674  typedef struct UDPSendPB UDPSendPB;
677  {
678  unsigned short timeOut;
679  ip_addr remoteHost;
680  udp_port remotePort;
681  Ptr rcvBuff;
682  unsigned short rcvBuffLen;
683  unsigned short secondTimeStamp;
684  Ptr userDataPtr;
685  ip_addr destHost;
686  udp_port destPort;
687  };
688  typedef struct UDPReceivePB UDPReceivePB;
689  struct UDPMTUPB
690  {
691  unsigned short mtuSize;
692  ip_addr remoteHost;
693  Ptr userDataPtr;
694  };
695  typedef struct UDPMTUPB UDPMTUPB;
696  typedef struct UDPiopb UDPiopb;
697  typedef CALLBACK_API_C(void, UDPIOCompletionProcPtr)(UDPiopb *iopb);
698  typedef STACK_UPP_TYPE(UDPIOCompletionProcPtr) UDPIOCompletionUPP;
699  struct UDPiopb
700  {
701  SInt8 fill12[12];
702  UDPIOCompletionUPP ioCompletion;
703  short ioResult;
704  Ptr ioNamePtr;
705  short ioVRefNum;
706  short ioCRefNum;
707  short csCode;
708  StreamPtr udpStream;
709  union
710  {
711  UDPCreatePB create;
712  UDPSendPB send;
713  UDPReceivePB receive;
714  UDPMTUPB mtu;
715  } csParam;
716  };
717 
718 #if CALL_NOT_IN_CARBON
727  GetIPIOCompletionUPP
728  NewGetIPIOCompletionUPP(GetIPIOCompletionProcPtr userRoutine);
729 #if !OPAQUE_UPP_TYPES
730  enum
731  {
732  uppGetIPIOCompletionProcInfo = 0x000000C1
733  };
734 #ifdef __cplusplus
735  inline GetIPIOCompletionUPP
736  NewGetIPIOCompletionUPP(GetIPIOCompletionProcPtr userRoutine)
737  {
738  return (GetIPIOCompletionUPP)NewRoutineDescriptor(
739  (ProcPtr)(userRoutine), uppGetIPIOCompletionProcInfo,
740  GetCurrentArchitecture());
741  }
742 #else
743 #define NewGetIPIOCompletionUPP(userRoutine) \
744  (GetIPIOCompletionUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), \
745  uppGetIPIOCompletionProcInfo, \
746  GetCurrentArchitecture())
747 #endif
748 #endif
749 
758  IPIOCompletionUPP
759  NewIPIOCompletionUPP(IPIOCompletionProcPtr userRoutine);
760 #if !OPAQUE_UPP_TYPES
761  enum
762  {
763  uppIPIOCompletionProcInfo = 0x000000C1
764  };
765 #ifdef __cplusplus
766  inline IPIOCompletionUPP
767  NewIPIOCompletionUPP(IPIOCompletionProcPtr userRoutine)
768  {
769  return (IPIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
770  uppIPIOCompletionProcInfo,
771  GetCurrentArchitecture());
772  }
773 #else
774 #define NewIPIOCompletionUPP(userRoutine) \
775  (IPIOCompletionUPP) \
776  NewRoutineDescriptor((ProcPtr)(userRoutine), uppIPIOCompletionProcInfo, \
777  GetCurrentArchitecture())
778 #endif
779 #endif
780 
789  ICMPEchoNotifyUPP
790  NewICMPEchoNotifyUPP(ICMPEchoNotifyProcPtr userRoutine);
791 #if !OPAQUE_UPP_TYPES
792  enum
793  {
794  uppICMPEchoNotifyProcInfo = 0x000000C1
795  };
796 #ifdef __cplusplus
797  inline ICMPEchoNotifyUPP
798  NewICMPEchoNotifyUPP(ICMPEchoNotifyProcPtr userRoutine)
799  {
800  return (ICMPEchoNotifyUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
801  uppICMPEchoNotifyProcInfo,
802  GetCurrentArchitecture());
803  }
804 #else
805 #define NewICMPEchoNotifyUPP(userRoutine) \
806  (ICMPEchoNotifyUPP) \
807  NewRoutineDescriptor((ProcPtr)(userRoutine), uppICMPEchoNotifyProcInfo, \
808  GetCurrentArchitecture())
809 #endif
810 #endif
811 
820  TCPNotifyUPP
821  NewTCPNotifyUPP(TCPNotifyProcPtr userRoutine);
822 #if !OPAQUE_UPP_TYPES
823  enum
824  {
825  uppTCPNotifyProcInfo = 0x0000EEC0
826  };
828 #ifdef __cplusplus
829  inline TCPNotifyUPP NewTCPNotifyUPP(TCPNotifyProcPtr userRoutine)
830  {
831  return (TCPNotifyUPP)NewRoutineDescriptor(
832  (ProcPtr)(userRoutine), uppTCPNotifyProcInfo, GetCurrentArchitecture());
833  }
834 #else
835 #define NewTCPNotifyUPP(userRoutine) \
836  (TCPNotifyUPP) NewRoutineDescriptor( \
837  (ProcPtr)(userRoutine), uppTCPNotifyProcInfo, GetCurrentArchitecture())
838 #endif
839 #endif
840 
849  TCPIOCompletionUPP
850  NewTCPIOCompletionUPP(TCPIOCompletionProcPtr userRoutine);
851 #if !OPAQUE_UPP_TYPES
852  enum
853  {
854  uppTCPIOCompletionProcInfo = 0x000000C1
855  };
856 #ifdef __cplusplus
857  inline TCPIOCompletionUPP
858  NewTCPIOCompletionUPP(TCPIOCompletionProcPtr userRoutine)
859  {
860  return (TCPIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
861  uppTCPIOCompletionProcInfo,
862  GetCurrentArchitecture());
863  }
864 #else
865 #define NewTCPIOCompletionUPP(userRoutine) \
866  (TCPIOCompletionUPP) \
867  NewRoutineDescriptor((ProcPtr)(userRoutine), uppTCPIOCompletionProcInfo, \
868  GetCurrentArchitecture())
869 #endif
870 #endif
871 
880  UDPNotifyUPP
881  NewUDPNotifyUPP(UDPNotifyProcPtr userRoutine);
882 #if !OPAQUE_UPP_TYPES
883  enum
884  {
885  uppUDPNotifyProcInfo = 0x00003EC0
886  };
887 #ifdef __cplusplus
888  inline UDPNotifyUPP NewUDPNotifyUPP(UDPNotifyProcPtr userRoutine)
889  {
890  return (UDPNotifyUPP)NewRoutineDescriptor(
891  (ProcPtr)(userRoutine), uppUDPNotifyProcInfo, GetCurrentArchitecture());
892  }
893 #else
894 #define NewUDPNotifyUPP(userRoutine) \
895  (UDPNotifyUPP) NewRoutineDescriptor( \
896  (ProcPtr)(userRoutine), uppUDPNotifyProcInfo, GetCurrentArchitecture())
897 #endif
898 #endif
899 
908  UDPIOCompletionUPP
909  NewUDPIOCompletionUPP(UDPIOCompletionProcPtr userRoutine);
910 #if !OPAQUE_UPP_TYPES
911  enum
912  {
913  uppUDPIOCompletionProcInfo = 0x000000C1
914  };
915 #ifdef __cplusplus
916  inline UDPIOCompletionUPP
917  NewUDPIOCompletionUPP(UDPIOCompletionProcPtr userRoutine)
918  {
919  return (UDPIOCompletionUPP)NewRoutineDescriptor((ProcPtr)(userRoutine),
920  uppUDPIOCompletionProcInfo,
921  GetCurrentArchitecture());
922  }
923 #else
924 #define NewUDPIOCompletionUPP(userRoutine) \
925  (UDPIOCompletionUPP) \
926  NewRoutineDescriptor((ProcPtr)(userRoutine), uppUDPIOCompletionProcInfo, \
927  GetCurrentArchitecture())
928 #endif
929 #endif
930 
939  void
940  DisposeGetIPIOCompletionUPP(GetIPIOCompletionUPP userUPP);
941 #if !OPAQUE_UPP_TYPES
942 #ifdef __cplusplus
943  inline void DisposeGetIPIOCompletionUPP(GetIPIOCompletionUPP userUPP)
944  {
945  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
946  }
947 #else
948 #define DisposeGetIPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
949 #endif
950 #endif
951 
960  void
961  DisposeIPIOCompletionUPP(IPIOCompletionUPP userUPP);
962 #if !OPAQUE_UPP_TYPES
963 #ifdef __cplusplus
964  inline void DisposeIPIOCompletionUPP(IPIOCompletionUPP userUPP)
965  {
966  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
967  }
968 #else
969 #define DisposeIPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
970 #endif
971 #endif
972 
981  void
982  DisposeICMPEchoNotifyUPP(ICMPEchoNotifyUPP userUPP);
983 #if !OPAQUE_UPP_TYPES
984 #ifdef __cplusplus
985  inline void DisposeICMPEchoNotifyUPP(ICMPEchoNotifyUPP userUPP)
986  {
987  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
988  }
989 #else
990 #define DisposeICMPEchoNotifyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
991 #endif
992 #endif
993 
1002  void
1003  DisposeTCPNotifyUPP(TCPNotifyUPP userUPP);
1004 #if !OPAQUE_UPP_TYPES
1005 #ifdef __cplusplus
1006  inline void DisposeTCPNotifyUPP(TCPNotifyUPP userUPP)
1007  {
1008  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1009  }
1010 #else
1011 #define DisposeTCPNotifyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1012 #endif
1013 #endif
1014 
1023  void
1024  DisposeTCPIOCompletionUPP(TCPIOCompletionUPP userUPP);
1025 #if !OPAQUE_UPP_TYPES
1026 #ifdef __cplusplus
1027  inline void DisposeTCPIOCompletionUPP(TCPIOCompletionUPP userUPP)
1028  {
1029  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1030  }
1031 #else
1032 #define DisposeTCPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1033 #endif
1034 #endif
1035 
1044  void
1045  DisposeUDPNotifyUPP(UDPNotifyUPP userUPP);
1046 #if !OPAQUE_UPP_TYPES
1047 #ifdef __cplusplus
1048  inline void DisposeUDPNotifyUPP(UDPNotifyUPP userUPP)
1049  {
1050  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1051  }
1052 #else
1053 #define DisposeUDPNotifyUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1054 #endif
1055 #endif
1056 
1065  void
1066  DisposeUDPIOCompletionUPP(UDPIOCompletionUPP userUPP);
1067 #if !OPAQUE_UPP_TYPES
1068 #ifdef __cplusplus
1069  inline void DisposeUDPIOCompletionUPP(UDPIOCompletionUPP userUPP)
1070  {
1071  DisposeRoutineDescriptor((UniversalProcPtr)userUPP);
1072  }
1073 #else
1074 #define DisposeUDPIOCompletionUPP(userUPP) DisposeRoutineDescriptor(userUPP)
1075 #endif
1076 #endif
1077 
1086  void
1088  GetIPIOCompletionUPP userUPP);
1089 #if !OPAQUE_UPP_TYPES
1090 #ifdef __cplusplus
1092  GetIPIOCompletionUPP userUPP)
1093  {
1094  CALL_ONE_PARAMETER_UPP(userUPP, uppGetIPIOCompletionProcInfo, iopb);
1095  }
1096 #else
1097 #define InvokeGetIPIOCompletionUPP(iopb, userUPP) \
1098  CALL_ONE_PARAMETER_UPP((userUPP), uppGetIPIOCompletionProcInfo, (iopb))
1099 #endif
1100 #endif
1101 
1110  void
1111  InvokeIPIOCompletionUPP(ICMPParamBlock *iopb, IPIOCompletionUPP userUPP);
1112 #if !OPAQUE_UPP_TYPES
1113 #ifdef __cplusplus
1114  inline void InvokeIPIOCompletionUPP(ICMPParamBlock *iopb,
1115  IPIOCompletionUPP userUPP)
1116  {
1117  CALL_ONE_PARAMETER_UPP(userUPP, uppIPIOCompletionProcInfo, iopb);
1118  }
1119 #else
1120 #define InvokeIPIOCompletionUPP(iopb, userUPP) \
1121  CALL_ONE_PARAMETER_UPP((userUPP), uppIPIOCompletionProcInfo, (iopb))
1122 #endif
1123 #endif
1124 
1133  void
1134  InvokeICMPEchoNotifyUPP(ICMPParamBlock *iopb, ICMPEchoNotifyUPP userUPP);
1135 #if !OPAQUE_UPP_TYPES
1136 #ifdef __cplusplus
1137  inline void InvokeICMPEchoNotifyUPP(ICMPParamBlock *iopb,
1138  ICMPEchoNotifyUPP userUPP)
1139  {
1140  CALL_ONE_PARAMETER_UPP(userUPP, uppICMPEchoNotifyProcInfo, iopb);
1141  }
1142 #else
1143 #define InvokeICMPEchoNotifyUPP(iopb, userUPP) \
1144  CALL_ONE_PARAMETER_UPP((userUPP), uppICMPEchoNotifyProcInfo, (iopb))
1145 #endif
1146 #endif
1147 
1156  void
1157  InvokeTCPNotifyUPP(StreamPtr tcpStream, unsigned short eventCode,
1158  Ptr userDataPtr, unsigned short terminReason,
1159  ICMPReport *icmpMsg, TCPNotifyUPP userUPP);
1160 #if !OPAQUE_UPP_TYPES
1161 #ifdef __cplusplus
1162  inline void InvokeTCPNotifyUPP(StreamPtr tcpStream, unsigned short eventCode,
1163  Ptr userDataPtr, unsigned short terminReason,
1164  ICMPReport *icmpMsg, TCPNotifyUPP userUPP)
1165  {
1166  CALL_FIVE_PARAMETER_UPP(userUPP, uppTCPNotifyProcInfo, tcpStream, eventCode,
1167  userDataPtr, terminReason, icmpMsg);
1168  }
1169 #else
1170 #define InvokeTCPNotifyUPP(tcpStream, eventCode, userDataPtr, terminReason, \
1171  icmpMsg, userUPP) \
1172  CALL_FIVE_PARAMETER_UPP((userUPP), uppTCPNotifyProcInfo, (tcpStream), \
1173  (eventCode), (userDataPtr), (terminReason), \
1174  (icmpMsg))
1175 #endif
1176 #endif
1177 
1186  void
1187  InvokeTCPIOCompletionUPP(TCPiopb *iopb, TCPIOCompletionUPP userUPP);
1188 #if !OPAQUE_UPP_TYPES
1189 #ifdef __cplusplus
1190  inline void InvokeTCPIOCompletionUPP(TCPiopb *iopb,
1191  TCPIOCompletionUPP userUPP)
1192  {
1193  CALL_ONE_PARAMETER_UPP(userUPP, uppTCPIOCompletionProcInfo, iopb);
1194  }
1195 #else
1196 #define InvokeTCPIOCompletionUPP(iopb, userUPP) \
1197  CALL_ONE_PARAMETER_UPP((userUPP), uppTCPIOCompletionProcInfo, (iopb))
1198 #endif
1199 #endif
1200 
1209  void
1210  InvokeUDPNotifyUPP(StreamPtr udpStream, unsigned short eventCode,
1211  Ptr userDataPtr, ICMPReport *icmpMsg, UDPNotifyUPP userUPP);
1212 #if !OPAQUE_UPP_TYPES
1213 #ifdef __cplusplus
1214  inline void InvokeUDPNotifyUPP(StreamPtr udpStream, unsigned short eventCode,
1215  Ptr userDataPtr, ICMPReport *icmpMsg,
1216  UDPNotifyUPP userUPP)
1217  {
1218  CALL_FOUR_PARAMETER_UPP(userUPP, uppUDPNotifyProcInfo, udpStream, eventCode,
1219  userDataPtr, icmpMsg);
1220  }
1221 #else
1222 #define InvokeUDPNotifyUPP(udpStream, eventCode, userDataPtr, icmpMsg, \
1223  userUPP) \
1224  CALL_FOUR_PARAMETER_UPP((userUPP), uppUDPNotifyProcInfo, (udpStream), \
1225  (eventCode), (userDataPtr), (icmpMsg))
1226 #endif
1227 #endif
1228 
1237  void
1238  InvokeUDPIOCompletionUPP(UDPiopb *iopb, UDPIOCompletionUPP userUPP);
1239 #if !OPAQUE_UPP_TYPES
1240 #ifdef __cplusplus
1241  inline void InvokeUDPIOCompletionUPP(UDPiopb *iopb,
1242  UDPIOCompletionUPP userUPP)
1243  {
1244  CALL_ONE_PARAMETER_UPP(userUPP, uppUDPIOCompletionProcInfo, iopb);
1245  }
1246 #else
1247 #define InvokeUDPIOCompletionUPP(iopb, userUPP) \
1248  CALL_ONE_PARAMETER_UPP((userUPP), uppUDPIOCompletionProcInfo, (iopb))
1249 #endif
1250 #endif
1251 
1252 #endif
1254 #if CALL_NOT_IN_CARBON || OLDROUTINENAMES
1256 #define NewGetIPIOCompletionProc(userRoutine) \
1257  NewGetIPIOCompletionUPP(userRoutine)
1258 #define NewIPIOCompletionProc(userRoutine) NewIPIOCompletionUPP(userRoutine)
1259 #define NewICMPEchoNotifyProc(userRoutine) NewICMPEchoNotifyUPP(userRoutine)
1260 #define NewTCPNotifyProc(userRoutine) NewTCPNotifyUPP(userRoutine)
1261 #define NewTCPIOCompletionProc(userRoutine) NewTCPIOCompletionUPP(userRoutine)
1262 #define NewUDPNotifyProc(userRoutine) NewUDPNotifyUPP(userRoutine)
1263 #define NewUDPIOCompletionProc(userRoutine) NewUDPIOCompletionUPP(userRoutine)
1264 #define CallGetIPIOCompletionProc(userRoutine, iopb) \
1265  InvokeGetIPIOCompletionUPP(iopb, userRoutine)
1266 #define CallIPIOCompletionProc(userRoutine, iopb) \
1267  InvokeIPIOCompletionUPP(iopb, userRoutine)
1268 #define CallICMPEchoNotifyProc(userRoutine, iopb) \
1269  InvokeICMPEchoNotifyUPP(iopb, userRoutine)
1270 #define CallTCPNotifyProc(userRoutine, tcpStream, eventCode, userDataPtr, \
1271  terminReason, icmpMsg) \
1272  InvokeTCPNotifyUPP(tcpStream, eventCode, userDataPtr, terminReason, icmpMsg, \
1273  userRoutine)
1274 #define CallTCPIOCompletionProc(userRoutine, iopb) \
1275  InvokeTCPIOCompletionUPP(iopb, userRoutine)
1276 #define CallUDPNotifyProc(userRoutine, udpStream, eventCode, userDataPtr, \
1277  icmpMsg) \
1278  InvokeUDPNotifyUPP(udpStream, eventCode, userDataPtr, icmpMsg, userRoutine)
1279 #define CallUDPIOCompletionProc(userRoutine, iopb) \
1280  InvokeUDPIOCompletionUPP(iopb, userRoutine)
1281 #endif
1283 #if PRAGMA_STRUCT_ALIGN
1284 #pragma options align = reset
1285 #elif PRAGMA_STRUCT_PACKPUSH
1286 #pragma pack(pop)
1287 #elif PRAGMA_STRUCT_PACK
1288 #pragma pack()
1289 #endif
1290 
1291 #ifdef PRAGMA_IMPORT_OFF
1292 #pragma import off
1293 #elif PRAGMA_IMPORT
1294 #pragma import reset
1295 #endif
1296 
1297 #ifdef __cplusplus
1298 }
1299 #endif
1300 
1301 #endif
AppleTalk Interfaces.
void InvokeTCPIOCompletionUPP(TCPiopb *iopb, TCPIOCompletionUPP userUPP)
void DisposeTCPIOCompletionUPP(TCPIOCompletionUPP userUPP)
@ BYTES_32WORD
Definition: MacTCP.h:137
@ BYTES_64WORD
Definition: MacTCP.h:138
void InvokeGetIPIOCompletionUPP(GetAddrParamBlock *iopb, GetIPIOCompletionUPP userUPP)
UInt8 b_8
Definition: MacTCP.h:142
#define NewGetIPIOCompletionUPP(userRoutine)
Definition: MacTCP.h:743
@ ipLoadErr
Definition: MacTCP.h:97
@ ipNoCnfgErr
Definition: MacTCP.h:96
@ ipBadLapErr
Definition: MacTCP.h:94
@ ipBadCnfgErr
Definition: MacTCP.h:95
@ invalidLength
Definition: MacTCP.h:100
@ ipBadAddr
Definition: MacTCP.h:98
@ insufficientResources
Definition: MacTCP.h:103
@ connectionDoesntExist
Definition: MacTCP.h:102
@ invalidStreamPtr
Definition: MacTCP.h:105
@ connectionClosing
Definition: MacTCP.h:99
void InvokeIPIOCompletionUPP(ICMPParamBlock *iopb, IPIOCompletionUPP userUPP)
void DisposeUDPIOCompletionUPP(UDPIOCompletionUPP userUPP)
void DisposeTCPNotifyUPP(TCPNotifyUPP userUPP)
void InvokeTCPNotifyUPP(StreamPtr tcpStream, unsigned short eventCode, Ptr userDataPtr, unsigned short terminReason, ICMPReport *icmpMsg, TCPNotifyUPP userUPP)
UInt16 b_16
Definition: MacTCP.h:144
@ NBP_MAX_NAME_SIZE
Definition: MacTCP.h:350
#define NewICMPEchoNotifyUPP(userRoutine)
Definition: MacTCP.h:805
void DisposeUDPNotifyUPP(UDPNotifyUPP userUPP)
void InvokeICMPEchoNotifyUPP(ICMPParamBlock *iopb, ICMPEchoNotifyUPP userUPP)
UInt32 b_32
Definition: MacTCP.h:146
void InvokeUDPNotifyUPP(StreamPtr udpStream, unsigned short eventCode, Ptr userDataPtr, ICMPReport *icmpMsg, UDPNotifyUPP userUPP)
void DisposeIPIOCompletionUPP(IPIOCompletionUPP userUPP)
#define NewTCPIOCompletionUPP(userRoutine)
Definition: MacTCP.h:865
#define NewIPIOCompletionUPP(userRoutine)
Definition: MacTCP.h:774
#define NewTCPNotifyUPP(userRoutine)
Definition: MacTCP.h:835
b_32 ip_addr
Definition: MacTCP.h:148
@ ipDestDeadErr
Definition: MacTCP.h:120
@ ipNoFragMemErr
Definition: MacTCP.h:122
@ icmpEchoTimeoutErr
Definition: MacTCP.h:121
@ nameSyntaxErr
Definition: MacTCP.h:124
@ ipRouteErr
Definition: MacTCP.h:123
void DisposeICMPEchoNotifyUPP(ICMPEchoNotifyUPP userUPP)
@ ipctlLAPStats
Definition: MacTCP.h:230
#define NewUDPNotifyUPP(userRoutine)
Definition: MacTCP.h:894
void DisposeGetIPIOCompletionUPP(GetIPIOCompletionUPP userUPP)
void InvokeUDPIOCompletionUPP(UDPiopb *iopb, UDPIOCompletionUPP userUPP)
#define NewUDPIOCompletionUPP(userRoutine)
Definition: MacTCP.h:924
Basic Macintosh data types.
unsigned char * StringPtr
Definition: MacTypes.h:477
unsigned char Boolean
Definition: MacTypes.h:318
Mixed Mode Manager Interfaces.
void DisposeRoutineDescriptor(UniversalProcPtr theUPP)
#define STACK_UPP_TYPE(name)
Definition: MixedMode.h:734
UniversalProcPtr NewRoutineDescriptor(ProcPtr theProc, ProcInfoType theProcInfo, ISAType theISA)
Definition: AppleTalk.h:342
Definition: MacTCP.h:310
Definition: MacTCP.h:211
long ourNetMask
Definition: MacTCP.h:223
Definition: MacTCP.h:494
Definition: MacTCP.h:237
rdsEntry echoedData
Definition: MacTCP.h:255
unsigned long echoReplyIn
Definition: MacTCP.h:254
Ptr options
Definition: MacTCP.h:256
Definition: MacTCP.h:190
Definition: MacTCP.h:265
wdsEntry data
Definition: MacTCP.h:281
Definition: MacTCP.h:330
Definition: OSUtils.h:131
Definition: MacTCP.h:554
Definition: MacTCP.h:485
Ptr userDataPtr
Definition: MacTCP.h:490
Definition: MacTCP.h:505
Definition: MacTCP.h:422
Definition: MacTCP.h:588
Definition: MacTCP.h:430
Definition: MacTCP.h:559
Definition: MacTCP.h:470
Ptr rcvBuff
Definition: MacTCP.h:475
Definition: MacTCP.h:451
Ptr wdsPtr
Definition: MacTCP.h:458
Definition: MacTCP.h:569
Definition: MacTCP.h:525
unsigned short sendWindow
Definition: MacTCP.h:537
Definition: MacTCP.h:600
Definition: MacTCP.h:653
Definition: MacTCP.h:690
Definition: MacTCP.h:677
udp_port destPort
Definition: MacTCP.h:686
Definition: MacTCP.h:663
unsigned short sendLength
Definition: MacTCP.h:670
Definition: MacTCP.h:700
Definition: MacTCP.h:316
ip_addr ip_address
Definition: MacTCP.h:319
b_16 protocol
Definition: MacTCP.h:318
Enet_addr en_address
Definition: MacTCP.h:320
Definition: MacTCP.h:150
Definition: MacTCP.h:297
Boolean valid
Definition: MacTCP.h:301
Boolean gateway
Definition: MacTCP.h:300
SInt8 filler[116]
Definition: MacTCP.h:306
long age
Definition: MacTCP.h:304
Boolean probing
Definition: MacTCP.h:302
long access
Definition: MacTCP.h:305
AddrBlock at_address
Definition: MacTCP.h:299
SInt8 afiller
Definition: MacTCP.h:303
Definition: MacTCP.h:165
Ptr ptr
Definition: MacTCP.h:167
Definition: MacTCP.h:159
Ptr ptr
Definition: MacTCP.h:161
Definition: MacTCP.h:324