mirror of
https://git.rtems.org/rtems-libbsd/
synced 2025-05-14 06:40:00 +08:00
parent
6ac77389a3
commit
a4a6523309
@ -274,17 +274,12 @@ mDNSexport void SetAnonData(DNSQuestion *q, ResourceRecord *rr, mDNSBool ForQues
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mDNSlocal char *RRDisplayStringBuf(const ResourceRecord *const rr, char *const buffer)
|
|
||||||
{
|
|
||||||
return GetRRDisplayString_rdb(rr, &rr->rdata->u, buffer);
|
|
||||||
}
|
|
||||||
|
|
||||||
// returns -1 if the caller should ignore the result
|
// returns -1 if the caller should ignore the result
|
||||||
// returns 1 if the record answers the question
|
// returns 1 if the record answers the question
|
||||||
// returns 0 if the record does not answer the question
|
// returns 0 if the record does not answer the question
|
||||||
mDNSexport int AnonInfoAnswersQuestion(const ResourceRecord *const rr, const DNSQuestion *const q)
|
mDNSexport int AnonInfoAnswersQuestion(const ResourceRecord *const rr, const DNSQuestion *const q)
|
||||||
{
|
{
|
||||||
char MsgBuffer[MaxMsg]; // Temp storage used while building error log messages
|
mDNSexport mDNS mDNSStorage;
|
||||||
ResourceRecord *nsec3RR;
|
ResourceRecord *nsec3RR;
|
||||||
int i;
|
int i;
|
||||||
AnonymousInfo *qai, *rai;
|
AnonymousInfo *qai, *rai;
|
||||||
@ -368,7 +363,7 @@ mDNSexport int AnonInfoAnswersQuestion(const ResourceRecord *const rr, const DNS
|
|||||||
mDNSPlatformMemCmp(qai->AnonData, rai->AnonData, qai->AnonDataLen) != 0)
|
mDNSPlatformMemCmp(qai->AnonData, rai->AnonData, qai->AnonDataLen) != 0)
|
||||||
{
|
{
|
||||||
debugf("AnonInfoAnswersQuestion: AnonData mis-match for record %s question %##s ",
|
debugf("AnonInfoAnswersQuestion: AnonData mis-match for record %s question %##s ",
|
||||||
RRDisplayStringBuf(rr, MsgBuffer), q->qname.c);
|
RRDisplayString(&mDNSStorage, rr), q->qname.c);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
// AnonData matches i.e they belong to the same group and the same service.
|
// AnonData matches i.e they belong to the same group and the same service.
|
||||||
@ -406,10 +401,10 @@ mDNSexport int AnonInfoAnswersQuestion(const ResourceRecord *const rr, const DNS
|
|||||||
// AnonData can be NULL for the cache entry and if we are hearing our own question back, AnonData is NULL for
|
// AnonData can be NULL for the cache entry and if we are hearing our own question back, AnonData is NULL for
|
||||||
// that too and we can end up here for that case.
|
// that too and we can end up here for that case.
|
||||||
debugf("AnonInfoAnswersQuestion: AnonData %p or nsec3RR %p, NULL for question %##s, record %s", AnonData, nsec3RR,
|
debugf("AnonInfoAnswersQuestion: AnonData %p or nsec3RR %p, NULL for question %##s, record %s", AnonData, nsec3RR,
|
||||||
q->qname.c, RRDisplayStringBuf(rr, MsgBuffer));
|
q->qname.c, RRDisplayString(&mDNSStorage, rr));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
debugf("AnonInfoAnswersQuestion: Validating question %##s, ResourceRecord %s", q->qname.c, RRDisplayStringBuf(nsec3RR, MsgBuffer));
|
debugf("AnonInfoAnswersQuestion: Validating question %##s, ResourceRecord %s", q->qname.c, RRDisplayString(&mDNSStorage, nsec3RR));
|
||||||
|
|
||||||
|
|
||||||
nsec3 = (rdataNSEC3 *)nsec3RR->rdata->u.data;
|
nsec3 = (rdataNSEC3 *)nsec3RR->rdata->u.data;
|
||||||
@ -441,7 +436,7 @@ mDNSexport int AnonInfoAnswersQuestion(const ResourceRecord *const rr, const DNS
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
LogInfo("AnonInfoAnswersQuestion: ResourceRecord %s matched question %##s (%s)", RRDisplayStringBuf(nsec3RR, MsgBuffer), q->qname.c, DNSTypeName(q->qtype));
|
LogInfo("AnonInfoAnswersQuestion: ResourceRecord %s matched question %##s (%s)", RRDisplayString(&mDNSStorage, nsec3RR), q->qname.c, DNSTypeName(q->qtype));
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -14475,11 +14475,7 @@ mDNSlocal mStatus mDNS_InitStorage(mDNS *const m, mDNS_PlatformSupport *const p,
|
|||||||
m->WABBrowseQueriesCount = 0;
|
m->WABBrowseQueriesCount = 0;
|
||||||
m->WABLBrowseQueriesCount = 0;
|
m->WABLBrowseQueriesCount = 0;
|
||||||
m->WABRegQueriesCount = 0;
|
m->WABRegQueriesCount = 0;
|
||||||
#ifndef __rtems__
|
|
||||||
m->AutoTargetServices = 0;
|
m->AutoTargetServices = 0;
|
||||||
#else /* __rtems__ */
|
|
||||||
m->AutoTargetServices = 1;
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
|
|
||||||
#if BONJOUR_ON_DEMAND
|
#if BONJOUR_ON_DEMAND
|
||||||
m->NumAllInterfaceRecords = 0;
|
m->NumAllInterfaceRecords = 0;
|
||||||
|
@ -3632,46 +3632,6 @@ extern void D2D_stop_advertising_record(AuthRecord *ar);
|
|||||||
|
|
||||||
// ***************************************************************************
|
// ***************************************************************************
|
||||||
|
|
||||||
#ifdef __rtems__
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
// Client API fields: The client must set up name and InterfaceID *before* calling mDNS_StartResolveService()
|
|
||||||
// When the callback is invoked, ip, port, TXTlen and TXTinfo will have been filled in with the results learned from the network.
|
|
||||||
domainname name;
|
|
||||||
mDNSInterfaceID InterfaceID; // ID of the interface the response was received on
|
|
||||||
mDNSAddr ip; // Remote (destination) IP address where this service can be accessed
|
|
||||||
mDNSIPPort port; // Port where this service can be accessed
|
|
||||||
mDNSu16 TXTlen;
|
|
||||||
mDNSu8 TXTinfo[2048]; // Additional demultiplexing information (e.g. LPR queue name)
|
|
||||||
} ServiceInfo;
|
|
||||||
|
|
||||||
// Note: Within an mDNSServiceInfoQueryCallback mDNS all API calls are legal except mDNS_Init(), mDNS_Exit(), mDNS_Execute()
|
|
||||||
typedef struct ServiceInfoQuery_struct ServiceInfoQuery;
|
|
||||||
typedef void mDNSServiceInfoQueryCallback (mDNS *const m, ServiceInfoQuery *query);
|
|
||||||
struct ServiceInfoQuery_struct
|
|
||||||
{
|
|
||||||
// Internal state fields. These are used internally by mDNSCore; the client layer needn't be concerned with them.
|
|
||||||
// No fields need to be set up by the client prior to calling mDNS_StartResolveService();
|
|
||||||
// all required data is passed as parameters to that function.
|
|
||||||
// The ServiceInfoQuery structure memory is working storage for mDNSCore to discover the requested information
|
|
||||||
// and place it in the ServiceInfo structure. After the client has called mDNS_StopResolveService(), it may
|
|
||||||
// dispose of the ServiceInfoQuery structure while retaining the results in the ServiceInfo structure.
|
|
||||||
DNSQuestion qSRV;
|
|
||||||
DNSQuestion qTXT;
|
|
||||||
DNSQuestion qAv4;
|
|
||||||
DNSQuestion qAv6;
|
|
||||||
mDNSu8 GotSRV;
|
|
||||||
mDNSu8 GotTXT;
|
|
||||||
mDNSu8 GotADD;
|
|
||||||
mDNSu32 Answers;
|
|
||||||
ServiceInfo *info;
|
|
||||||
mDNSServiceInfoQueryCallback *ServiceInfoQueryCallback;
|
|
||||||
void *ServiceInfoQueryContext;
|
|
||||||
};
|
|
||||||
|
|
||||||
extern mStatus mDNS_StartResolveService(mDNS *const m, ServiceInfoQuery *query, ServiceInfo *info, mDNSServiceInfoQueryCallback *Callback, void *Context);
|
|
||||||
extern void mDNS_StopResolveService (mDNS *const m, ServiceInfoQuery *query);
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -40,10 +40,6 @@
|
|||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <time.h> // platform support for UTC time
|
#include <time.h> // platform support for UTC time
|
||||||
#ifdef __rtems__
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <rtems/libio_.h>
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
|
|
||||||
#if USES_NETLINK
|
#if USES_NETLINK
|
||||||
#include <asm/types.h>
|
#include <asm/types.h>
|
||||||
@ -80,12 +76,7 @@ struct IfChangeRec
|
|||||||
typedef struct IfChangeRec IfChangeRec;
|
typedef struct IfChangeRec IfChangeRec;
|
||||||
|
|
||||||
// Note that static data is initialized to zero in (modern) C.
|
// Note that static data is initialized to zero in (modern) C.
|
||||||
#ifndef __rtems__
|
|
||||||
static fd_set gEventFDs;
|
static fd_set gEventFDs;
|
||||||
#else /* __rtems__ */
|
|
||||||
static fd_set *gAllocatedEventFDs;
|
|
||||||
#define gEventFDs (*gAllocatedEventFDs)
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
static int gMaxFD; // largest fd in gEventFDs
|
static int gMaxFD; // largest fd in gEventFDs
|
||||||
static GenLinkedList gEventSources; // linked list of PosixEventSource's
|
static GenLinkedList gEventSources; // linked list of PosixEventSource's
|
||||||
static sigset_t gEventSignalSet; // Signals which event loop listens for
|
static sigset_t gEventSignalSet; // Signals which event loop listens for
|
||||||
@ -448,15 +439,6 @@ mDNSexport mDNSBool mDNSPlatformSetDNSConfig(mDNSBool setservers, mDNSBool setse
|
|||||||
(void) RegDomains;
|
(void) RegDomains;
|
||||||
(void) BrowseDomains;
|
(void) BrowseDomains;
|
||||||
(void) ackConfig;
|
(void) ackConfig;
|
||||||
#ifdef __rtems__
|
|
||||||
/*
|
|
||||||
* Copied from mDNSMacOSX/mDNSMacOSX.c to prevent use of uninitialized
|
|
||||||
* stack variables.
|
|
||||||
*/
|
|
||||||
if (fqdn ) fqdn->c[0] = 0;
|
|
||||||
if (RegDomains ) *RegDomains = NULL;
|
|
||||||
if (BrowseDomains) *BrowseDomains = NULL;
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
|
|
||||||
return mDNStrue;
|
return mDNStrue;
|
||||||
}
|
}
|
||||||
@ -675,7 +657,6 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
|
|||||||
#endif
|
#endif
|
||||||
if (err < 0) { err = errno; perror("setsockopt - SO_REUSExxxx"); }
|
if (err < 0) { err = errno; perror("setsockopt - SO_REUSExxxx"); }
|
||||||
|
|
||||||
#ifndef __rtems__
|
|
||||||
// Enable inbound packets on IFEF_AWDL interface.
|
// Enable inbound packets on IFEF_AWDL interface.
|
||||||
// Only done for multicast sockets, since we don't expect unicast socket operations
|
// Only done for multicast sockets, since we don't expect unicast socket operations
|
||||||
// on the IFEF_AWDL interface. Operation is a no-op for other interface types.
|
// on the IFEF_AWDL interface. Operation is a no-op for other interface types.
|
||||||
@ -683,7 +664,6 @@ mDNSlocal int SetupSocket(struct sockaddr *intfAddr, mDNSIPPort port, int interf
|
|||||||
#define SO_RECV_ANYIF 0x1104 /* unrestricted inbound processing */
|
#define SO_RECV_ANYIF 0x1104 /* unrestricted inbound processing */
|
||||||
#endif
|
#endif
|
||||||
if (setsockopt(*sktPtr, SOL_SOCKET, SO_RECV_ANYIF, &kOn, sizeof(kOn)) < 0) perror("setsockopt - SO_RECV_ANYIF");
|
if (setsockopt(*sktPtr, SOL_SOCKET, SO_RECV_ANYIF, &kOn, sizeof(kOn)) < 0) perror("setsockopt - SO_RECV_ANYIF");
|
||||||
#endif /* __rtems__ */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// We want to receive destination addresses and interface identifiers.
|
// We want to receive destination addresses and interface identifiers.
|
||||||
@ -1228,23 +1208,14 @@ mDNSlocal mDNSu32 ProcessRoutingNotification(int sd)
|
|||||||
mDNSlocal void InterfaceChangeCallback(int fd, short filter, void *context)
|
mDNSlocal void InterfaceChangeCallback(int fd, short filter, void *context)
|
||||||
{
|
{
|
||||||
IfChangeRec *pChgRec = (IfChangeRec*) context;
|
IfChangeRec *pChgRec = (IfChangeRec*) context;
|
||||||
#ifndef __rtems__
|
|
||||||
fd_set readFDs;
|
fd_set readFDs;
|
||||||
#else /* __rtems__ */
|
|
||||||
fd_set bigEnoughReadFDs[howmany(rtems_libio_number_iops, sizeof(fd_set) * 8)];
|
|
||||||
#define readFDs (*(&bigEnoughReadFDs[0]))
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
mDNSu32 changedInterfaces = 0;
|
mDNSu32 changedInterfaces = 0;
|
||||||
struct timeval zeroTimeout = { 0, 0 };
|
struct timeval zeroTimeout = { 0, 0 };
|
||||||
|
|
||||||
(void)fd; // Unused
|
(void)fd; // Unused
|
||||||
(void)filter; // Unused
|
(void)filter; // Unused
|
||||||
|
|
||||||
#ifndef __rtems__
|
|
||||||
FD_ZERO(&readFDs);
|
FD_ZERO(&readFDs);
|
||||||
#else /* __rtems__ */
|
|
||||||
memset(bigEnoughReadFDs, 0, sizeof(bigEnoughReadFDs));
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
FD_SET(pChgRec->NotifySD, &readFDs);
|
FD_SET(pChgRec->NotifySD, &readFDs);
|
||||||
|
|
||||||
do
|
do
|
||||||
@ -1301,9 +1272,6 @@ mDNSexport mStatus mDNSPlatformInit(mDNS *const m)
|
|||||||
{
|
{
|
||||||
int err = 0;
|
int err = 0;
|
||||||
struct sockaddr sa;
|
struct sockaddr sa;
|
||||||
#ifdef __rtems__
|
|
||||||
pthread_mutexattr_t attr;
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
assert(m != NULL);
|
assert(m != NULL);
|
||||||
|
|
||||||
if (mDNSPlatformInit_CanReceiveUnicast()) m->CanReceiveUnicastOn5353 = mDNStrue;
|
if (mDNSPlatformInit_CanReceiveUnicast()) m->CanReceiveUnicastOn5353 = mDNStrue;
|
||||||
@ -1321,16 +1289,6 @@ mDNSexport mStatus mDNSPlatformInit(mDNS *const m)
|
|||||||
if (m->hostlabel.c[0] == 0) MakeDomainLabelFromLiteralString(&m->hostlabel, "Computer");
|
if (m->hostlabel.c[0] == 0) MakeDomainLabelFromLiteralString(&m->hostlabel, "Computer");
|
||||||
|
|
||||||
mDNS_SetFQDN(m);
|
mDNS_SetFQDN(m);
|
||||||
#ifdef __rtems__
|
|
||||||
if (err == mStatus_NoError) {
|
|
||||||
gAllocatedEventFDs = calloc(howmany(rtems_libio_number_iops, sizeof(fd_set) * 8), sizeof(fd_set));
|
|
||||||
if (gAllocatedEventFDs == NULL) err = mStatus_NoMemoryErr;
|
|
||||||
}
|
|
||||||
if (err == mStatus_NoError) err = pthread_mutexattr_init(&attr);
|
|
||||||
if (err == mStatus_NoError) err = pthread_mutexattr_setprotocol(&attr, PTHREAD_PRIO_INHERIT);
|
|
||||||
if (err == mStatus_NoError) err = pthread_mutex_init(&m->p->mutex, &attr);
|
|
||||||
if (err == mStatus_NoError) err = pthread_mutexattr_destroy(&attr);
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
|
|
||||||
sa.sa_family = AF_INET;
|
sa.sa_family = AF_INET;
|
||||||
m->p->unicastSocket4 = -1;
|
m->p->unicastSocket4 = -1;
|
||||||
@ -1415,22 +1373,14 @@ mDNSexport mStatus mDNSPlatformPosixRefreshInterfaceList(mDNS *const m)
|
|||||||
// the platform from reentering mDNS core code.
|
// the platform from reentering mDNS core code.
|
||||||
mDNSexport void mDNSPlatformLock (const mDNS *const m)
|
mDNSexport void mDNSPlatformLock (const mDNS *const m)
|
||||||
{
|
{
|
||||||
#ifndef __rtems__
|
|
||||||
(void) m; // Unused
|
(void) m; // Unused
|
||||||
#else /* __rtems__ */
|
|
||||||
pthread_mutex_lock(&m->p->mutex);
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// mDNS core calls this routine when it release the lock taken by
|
// mDNS core calls this routine when it release the lock taken by
|
||||||
// mDNSPlatformLock and allow the platform to reenter mDNS core code.
|
// mDNSPlatformLock and allow the platform to reenter mDNS core code.
|
||||||
mDNSexport void mDNSPlatformUnlock (const mDNS *const m)
|
mDNSexport void mDNSPlatformUnlock (const mDNS *const m)
|
||||||
{
|
{
|
||||||
#ifndef __rtems__
|
|
||||||
(void) m; // Unused
|
(void) m; // Unused
|
||||||
#else /* __rtems__ */
|
|
||||||
pthread_mutex_unlock(&m->p->mutex);
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#if COMPILER_LIKES_PRAGMA_MARK
|
#if COMPILER_LIKES_PRAGMA_MARK
|
||||||
@ -1553,7 +1503,7 @@ mDNSexport void mDNSPlatformMemZero(void *dst, mDNSu32 len)
|
|||||||
memset(dst, 0, len);
|
memset(dst, 0, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
mDNSexport void * mDNSPlatformMemAllocate(mDNSu32 len) { return(calloc(1, len)); }
|
mDNSexport void * mDNSPlatformMemAllocate(mDNSu32 len) { return(malloc(len)); }
|
||||||
mDNSexport void mDNSPlatformMemFree (void *mem) { free(mem); }
|
mDNSexport void mDNSPlatformMemFree (void *mem) { free(mem); }
|
||||||
|
|
||||||
#if _PLATFORM_HAS_STRONG_PRNG_
|
#if _PLATFORM_HAS_STRONG_PRNG_
|
||||||
@ -1804,10 +1754,8 @@ mStatus mDNSPosixAddFDToEventLoop(int fd, mDNSPosixEventCallback callback, void
|
|||||||
if (gEventSources.LinkOffset == 0)
|
if (gEventSources.LinkOffset == 0)
|
||||||
InitLinkedList(&gEventSources, offsetof(PosixEventSource, Next));
|
InitLinkedList(&gEventSources, offsetof(PosixEventSource, Next));
|
||||||
|
|
||||||
#ifndef __rtems__
|
|
||||||
if (fd >= (int) FD_SETSIZE || fd < 0)
|
if (fd >= (int) FD_SETSIZE || fd < 0)
|
||||||
return mStatus_UnsupportedErr;
|
return mStatus_UnsupportedErr;
|
||||||
#endif /* __rtems__ */
|
|
||||||
if (callback == NULL)
|
if (callback == NULL)
|
||||||
return mStatus_BadParamErr;
|
return mStatus_BadParamErr;
|
||||||
|
|
||||||
@ -1887,13 +1835,7 @@ mStatus mDNSPosixIgnoreSignalInEventLoop(int signum)
|
|||||||
mStatus mDNSPosixRunEventLoopOnce(mDNS *m, const struct timeval *pTimeout,
|
mStatus mDNSPosixRunEventLoopOnce(mDNS *m, const struct timeval *pTimeout,
|
||||||
sigset_t *pSignalsReceived, mDNSBool *pDataDispatched)
|
sigset_t *pSignalsReceived, mDNSBool *pDataDispatched)
|
||||||
{
|
{
|
||||||
#ifndef __rtems__
|
|
||||||
fd_set listenFDs = gEventFDs;
|
fd_set listenFDs = gEventFDs;
|
||||||
#else /* __rtems__ */
|
|
||||||
fd_set bigEnoughListenFDs[howmany(rtems_libio_number_iops, sizeof(fd_set) * 8)];
|
|
||||||
#define listenFDs (*(&bigEnoughListenFDs[0]))
|
|
||||||
memcpy(bigEnoughListenFDs, gAllocatedEventFDs, sizeof(bigEnoughListenFDs));
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
int fdMax = 0, numReady;
|
int fdMax = 0, numReady;
|
||||||
struct timeval timeout = *pTimeout;
|
struct timeval timeout = *pTimeout;
|
||||||
|
|
||||||
|
@ -20,9 +20,6 @@
|
|||||||
|
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#ifdef __rtems__
|
|
||||||
#include <pthread.h>
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
@ -58,9 +55,6 @@ struct mDNS_PlatformSupport_struct
|
|||||||
#if HAVE_IPV6
|
#if HAVE_IPV6
|
||||||
int unicastSocket6;
|
int unicastSocket6;
|
||||||
#endif
|
#endif
|
||||||
#ifdef __rtems__
|
|
||||||
pthread_mutex_t mutex;
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define uDNS_SERVERS_FILE "/etc/resolv.conf"
|
#define uDNS_SERVERS_FILE "/etc/resolv.conf"
|
||||||
|
@ -244,7 +244,7 @@ struct ifi_info *get_ifi_info(int family, int doaliases)
|
|||||||
lastlen = 0;
|
lastlen = 0;
|
||||||
len = 100 * sizeof(struct ifreq); /* initial buffer size guess */
|
len = 100 * sizeof(struct ifreq); /* initial buffer size guess */
|
||||||
for ( ; ; ) {
|
for ( ; ; ) {
|
||||||
buf = (char*)calloc(1, len);
|
buf = (char*)malloc(len);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
goto gotError;
|
goto gotError;
|
||||||
}
|
}
|
||||||
|
@ -9,18 +9,33 @@ EndProject
|
|||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mdnsNSP", "mDNSWindows\mdnsNSP\mdnsNSP.vcxproj", "{F4F15529-F0EB-402F-8662-73C5797EE557}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mdnsNSP", "mDNSWindows\mdnsNSP\mdnsNSP.vcxproj", "{F4F15529-F0EB-402F-8662-73C5797EE557}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExplorerPlugin", "Clients\ExplorerPlugin\ExplorerPlugin.vcxproj", "{BB8AC1B5-6587-4163-BDC6-788B157705CA}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExplorerPlugin", "Clients\ExplorerPlugin\ExplorerPlugin.vcxproj", "{BB8AC1B5-6587-4163-BDC6-788B157705CA}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{1643427B-F226-4AD6-B413-97DA64D5C6B4} = {1643427B-F226-4AD6-B413-97DA64D5C6B4}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrinterSetupWizard", "Clients\PrinterSetupWizard\PrinterSetupWizard.vcxproj", "{B1D2CDA2-CC8F-45D5-A694-2EE45B0308CF}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrinterSetupWizard", "Clients\PrinterSetupWizard\PrinterSetupWizard.vcxproj", "{B1D2CDA2-CC8F-45D5-A694-2EE45B0308CF}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{967F5375-0176-43D3-ADA3-22EE25551C37} = {967F5375-0176-43D3-ADA3-22EE25551C37}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrinterSetupWizardLocRes", "Clients\PrinterSetupWizard\PrinterSetupWizardLocRes.vcxproj", "{967F5375-0176-43D3-ADA3-22EE25551C37}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrinterSetupWizardLocRes", "Clients\PrinterSetupWizard\PrinterSetupWizardLocRes.vcxproj", "{967F5375-0176-43D3-ADA3-22EE25551C37}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{CFCCB176-6CAA-472B-B0A2-90511C8E2E52} = {CFCCB176-6CAA-472B-B0A2-90511C8E2E52}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrinterSetupWizardRes", "Clients\PrinterSetupWizard\PrinterSetupWizardRes.vcxproj", "{CFCCB176-6CAA-472B-B0A2-90511C8E2E52}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PrinterSetupWizardRes", "Clients\PrinterSetupWizard\PrinterSetupWizardRes.vcxproj", "{CFCCB176-6CAA-472B-B0A2-90511C8E2E52}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExplorerPluginLocRes", "Clients\ExplorerPlugin\ExplorerPluginLocRes.vcxproj", "{1643427B-F226-4AD6-B413-97DA64D5C6B4}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExplorerPluginLocRes", "Clients\ExplorerPlugin\ExplorerPluginLocRes.vcxproj", "{1643427B-F226-4AD6-B413-97DA64D5C6B4}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{871B1492-B4A4-4B57-9237-FA798484D7D7} = {871B1492-B4A4-4B57-9237-FA798484D7D7}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExplorerPluginRes", "Clients\ExplorerPlugin\ExplorerPluginRes.vcxproj", "{871B1492-B4A4-4B57-9237-FA798484D7D7}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ExplorerPluginRes", "Clients\ExplorerPlugin\ExplorerPluginRes.vcxproj", "{871B1492-B4A4-4B57-9237-FA798484D7D7}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dns-sd", "Clients\DNS-SD.VisualStudio\dns-sd.vcxproj", "{AA230639-E115-4A44-AA5A-44A61235BA50}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "dns-sd", "Clients\DNS-SD.VisualStudio\dns-sd.vcxproj", "{AA230639-E115-4A44-AA5A-44A61235BA50}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{AB581101-18F0-46F6-B56A-83A6B1EA657E} = {AB581101-18F0-46F6-B56A-83A6B1EA657E}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Java", "mDNSWindows\Java\Java.vcxproj", "{9CE2568A-3170-41C6-9F20-A0188A9EC114}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Java", "mDNSWindows\Java\Java.vcxproj", "{9CE2568A-3170-41C6-9F20-A0188A9EC114}"
|
||||||
EndProject
|
EndProject
|
||||||
@ -37,10 +52,16 @@ EndProject
|
|||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mDNSNetMonitor", "Clients\mDNSNetMonitor.VisualStudio\mDNSNetMonitor.vcxproj", "{AF35C285-528D-46A1-8A0E-47B0733DC718}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mDNSNetMonitor", "Clients\mDNSNetMonitor.VisualStudio\mDNSNetMonitor.vcxproj", "{AF35C285-528D-46A1-8A0E-47B0733DC718}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ControlPanelLocRes", "mDNSWindows\ControlPanel\ControlPanelLocRes.vcxproj", "{4490229E-025A-478F-A2CF-51154DA83E39}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ControlPanelLocRes", "mDNSWindows\ControlPanel\ControlPanelLocRes.vcxproj", "{4490229E-025A-478F-A2CF-51154DA83E39}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{5254AA9C-3D2E-4539-86D9-5EB0F4151215} = {5254AA9C-3D2E-4539-86D9-5EB0F4151215}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ControlPanelRes", "mDNSWindows\ControlPanel\ControlPanelRes.vcxproj", "{5254AA9C-3D2E-4539-86D9-5EB0F4151215}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ControlPanelRes", "mDNSWindows\ControlPanel\ControlPanelRes.vcxproj", "{5254AA9C-3D2E-4539-86D9-5EB0F4151215}"
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ControlPanel", "mDNSWindows\ControlPanel\ControlPanel.vcxproj", "{0DF09484-B4C2-4AB4-9FC0-7B091ADEAFEB}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ControlPanel", "mDNSWindows\ControlPanel\ControlPanel.vcxproj", "{0DF09484-B4C2-4AB4-9FC0-7B091ADEAFEB}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{4490229E-025A-478F-A2CF-51154DA83E39} = {4490229E-025A-478F-A2CF-51154DA83E39}
|
||||||
|
EndProjectSection
|
||||||
EndProject
|
EndProject
|
||||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FirefoxExtension", "Clients\FirefoxExtension\FirefoxExtension.vcxproj", "{7826EA27-D4CC-4FAA-AD23-DF813823227B}"
|
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "FirefoxExtension", "Clients\FirefoxExtension\FirefoxExtension.vcxproj", "{7826EA27-D4CC-4FAA-AD23-DF813823227B}"
|
||||||
EndProject
|
EndProject
|
||||||
|
@ -25,8 +25,6 @@
|
|||||||
|
|
||||||
#include "dns_sd.h" // Defines the interface to the client layer above
|
#include "dns_sd.h" // Defines the interface to the client layer above
|
||||||
#include "mDNSEmbeddedAPI.h" // The interface we're building on top of
|
#include "mDNSEmbeddedAPI.h" // The interface we're building on top of
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
extern mDNS mDNSStorage; // We need to pass the address of this storage to the lower-layer functions
|
extern mDNS mDNSStorage; // We need to pass the address of this storage to the lower-layer functions
|
||||||
|
|
||||||
#if MDNS_BUILDINGSHAREDLIBRARY || MDNS_BUILDINGSTUBLIBRARY
|
#if MDNS_BUILDINGSHAREDLIBRARY || MDNS_BUILDINGSTUBLIBRARY
|
||||||
@ -70,14 +68,6 @@ typedef struct
|
|||||||
DNSQuestion q;
|
DNSQuestion q;
|
||||||
} mDNS_DirectOP_Browse;
|
} mDNS_DirectOP_Browse;
|
||||||
|
|
||||||
typedef struct
|
|
||||||
{
|
|
||||||
mDNS_DirectOP_Dispose *disposefn;
|
|
||||||
DNSServiceRef aQuery;
|
|
||||||
DNSServiceGetAddrInfoReply callback;
|
|
||||||
void *context;
|
|
||||||
} mDNS_DirectOP_GetAddrInfo;
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
mDNS_DirectOP_Dispose *disposefn;
|
mDNS_DirectOP_Dispose *disposefn;
|
||||||
@ -684,7 +674,7 @@ DNSServiceErrorType DNSServiceQueryRecord
|
|||||||
x->q.ExpectUnique = mDNSfalse;
|
x->q.ExpectUnique = mDNSfalse;
|
||||||
x->q.ForceMCast = (flags & kDNSServiceFlagsForceMulticast) != 0;
|
x->q.ForceMCast = (flags & kDNSServiceFlagsForceMulticast) != 0;
|
||||||
x->q.ReturnIntermed = (flags & kDNSServiceFlagsReturnIntermediates) != 0;
|
x->q.ReturnIntermed = (flags & kDNSServiceFlagsReturnIntermediates) != 0;
|
||||||
x->q.SuppressUnusable = (flags & kDNSServiceFlagsSuppressUnusable) != 0;
|
x->q.SuppressUnsable = (flags & kDNSServiceFlagsSuppressUnusable) != 0;
|
||||||
x->q.SearchListIndex = 0;
|
x->q.SearchListIndex = 0;
|
||||||
x->q.AppendSearchDomains = 0;
|
x->q.AppendSearchDomains = 0;
|
||||||
x->q.RetryWithSearchDomains = mDNSfalse;
|
x->q.RetryWithSearchDomains = mDNSfalse;
|
||||||
|
@ -60,11 +60,7 @@ mDNSlocal void LogMsgWithLevelv(mDNSLogLevel_t logLevel, const char *format, va_
|
|||||||
{
|
{
|
||||||
char buffer[512];
|
char buffer[512];
|
||||||
buffer[mDNS_vsnprintf((char *)buffer, sizeof(buffer), format, ptr)] = 0;
|
buffer[mDNS_vsnprintf((char *)buffer, sizeof(buffer), format, ptr)] = 0;
|
||||||
#ifndef __rtems__
|
|
||||||
mDNSPlatformWriteLogMsg(ProgramName, buffer, logLevel);
|
mDNSPlatformWriteLogMsg(ProgramName, buffer, logLevel);
|
||||||
#else /* __rtems__ */
|
|
||||||
mDNSPlatformWriteLogMsg(NULL, buffer, logLevel);
|
|
||||||
#endif /* __rtems__ */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#define LOG_HELPER_BODY(L) \
|
#define LOG_HELPER_BODY(L) \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user