gpt4 book ai didi

c - IFF_UP 和 IFF_RUNNING 有什么区别?

转载 作者:IT王子 更新时间:2023-10-29 00:21:51 24 4
gpt4 key购买 nike

这两个标志经常一起设置。它们有什么区别?

最佳答案

来自 Linux Device Drivers 3 :

IFF_UP This flag is read-only for the driver. The kernel turns it on when the interface is active and ready to transfer packets.

...

IFF_RUNNING

This flag indicates that the interface is up and running. It is mostly present for BSD compatibility; the kernel makes little use of it. Most network drivers need not worry about IFF_RUNNING.

再深入一点,似乎有一个显着差异:

IFF_RUNNING 应该反射(reflect)网络接口(interface)上的操作状态,而不是其管理状态。举个例子,一个以太网接口(interface)可能被管理员UP(例如ifconfig eth0 up),但它不会被认为是可操作的(即RUNNING 根据 RFC2863)如果电缆未插入。

关于c - IFF_UP 和 IFF_RUNNING 有什么区别?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11679514/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com