]> git.saurik.com Git - apple/mdnsresponder.git/blob - mDNSMacOS9/mDNSMacOS9.h
mDNSResponder-107.5.tar.gz
[apple/mdnsresponder.git] / mDNSMacOS9 / mDNSMacOS9.h
1 /*
2 * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. Please obtain a copy of the License at
10 * http://www.opensource.apple.com/apsl/ and read it before using this
11 * file.
12 *
13 * The Original Code and all software distributed under the License are
14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
18 * Please see the License for the specific language governing rights and
19 * limitations under the License.
20 *
21 * @APPLE_LICENSE_HEADER_END@
22
23 Change History (most recent first):
24
25 $Log: mDNSMacOS9.h,v $
26 Revision 1.10 2004/03/12 21:30:26 cheshire
27 Build a System-Context Shared Library from mDNSCore, for the benefit of developers
28 like Muse Research who want to be able to use mDNS/DNS-SD from GPL-licensed code.
29
30 Revision 1.9 2004/02/09 23:25:35 cheshire
31 Need to set TTL 255 to interoperate with peers that check TTL (oops!)
32
33 Revision 1.8 2003/08/12 19:56:24 cheshire
34 Update to APSL 2.0
35
36 */
37
38 // ***************************************************************************
39 // Classic Mac (Open Transport) structures
40
41 //#include <Files.h> // OpenTransport.h requires this
42 #include <OpenTransport.h>
43 #include <OpenTptInternet.h>
44 #include <OpenTptClient.h>
45
46 typedef enum
47 {
48 mOT_Closed = 0, // We got kOTProviderIsClosed message
49 mOT_Reset, // We got xOTStackWasLoaded message
50 mOT_Start, // We've called OTAsyncOpenEndpoint
51 mOT_ReusePort, // Have just done kReusePortOption
52 mOT_RcvDestAddr, // Have just done kRcvDestAddrOption
53 mOT_SetUTTL, // Have just done kSetUnicastTTLOption
54 mOT_SetMTTL, // Have just done kSetMulticastTTLOption
55 mOT_LLScope, // Have just done kAddLinkMulticastOption
56 // mOT_AdminScope, // Have just done kAddAdminMulticastOption
57 mOT_Bind, // We've just called OTBind
58 mOT_Ready // Got T_BINDCOMPLETE; Interface is registered and active
59 } mOT_State;
60
61 typedef struct { TOptionHeader h; mDNSv4Addr multicastGroupAddress; mDNSv4Addr InterfaceAddress; } TIPAddMulticastOption;
62 typedef struct { TOptionHeader h; UInt8 val; } TSetByteOption;
63 typedef struct { TOptionHeader h; UInt32 flag; } TSetBooleanOption;
64
65 // TOptionBlock is a union of various types.
66 // What they all have in common is that they all start with a TOptionHeader.
67 typedef union { TOptionHeader h; TIPAddMulticastOption m; TSetByteOption i; TSetBooleanOption b; } TOptionBlock;
68
69 struct mDNS_PlatformSupport_struct
70 {
71 EndpointRef ep;
72 UInt32 mOTstate; // mOT_State enum
73 TOptionBlock optBlock;
74 TOptMgmt optReq;
75 long OTTimerTask;
76 UInt32 nesting;
77 NetworkInterfaceInfo interface;
78 };