Imported Upstream version 878.70.2
[platform/upstream/mdnsresponder.git] / mDNSMacOSX / BonjourTop / source / BonjourTop.h
1 //
2 //  BonjourTop.h
3 //  TestTB
4 //
5 //  Created by Terrin Eager on 9/26/12.
6 //
7 //
8
9 #ifndef __TestTB__BonjourTop__
10 #define __TestTB__BonjourTop__
11
12 #include <iostream>
13 #include <stdio.h>
14 #include <map>
15 #include <utility>
16
17 #include "bjtypes.h"
18 #include "bjsocket.h"
19 #include "LLRBTree.h"
20 #include "DNSFrame.h"
21 #include "bjStringtoStringMap.h"
22 #include "bjstring.h"
23
24 #include "CollectBy.h"
25
26 using namespace std;
27
28 typedef struct device_count {
29     BJ_UINT64 iOS = 0;
30     BJ_UINT64 OSX = 0;
31     BJ_UINT64 unknownOS = 0;
32     BJ_UINT64 OSXWithEDNSField = 0;
33     BJ_UINT64 iOSWithEDNSField = 0;
34 } device_count;
35
36 class CSocketStats
37 {
38 public:
39     CSocketStats();
40     void Init();
41     void Clear();
42     BJ_UINT64 m_nFrameCount;
43
44     BJ_UINT64 m_nQuestionOnlyFrames;
45     BJ_UINT64 m_nAnswerOnlyFrames;
46     BJ_UINT64 m_nQandAFrames;
47
48     BJ_INT32 m_SampleDay;
49
50 };
51
52 class FrameCount
53 {
54 public:
55     FrameCount() { count = 0;lastFrameNumber = -1;};
56     void Increment(BJ_UINT64 frameNumber)
57     {
58         if (frameNumber != lastFrameNumber)
59             count++;
60         lastFrameNumber = frameNumber;
61
62     };
63     BJ_UINT64 GetValue() const {return count;};
64     void Reset() { count = 0;lastFrameNumber = -1;};
65     FrameCount &operator+=(const FrameCount &src) { count += src.count; return *this;};
66
67 private:
68     BJ_UINT64       count;
69     BJ_UINT64       lastFrameNumber;
70 };
71
72 ////////////////
73 class CDeviceMap;
74 class CDeviceNode;
75
76 class CIPDeviceNode : public CRBNode<BJIPAddr>
77 {
78 public:
79     CIPDeviceNode(BJIPAddr* pSrc) {m_Key = *pSrc; /* temp deviceOS = '?';lastQUFrame = 0;*/pDeviceNode=NULL;};
80     CIPDeviceNode(){ /*deviceOS = '?';lastQUFrame = 0; */pDeviceNode=NULL;};
81     ~CIPDeviceNode(){};
82     inline virtual BJ_COMPARE Compare(BJIPAddr* pKey) {return m_Key.Compare(pKey);};
83     inline virtual void CopyNode(CRBNode* pSrc)
84     {
85         m_Key.Set(((BJIPAddr*)pSrc)->Getin6_addr());
86         pDeviceNode = ((CIPDeviceNode*)pSrc)->pDeviceNode;
87     };
88     void Init() {};
89     void Clear() {};
90
91
92     CDeviceNode* pDeviceNode;
93
94 };
95
96 class CIPAddrMap: public CLLRBTree<BJIPAddr,CIPDeviceNode>
97 {
98 public:
99     void GetDeviceOSTypes(CIPDeviceNode* node, CIPAddrMap* pGobalMap, BJ_UINT64& iOS,BJ_UINT64& OSX,BJ_UINT64& unknowOS);
100 };
101
102 ////////////////////
103 class CDeviceNode : public CRBNode<BJString>
104 {
105 public:
106     CDeviceNode(BJString* pSrc) {m_Key = *pSrc; deviceOS = '?'; bOSXWithEDNSField = false; biOSWithEDNSField = false; bDuplicate = false; bIPName = false; bHasFrames = false; nCreateCount++;};
107     CDeviceNode(){deviceOS = '?'; bDuplicate = false; bIPName = false;  bHasFrames = false; nCreateCount++;};
108     ~CDeviceNode(){nCreateCount--;};
109     inline virtual BJ_COMPARE Compare(BJString* pKey) {return m_Key.Compare(*pKey);};
110     inline virtual void CopyNode(CRBNode* pSource)
111     {
112         m_Key = pSource->m_Key;
113         deviceOS = dynamic_cast<CDeviceNode*>(pSource)->deviceOS;
114         model = dynamic_cast<CDeviceNode*>(pSource)->model;
115         settingService = dynamic_cast<CDeviceNode*>(pSource)->settingService;
116         macAddress = dynamic_cast<CDeviceNode*>(pSource)->macAddress;
117         ipAddressv4 = dynamic_cast<CDeviceNode*>(pSource)->ipAddressv4;
118         ipAddressv6 = dynamic_cast<CDeviceNode*>(pSource)->ipAddressv6;
119         bOSXWithEDNSField = dynamic_cast<CDeviceNode*>(pSource)->bOSXWithEDNSField;
120         biOSWithEDNSField = dynamic_cast<CDeviceNode*>(pSource)->biOSWithEDNSField;
121         bHasFrames = dynamic_cast<CDeviceNode*>(pSource)->bHasFrames;
122     };
123     inline virtual void MergeData(CDeviceNode* src)
124     {
125         deviceOS = src->deviceOS;
126         model = src->model;
127         settingService = src->settingService;
128         macAddress = src->macAddress;
129         bOSXWithEDNSField = src->bOSXWithEDNSField;
130         biOSWithEDNSField = src->biOSWithEDNSField;
131
132         frameTotal += src->frameTotal;
133         questionFrame += src->questionFrame;
134         QUFrame += src->QUFrame;
135         answerFrame += src->answerFrame;
136         bHasFrames |=  src->bHasFrames;
137     };
138     void ClearData()
139     {
140         frameTotal.Reset();
141         questionFrame.Reset();
142         QUFrame.Reset();
143         answerFrame.Reset();
144         bHasFrames = false;
145     }
146     void Init() {deviceOS = '?';};
147
148     void Clear() {};
149     char GetDeviceOS() {return deviceOS;};
150     void SetDeviceOS(char t,const char* pSettingService)
151     {
152         BJString EDNS0 = "EDNS0 Trace";
153         if (pSettingService == NULL)
154             printf("SetDeviceOS: pSettingService is NULL\n");
155
156         if (settingService != EDNS0 || EDNS0 == pSettingService)
157         {
158             settingService = pSettingService;;
159             deviceOS = t;
160         }
161    //     if ( t != deviceOS && deviceOS != '?' && (deviceOS != 'b' ))
162     //         printf("SetDeviceOS: %s deviceOS not equal %c by %s != %c by %s\n", m_Key.GetBuffer(),deviceOS,settingService.GetBuffer(),t,pSettingService);
163     };
164     void SetModel(char* pModel) {model = pModel;};
165     void Export(FILE* file)
166     {
167         //  fprintf(hFile,"Name,IPAddress,MACAddress,OSType,Model,Method\n");
168         if (m_rbRight)
169             dynamic_cast<CDeviceNode*>(m_rbRight)->Export(file);
170
171         if (!bDuplicate || frameTotal.GetValue() > 0)
172         {
173             fprintf(file,"\"%s\",\"%s\",\"%s\",\"%s\",%c,\"%s\",\"%s\",%llu,%llu,%llu,%llu\n",
174                 m_Key.GetBuffer(),
175                 ipAddressv4.GetString(),
176                 ipAddressv6.GetString(),
177                 macAddress.GetString(),
178                 deviceOS,
179                 model.GetBuffer()?model.GetBuffer():" ",
180                 (bDuplicate)?"dup":settingService.GetBuffer()?settingService.GetBuffer():" ",
181                 frameTotal.GetValue(),
182                 questionFrame.GetValue(),
183                 QUFrame.GetValue(),
184                 answerFrame.GetValue());
185         }
186
187         if (m_rbLeft)
188             dynamic_cast<CDeviceNode*>(m_rbLeft)->Export(file);
189     };
190
191     BJMACAddr macAddress;
192     BJIPAddr ipAddressv4;
193     BJIPAddr ipAddressv6;
194     BJString model;
195     BJString settingService;
196     bool     biOSWithEDNSField;
197     bool     bOSXWithEDNSField;
198     bool     bDuplicate;
199     bool     bIPName;
200     bool     bHasFrames;
201
202     FrameCount frameTotal;
203     FrameCount questionFrame;
204     FrameCount QUFrame;
205     FrameCount answerFrame;
206     static int nCreateCount;
207
208 private:
209     char deviceOS;
210 };
211
212 class CDeviceMap: public CLLRBTree<BJString,CDeviceNode>
213 {
214 public:
215     void GetDeviceOSTypes(CDeviceNode *node, CDeviceMap *pGobalMap, device_count& dev_cnt);
216 };
217
218 //////////////
219 class CMACAddrNode: public CRBNode<BJMACAddr>
220 {
221 public:
222     CMACAddrNode(BJMACAddr* pSrc) {m_Key.Set(pSrc->Get()); deviceOS = '?'; };
223     CMACAddrNode(){deviceOS = '?';};
224     ~CMACAddrNode(){};
225     inline virtual BJ_COMPARE Compare(BJMACAddr* pKey) {return m_Key.Compare(pKey);};
226     inline virtual void CopyNode(CRBNode* pSource)
227     {
228         m_Key.Set( pSource->m_Key.Get());
229         deviceOS = dynamic_cast<CMACAddrNode*>(pSource)->deviceOS;
230         model = dynamic_cast<CMACAddrNode*>(pSource)->model;
231         method = dynamic_cast<CMACAddrNode*>(pSource)->method;
232     };
233     void Export(FILE* file)
234     {
235         if (m_rbRight)
236             dynamic_cast<CMACAddrNode*>(m_rbRight)->Export(file);
237
238
239         fprintf(file,"\"%s\",%c,\"%s\",\"%s\"\n",
240                 m_Key.GetString(),
241                 deviceOS,
242                 model.GetBuffer()?model.GetBuffer():" ",
243                 method.GetBuffer()?method.GetBuffer():" ");
244
245
246         if (m_rbLeft)
247             dynamic_cast<CMACAddrNode*>(m_rbLeft)->Export(file);
248     };
249
250     void Init() {deviceOS = '?';};
251     void Clear(){};
252     char deviceOS;
253     BJString model;
254     BJString method;
255
256 };
257
258 class CMACAddrTree: public CLLRBTree<BJMACAddr,CMACAddrNode>
259 {
260 public:
261
262 };
263 class CMACAddrDeviceNode: public CRBNode<BJMACAddr>
264 {
265 public:
266     CMACAddrDeviceNode(BJMACAddr* pSrc) {m_Key.Set(pSrc->Get()); device = NULL; };
267     CMACAddrDeviceNode(){device = NULL;};
268     ~CMACAddrDeviceNode(){};
269     inline virtual BJ_COMPARE Compare(BJMACAddr* pKey) {return m_Key.Compare(pKey);};
270     inline virtual void CopyNode(CRBNode* pSource)
271     {
272         m_Key.Set( pSource->m_Key.Get());
273         device = dynamic_cast<CMACAddrDeviceNode*>(pSource)->device;
274     };
275     void Init() {device = NULL;};
276     void Clear(){};
277     CDeviceNode *device;
278
279 };
280
281 class CMACDeviceMap: public CLLRBTree<BJMACAddr,CMACAddrDeviceNode>
282 {
283
284 };
285
286 /////////////
287
288 class CStringNode : public CRBNode<BJ_UINT64>
289 {
290 public:
291     CStringNode(){Init();};
292     CStringNode ( BJ_UINT64* Key) { Init(); m_Key = *Key;};
293     inline virtual BJ_COMPARE Compare(BJ_UINT64* pKey)
294         {
295
296                 if (m_Key < *pKey)
297                         return (BJ_GT);
298                 else if (m_Key > *pKey)
299                         return (BJ_LT);
300                 else
301                         return (BJ_EQUAL);
302         }
303     inline virtual void CopyNode(CRBNode* pSource)
304         {
305                 CStringNode* pSrc = (CStringNode*) pSource;
306
307                 //  m_Key = pSrc->m_Key;
308                 m_nBytes = pSrc->m_nBytes;
309                 m_nFrames = pSrc->m_nFrames;
310                 m_nFramesiOS = pSrc->m_nFramesiOS;
311                 m_nFramesOSX = pSrc->m_nFramesOSX;
312                 m_nQuestionFrames = pSrc->m_nQuestionFrames;
313                 m_nQuestionFramesiOS = pSrc->m_nQuestionFramesiOS;
314                 m_nQuestionFramesOSX = pSrc->m_nQuestionFramesOSX;
315                 m_nAnswerFrames = pSrc->m_nAnswerFrames;
316                 m_nAnswerFramesiOS = pSrc->m_nAnswerFramesiOS;
317                 m_nAnswerFramesOSX = pSrc->m_nAnswerFramesOSX;
318                 strcpy(m_Value,pSrc->m_Value);
319                 m_nDeviceAskingCount = pSrc->m_nDeviceAskingCount;
320                 m_nDeviceAskingiOSCount = pSrc->m_nDeviceAskingiOSCount;
321                 m_nDeviceAskingOSXCount = pSrc->m_nDeviceAskingOSXCount;
322                 m_nDeviceAnsweringCount = pSrc->m_nDeviceAnsweringCount;
323                 m_nDeviceAnsweringiOSCount = pSrc->m_nDeviceAnsweringiOSCount;
324                 m_nDeviceAnsweringOSXCount = pSrc->m_nDeviceAnsweringOSXCount;
325                 m_nDeviceTotalCount = pSrc->m_nDeviceTotalCount;
326                 m_nDeviceTotaliOSCount = pSrc->m_nDeviceTotaliOSCount;
327                 m_nDeviceTotalOSXCount = pSrc->m_nDeviceTotalOSXCount;
328                 m_nWakeFrames = pSrc->m_nWakeFrames;
329                 m_nLastWakeFrameIndex =  pSrc->m_nLastWakeFrameIndex;
330                 m_nGoodbyeFrames = pSrc->m_nGoodbyeFrames;
331         }
332
333     inline void Init() {
334         m_nBytes = 0;
335         m_nFrames = m_nFramesiOS = m_nFramesOSX = m_nQuestionFrames = m_nQuestionFramesiOS = m_nQuestionFramesOSX = m_nAnswerFrames = m_nAnswerFramesiOS = m_nAnswerFramesOSX = 0;
336         m_nLastFrameIndex = 0;
337         m_nLastQueryFrameIndex = 0;
338         m_nLastRespondsFrameIndex = 0;
339         m_nDeviceAskingCount = m_nDeviceAskingiOSCount = m_nDeviceAskingOSXCount = 0;
340         m_nDeviceAnsweringCount = m_nDeviceAnsweringiOSCount = m_nDeviceAnsweringOSXCount = 0;
341         m_nDeviceTotalCount = m_nDeviceTotaliOSCount = m_nDeviceTotalOSXCount = 0;
342         m_nWakeFrames = 0;
343         m_nGoodbyeFrames = 0;
344         m_lastQUFrameTime = 0;
345     };
346     inline void Clear() {};
347
348     void UpdateOSTypeCounts(CDeviceMap* pGobalMap,CIPAddrMap *pIp2NameMap);
349
350     void Print(bool bCursers,bool bDescendingSort,BJ_UINT32 &nIndex,BJ_UINT32 nStartIndex,BJ_UINT32 nEndIndex);
351     void Export(FILE* hFile);
352
353     //  BJ_UINT64        m_Key;
354     char            m_Value[255];
355     BJ_UINT64       m_nBytes;
356     BJ_UINT64       m_nFrames;
357     BJ_UINT64       m_nFramesiOS;
358     BJ_UINT64       m_nFramesOSX;
359     BJ_UINT64       m_nQuestionFrames;
360     BJ_UINT64       m_nQuestionFramesiOS;
361     BJ_UINT64       m_nQuestionFramesOSX;
362     BJ_UINT64       m_nAnswerFrames;
363     BJ_UINT64       m_nAnswerFramesiOS;
364     BJ_UINT64       m_nAnswerFramesOSX;
365     BJ_UINT64       m_nLastFrameIndex;
366     BJ_UINT64       m_nLastQueryFrameIndex;
367     BJ_UINT64       m_nLastRespondsFrameIndex;
368     BJ_UINT64       m_nLastWakeFrameIndex;
369     CIPAddrMap      m_DeviceAskingTree;
370     BJ_UINT64       m_nDeviceAskingCount;
371     BJ_UINT64       m_nDeviceAskingiOSCount;
372     BJ_UINT64       m_nDeviceAskingOSXCount;
373     CIPAddrMap      m_DeviceAnsweringTree;
374     BJ_UINT64       m_nDeviceAnsweringCount;
375     BJ_UINT64       m_nDeviceAnsweringiOSCount;
376     BJ_UINT64       m_nDeviceAnsweringOSXCount;
377     CIPAddrMap      m_DeviceTotalTree;
378     BJ_UINT64       m_nDeviceTotalCount;
379     BJ_UINT64       m_nDeviceTotaliOSCount;
380     BJ_UINT64       m_nDeviceTotalOSXCount;
381     BJ_UINT64       m_nWakeFrames;
382     BJ_UINT64       m_lastQUFrameTime;
383     BJ_UINT64       m_nGoodbyeFrames;
384 };
385
386 class CStringTree: public CLLRBTree<BJ_UINT64,CStringNode>
387 {
388 public:
389
390 };
391
392 ///////////
393
394 class CStringShortNode: public CRBNode<BJ_UINT64>
395 {
396 public:
397     CStringShortNode(BJ_UINT64* key) {Init(); m_Key = *key;};
398         inline virtual BJ_COMPARE Compare(BJ_UINT64* pKey)
399         {
400
401                 if (m_Key < *pKey)
402                         return (BJ_GT);
403                 else if (m_Key > *pKey)
404                         return (BJ_LT);
405                 else
406                         return (BJ_EQUAL);
407         }
408
409     inline virtual void CopyNode(CRBNode* pSource)
410         {
411                 CStringShortNode* pSrc = (CStringShortNode*) pSource;
412
413                 //  m_Key = pSrc->m_Key;
414                 m_nBytes = pSrc->m_nBytes;
415                 m_nFrames = pSrc->m_nFrames;
416                 m_nQuestionFrames = pSrc->m_nQuestionFrames;
417                 m_nAnswerFrames = pSrc->m_nAnswerFrames;
418                 strcpy(m_Value,pSrc->m_Value);
419                 m_nDeviceAskingCount = pSrc->m_nDeviceAskingCount;
420                 m_nDeviceAnsweringCount = pSrc->m_nDeviceAnsweringCount;
421                 m_nDeviceTotalCount = pSrc->m_nDeviceTotalCount;
422                 m_nWakeFrames = pSrc->m_nWakeFrames;
423                 m_nLastWakeFrameIndex =  pSrc->m_nLastWakeFrameIndex;
424                 m_nGoodbyeFrames = pSrc->m_nGoodbyeFrames;
425         }
426
427     inline void Init() {
428         m_nBytes = 0;
429         m_nFrames = m_nQuestionFrames = m_nAnswerFrames = 0;
430         m_nLastFrameIndex = m_nLastQueryFrameIndex = m_nLastRespondsFrameIndex = m_nLastWakeFrameIndex = 0;
431         m_nDeviceAskingCount = m_nDeviceAnsweringCount = m_nDeviceTotalCount = 0;
432         m_nWakeFrames = m_lastQUFrameTime = m_nGoodbyeFrames = 0;
433     };
434     inline void Clear(){};
435
436     void Export(FILE* hFile);
437
438     //  BJ_UINT64        m_Key;
439     char            m_Value[255];
440     BJ_UINT64       m_nBytes;
441     BJ_UINT64       m_nFrames;
442     BJ_UINT64       m_nQuestionFrames;
443     BJ_UINT64       m_nAnswerFrames;
444     BJ_UINT64       m_nLastFrameIndex;
445     BJ_UINT64       m_nLastQueryFrameIndex;
446     BJ_UINT64       m_nLastRespondsFrameIndex;
447     BJ_UINT64       m_nLastWakeFrameIndex;
448     CIPAddrMap      m_DeviceAskingTree;
449     BJ_UINT64       m_nDeviceAskingCount;
450     CIPAddrMap      m_DeviceAnsweringTree;
451     BJ_UINT64       m_nDeviceAnsweringCount;
452     CIPAddrMap      m_DeviceTotalTree;
453     BJ_UINT64       m_nDeviceTotalCount;
454     BJ_UINT64       m_nWakeFrames;
455     BJ_UINT64       m_lastQUFrameTime;
456     BJ_UINT64       m_nGoodbyeFrames;
457 };
458
459 class CStringShortTree: public CLLRBTree<BJ_UINT64, CStringShortNode>
460 {
461 public:
462 };
463
464 ///////////
465
466
467 class CBonjourTop
468 {
469 public:
470     CBonjourTop();
471
472     void SetIPAddr(const char*);
473     void LiveCapture();
474     void CaptureFile();
475
476     void PrintResults(int nSortCol, bool bSortAsc);
477     void UpdateOSCounts();
478     void PrintDetailResults(int nSortCol, bool bSortAsc);
479     void ExportResults();
480     void Reset();
481
482     void WriteDeviceFile();
483     void WriteVendorFile();
484
485     void ProcessFrame(BJ_UINT8* pBuffer,BJ_INT32 nLength, BJ_UINT64 frameTime);
486     bool Name2OSType(BJString name,CDeviceNode* device);
487
488     void UpdateRecord(CStringTree &Cache,CDNSRecord* pDNSRecord,BJString& RecordName,BJString& ServiceName,BJ_UINT32 nBytes,bool bGoodbye);
489
490     void UpdateShortRecordHelper(BJ_UINT32 cacheType, BJ_UINT32 tracePlatform, BJ_UINT32 traceVersion, char deviceOS, CDNSRecord* pDNSRecord,BJString& RecordName,BJString& ServiceName,BJ_UINT32 nBytes,bool bGoodbye);
491
492     void UpdateShortRecord(CStringShortTree* Cache,CDNSRecord* pDNSRecord,BJString& RecordName,BJString& ServiceName,BJ_UINT32 nBytes,bool bGoodbye);
493
494     void GetOSTypeFromQuery(CDNSRecord *pDNSRecord,BJString& ServiceName);
495     void GetOSTypeFromRegistration(CDNSRecord *pDNSRecord,BJString& ServiceName);
496
497     CStringNode* GetCurrentDisplayRoot(BJString &sTitle);
498     void ExportPtrCache(FILE* hFile, BJString sTitle, CStringNode* pRoot);
499     void ExportShortCache(FILE* hFile, BJString sTitle, map<BJString, CStringShortTree*>* myMap);
500     void ExportShortCacheHelper(FILE* hFile, BJString sTitle, CStringShortNode* pRoot);
501
502     void WindowSizeChanged();
503
504     bool m_bCursers;
505     const char* m_pTcpDumpFileName;
506     const char* m_pExportFileName;
507     bool window_size_changed;
508     bool m_bImportExportDeviceMap;
509     BJString m_DeviceFileName;
510
511     CDNSFrame m_Frame;
512
513 #define NUM_SOCKET_STATUS   6
514 #define HOURS_IN_DAY        24
515 #define MINUTES_IN_HOUR     60
516
517     CSocketStats m_SocketStatus[NUM_SOCKET_STATUS];
518
519     CSocketStats m_MinSnapshot[HOURS_IN_DAY][MINUTES_IN_HOUR];
520
521     BJ_UINT64 m_nFrameCount;
522     BJ_UINT64 m_nTotalBytes;
523     long m_StartTime;
524     long m_EndTime;
525     BJ_UINT64 m_MinAnswerCountForTruncatedFrames;
526     BJ_UINT64 m_AvgAnswerCountForTruncatedFrames;
527     BJ_UINT64 m_MaxAnswerCountForTruncatedFrames;
528
529     BJIPAddr m_IPv4Addr;
530
531     BJStringtoStringMap m_Service2AppMap;
532
533     BJStringtoStringMap m_Service2osRegisterMap;
534     BJStringtoStringMap m_Service2osBrowseMap;
535
536     enum BJ_DISPLAY_MODE_ENUM {
537         BJ_DISPLAY_APP,
538         BJ_DISPLAY_APPv6,
539         BJ_DISPLAY_SERVICE,
540         BJ_DISPLAY_SERVICEv6,
541         BJ_DISPLAY_24_MIN
542     } m_CurrentDisplay ;
543
544     BJ_INT32 m_SnapshotSeconds;
545
546     CStringTree m_ServicePtrCache;
547     CStringTree m_ApplPtrCache;
548
549     CStringTree m_ServicePtrCacheIPv6;
550     CStringTree m_ApplPtrCacheIPv6;
551
552     map<BJString, CStringShortTree*> m_ServiceBreakdownIPv4OSX;
553     map<BJString, CStringShortTree*> m_ServiceBreakdownIPv4iOS;
554     map<BJString, CStringShortTree*> m_ServiceBreakdownIPv6OSX;
555     map<BJString, CStringShortTree*> m_ServiceBreakdownIPv6iOS;
556
557     map<BJString, CStringShortTree*> m_AppBreakdownIPv4OSX;
558     map<BJString, CStringShortTree*> m_AppBreakdownIPv4iOS;
559     map<BJString, CStringShortTree*> m_AppBreakdownIPv6OSX;
560     map<BJString, CStringShortTree*> m_AppBreakdownIPv6iOS;
561
562     CDeviceMap m_DeviceMap;
563
564     CMACAddrTree m_MacMap;
565     CIPAddrMap  m_IPtoNameMap;
566     CMACDeviceMap m_MACtoDevice;
567     BJStringtoStringMap SVRtoDeviceName;
568
569     Collection m_Collection;
570
571     BJString interfaceName;
572     BJString filterApplicationName;
573
574
575 };
576
577 #endif /* defined(__TestTB__BonjourTop__) */