summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--main.cpp24
1 files changed, 24 insertions, 0 deletions
diff --git a/main.cpp b/main.cpp
index ffd4535..bb8bc49 100644
--- a/main.cpp
+++ b/main.cpp
@@ -173,6 +173,9 @@ static struct option long_options[] = {
{ "ctx-id", required_argument, 0, 'C' },
{ "apn", required_argument, 0, 'a' },
{ "ipMode", required_argument, 0, 'i' },
+ { "authType", required_argument, 0, 'T' },
+ { "username", required_argument, 0, 'u' },
+ { "password", required_argument, 0, 'W' },
{ 0, 0, 0, 0 }
};
@@ -693,6 +696,24 @@ void parseOptions(int argc, char** argv)
g_jPdpConfig[MTS::IO::ICellularRadio::KEY_PDP_CONTEXT_IPMODE] = optarg;
}
break;
+
+ case 'T':
+ if(optarg != 0) {
+ g_jPdpConfig[MTS::IO::ICellularRadio::KEY_PDP_CONTEXT_AUTH_TYPE] = optarg;
+ }
+ break;
+
+ case 'u':
+ if(optarg != 0) {
+ g_jPdpConfig[MTS::IO::ICellularRadio::KEY_PDP_CONTEXT_AUTH_USERNAME] = optarg;
+ }
+ break;
+
+ case 'W':
+ if(optarg != 0) {
+ g_jPdpConfig[MTS::IO::ICellularRadio::KEY_PDP_CONTEXT_AUTH_PASSWORD] = optarg;
+ }
+ break;
default:
printf("OPTION: [%d] ABORTING!!\n", c);
@@ -752,6 +773,9 @@ void printHelp(const std::string& sApp) {
printf("\t --ctx-id <ID> : specify a Context ID for the set-pdp-conf-static command\n");
printf("\t --apn <APN> : specify an APN for the set-pdp-conf-static command\n");
printf("\t --ipMode <MODE> : specify an IP Mode for the set-pdp-conf-static command\n");
+ printf("\t --authType <TYPE> : specify an authentication type for the set-pdp-conf-static: NONE, PAP, CHAP, PAP-CHAP\n");
+ printf("\t --username <USERNAME> : specify an authentication username for the set-pdp-conf-static\n");
+ printf("\t --password <PASSWORD> : specify an authentication password for the set-pdp-conf-static\n");
// Undocumented: use for debugging and testing purposes
// printf("\t--delta-fwu-upload <FILE_PATH> : upload a delta radio FWU file to the radio\n");
// printf("\t--delta-fwu-apply : apply the delta radio FWU image that was already uploaded to the radio\n");