Linux Network card device driver programming (3)

Source: Internet
Author: User

Three. Deep analysis of network subsystem

The user program sends this network packet over the network

Pass

Sci

Protocol-Independent Interfaces

Protocol stack the implementation of UDP chooses the route

The implementation of IP will establish this neighbor subsystem and establish the neighbor information

Device-Independent interfaces

Driven

function call relationship (corresponds to above)

Socket_file_ops

Do_sock_write

_sock_sendmsg

(SCI interface)

      

Udp_sendmsg (Routing Ip_route_output_flow)

Udp_push_pending_frames

(select route)

      

Ip_push_penging_frames

Ip_local_out (Implement firewall)

Dst_output

Ip_finish_output

Ip_finish_output2 (Dev->neighbour->output)

Neighbor Subsystem

Arp_generic_ops->neigh_resolve_output

(Establish neighbor Subsystem)

      

Dev_queue_xmit

Dev_hard_start_xmit

(Protocol Independent Interface)

    

Dev->netdev_ops->ndo_start_xmit

Driver

      

2. How the NIC receives the packet to the user for processing

Received function receive ()

will produce an interrupt

1. Acceptance

(1). Read data from hardware to SKB

(2). Call the Netif_rx () function

2.

Linux Network card device driver programming (3)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.