Thread: Accessing Network Driver Functions directly from user application

  1. #1
    Registered User
    Join Date
    May 2007
    Posts
    4

    Question Accessing Network Driver Functions directly from user application

    Hi All,
    Iam Ram, I need some help in device driver development.

    I wrote a network device driver. I want to access the driver directly from my user application...

    i.e. I am not interested in using socket api(socket,bind,connect etc) to get access to my network driver.

    what I want is to access the Network driver functions so that i can pass the arguments which are expected for open,close,hard_transmit and all other net structure functions...

    I am trying to provide my own api....so that they can be used in user applications.

    is it possible to do it.....please help me out.....

    Always Urs,
    Ram.

  2. #2
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Why not invent some ioctl() calls and communicate that way? That's how everything else in the universe works.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    Or expose some custom device.

    Although I really have to wonder why you would want such a thing.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Registered User
    Join Date
    May 2007
    Posts
    4
    Quote Originally Posted by CornedBee View Post
    Or expose some custom device.

    Although I really have to wonder why you would want such a thing.
    thanx cornetBee for ur response.

    can you be little bit clear and explain me more how to expose custom device....

    I am doing some project in LDD .As part of it I need it.

    Always Urs,
    Ram

  5. #5
    Registered User
    Join Date
    May 2007
    Posts
    4

    help

    Quote Originally Posted by brewbuck View Post
    Why not invent some ioctl() calls and communicate that way? That's how everything else in the universe works.
    hi Brewbuck,
    thanx for ur advice . but i want to tell u some thing.

    In order to use ioctl calls I need a handler to the driver.

    int ioctl(int fildes, int request, ... /* arg */);

    The fildes argument is an open file descriptor that refers to a device.

    This is obtained only by using the Socket api (socket open)for network drivers , which I dont want to use.
    do u know any way to get the handle for the network driver.
    if you know please tell me.

    Always Urs,
    Ram.

  6. #6
    Officially An Architect brewbuck's Avatar
    Join Date
    Mar 2007
    Location
    Portland, OR
    Posts
    7,396
    Quote Originally Posted by rkanna View Post
    This is obtained only by using the Socket api (socket open)for network drivers , which I dont want to use.
    do u know any way to get the handle for the network driver.
    if you know please tell me.
    Give it a major/minor device number and bind it to a name in /dev just like any other device? Then the app can get a handle by opening /dev/your_device.

    In other words, do it how everybody else does it.

  7. #7
    Registered User
    Join Date
    May 2007
    Posts
    4

    Smile Thanx but....

    Quote Originally Posted by brewbuck View Post
    Give it a major/minor device number and bind it to a name in /dev just like any other device? Then the app can get a handle by opening /dev/your_device.

    In other words, do it how everybody else does it.
    Hi brewbuck,
    so u are asking me to convert char device drivers because they only have major and minor numbers.
    which i can't do it.....

    I want my driver to be Network driver and access it using my own functions api's.
    can u suggest some other solution.....


    Always Urs,
    Ram

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Instant messenger app help
    By AusTex in forum C Programming
    Replies: 2
    Last Post: 05-01-2005, 12:41 AM
  2. SSH Hacker Activity!! AAHHH!!
    By Kleid-0 in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 03-06-2005, 03:53 PM
  3. Help! User defined functions
    By AdrenalinFlow in forum C Programming
    Replies: 3
    Last Post: 02-22-2003, 07:36 PM
  4. Contest Results - May 27, 2002
    By ygfperson in forum A Brief History of Cprogramming.com
    Replies: 18
    Last Post: 06-18-2002, 01:27 PM
  5. Serial Communications in C
    By ExDigit in forum Windows Programming
    Replies: 7
    Last Post: 01-09-2002, 10:52 AM