Thread: problem in network driver

  1. #1
    Registered User
    Join Date
    Sep 2017
    Posts
    4

    problem in network driver

    hello,

    How to install realtek so that I can write a network driver on it ?
    Given that I have two network cards on my Ubuntu, I want to sniff from a network traffic card and send it to another network card. How do I do this?
    Does it do this by writing a network driver?

  2. #2
    Registered User
    Join Date
    Sep 2017
    Posts
    4
    i get help for this problem from this link:
    Writing Network Device Drivers for Linux LG #156

    but when i running it ؛give this error:
    Makefile:4:recipe for target 'all' failed
    make: *** [all] Error 2
    get error from this line :
    pdev = pci_find_device(REALTEK_VENDER_ID, REALTEK_DEVICE_ID, NULL);
    please help ...

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    What's the actual error message?
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Registered User
    Join Date
    Sep 2017
    Posts
    4
    get error from realtek_vender_ID
    .
    didnt know this line : pdev = pci_find_device(REALTEK_VENDER_ID, REALTEK_DEVICE_ID, NULL);

    . how to add or install realtek ?




  5. #5
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    Well since it's usually spelt REALTEK_VENDOR_ID, perhaps you can begin with spelling.

    Even more likely to be so if you didn't get the same error for REALTEK_DEVICE_ID.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  6. #6
    Registered User
    Join Date
    Sep 2017
    Posts
    4
    Code:
    #define REALTEK_VENDER_ID  0x10EC#define REALTEK_DEVICE_ID   0x8139
    
    #include <linux/kernel.h>
    #include <linux/module.h>
    #include <linux/stddef.h>
    #include <linux/pci.h>
    int init_module(void)
    {
        struct pci_dev *pdev;
        pdev = pci_find_device(REALTEK_VENDER_ID, REALTEK_DEVICE_ID, NULL);
        if(!pdev)
            printk("<1>Device not found\n");
        else
            printk("<1>Device found\n");
        return 0; }
    this is my code

  7. #7
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,659
    How to write Makefile for compiling simple pgm in rt patch 2.6.24.4
    An 8 year old article which tells you pci_find_device is already obsolete.
    Maybe you need a better reference to copy from.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. hi how to check my serial port is intrupt driver or poll driver?
    By nkrao123@gmail. in forum Networking/Device Communication
    Replies: 5
    Last Post: 09-19-2011, 11:20 PM
  2. [C++] USB gadget driver, unbound kernel driver?
    By Jelte in forum C++ Programming
    Replies: 0
    Last Post: 01-13-2010, 08:53 AM
  3. Replies: 6
    Last Post: 05-15-2007, 10:47 PM
  4. Driver Problem
    By todd14 in forum C Programming
    Replies: 3
    Last Post: 04-04-2007, 11:46 PM
  5. Really Weird Driver Problem
    By Davros in forum Tech Board
    Replies: 0
    Last Post: 09-10-2003, 06:17 PM

Tags for this Thread