1 /* -*- Mode: C; tab-width: 4 -*-
3 * Copyright (c) 2002-2003 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 Contains: mDNS platform plugin for VxWorks.
19 Copyright: Copyright (C) 2002-2003 Apple Computer, Inc., All Rights Reserved.
21 Change History (most recent first):
23 $Log: mDNSVxWorksIPv4Only.h,v $
24 Revision 1.4 2006/08/14 23:25:18 cheshire
25 Re-licensed mDNSResponder daemon source code under Apache License, Version 2.0
27 Revision 1.3 2004/09/17 01:08:57 cheshire
28 Renamed mDNSClientAPI.h to mDNSEmbeddedAPI.h
29 The name "mDNSClientAPI.h" is misleading to new developers looking at this code. The interfaces
30 declared in that file are ONLY appropriate to single-address-space embedded applications.
31 For clients on general-purpose computers, the interfaces defined in dns_sd.h should be used.
33 Revision 1.2 2003/08/12 19:56:27 cheshire
36 Revision 1.1 2003/08/02 10:06:49 bradley
37 mDNS platform plugin for VxWorks.
41 #ifndef __MDNS_VXWORKS__
42 #define __MDNS_VXWORKS__
47 #include "mDNSEmbeddedAPI.h"
53 // Forward Declarations
55 typedef struct MDNSInterfaceItem MDNSInterfaceItem
;
57 //---------------------------------------------------------------------------------------------------------------------------
58 /*! @struct mDNS_PlatformSupport_struct
60 @abstract Structure containing platform-specific data.
63 struct mDNS_PlatformSupport_struct
69 MDNSInterfaceItem
* interfaceList
;
77 //---------------------------------------------------------------------------------------------------------------------------
78 /*! @function mDNSReconfigure
80 @abstract Tell mDNS that the configuration has changed. Call when IP address changes, link goes up after being down, etc.
84 VxWorks does not provide a generic mechanism for getting notified when network interfaces change so this routines
85 provides a way for BSP-specific code to signal mDNS that something has changed and it should re-build its interfaces.
88 void mDNSReconfigure( void );
90 //---------------------------------------------------------------------------------------------------------------------------
93 @abstract Interface information
98 struct ifaddrs
* ifa_next
;
101 struct sockaddr
* ifa_addr
;
102 struct sockaddr
* ifa_netmask
;
103 struct sockaddr
* ifa_dstaddr
;
107 //---------------------------------------------------------------------------------------------------------------------------
108 /*! @function getifaddrs
110 @abstract Builds a linked list of interfaces. Caller must free using freeifaddrs if successful.
113 int getifaddrs( struct ifaddrs
**outAddrs
);
115 //---------------------------------------------------------------------------------------------------------------------------
116 /*! @function freeifaddrs
118 @abstract Frees a linked list of interfaces built with getifaddrs.
121 void freeifaddrs( struct ifaddrs
*inAddrs
);
123 //---------------------------------------------------------------------------------------------------------------------------
124 /*! @function sock_pton
126 @abstract Converts a 'p'resentation address string into a 'n'umeric sockaddr structure.
128 @result 0 if successful or an error code on failure.
131 int sock_pton( const char *inString
, int inFamily
, void *outAddr
, size_t inAddrSize
, size_t *outAddrSize
);
133 //---------------------------------------------------------------------------------------------------------------------------
134 /*! @function sock_ntop
136 @abstract Converts a 'n'umeric sockaddr structure into a 'p'resentation address string.
138 @result Ptr to 'p'resentation address string buffer if successful or NULL on failure.
141 char * sock_ntop( const void *inAddr
, size_t inAddrSize
, char *inBuffer
, size_t inBufferSize
);
147 #endif // __MDNS_VXWORKS__