This concept of interface allows the Linux kernel to use networking functions without knowing much of the real implementation made by the driver.

Author : Pjmdef21
Publish Date : 2021-01-09 18:46:42


This concept of interface allows the Linux kernel to use networking functions without knowing much of the real implementation made by the driver.

Studying network programming, I understood how to use Linux sockets in order to communicate with other systems/computers. I also studied a lot of higher level technologies built on top of sockets such as http, ssh, ftp.
I wrote this blog post while improving my understanding of Linux kernel networking features, from a socket to a NIC.
Plan
I) The Network Interface Controller (NIC)
II) The Network Interface
III) From socket to NIC
IV) Network interface functions
I) The Network Interface Controller (NIC)
According to Wikipedia; a NIC is a hardware component connecting a computer to a computer network.
Image for post
An ethernet NIC
If your computer doesn’t have a NIC, you cannot communicate with other computers.
Indeed you are isolated from the rest of the world (private and public networks).
So the first thing to do is to plug a NIC on the motherboard.
(If you want to connect to the internet thanks to wifi, you’ll need to plug a second NIC: a wifi NIC).
NICs are connected to the computer thanks to the PCI ports of the motherboard.
Image for post
PCI ports on a motherboard
On this Linux computer I only have 1 NIC plugged (wireless):
Image for post
The ‘lspci’ command shows hardware connected to PCI ports
The command above shows us that a NIC device (also called adapter) is plugged on the motherboard.
It is not possible to use it directly for the moment. A network driver must be installed and activated on our computer.
II) The Network Interface
“Linux Network Interface” is a category of drivers made for networking communications.
The Linux network interface defines a set of functions which must be implemented by the driver in order to be used by the kernel as a network driver.
This concept of interface allows the Linux kernel to use networking functions without knowing much of the real implementation made by the driver.

https://www.woodloch.com/hie/tfe/videos-sew-v-ram-liv-hq-tvs1.html
https://www.woodloch.com/hie/tfe/videos-sew-v-ram-liv-hq-tvs2.html
https://www.woodloch.com/hie/tfe/videos-sew-v-ram-liv-hq-tvs3.html
https://www.woodloch.com/hie/tfe/videos-sew-v-ram-liv-hq-tvs4.html
https://www.woodloch.com/hie/tfe/videos-sew-v-ram-liv-hq-tvs5.html
https://www.woodloch.com/hie/tfe/videos-sew-v-ram-liv-hq-tvs6.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-1.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-10.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-11.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-12.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-2.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-3.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-4.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-5.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-6.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-7.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-8.html
https://www.woodloch.com/toc/rot/e-video-seahawks-vs-rams-nfl-wild-card-round-live-9.html


Among every existing drivers, most implement either:
The “char device interface” (e.g: mouse, keyboard).
A driver implementing this interface is available as a special file located somewhere in the “/dev” folder.
The “block device interface” (e.g: disks).


The Rams vs Seahawks live stream features divisional opponents taking their rivalry to the postseason. In their two matchups this season, the home team has won each time. The Seahawks will hold that advantage for this NFL live stream, Saturday at Lumen field where they have lost just once this season.

Seattle quarterback Russell Wilson is coming off a career year with 40 touchdown passes and will be in pursuit of his second Super Bowl ring. Wilson has made the playoffs in eight of his nine seasons in the league with a record of 9-6 over that span. The (10-6) Rams visit the (12-4) Seahawks today as 3.5-point underdogs.

And the best streaming devices for watching the games
The 63 best Netflix shows and TV series
Wilson leads one of the best passing attacks in the NFL. Seattle is the only team in the league with two wide receivers that have over 1,000 yards and at least 10 touchdowns. Those WRs are second year wide receiver D.K. Metcalf and 5th year wide out Tyler Lockett. Metcalf was named to his first Pro Bowl this season.  

As good as their passing attack has been, the Seahawks’ pass defense has been awful. Seattle allowed the second most passing yards this season and a weak secondary could be exactly what the Rams need to face this week.

The Rams franchise quarterback Jared Goff missed last week’s 18-7 playoff clinching win over the Cardinals with a broken thumb on his throwing hand. Rookie John Wolford started in Goff’s place and was less than spectacular. With Goff out, Los Angeles’ defense stepped up recording a safety and a defensive touchdown on a Troy Hill 84-yard interception return. The Rams are optimistic that Goff will be ready to go come game time. LA wide receiver Robert Woods said Goff was, “slinging the ball pretty well” at practice this week.

 

A driver implementing this interface is available as a special file located somewhere in the “/dev” folder.
The “network device interface” (the interesting one in our case).
A driver implementing this interface is different from the previous ones as it doesn’t have a “file” entry in our filesystem.
Network drivers have to implement the Network device interface to be considered as “network interfaces” by the OS.
The “ifconfig” linux command shows our current activated network interfaces.



Category : general

Negative energy acts like a vacuum. It sucks you in. Quitting your addiction to negative energy is like quitting cigaret

Negative energy acts like a vacuum. It sucks you in. Quitting your addiction to negative energy is like quitting cigaret

- Just as bomber pilot Billy Mitchell demonstrated in 1921 that battleships were too vulnerable to air attack, forward-thinking military leaders have known for years that the battlefield utility of the


Taiwan Prosecutors Seek Arrest Warrant for Suspect in Deadly Train Crash

Taiwan Prosecutors Seek Arrest Warrant for Suspect in Deadly Train Crash

- Taiwanese prosecutors have sought an arrest warrant for a construction site manager whose truck is believed to have caused a train accident in which


100% Success with Latest Microsoft AZ-220 Exam Questions

100% Success with Latest Microsoft AZ-220 Exam Questions

- reason why father and mother pick to teach their minimal kinds as part of Microsoft Azure IoT Developer Specialty Microsoft AZ-220 Microsoft Azure IoT Develo


Pass DMI PDDM Exam Questions In First Attempt

Pass DMI PDDM Exam Questions In First Attempt

- CertsLeads enables you to prepare your certification exams, Get most actual and updated exam questions PDF for passing the certifications exam in first attempt