1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2002-2005 Apple Computer, Inc. All rights reserved.
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
9 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 Change History (most recent first):
19 $Log: mDNSVxWorks.h,v $
20 Revision 1.5 2006/08/14 23:25:18 cheshire
21 Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0
23 Revision 1.4 2005/05/30 07:36:38 bradley
24 New implementation of the mDNS platform plugin for VxWorks 5.5 or later with IPv6 support.
28 #ifndef __MDNS_VXWORKS_H__
29 #define __MDNS_VXWORKS_H__
36 #include "CommonServices.h"
37 #include "DebugServices.h"
43 // Forward Declarations
45 typedef struct NetworkInterfaceInfoVxWorks NetworkInterfaceInfoVxWorks
;
47 //---------------------------------------------------------------------------------------------------------------------------
50 @abstract Data for IPv4 and IPv6 sockets.
53 typedef struct SocketSet SocketSet
;
56 NetworkInterfaceInfoVxWorks
* info
;
61 //---------------------------------------------------------------------------------------------------------------------------
62 /*! @struct NetworkInterfaceInfoVxWorks
64 @abstract Interface info for VxWorks.
67 struct NetworkInterfaceInfoVxWorks
69 NetworkInterfaceInfo ifinfo
; // MUST be the first element in this structure.
70 NetworkInterfaceInfoVxWorks
* next
;
71 mDNSu32 exists
; // 1 = currently exists in getifaddrs list; 0 = doesn't.
72 // 2 = exists, but McastTxRx state changed.
73 mDNSs32 lastSeen
; // If exists == 0, last time this interface appeared in getifaddrs list.
74 mDNSu32 scopeID
; // Interface index / IPv6 scope ID.
75 int family
; // Socket address family of the primary socket.
80 //---------------------------------------------------------------------------------------------------------------------------
81 /*! @struct mDNS_PlatformSupport_struct
83 @abstract Data for mDNS platform plugin.
86 struct mDNS_PlatformSupport_struct
88 NetworkInterfaceInfoVxWorks
* interfaceList
;
90 domainlabel userNiceLabel
;
91 domainlabel userHostLabel
;
102 //---------------------------------------------------------------------------------------------------------------------------
103 /*! @function mDNSReconfigure
105 @abstract Tell mDNS that the configuration has changed. Call when IP address changes, link goes up after being down, etc.
109 VxWorks does not provide a generic mechanism for getting notified when network interfaces change so this routines
110 provides a way for BSP-specific code to signal mDNS that something has changed and it should re-build its interfaces.
113 void mDNSReconfigure( void );
115 //---------------------------------------------------------------------------------------------------------------------------
116 /*! @function mDNSDeferIPv4
118 @abstract Tells mDNS whether to defer advertising of IPv4 interfaces.
122 To workaround problems with clients getting a link-local IPv4 address before a DHCP address is acquired, this allows
123 external code to defer advertising of IPv4 addresses until a DHCP lease has been acquired (or it times out).
126 void mDNSDeferIPv4( mDNSBool inDefer
);
132 #endif // __MDNS_VXWORKS_H__