Also used recently added #define flag to disable or enable the protocol search code, based on the SDK version. Ideally this will allow the same code to compile for the legacy SDK or the latest SDK.