zoukankan      html  css  js  c++  java
  • linux wake on lan功能通过ethtool配置【转】

    转自:https://blog.csdn.net/fanlilei/article/details/38042063

    ethtool工具中的wol功能一直很迷惑。今天看了代码将其帮助中下面的参数说明下,如果有不懂wake on lan的请自己到

    intel官网查下。

    p|u|m|b|a|g|s|d

            if (wolopts & WAKE_PHY)//物理接口
                *p++ = 'p';
            if (wolopts & WAKE_UCAST)//单播
                *p++ = 'u';
            if (wolopts & WAKE_MCAST)//多播
                *p++ = 'm';
            if (wolopts & WAKE_BCAST)//广播
                *p++ = 'b';
            if (wolopts & WAKE_ARP)//arp包
                *p++ = 'a';
            if (wolopts & WAKE_MAGIC)//magic 包
                *p++ = 'g';
            if (wolopts & WAKE_MAGICSECURE)//magic 加密包
                *p++ = 's';

    d很明显了是关闭。


    ethtool.c: if (adapter->wol & E1000_WUFC_EX)
    ethtool.c:  wol->wolopts |= WAKE_UCAST; u
    ethtool.c: if (adapter->wol & E1000_WUFC_MC)
    ethtool.c:  wol->wolopts |= WAKE_MCAST; m
    ethtool.c: if (adapter->wol & E1000_WUFC_BC)
    ethtool.c:  wol->wolopts |= WAKE_BCAST; b
    ethtool.c: if (adapter->wol & E1000_WUFC_MAG)
    ethtool.c:  wol->wolopts |= WAKE_MAGIC; g
    ethtool.c: if (adapter->wol & E1000_WUFC_LNKC)
    ethtool.c:  wol->wolopts |= WAKE_PHY;  p
    ethtool.c: if (adapter->wol & E1000_WUFC_ARP)
    ethtool.c:  wol->wolopts |= WAKE_ARP;  a
    ethtool.c:static int e1000_set_wol(struct net_device *netdev,
    ethtool.c:    struct ethtool_wolinfo *wol)
    ethtool.c:     (wol->wolopts & ~(WAKE_UCAST | WAKE_MCAST | WAKE_BCAST |
    ethtool.c: adapter->wol = 0;
    ethtool.c: if (wol->wolopts & WAKE_UCAST)
    ethtool.c:  adapter->wol |= E1000_WUFC_EX;
    ethtool.c: if (wol->wolopts & WAKE_MCAST)
    ethtool.c:  adapter->wol |= E1000_WUFC_MC;
    ethtool.c: if (wol->wolopts & WAKE_BCAST)
    ethtool.c:  adapter->wol |= E1000_WUFC_BC;
    ethtool.c: if (wol->wolopts & WAKE_MAGIC)
    ethtool.c:  adapter->wol |= E1000_WUFC_MAG;
    ethtool.c: if (wol->wolopts & WAKE_PHY)
    ethtool.c:  adapter->wol |= E1000_WUFC_LNKC;
    ethtool.c: if (wol->wolopts & WAKE_ARP)
    ethtool.c:  adapter->wol |= E1000_WUFC_ARP;
    ---------------------
    作者:尖椒炒肉
    来源:CSDN
    原文:https://blog.csdn.net/fanlilei/article/details/38042063
    版权声明:本文为博主原创文章,转载请附上博文链接!

  • 相关阅读:
    如果int x=20, y=5,则语句System.out.println(x+y +""+(x+y)+y); 的输出结果是()
    子父类存在同名成员时super的使用条件
    7mysql高级查询
    1udp编程
    6mysql外键
    4mysql数据表增删改查
    5mysql数据类型
    3mysql数据库操作
    2mysql基本使用
    1mysql安装
  • 原文地址:https://www.cnblogs.com/sky-heaven/p/11132698.html
Copyright © 2011-2022 走看看