// \file SNFIdentityConfig.hpp // // Copyright (C) 2011 ARM Research Labs, LLC. // See www.armresearch.com for the copyright terms. // // This file defines the SNFIdentityConfig interface. // // $Id$ // /////////////////////////////////////////////////////////////////////////////////////////////////// #ifndef SNFIdentityConfighpp_included #define SNFIdentityConfighpp_included #include #include "UtilityConfig.hpp" /// Class to manage the sniffer credentials. // // This class creates the sniffer identity.xml file, and updates the // getRulebase script with the specified sniffer credentials. // ////////////////////////////////////////////////////////////////////////////////////////////////////////// class SNFIdentityConfig : public UtilityConfig { public: /// Structure to hold the command-line parameters. struct CommandLineInput { std::string ConfigFile; ///< Configuration file name. std::string LicenseID; ///< License ID credentials. std::string Authentication; ///< Authentication credentials. }; /// Display usage. // // \param[in] Version is the SNFIdentity version. // // \param[in] DefaultConfigFile is the list of default locations of the // configuration file. // // \param[in] NumDefaultConfigFiles is the number of default configuration files. // void DisplayHelp(std::string Version, const std::string DefaultConfigFile[], int NumDefaultConfigFiles); /// Get the command-line input parameters for SNFIdentity. // // \param[in] argc is the number of parameters. // // \param[in] argv is the parameters. // // \returns true if all the required command line parameters are // present and there are no unknown command-line parameters, false // otherwise. // bool GetCommandLineInput(int argc, char* argv[]); #if 0 /// Update the rulebase script with the credentials. // void UpdateRulebaseScriptCredentials(); /// Download the rulebase. // void DownloadRulebase(); /// Create the identity file. // // The file is created, the owner/group is changed by SetOwnerGroup(), // and the permissions are changed to readonly for the owner. // // \see SetOwnerGroup(). // void CreateIdentityFile(); private: /// Return the rulebase file name. // // \returns the name of the rulebase file, including the path. // std::string GetRulebaseFileName(); std::string LicenseID; ///< License ID string. std::string Authentication; ///< Authentication string. static const std::string RulebaseDownloadCommand; ///< Command to download the rulebase. #endif }; #endif