1/* -*- Mode: C; tab-width: 4 -*-
2 *
3 * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
16 */
17
18// ***************************************************************************
19// Classic Mac (Open Transport) structures
20
21//#include <Files.h>	// OpenTransport.h requires this
22#include <OpenTransport.h>
23#include <OpenTptInternet.h>
24#include <OpenTptClient.h>
25
26typedef enum
27{
28    mOT_Closed = 0,     // We got kOTProviderIsClosed message
29    mOT_Reset,          // We got xOTStackWasLoaded message
30    mOT_Start,          // We've called OTAsyncOpenEndpoint
31    mOT_ReusePort,      // Have just done kReusePortOption
32    mOT_RcvDestAddr,    // Have just done kRcvDestAddrOption
33    mOT_SetUTTL,        // Have just done kSetUnicastTTLOption
34    mOT_SetMTTL,        // Have just done kSetMulticastTTLOption
35    mOT_LLScope,        // Have just done kAddLinkMulticastOption
36//	mOT_AdminScope,		// Have just done kAddAdminMulticastOption
37    mOT_Bind,           // We've just called OTBind
38    mOT_Ready           // Got T_BINDCOMPLETE; Interface is registered and active
39} mOT_State;
40
41typedef struct { TOptionHeader h; mDNSv4Addr multicastGroupAddress; mDNSv4Addr InterfaceAddress; } TIPAddMulticastOption;
42typedef struct { TOptionHeader h; UInt8 val; } TSetByteOption;
43typedef struct { TOptionHeader h; UInt32 flag; } TSetBooleanOption;
44
45// TOptionBlock is a union of various types.
46// What they all have in common is that they all start with a TOptionHeader.
47typedef union  { TOptionHeader h; TIPAddMulticastOption m; TSetByteOption i; TSetBooleanOption b; } TOptionBlock;
48
49struct mDNS_PlatformSupport_struct
50{
51    EndpointRef ep;
52    UInt32 mOTstate;                // mOT_State enum
53    TOptionBlock optBlock;
54    TOptMgmt optReq;
55    long OTTimerTask;
56    UInt32 nesting;
57    NetworkInterfaceInfo interface;
58};
59