* Re: network device driver
@ 2001-10-15 17:58 Mal hacker
0 siblings, 0 replies; 4+ messages in thread
From: Mal hacker @ 2001-10-15 17:58 UTC (permalink / raw)
To: Mehta, Phoram Kirtikumar (UMKC-Student); +Cc: linux-net, linux-kernel
Hello Kirti,
rather than doing it in kernel space why don't u do in userspace.
There's a lot of tools and libraries available! Take for example
tcpdump, ethereal, dniff and others as tools, libpcap (*nix packet
capturing library) or wincap (windows packet capturing library) and
many more. The kernel also provides a lot of other features via the
socket call to do these stuff. Could u please detail out what exactly
do u want to do and your major reason of getting inside the kernel ?
hope this helps..
mal
-------------------------------------------------------------------
On Sun, 14 Oct 2001, Mehta, Phoram Kirtikumar (UMKC-Student) wrote: >
1. how does ifconfig and netstat get teh net statistics, where can i
get
> the source to that funtion or source file. They are from /proc/net/.
> 2. is there any funtion in the network device driver source by
accessing
> which i can get the packets received or the type of packets. if not
can
> anybody gimme some tips on how can i write it. You can use a packet
filter. > i am trying to write or modify the eth device driver(3c509.c)
in such
a
> way that i can statistics of the traffic and then i also want to
> identify teh traffic. in short i want to incorporate a function in my
> driver which when acceseed would act as a sniffer/protocol analyzer .
> any help or advise will be appreciated. Do it in userspace with
packet filters. Look at tcpdump for example
code. Rasmus
=====
Image by FlamingText.com
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* network device driver
@ 2001-10-14 21:09 Mehta, Phoram Kirtikumar (UMKC-Student)
2001-10-15 7:14 ` Rasmus Bøg Hansen
0 siblings, 1 reply; 4+ messages in thread
From: Mehta, Phoram Kirtikumar (UMKC-Student) @ 2001-10-14 21:09 UTC (permalink / raw)
To: linux-net, linux-kernel
hello,
1. how does ifconfig and netstat get teh net statistics, where can i get
the source to that funtion or source file.
2. is there any funtion in the network device driver source by accessing
which i can get the packets received or the type of packets. if not can
anybody gimme some tips on how can i write it.
i am trying to write or modify the eth device driver(3c509.c) in such a
way that i can statistics of the traffic and then i also want to
identify teh traffic. in short i want to incorporate a function in my
driver which when acceseed would act as a sniffer/protocol analyzer .
any help or advise will be appreciated.
thanks,
phoram mehta
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: network device driver
2001-10-14 21:09 Mehta, Phoram Kirtikumar (UMKC-Student)
@ 2001-10-15 7:14 ` Rasmus Bøg Hansen
2001-10-15 7:56 ` Kirill Ratkin
0 siblings, 1 reply; 4+ messages in thread
From: Rasmus Bøg Hansen @ 2001-10-15 7:14 UTC (permalink / raw)
To: Mehta, Phoram Kirtikumar (UMKC-Student); +Cc: linux-net, linux-kernel
On Sun, 14 Oct 2001, Mehta, Phoram Kirtikumar (UMKC-Student) wrote:
> 1. how does ifconfig and netstat get teh net statistics, where can i get
> the source to that funtion or source file.
They are from /proc/net/.
> 2. is there any funtion in the network device driver source by accessing
> which i can get the packets received or the type of packets. if not can
> anybody gimme some tips on how can i write it.
You can use a packet filter.
> i am trying to write or modify the eth device driver(3c509.c) in such a
> way that i can statistics of the traffic and then i also want to
> identify teh traffic. in short i want to incorporate a function in my
> driver which when acceseed would act as a sniffer/protocol analyzer .
> any help or advise will be appreciated.
Do it in userspace with packet filters. Look at tcpdump for example
code.
Rasmus
--
-- [ Rasmus 'Møffe' Bøg Hansen ] ---------------------------------------
[...] Note that 120 sec is defined in the protocol as the maximum
possible RTT. I guess we'll have to use something other than TCP
to talk to the University of Mars.
--------------------------------- [ moffe at amagerkollegiet dot dk ] --
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: network device driver
2001-10-15 7:14 ` Rasmus Bøg Hansen
@ 2001-10-15 7:56 ` Kirill Ratkin
0 siblings, 0 replies; 4+ messages in thread
From: Kirill Ratkin @ 2001-10-15 7:56 UTC (permalink / raw)
To: Rasmus_Bøg_Hansen , Mehta, Phoram Kirtikumar (UMKC-Student)
Cc: linux-net, linux-kernel
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=us-ascii, Size: 1898 bytes --]
--- Rasmus_Bøg_Hansen <moffe@amagerkollegiet.dk>
wrote:
> On Sun, 14 Oct 2001, Mehta, Phoram Kirtikumar
> (UMKC-Student) wrote:
>
> > 1. how does ifconfig and netstat get teh net
> statistics, where can i get
> > the source to that funtion or source file.
>
> They are from /proc/net/.
Yeah, here you can find src of network utilities:
http://www.tazenda.demon.co.uk/phil/net-tools/
>
> > 2. is there any funtion in the network device
> driver source by accessing
> > which i can get the packets received or the type
> of packets. if not can
> > anybody gimme some tips on how can i write it.
>
> You can use a packet filter.
>
> > i am trying to write or modify the eth device
> driver(3c509.c) in such a
> > way that i can statistics of the traffic and then
> i also want to
> > identify teh traffic. in short i want to
> incorporate a function in my
> > driver which when acceseed would act as a
> sniffer/protocol analyzer .
> > any help or advise will be appreciated.
>
> Do it in userspace with packet filters. Look at
> tcpdump for example
> code.
Sure. Or ... to use netfilter hook functions (if you
can't use user space code)
>
> Rasmus
>
> --
> -- [ Rasmus 'Møffe' Bøg Hansen ]
> ---------------------------------------
> [...] Note that 120 sec is defined in the protocol
> as the maximum
> possible RTT. I guess we'll have to use something
> other than TCP
> to talk to the University of Mars.
> --------------------------------- [ moffe at
> amagerkollegiet dot dk ] --
>
> -
> To unsubscribe from this list: send the line
> "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at
> http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
__________________________________________________
Do You Yahoo!?
Make a great connection at Yahoo! Personals.
http://personals.yahoo.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2001-10-15 17:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-10-15 17:58 network device driver Mal hacker
-- strict thread matches above, loose matches on Subject: below --
2001-10-14 21:09 Mehta, Phoram Kirtikumar (UMKC-Student)
2001-10-15 7:14 ` Rasmus Bøg Hansen
2001-10-15 7:56 ` Kirill Ratkin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®