Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > comp.os.linux.development.system > #601

Re: how to create a interrupt service function in c for real time linux operating system?

From Joe Beanfish <joebeanfish@nospam.duh>
Newsgroups comp.os.linux.development.system
Subject Re: how to create a interrupt service function in c for real time linux operating system?
Date 2014-03-27 13:14 +0000
Organization A noiseless patient Spider
Message-ID <lh188f$p55$1@dont-email.me> (permalink)
References <19fd3278-9abf-4759-bb81-179e1e26ffb2@googlegroups.com> <lgukfa$3m2$1@dont-email.me> <6e96548b-5cf7-45c0-b3a5-bf545c677865@googlegroups.com>

Show all headers | View raw


On Thu, 27 Mar 2014 00:25:04 -0700, Hemanth Venkatappa wrote:

> On Wednesday, 26 March 2014 14:24:57 UTC+1, Tauno Voipio  wrote:
>> On 26.3.14 10:46, Hemanth Venkatappa wrote:
>> > Scenario : Client is sending a data and the server is receving the
>> > data from client via ethernet layer (udp). When the server receives a
>> > data from the client on the ip layer (kernel). It interrupts the
>> > kernel and kernel as to execute the data by the client, so I want to
>> > create a interrupt service function to catch the interrupt from the
>> > network service card.
>> >
>> > could someone help me how to go about it ?
>> 
>> If you want to catch a copy of the incoming packet stream,
>> have a look at libpcap (packet capture library). There
>> is no sense to re-invent a wheel.
>> 
>> If it is something else, please explain in more details
>> what you're attempting to achieve.
>> 
>> For an one-time use, tcpdump -w will capture the data
>> and store it into a file for later inspection.
>> 
>> --
>> 
>> Tauno Voipio
> 
> 
> Where to write a interrupt handler and how to register with kernel in
> linux?
> 
> [snip exact repeat of original post]
> 
> I can't write kernel modules (the kernel is not open) and you have
> real-time in user-space. However I can write code using RTLinux (real
> time linux) in kernel space and with kernel modules.

So basically you want to reinvent the ethernet device driver for your
network card. Get all the detailed specs for that hardware and a good
book on writing linux device drivers.

Or take the sensible route and leverage the existing ethernet device
driver with libpcap as previously suggested. You can read the source
for libpcap if you want to learn how to do it yourself.

Back to comp.os.linux.development.system | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-03-26 01:46 -0700
  Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-03-26 15:24 +0200
    Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-03-27 00:25 -0700
      Re: how to create a interrupt service function in c for real time linux operating system? Joe Beanfish <joebeanfish@nospam.duh> - 2014-03-27 13:14 +0000
      Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-03-27 17:30 +0200
        Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-04-01 01:56 -0700
          Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-01 14:10 +0300
            Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-04-01 22:21 -0700
              Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-02 08:44 +0300
                Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-04-02 05:27 -0700
                Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-02 17:50 +0300
                Re: how to create a interrupt service function in c for real time linux operating system? Hemanth Venkatappa <hemanthvenkatappa@gmail.com> - 2014-04-02 08:46 -0700
                Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-02 21:49 +0300
                Re: how to create a interrupt service function in c for real time linux operating system? Richard Kettlewell <rjk@greenend.org.uk> - 2014-04-02 23:13 +0100
                Re: how to create a interrupt service function in c for real time linux operating system? Tauno Voipio <tauno.voipio@notused.fi.invalid> - 2014-04-03 08:59 +0300

csiph-web