zoukankan      html  css  js  c++  java
  • Linux 网卡设备驱动程序设计(3)

    三。网络子系统深度分析

      用户程序通过网络发送这个网络数据包

      通过

          SCI

          协议无关接口

          协议栈 《   UDP的实现  会选择路由

              《    IP的实现   会建立这个邻居子系统,建立邻居信息

          设备无关接口

          驱动

      函数调用关系(对应上面)

          socket_file_ops

          do_sock_write

          _sock_sendmsg

          (SCI 接口)

          

          udp_sendmsg(路由ip_route_output_flow)

          udp_push_pending_frames

          (选择路由)

          

          ip_push_penging_frames

          ip_local_out(实现防火墙)

          dst_output

          ip_finish_output

          ip_finish_output2(dev->neighbour->output)

          // 邻居子系统

          arp_generic_ops->neigh_resolve_output

          (建立邻居子系统)

          

          dev_queue_xmit

          dev_hard_start_xmit

          (协议无关接口)

        

          dev->netdev_ops->ndo_start_xmit

          (驱动)

          

      2.网卡收到数据包如何交给用户来处理

          收到函数Receive()

          会产生一个中断

          1. 接受

            (1). 从硬件中读取数据到SKB中

            (2).调用Netif_rx()函数

          2.

  • 相关阅读:
    <html>
    Android逆向之旅---带你爆破一款应用的签名验证问题
    Android Studio关于USB device not found的解决的方法
    在eclipse中使用github进行代码的上传操作以及如何建立分支
    eclipse 代码上传github 笔记
    如何从Eclipse导入github上的项目源码
    SourceTree的基本使用
    gradle配置国内镜像
    Gradle修改Maven仓库地址
    Gradle仓库配置
  • 原文地址:https://www.cnblogs.com/lvxiaoning/p/5080458.html
Copyright © 2011-2022 走看看