[newbie] Net::Pcap

D

David Vallner

I was thinking of cutting my ruby baby teeth on making something
actually generally useful. So I wonder: Would anyone find a libpcap
extension any useful? If so, I'd welcome any advice on how to start,
possibly some pointers on writing C extensions, or any decent examples
of DL usage.

David
(as likkle a Ruby newbie as they get)
 
T

Timothy Hunter

David said:
I was thinking of cutting my ruby baby teeth on making something
actually generally useful. So I wonder: Would anyone find a libpcap
extension any useful? If so, I'd welcome any advice on how to start,
possibly some pointers on writing C extensions, or any decent examples
of DL usage.

David
(as likkle a Ruby newbie as they get)

For C extensions check out README.EXT in the Ruby distribution, Chapter
21 "Extending Ruby" in the Pickaxe 2nd ed., the builtin classes
(array.c, string.c, etc.) and C extensions that come with Ruby.
 
E

Eric Hodel

I was thinking of cutting my ruby baby teeth on making something
actually generally useful. So I wonder: Would anyone find a libpcap
extension any useful?

There's this one:

http://www.goto.info.waseda.ac.jp/~fukusima/ruby/pcap-e.html

Not that that should stop you!
If so, I'd welcome any advice on how to start, possibly some
pointers on writing C extensions, or any decent examples of DL usage.

If you're going to write a C extension, use RubyInline:

http://www.zenspider.com/ZSS/Products/RubyInline/

It lets you avoid all the boring parts and focus on the fun.
 
D

David Vallner

Eric said:
There's this one:

http://www.goto.info.waseda.ac.jp/~fukusima/ruby/pcap-e.html

Not that that should stop you!

Well, what do you know. I'll go off and see about something else;
pondering a web service to serve sudoku puzzles to J2ME clients and
track solver statistics...

Thanks for the link though, that should come in unbelievably handy next
semester, even though I'll probably give the instructor a heart attack
by using a library that already does packet parsing.
If you're going to write a C extension, use RubyInline:

http://www.zenspider.com/ZSS/Products/RubyInline/

It lets you avoid all the boring parts and focus on the fun.
Oooh. Aaah. I hope boring parts include "getting the stuff to compile
using the MSVC++ toolkit". I admit I'm a very bad C programmer when it
comes to gory details like writing proper makefiles.

Cheers for all!

David Vallner
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,176
Messages
2,570,947
Members
47,498
Latest member
log5Sshell/alfa5

Latest Threads

Top