2 * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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
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.
21 * @APPLE_LICENSE_HEADER_END@
23 Contains: mDNS platform plugin for VxWorks.
25 Copyright: Copyright (C) 2002-2003 Apple Computer, Inc., All Rights Reserved.
27 Change History (most recent first):
29 $Log: mDNSVxWorksIPv4Only.h,v $
30 Revision 1.3 2004/09/17 01:08:57 cheshire
31 Renamed mDNSClientAPI.h to mDNSEmbeddedAPI.h
32 The name "mDNSClientAPI.h" is misleading to new developers looking at this code. The interfaces
33 declared in that file are ONLY appropriate to single-address-space embedded applications.
34 For clients on general-purpose computers, the interfaces defined in dns_sd.h should be used.
36 Revision 1.2 2003/08/12 19:56:27 cheshire
39 Revision 1.1 2003/08/02 10:06:49 bradley
40 mDNS platform plugin for VxWorks.
44 #ifndef __MDNS_VXWORKS__
45 #define __MDNS_VXWORKS__
50 #include "mDNSEmbeddedAPI.h"
56 // Forward Declarations
58 typedef struct MDNSInterfaceItem MDNSInterfaceItem
;
60 //---------------------------------------------------------------------------------------------------------------------------
61 /*! @struct mDNS_PlatformSupport_struct
63 @abstract Structure containing platform-specific data.
66 struct mDNS_PlatformSupport_struct
72 MDNSInterfaceItem
* interfaceList
;
80 //---------------------------------------------------------------------------------------------------------------------------
81 /*! @function mDNSReconfigure
83 @abstract Tell mDNS that the configuration has changed. Call when IP address changes, link goes up after being down, etc.
87 VxWorks does not provide a generic mechanism for getting notified when network interfaces change so this routines
88 provides a way for BSP-specific code to signal mDNS that something has changed and it should re-build its interfaces.
91 void mDNSReconfigure( void );
93 //---------------------------------------------------------------------------------------------------------------------------
96 @abstract Interface information
101 struct ifaddrs
* ifa_next
;
104 struct sockaddr
* ifa_addr
;
105 struct sockaddr
* ifa_netmask
;
106 struct sockaddr
* ifa_dstaddr
;
110 //---------------------------------------------------------------------------------------------------------------------------
111 /*! @function getifaddrs
113 @abstract Builds a linked list of interfaces. Caller must free using freeifaddrs if successful.
116 int getifaddrs( struct ifaddrs
**outAddrs
);
118 //---------------------------------------------------------------------------------------------------------------------------
119 /*! @function freeifaddrs
121 @abstract Frees a linked list of interfaces built with getifaddrs.
124 void freeifaddrs( struct ifaddrs
*inAddrs
);
126 //---------------------------------------------------------------------------------------------------------------------------
127 /*! @function sock_pton
129 @abstract Converts a 'p'resentation address string into a 'n'umeric sockaddr structure.
131 @result 0 if successful or an error code on failure.
134 int sock_pton( const char *inString
, int inFamily
, void *outAddr
, size_t inAddrSize
, size_t *outAddrSize
);
136 //---------------------------------------------------------------------------------------------------------------------------
137 /*! @function sock_ntop
139 @abstract Converts a 'n'umeric sockaddr structure into a 'p'resentation address string.
141 @result Ptr to 'p'resentation address string buffer if successful or NULL on failure.
144 char * sock_ntop( const void *inAddr
, size_t inAddrSize
, char *inBuffer
, size_t inBufferSize
);
150 #endif // __MDNS_VXWORKS__