Lines Matching refs:pos
484 std::string::size_type pos = fileContent.find(KEY_DEVICE); in ParseDevice() local
485 if (pos == std::string::npos) { in ParseDevice()
488 pos += strlen(KEY_DEVICE); in ParseDevice()
489 const auto &device = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseDevice()
495 std::string::size_type pos = fileContent.find(KEY_BOOTPROTO); in ParseBootProto() local
496 if (pos == std::string::npos) { in ParseBootProto()
499 pos += strlen(KEY_BOOTPROTO); in ParseBootProto()
500 const auto &bootProto = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseBootProto()
518 auto pos = fileContent.find(KEY_IPADDR); in ParseStaticConfig() local
519 if (pos != std::string::npos) { in ParseStaticConfig()
520 pos += strlen(KEY_IPADDR); in ParseStaticConfig()
521 ipAddresses = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseStaticConfig()
524 pos = fileContent.find(KEY_NETMASK); in ParseStaticConfig()
525 if (pos != std::string::npos) { in ParseStaticConfig()
526 pos += strlen(KEY_NETMASK); in ParseStaticConfig()
527 netMasks = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseStaticConfig()
530 pos = fileContent.find(KEY_GATEWAY); in ParseStaticConfig()
531 if (pos != std::string::npos) { in ParseStaticConfig()
532 pos += strlen(KEY_GATEWAY); in ParseStaticConfig()
533 gateways = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseStaticConfig()
536 pos = fileContent.find(KEY_ROUTE); in ParseStaticConfig()
537 if (pos != std::string::npos) { in ParseStaticConfig()
538 pos += strlen(KEY_ROUTE); in ParseStaticConfig()
539 routes = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseStaticConfig()
542 pos = fileContent.find(KEY_ROUTE_NETMASK); in ParseStaticConfig()
543 if (pos != std::string::npos) { in ParseStaticConfig()
544 pos += strlen(KEY_ROUTE_NETMASK); in ParseStaticConfig()
545 routeMasks = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseStaticConfig()
548 pos = fileContent.find(KEY_DNS); in ParseStaticConfig()
549 if (pos != std::string::npos) { in ParseStaticConfig()
550 pos += strlen(KEY_DNS); in ParseStaticConfig()
551 dnsServers = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParseStaticConfig()
564 std::string::size_type pos = fileContent.find(KEY_PROXY_HOST); in ParserFileHttpProxy() local
565 if (pos != std::string::npos) { in ParserFileHttpProxy()
566 pos += strlen(KEY_PROXY_HOST); in ParserFileHttpProxy()
567 cfg->httpProxy_.SetHost(fileContent.substr(pos, fileContent.find(WRAP, pos) - pos)); in ParserFileHttpProxy()
570 pos = fileContent.find(KEY_PROXY_PORT); in ParserFileHttpProxy()
571 if (pos != std::string::npos) { in ParserFileHttpProxy()
572 pos += strlen(KEY_PROXY_PORT); in ParserFileHttpProxy()
573 …uint32_t port = CommonUtils::StrToUint(fileContent.substr(pos, fileContent.find(WRAP, pos) - pos)); in ParserFileHttpProxy()
577 pos = fileContent.find(KEY_PROXY_EXCLUSIONS); in ParserFileHttpProxy()
578 if (pos != std::string::npos) { in ParserFileHttpProxy()
579 pos += strlen(KEY_PROXY_EXCLUSIONS); in ParserFileHttpProxy()
580 auto exclusions = fileContent.substr(pos, fileContent.find(WRAP, pos) - pos); in ParserFileHttpProxy()