LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-17-2017, 04:38 AM   #1
SAGARSINGHA
LQ Newbie
 
Registered: Aug 2016
Posts: 12

Rep: Reputation: Disabled
Difference between netdev_rx_handler_register() and dev_add_pack()


Hi,
Can any one explain what is the difference between netdev_rx_handler_register() and dev_add_pack() as both of these two APIs are used to register the handler to handle the received packets??

where and in which context I should used which one??

Thanks in Advance!!
 
Old 08-18-2017, 04:19 PM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,126
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
iirc netdev_rx_handler_register is registering to handle incoming packets on a specific network device and dev_add_pack() puts the handler in the chain of handlers for the passed in protocol type.

So if you wanted to look at all the incoming on say eth0 then use netdev_rx_handler_register, if you are looking for say udp packets and you don't care what device it's coming from use dev_add_pack
 
1 members found this post helpful.
Old 08-21-2017, 05:46 AM   #3
SAGARSINGHA
LQ Newbie
 
Registered: Aug 2016
Posts: 12

Original Poster
Rep: Reputation: Disabled
Thnaks estabroo for your kind response.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Making a Difference; Selling a Difference LXer Syndicated Linux News 0 09-23-2010 05:00 AM
shell script to find the difference betwwn two file and place the difference to other kittunot4u Linux - General 3 07-19-2010 04:26 AM
Usage of dev_add_pack() for writing a sniffer application gauravholey Linux - Kernel 2 07-26-2009 04:38 AM
What is the difference between the two? YESnewbie2linux SUSE / openSUSE 4 02-12-2007 06:45 AM
Difference? Jongi Linux - Newbie 4 08-22-2003 02:21 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 06:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration