diff options
author | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-06-18 14:22:10 +0200 |
---|---|---|
committer | Sebastian Huber <sebastian.huber@embedded-brains.de> | 2020-06-23 18:13:59 +0200 |
commit | 7d194e5f55b4aad6abbd096c30d2dd22531c73cf (patch) | |
tree | 693ef2133a930eea6cfa4fb7268e9de36cfb63ce /mDNSResponder/mDNSCore/mDNSEmbeddedAPI.h | |
parent | mDNSResponder: Update to v878.270.2 (diff) | |
download | rtems-libbsd-7d194e5f55b4aad6abbd096c30d2dd22531c73cf.tar.bz2 |
mDNSResponder: Port to RTEMS
Update #4010.
Diffstat (limited to 'mDNSResponder/mDNSCore/mDNSEmbeddedAPI.h')
-rwxr-xr-x | mDNSResponder/mDNSCore/mDNSEmbeddedAPI.h | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/mDNSResponder/mDNSCore/mDNSEmbeddedAPI.h b/mDNSResponder/mDNSCore/mDNSEmbeddedAPI.h index d714de49..ba5dfb3f 100755 --- a/mDNSResponder/mDNSCore/mDNSEmbeddedAPI.h +++ b/mDNSResponder/mDNSCore/mDNSEmbeddedAPI.h @@ -3665,6 +3665,46 @@ 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 } #endif |