1/* 2 File: IrDAStats.h 3 4 Contains: Status and statistics of interest to outside clients 5 6*/ 7#ifndef __IrDAStats__ 8#define __IrDAStats__ 9 10#include <libkern/OSTypes.h> 11 12enum { // lap connection state 13 kIrDAStatusIdle, // idle 14 kIrDAStatusDiscoverActive, // looking for peer 15 kIrDAStatusConnected, // connected 16 kIrDAStatusBrokenConnection, // still connected, but beam blocked 17 kIrDAStatusInvalid, // Invalid Status (Use by UI) 18 kIrDAStatusOff // We have been powered down 19}; 20 21typedef struct 22{ 23 UInt8 connectionState; // see enum 24 UInt32 connectionSpeed; // in bps 25 UInt8 nickName[22]; // Nickname of peer (from discovery). valid if connected 26 27 UInt32 dataPacketsIn; // total packets read 28 UInt32 dataPacketsOut; // total packets written 29 UInt32 crcErrors; // packets read with CRC errors (if available) 30 UInt32 ioErrors; // packets read with other errors (if available) 31 32 UInt32 recTimeout; // number of recv timeouts 33 UInt32 xmitTimeout; // number of transmit timeouts (if implemented) 34 35 UInt32 iFrameRec; // Info frames received (data carrying packets) 36 UInt32 iFrameSent; // Info frames sent (data carrying packets) 37 38 UInt32 uFrameRec; // U frames received 39 UInt32 uFrameSent; // U frames sent 40 41 UInt32 dropped; // input packet dropped for (one of several) reasons 42 UInt32 resent; // count of our packets that we have resent 43 44 UInt32 rrRec; // count of RR packets read 45 UInt32 rrSent; // count of RR packets written 46 47 UInt16 rnrRec; // count of receiver-not-ready packets read 48 UInt16 rnrSent; // count of receiver-not-ready packets sent 49 50 UInt8 rejRec; // number of reject packets received 51 UInt8 rejSent; // number of reject packets sent 52 53 UInt8 srejRec; // ? 54 UInt8 srejSent; 55 56 UInt32 protcolErrs; // ? 57} IrDAStatus; 58 59 60#endif // __IrDAStats__