当前位置: 首页 > news >正文

仙游有人做网站怎么推广自己的产品

仙游有人做网站,怎么推广自己的产品,北京网站开发建设,云阳如何做网站测试时关注到bw_costly_链 因为和iface有关。猜测这个链是动态生成的。 开关数据业务测试,果然关闭数据业务后,bw_OUTPUT中不再会调用bw_costly_rmnet_data3,也没有bw_costly_rmnet_data3这个链了。 再次打开数据业务后出现了bw_costly_rmnet…

测试时关注到bw_costly_链
因为和iface有关。猜测这个链是动态生成的。
开关数据业务测试,果然关闭数据业务后,bw_OUTPUT中不再会调用bw_costly_rmnet_data3,也没有bw_costly_rmnet_data3这个链了。
再次打开数据业务后出现了bw_costly_rmnet_data2。说明上次上网的rmnet_data3口,这此上网的rmnet_data2。

:/ # iptables -t filter -nvL bw_OUTPUT
Chain bw_OUTPUT (1 references)pkts bytes target     prot opt in     out     source               destination24  1909 bw_global_alert  all  --  *      *       0.0.0.0/0            0.0.0.0/02   120 bw_costly_rmnet_data3  all  --  *      rmnet_data3  0.0.0.0/0            0.0.0.0/0

是netd模块自己检测上网状态后,自己添加的吗?

查看代码是netd的BandwidthController生成。

int BandwidthController::setInterfaceQuota(const std::string& iface, int64_t maxBytes) {const std::string& cost = iface;
..../* Insert ingress quota. */auto it = mQuotaIfaces.find(iface);if (it != mQuotaIfaces.end()) {if (int res = updateQuota(cost, maxBytes)) {ALOGE("Failed update quota for %s", iface.c_str());removeInterfaceQuota(iface);return res;}it->second.quota = maxBytes;return 0;}const std::string chain = "bw_costly_" + iface;const int ruleInsertPos = (mGlobalAlertBytes) ? 2 : 1;std::vector<std::string> cmds = {"*filter",StringPrintf(":%s -", chain.c_str()),StringPrintf("-A %s -j bw_penalty_box", chain.c_str()),StringPrintf("-I bw_INPUT %d -i %s -j %s", ruleInsertPos, iface.c_str(), chain.c_str()),StringPrintf("-I bw_OUTPUT %d -o %s -j %s", ruleInsertPos, iface.c_str(),chain.c_str()),StringPrintf("-A bw_FORWARD -i %s -j %s", iface.c_str(), chain.c_str()),StringPrintf("-A bw_FORWARD -o %s -j %s", iface.c_str(), chain.c_str()),StringPrintf("-A %s -m quota2 ! --quota %" PRId64 " --name %s -j REJECT", chain.c_str(),maxBytes, cost.c_str()),"COMMIT\n",};if (iptablesRestoreFunction(V4V6, Join(cmds, "\n"), nullptr) != 0) {ALOGE("Failed set quota rule");removeInterfaceQuota(iface);return -EREMOTEIO;}mQuotaIfaces[iface] = QuotaInfo{maxBytes, 0};return 0;
}

netd 向上提供此接口,内部除了ndc模块通过控制台可以调用,没有自动关注网络状态,调用setInterfaceQuota的地方:

binder::Status NetdNativeService::bandwidthSetInterfaceQuota(const std::string& ifName,int64_t bytes) {NETD_LOCKING_RPC(gCtls->bandwidthCtrl.lock, PERM_NETWORK_STACK, PERM_MAINLINE_NETWORK_STACK);int res = gCtls->bandwidthCtrl.setInterfaceQuota(ifName, bytes);return statusFromErrcode(res);
}

继续在android代码中搜索:
framework的NetworkManagementService.java中调用
mNetdService.bandwidthSetInterfaceQuota

    public void setInterfaceQuota(String iface, long quotaBytes) {NetworkStack.checkNetworkStackPermission(mContext);synchronized (mQuotaLock) {if (mActiveQuotas.containsKey(iface)) {throw new IllegalStateException("iface " + iface + " already has quota");}try {// TODO: support quota shared across interfacesmNetdService.bandwidthSetInterfaceQuota(iface, quotaBytes);mActiveQuotas.put(iface, quotaBytes);} catch (RemoteException | ServiceSpecificException e) {throw new IllegalStateException(e);}synchronized (mTetheringStatsProviders) {for (ITetheringStatsProvider provider : mTetheringStatsProviders.keySet()) {try {provider.setInterfaceQuota(iface, quotaBytes);} catch (RemoteException e) {Log.e(TAG, "Problem setting tethering data limit on provider " +mTetheringStatsProviders.get(provider) + ": " + e);}}}}}

调用序列是:
NatworkManagementService:
NatworkManagementService.systemReady->prepareNativeDaemon()->setInterfaceQuota->mNetdService.bandwidthSetInterfaceQuota

下一步分析数据业务开关后,是什么流程触发NatworkManagementService的setInterfaceQuota和removeInterfaceQuota的调用。

参考链接:
Android系统中iptables的应用(二)BandwidthController https://blog.csdn.net/xiaokeweng/article/details/48810049

http://www.dinnco.com/news/6753.html

相关文章:

  • 中企动力值不值得入职搜索seo引擎
  • 做伊朗的外贸公司网站重庆网站建设维护
  • 西安seo关键字优化seo案例分析及解析
  • 手机网站规格运营推广
  • 成都网站建设 四川冠辰科技关键字查找
  • 网站开发数据中视频自媒体平台注册
  • 有什么可以做翻译的网站网站建设合同
  • 江苏外贸网站建设武汉搜索引擎排名优化
  • 搭建钓鱼网站教程torrentkitty磁力天堂
  • 网站logo上传百度网盘app下载
  • wordpress注册页面出错长沙官网seo收费
  • 整站优化案例做百度推广的网络公司
  • web网站开发安全性合肥网络推广服务
  • 专业的深圳网站建设公司bing搜索引擎国际版
  • asp网站源码免费版window优化大师
  • 移动开发的现状和前景百度推广优化排名
  • 有保障的广州网站建设线上销售平台有哪些
  • 做网站策划用什么软件找培训班一般在什么平台
  • 网站如何接广告国内推广平台有哪些
  • 禹城网站建设电话如何创建个人网页
  • 网站培训费用跨境电商营销推广
  • 网站制作台州企业网站模板设计
  • 武汉网站建设培训域名注册商
  • 做政协网站软件的公司怎么做网络营销推广
  • wordpress 千易网盘seo实战培训费用
  • 网络营销方式优势徐州seo网站推广
  • 平面设计图100张搜狗搜索引擎优化
  • 广告传媒公司简介ppt优化培训内容
  • 杨振峰网站开发seo教程 百度网盘
  • 斗牛app开发公司seo博客大全