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.
18 #ifndef __MDNS_VXWORKS_H__
19 #define __MDNS_VXWORKS_H__
26 #include "CommonServices.h"
27 #include "DebugServices.h"
33 // Forward Declarations
35 typedef struct NetworkInterfaceInfoVxWorks NetworkInterfaceInfoVxWorks
;
37 //---------------------------------------------------------------------------------------------------------------------------
40 @abstract Data for IPv4 and IPv6 sockets.
43 typedef struct SocketSet SocketSet
;
46 NetworkInterfaceInfoVxWorks
* info
;
51 //---------------------------------------------------------------------------------------------------------------------------
52 /*! @struct NetworkInterfaceInfoVxWorks
54 @abstract Interface info for VxWorks.
57 struct NetworkInterfaceInfoVxWorks
59 NetworkInterfaceInfo ifinfo
; // MUST be the first element in this structure.
60 NetworkInterfaceInfoVxWorks
* next
;
61 mDNSu32 exists
; // 1 = currently exists in getifaddrs list; 0 = doesn't.
62 // 2 = exists, but McastTxRx state changed.
63 mDNSs32 lastSeen
; // If exists == 0, last time this interface appeared in getifaddrs list.
64 mDNSu32 scopeID
; // Interface index / IPv6 scope ID.
65 int family
; // Socket address family of the primary socket.
70 //---------------------------------------------------------------------------------------------------------------------------
71 /*! @struct mDNS_PlatformSupport_struct
73 @abstract Data for mDNS platform plugin.
76 struct mDNS_PlatformSupport_struct
78 NetworkInterfaceInfoVxWorks
* interfaceList
;
80 domainlabel userNiceLabel
;
81 domainlabel userHostLabel
;
92 //---------------------------------------------------------------------------------------------------------------------------
93 /*! @function mDNSReconfigure
95 @abstract Tell mDNS that the configuration has changed. Call when IP address changes, link goes up after being down, etc.
99 VxWorks does not provide a generic mechanism for getting notified when network interfaces change so this routines
100 provides a way for BSP-specific code to signal mDNS that something has changed and it should re-build its interfaces.
103 void mDNSReconfigure( void );
105 //---------------------------------------------------------------------------------------------------------------------------
106 /*! @function mDNSDeferIPv4
108 @abstract Tells mDNS whether to defer advertising of IPv4 interfaces.
112 To workaround problems with clients getting a link-local IPv4 address before a DHCP address is acquired, this allows
113 external code to defer advertising of IPv4 addresses until a DHCP lease has been acquired (or it times out).
116 void mDNSDeferIPv4( mDNSBool inDefer
);
122 #endif // __MDNS_VXWORKS_H__