Mac OS 9
OpenTransportUNIX.h
Go to the documentation of this file.
1 
21 #ifndef __OPENTRANSPORTUNIX__
22 #define __OPENTRANSPORTUNIX__
23 
24 #include <stddef.h>
25 #ifndef __OPENTRANSPORTPROTOCOL__
26 #include <OpenTransportProtocol.h>
27 #endif
28 
29 #if PRAGMA_ONCE
30 #pragma once
31 #endif
32 
33 #ifdef __cplusplus
34 extern "C" {
35 #endif
36 
37 #if PRAGMA_IMPORT
38 #pragma import on
39 #endif
40 
41 #if PRAGMA_STRUCT_ALIGN
42 #pragma options align = mac68k
43 #elif PRAGMA_STRUCT_PACKPUSH
44 #pragma pack(push, 2)
45 #elif PRAGMA_STRUCT_PACK
46 #pragma pack(2)
47 #endif
48 
49 #if defined(__MWERKS__) && TARGET_CPU_68K
50 #pragma push
51 #pragma pointers_in_D0
52 #endif
53 
64 extern int t_errno;
65 
75 struct netbuf {
76  unsigned int maxlen;
77  unsigned int len;
78  char *buf;
79 };
80 typedef struct netbuf netbuf;
81 struct t_info {
82  int addr;
83  int options;
84  int tsdu;
85  int etsdu;
86  int connect;
87  int discon;
88  unsigned int servtype;
89  unsigned int flags;
90 };
91 typedef struct t_info t_info;
92 
93 struct t_bind {
94  netbuf addr;
95  unsigned int qlen;
96 };
97 struct t_optmgmt {
98  netbuf opt;
99  long flags;
100 };
101 struct t_discon {
102  netbuf udata;
103  int reason;
104  int sequence;
105 };
106 typedef struct t_discon t_discon;
107 struct t_call {
108  netbuf addr;
109  netbuf opt;
110  netbuf udata;
111  int sequence;
112 };
113 typedef struct t_call t_call;
114 struct t_unitdata {
115  netbuf addr;
116  netbuf opt;
117  netbuf udata;
118 };
119 typedef struct t_unitdata t_unitdata;
120 struct t_uderr {
121  netbuf addr;
122  netbuf opt;
123  long error;
124 };
125 typedef struct t_uderr t_uderr;
129 struct t_request {
130  netbuf data;
131  netbuf opt;
132  long sequence;
133 };
134 typedef struct t_request t_request;
135 struct t_reply {
136  netbuf data;
137  netbuf opt;
138  long sequence;
139 };
140 typedef struct t_reply t_reply;
142  netbuf addr;
143  netbuf opt;
144  netbuf udata;
145  long sequence;
146 };
147 typedef struct t_unitrequest t_unitrequest;
148 struct t_unitreply {
149  netbuf opt;
150  netbuf udata;
151  long sequence;
152 };
153 typedef struct t_unitreply t_unitreply;
154 struct t_opthdr {
155  unsigned long len;
157  unsigned long level;
158  unsigned long name;
159  unsigned long status;
161 };
162 typedef struct t_opthdr t_opthdr;
164 #if !OTKERNEL
165 #if CALL_NOT_IN_CARBON
174 int
175 t_accept(int fd, int resfd, t_call *call);
176 
185 char *
186 t_alloc(int fd, int struct_type, int fields);
187 
188 #endif
190 int t_bind(int fd, struct t_bind *req, struct t_bind *ret);
191 int t_optmgmt(int fd, struct t_optmgmt *req, struct t_optmgmt *ret);
192 int
193 t_getprotaddr(int fd, struct t_bind *boundaddr, struct t_bind *peeraddr);
194 int
195 t_resolveaddr(int fd, struct t_bind *reqAddr, struct t_bind *retAddr,
196  OTTimeout timeout);
197 #if CALL_NOT_IN_CARBON
206 int
207 t_close(int fd);
208 
217 int
218 t_connect(int fd, t_call *sndcall, t_call *rcvcall);
219 
228 int
229 t_free(char *ptr, int struct_type);
230 
239 int
240 t_getinfo(int fd, t_info *info);
241 
250 int
251 t_getstate(int fd);
252 
261 int
262 t_listen(int fd, t_call *call);
263 
272 int
273 t_look(int fd);
274 
283 int
284 t_open(char *path, int oflag, t_info *info);
285 
294 int
295 t_blocking(int fd);
296 
305 int
307 
316 int
317 t_rcv(int fd, char *buf, size_t nbytes, int *flags);
318 
327 int
328 t_rcvconnect(int fd, t_call *call);
329 
338 int
339 t_rcvdis(int fd, t_discon *discon);
340 
349 int
350 t_rcvrel(int fd);
351 
360 int
361 t_rcvudata(int fd, t_unitdata *unitdata, int *flags);
362 
371 int
372 t_rcvuderr(int fd, t_uderr *uderr);
373 
382 int
383 t_snd(int fd, char *buf, size_t nbytes, int flags);
384 
393 int
394 t_snddis(int fd, t_call *call);
395 
404 int
405 t_sndrel(int fd);
406 
415 int
416 t_sndudata(int fd, t_unitdata *unitdata);
417 
426 int
427 t_sync(int fd);
428 
437 int
438 t_unbind(int fd);
439 
448 int
449 t_error(char *errmsg);
450 
461 int
463 
472 int
474 
483 int
485 
494 int
496 
505 int
506 t_usesyncidleevents(int fd, int useEvents);
507 
518 int
519 t_sndrequest(int fd, t_request *req, int flags);
520 
529 int
530 t_rcvreply(int fd, t_reply *rep, int *flags);
531 
540 int
541 t_rcvrequest(int fd, t_request *req, int *flags);
542 
551 int
552 t_sndreply(int fd, t_reply *rep, int flags);
553 
562 int
563 t_cancelrequest(int fd, long sequence);
564 
573 int
574 t_cancelreply(int fd, long sequence);
575 
584 int
585 t_sndurequest(int fd, t_unitrequest *ureq, int flags);
586 
595 int
596 t_rcvureply(int fd, t_unitreply *urep, int *flags);
597 
606 int
607 t_rcvurequest(int fd, t_unitrequest *ureq, int *flags);
608 
617 int
618 t_sndureply(int fd, t_unitreply *urep, int flags);
619 
628 int
629 t_cancelurequest(int fd, long sequence);
630 
639 int
640 t_cancelureply(int fd, long sequence);
641 
650 int
652 
661 int
662 t_installnotifier(int fd, OTNotifyProcPtr proc, void *contextPtr);
663 
672 void
674 
685 int
686 getmsg(int fd, strbuf *ctlbuf, strbuf *databuf, int *flagsp);
687 
696 int
697 putmsg(int fd, const strbuf *ctlbuf, const strbuf *databuf, int flags);
698 
707 int
708 getpmsg(int fd, strbuf *ctlbuf, strbuf *databuf, int *bandp, int *flagsp);
709 
718 int
719 putpmsg(int fd, const strbuf *ctlbuf, const strbuf *databuf, int band,
720  int flags);
721 
732 int
733 stream_installnotifier(int fd, OTNotifyProcPtr proc, void *contextPtr);
734 
743 int
745 
754 int
756 
765 int
767 
776 int
778 
787 int
789 
798 int
800 
809 int
810 stream_open(char *path, unsigned long flags);
811 
820 int
821 stream_close(int fd);
822 
831 int
832 stream_read(int fd, void *buf, size_t len);
833 
842 int
843 stream_write(int fd, void *buf, size_t len);
844 
853 int
854 stream_ioctl(int fd, unsigned long cmd, ...);
855 
864 int
865 stream_pipe(int *fds);
866 
867 #endif
869 struct pollfd {
870  SInt32 fd;
871  short events;
872  short revents;
873  long _ifd;
874 };
875 typedef struct pollfd pollfd;
876 #if CALL_NOT_IN_CARBON
885 int
886 poll(pollfd *fds, size_t nfds, unsigned long timeout);
887 
888 #endif
890 #endif
892 #if defined(__MWERKS__) && TARGET_CPU_68K
893 #pragma pop
894 #endif
895 
896 #if PRAGMA_STRUCT_ALIGN
897 #pragma options align = reset
898 #elif PRAGMA_STRUCT_PACKPUSH
899 #pragma pack(pop)
900 #elif PRAGMA_STRUCT_PACK
901 #pragma pack()
902 #endif
903 
904 #ifdef PRAGMA_IMPORT_OFF
905 #pragma import off
906 #elif PRAGMA_IMPORT
907 #pragma import reset
908 #endif
909 
910 #ifdef __cplusplus
911 }
912 #endif
913 
914 #endif
Definitions likely to be used by low-level protocol stack implementation.
int t_rcvrequest(int fd, t_request *req, int *flags)
int t_snddis(int fd, t_call *call)
int stream_read(int fd, void *buf, size_t len)
int stream_nonblocking(int fd)
int t_sndrequest(int fd, t_request *req, int flags)
int t_rcvurequest(int fd, t_unitrequest *ureq, int *flags)
int putmsg(int fd, const strbuf *ctlbuf, const strbuf *databuf, int flags)
int t_cancelurequest(int fd, long sequence)
int stream_write(int fd, void *buf, size_t len)
int t_sync(int fd)
int t_rcvrel(int fd)
int t_error(char *errmsg)
int getpmsg(int fd, strbuf *ctlbuf, strbuf *databuf, int *bandp, int *flagsp)
int t_rcvureply(int fd, t_unitreply *urep, int *flags)
int t_bind(int fd, struct t_bind *req, struct t_bind *ret)
int t_cancelrequest(int fd, long sequence)
int stream_open(char *path, unsigned long flags)
int t_issynchronous(int fd)
int t_rcvreply(int fd, t_reply *rep, int *flags)
char * t_alloc(int fd, int struct_type, int fields)
int t_getinfo(int fd, t_info *info)
int putpmsg(int fd, const strbuf *ctlbuf, const strbuf *databuf, int band, int flags)
int t_rcvudata(int fd, t_unitdata *unitdata, int *flags)
int poll(pollfd *fds, size_t nfds, unsigned long timeout)
int t_rcvuderr(int fd, t_uderr *uderr)
int stream_close(int fd)
int t_open(char *path, int oflag, t_info *info)
int t_cancelreply(int fd, long sequence)
int stream_installnotifier(int fd, OTNotifyProcPtr proc, void *contextPtr)
int stream_pipe(int *fds)
int t_getstate(int fd)
int t_isnonblocking(int fd)
int t_listen(int fd, t_call *call)
int t_asynchronous(int fd)
int t_free(char *ptr, int struct_type)
int t_sndurequest(int fd, t_unitrequest *ureq, int flags)
int t_errno
int getmsg(int fd, strbuf *ctlbuf, strbuf *databuf, int *flagsp)
int t_synchronous(int fd)
int t_sndreply(int fd, t_reply *rep, int flags)
int stream_blocking(int fd)
int t_cancelsynchronouscalls(int fd)
int t_rcvconnect(int fd, t_call *call)
int stream_synchronous(int fd)
int t_snd(int fd, char *buf, size_t nbytes, int flags)
int stream_ioctl(int fd, unsigned long cmd,...)
int t_look(int fd)
int t_usesyncidleevents(int fd, int useEvents)
int t_installnotifier(int fd, OTNotifyProcPtr proc, void *contextPtr)
int stream_issynchronous(int fd)
int t_sndrel(int fd)
int t_rcvdis(int fd, t_discon *discon)
int t_sndudata(int fd, t_unitdata *unitdata)
int t_rcv(int fd, char *buf, size_t nbytes, int *flags)
int t_connect(int fd, t_call *sndcall, t_call *rcvcall)
int t_unbind(int fd)
int t_accept(int fd, int resfd, t_call *call)
int stream_isblocking(int fd)
int stream_asynchronous(int fd)
int t_nonblocking(int fd)
int t_sndureply(int fd, t_unitreply *urep, int flags)
int t_blocking(int fd)
int t_cancelureply(int fd, long sequence)
int t_close(int fd)
void t_removenotifier(int fd)
Definition: Sound.h:748
Definition: OpenTransportUNIX.h:75
Definition: OpenTransportUNIX.h:869
Definition: OpenTransport.h:1533
Definition: OpenTransportUNIX.h:93
Definition: OpenTransportUNIX.h:107
Definition: OpenTransportUNIX.h:101
Definition: OpenTransportUNIX.h:81
unsigned int servtype
Definition: OpenTransportUNIX.h:88
int etsdu
Definition: OpenTransportUNIX.h:85
int connect
Definition: OpenTransportUNIX.h:86
int tsdu
Definition: OpenTransportUNIX.h:84
int discon
Definition: OpenTransportUNIX.h:87
int options
Definition: OpenTransportUNIX.h:83
unsigned int flags
Definition: OpenTransportUNIX.h:89
Definition: OpenTransportUNIX.h:154
unsigned long level
Definition: OpenTransportUNIX.h:157
unsigned long name
Definition: OpenTransportUNIX.h:158
unsigned long status
Definition: OpenTransportUNIX.h:159
Definition: OpenTransportUNIX.h:97
Definition: OpenTransportUNIX.h:135
Definition: OpenTransportUNIX.h:129
Definition: OpenTransportUNIX.h:120
Definition: OpenTransportUNIX.h:114
Definition: OpenTransportUNIX.h:148
Definition: OpenTransportUNIX.h:141