1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- // \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 <string>
-
- #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
|