Android 11.0 以太网设置默认静态ip地址

1.概述

在11.0的系统rom开发过程中,在进行以太网产品开发的过程中,有功能要求设置默认静态ip地址的功能,不使用动态ip,
方便ip地址管理所以就需要熟悉以太网的ip设置流程,然后设置对应的ip地址就可以了

2.以太网设置默认静态ip地址的相关代码

     frameworks\opt\net\ethernet\java\com\android\server\ethernet\EthernetServiceImpl.java
      frameworks\opt\net\ethernet\java\com\android\server\ethernet\EthernetService.java
      frameworks\opt\net\ethernet\java\com\android\server\ethernet\EthernetConfigStore.java

3.以太网设置默认静态ip地址的功能分析和实现
3.1 EthernetService.java以太网服务的功能分析

    public final class EthernetService extends SystemService {
     
        private static final String TAG = "EthernetService";
        final EthernetServiceImpl mImpl;
     
        public EthernetService(Context context) {
            super(context);
            mImpl = new EthernetServiceImpl(context);
        }
     
        @Override
        public void onStart() {
       

猜你喜欢

转载自blog.csdn.net/baidu_41666295/article/details/130493763