|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081 |
- // \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[]);
-
- /// 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();
-
- /// Update the rulebase script with the credentials.
- //
- void UpdateRulebaseScriptCredentials();
-
- private:
-
- std::string LicenseID; ///< License ID string.
- std::string Authentication; ///< Authentication string.
-
- };
-
- #endif
|