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) {

本文介绍了在Android 11.0系统开发中,如何为以太网设置默认静态IP地址,以替代动态IP。重点分析了EthernetService和EthernetServiceImpl的代码,以及由于API变化在EthernetConfigStore中进行的修改,以实现静态IP配置功能。
订阅专栏 解锁全文
915

被折叠的 条评论
为什么被折叠?



