int(*ndo_change_mtu)(struct net_device *dev, int new_mtu); int(*ndo_neigh_setup)(struct net_device *dev, struct neigh_parms *); #define HAVE_TX_TIMEOUT void(*ndo_tx_timeout) (struct net_device *dev); struct net_device_stats* (*ndo_get_stats)(struct net_device *dev); void(*...
对于一个网络设备来说,Linux 的操作和硬件设备的响应本身也需要一套规范,Linux 将其抽象为 net_device_ops 这个结构体,如果你对设备驱动感兴趣,那主要就是和它打交道,依然以 Veth 设备为例: static const struct net_device_ops veth_netdev_ops = { .ndo_init = veth_dev_init, .ndo_open = veth_open...
*/ u32 hash_mix; // lo 网络设备 struct net_device *loopback_dev; /* The loopback */ /* core fib_rules */ struct list_head rules_ops; struct netns_core core; struct netns_mib mib; struct netns_packet packet; struct netns_unix unx; struct netns_nexthop nexthop; struct netns_ipv4...
每个phy 芯片会创建一个 struct phy_device 类型的设备,对应的有 struct phy_driver 类型的驱动,这两者实际上是挂载在 mdio_bus_type 总线上的,mac 会被注册成 struct net_device。 phy_devicestructphy_device{ structphy_driver*drv;// PHY设备驱动 structmii_bus*bus;// 对应的MII总线 structdevicedev;//...
9、对一个struct net_device以太网网络设备进行初始化: void ether_setup(struct net_device *dev); EXPORT_SYMBOL(ether_setup); 1conststructheader_ops eth_header_ops ___cacheline_aligned ={2.create =eth_header,3.parse =eth_header_parse,4.rebuild =eth_rebuild_header,5.cache =eth_header_cache...
1//文件:net/core/netfilter.c23intnf_hook_slow(intpf, unsignedinthook,structsk_buff *skb,4structnet_device *indev,structnet_device *outdev,5int(*okfn)(structsk_buff *))6{7structlist_head *elem;8unsignedintverdict;9intret =0;1011elem = &nf_hooks[pf][hook];//获取要调用的钩子函数链表...
dst_entry{ struct dst_entry *next; atomic_t __refcnt; int __use; struct dst_entry *child; struct net_device...
PAGE_TYPE_OPS(Kmemcg, kmemcg) PAGE_TYPE_OPS(Table, table) PAGE_TYPE_OPS(Guard, guard) 例如以PG_buddy为用例: PageBuddy:表明PG_buddy位是否设置,如果设置返回true,否则返回false。 _SetPageBuddy: 设置PG_buddy标志位位1。 _ClearPageBuddy:清除PG_buddy标记位。
2 changes: 1 addition & 1 deletion2net/wireless/rdev-ops.h Original file line numberDiff line numberDiff line change @@ -173,7 +173,7 @@ static inline int rdev_start_ap(struct cfg80211_registered_device *rdev, staticinlineintrdev_change_beacon(structcfg80211_registered_device*rdev, ...
@@ -236,6 +236,31 @@ static inline void netdev_set_gro_flush_timeout(struct net_device *netdev, netdev->napi_config[i].gro_flush_timeout = timeout; } /** * napi_get_irq_suspend_timeout - get the irq_suspend_timeout * @n: napi struct to get the irq_suspend_timeout from ...